Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
store-system
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
luoyangfei
store-system
Commits
c86da07b
Commit
c86da07b
authored
Nov 07, 2018
by
wangyihao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改 排序,新增接口
parent
eb9406ce
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
102 additions
and
12 deletions
+102
-12
AdministratorsController.java
...a/cn/com/fqy/controller/mgt/AdministratorsController.java
+22
-1
StoreController.java
.../main/java/cn/com/fqy/controller/mgt/StoreController.java
+22
-1
WorkerController.java
...main/java/cn/com/fqy/controller/mgt/WorkerController.java
+25
-0
SysUser.java
...e-system/src/main/java/cn/com/fqy/core/model/SysUser.java
+17
-6
StoreMapper.xml
...-system/src/main/resources/mybatis/mapper/StoreMapper.xml
+1
-1
SysUserMapper.xml
...ystem/src/main/resources/mybatis/mapper/SysUserMapper.xml
+14
-2
WorkerMapper.xml
...system/src/main/resources/mybatis/mapper/WorkerMapper.xml
+1
-1
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/AdministratorsController.java
View file @
c86da07b
package
cn
.
com
.
fqy
.
controller
.
mgt
;
package
cn
.
com
.
fqy
.
controller
.
mgt
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
...
@@ -12,6 +14,7 @@ import cn.com.fqy.core.common.BaseController;
...
@@ -12,6 +14,7 @@ import cn.com.fqy.core.common.BaseController;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Administrators
;
import
cn.com.fqy.core.model.Administrators
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.service.AdministratorsService
;
import
cn.com.fqy.core.service.AdministratorsService
;
@Controller
@Controller
@RequestMapping
(
"administrators"
)
@RequestMapping
(
"administrators"
)
...
@@ -70,7 +73,25 @@ public class AdministratorsController extends BaseController{
...
@@ -70,7 +73,25 @@ public class AdministratorsController extends BaseController{
administrators
.
setIsDeleted
(
1
);
administrators
.
setIsDeleted
(
1
);
administrators
.
setAdministratorsId
(
administratorsId
);
administrators
.
setAdministratorsId
(
administratorsId
);
return
administratorsService
.
updateAdministrators
(
administrators
,
getOperator
());
return
administratorsService
.
updateAdministrators
(
administrators
,
getOperator
());
}
/**
* 获取店铺信息
*/
@RequestMapping
(
"getAdministrators"
)
@ResponseBody
public
ResultInfo
<
List
<
Administrators
>>
getAdministrators
(){
ResultInfo
<
List
<
Administrators
>>
result
=
new
ResultInfo
<>();
Administrators
administrators
=
new
Administrators
();
administrators
.
setIsDeleted
(
0
);
List
<
Administrators
>
administratorsList
=
administratorsService
.
getAdministratorsList
(
new
Query
(
administrators
));
if
(
administratorsList
.
size
()>
0
)
{
result
.
setCode
(
"1"
);
result
.
setData
(
administratorsList
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无店铺管理员数据"
);
}
return
result
;
}
}
}
}
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/StoreController.java
View file @
c86da07b
package
cn
.
com
.
fqy
.
controller
.
mgt
;
package
cn
.
com
.
fqy
.
controller
.
mgt
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
...
@@ -69,7 +71,26 @@ public class StoreController extends BaseController {
...
@@ -69,7 +71,26 @@ public class StoreController extends BaseController {
store
.
setIsDeleted
(
1
);
store
.
setIsDeleted
(
1
);
store
.
setStoreId
(
storeId
);
store
.
setStoreId
(
storeId
);
return
storeService
.
updateStore
(
store
,
getOperator
());
return
storeService
.
updateStore
(
store
,
getOperator
());
}
/**
* 获取店铺信息
*/
@RequestMapping
(
"getStores"
)
@ResponseBody
public
ResultInfo
<
List
<
Store
>>
getStores
(){
ResultInfo
<
List
<
Store
>>
result
=
new
ResultInfo
<>();
Store
store
=
new
Store
();
store
.
setIsDeleted
(
0
);
store
.
setIsAuditing
(
1
);
List
<
Store
>
storeList
=
storeService
.
getStoreList
(
new
Query
(
store
));
if
(
storeList
.
size
()>
0
)
{
result
.
setCode
(
"1"
);
result
.
setData
(
storeList
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无店铺数据"
);
}
return
result
;
}
}
}
}
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/WorkerController.java
View file @
c86da07b
package
cn
.
com
.
fqy
.
controller
.
mgt
;
package
cn
.
com
.
fqy
.
controller
.
mgt
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
...
@@ -10,6 +12,7 @@ import cn.com.fqy.common.Operator;
...
@@ -10,6 +12,7 @@ import cn.com.fqy.common.Operator;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.core.common.BaseController
;
import
cn.com.fqy.core.common.BaseController
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Administrators
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Worker
;
import
cn.com.fqy.core.model.Worker
;
import
cn.com.fqy.core.service.WorkerService
;
import
cn.com.fqy.core.service.WorkerService
;
...
@@ -71,4 +74,26 @@ public class WorkerController extends BaseController {
...
@@ -71,4 +74,26 @@ public class WorkerController extends BaseController {
worker
.
setWorkerId
(
workerId
);
worker
.
setWorkerId
(
workerId
);
return
workerService
.
updateWorker
(
worker
,
getOperator
());
return
workerService
.
updateWorker
(
worker
,
getOperator
());
}
}
/**
* 获取员工信息
*/
@RequestMapping
(
"getWorkers"
)
@ResponseBody
public
ResultInfo
<
List
<
Worker
>>
getWorkers
(){
ResultInfo
<
List
<
Worker
>>
result
=
new
ResultInfo
<>();
Worker
worker
=
new
Worker
();
worker
.
setIsDeleted
(
0
);
worker
.
setIsAuditing
(
1
);
List
<
Worker
>
workerList
=
workerService
.
getWorkerList
(
new
Query
(
worker
));
if
(
workerList
.
size
()>
0
)
{
result
.
setCode
(
"1"
);
result
.
setData
(
workerList
);
}
else
{
result
.
setCode
(
"0"
);
result
.
setMsg
(
"暂无员工数据"
);
}
return
result
;
}
}
}
2code/server/store-system/src/main/java/cn/com/fqy/core/model/SysUser.java
View file @
c86da07b
...
@@ -52,6 +52,8 @@ public class SysUser extends Entity<String> {
...
@@ -52,6 +52,8 @@ public class SysUser extends Entity<String> {
private
String
operatorId
;
private
String
operatorId
;
private
List
<
SysRole
>
sysRole
;
private
List
<
SysRole
>
sysRole
;
private
String
flag
;
private
String
flag
;
//店铺管理员编号
private
String
administratorsId
;
/*Auto generated properties end*/
/*Auto generated properties end*/
...
@@ -85,6 +87,14 @@ public class SysUser extends Entity<String> {
...
@@ -85,6 +87,14 @@ public class SysUser extends Entity<String> {
this
.
userName
=
userName
;
this
.
userName
=
userName
;
}
}
public
String
getAdministratorsId
()
{
return
administratorsId
;
}
public
void
setAdministratorsId
(
String
administratorsId
)
{
this
.
administratorsId
=
administratorsId
;
}
public
String
getPassword
(){
public
String
getPassword
(){
return
password
;
return
password
;
}
}
...
@@ -242,12 +252,13 @@ public class SysUser extends Entity<String> {
...
@@ -242,12 +252,13 @@ public class SysUser extends Entity<String> {
@Override
@Override
public
String
toString
()
{
public
String
toString
()
{
return
"SysUser ["
return
"SysUser [userId="
+
userId
+
", userName="
+
userName
+
", password="
+
password
+
", realName="
+
"userId = "
+
userId
+
", userName = "
+
userName
+
", password = "
+
password
+
", realName = "
+
realName
+
realName
+
", sex="
+
sex
+
", mobilePhone="
+
mobilePhone
+
", memo="
+
memo
+
", isAvailable="
+
", sex = "
+
sex
+
", mobilePhone = "
+
mobilePhone
+
", memo = "
+
memo
+
", isAvailable = "
+
isAvailable
+
isAvailable
+
", isDeleted="
+
isDeleted
+
", deptId="
+
deptId
+
", createTime="
+
createTime
+
", isDeleted = "
+
isDeleted
+
", createTime = "
+
createTime
+
", createTimeStart = "
+
createTimeStart
+
", createTimeEnd = "
+
createTimeEnd
+
", updateTime = "
+
updateTime
+
", updateTimeStart = "
+
updateTimeStart
+
", updateTimeEnd = "
+
updateTimeEnd
+
", operatorType = "
+
operatorType
+
", createTimeStart="
+
createTimeStart
+
", createTimeEnd="
+
createTimeEnd
+
", updateTime="
+
", operatorId = "
+
operatorId
+
updateTime
+
", updateTimeStart="
+
updateTimeStart
+
", updateTimeEnd="
+
updateTimeEnd
+
"]"
;
+
", operatorType="
+
operatorType
+
", operatorId="
+
operatorId
+
", sysRole="
+
sysRole
+
", flag="
+
flag
+
", administratorsId="
+
administratorsId
+
"]"
;
}
}
}
}
2code/server/store-system/src/main/resources/mybatis/mapper/StoreMapper.xml
View file @
c86da07b
...
@@ -260,7 +260,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
...
@@ -260,7 +260,7 @@ OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,IS_AVAILABLE
<where>
<where>
<include
refid=
"listCommonWhere1"
/>
<include
refid=
"listCommonWhere1"
/>
</where>
</where>
ORDER BY SERIAL_NUMBER DESC
ORDER BY SERIAL_NUMBER DESC
,CLICKS ASC
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
</select>
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/SysUserMapper.xml
View file @
c86da07b
...
@@ -18,6 +18,7 @@
...
@@ -18,6 +18,7 @@
<result
column=
"OPERATOR_TYPE"
property=
"operatorType"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
<result
column=
"OPERATOR_TYPE"
property=
"operatorType"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
<result
column=
"OPERATOR_ID"
property=
"operatorId"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"OPERATOR_ID"
property=
"operatorId"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"FLAG"
property=
"flag"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"FLAG"
property=
"flag"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"ADMINISTRATORS_ID"
property=
"administratorsId"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
</resultMap>
</resultMap>
<resultMap
type=
"SysUser"
id=
"SysUserAss"
extends=
"SysUser"
>
<resultMap
type=
"SysUser"
id=
"SysUserAss"
extends=
"SysUser"
>
<association
property=
"sysRole"
column=
"USER_ID"
<association
property=
"sysRole"
column=
"USER_ID"
...
@@ -39,7 +40,8 @@
...
@@ -39,7 +40,8 @@
CREATE_TIME,
CREATE_TIME,
UPDATE_TIME,
UPDATE_TIME,
OPERATOR_TYPE,
OPERATOR_TYPE,
OPERATOR_ID
OPERATOR_ID,
ADMINISTRATORS_ID
) values (
) values (
#{userId,jdbcType = VARCHAR},
#{userId,jdbcType = VARCHAR},
#{userName,jdbcType = VARCHAR},
#{userName,jdbcType = VARCHAR},
...
@@ -54,7 +56,8 @@
...
@@ -54,7 +56,8 @@
#{createTime,jdbcType = TIMESTAMP},
#{createTime,jdbcType = TIMESTAMP},
#{updateTime,jdbcType = TIMESTAMP},
#{updateTime,jdbcType = TIMESTAMP},
#{operatorType,jdbcType = TINYINT},
#{operatorType,jdbcType = TINYINT},
#{operatorId,jdbcType = VARCHAR}
#{operatorId,jdbcType = VARCHAR},
#{administratorsId,jdbcType = VARCHAR}
)
)
</insert>
</insert>
...
@@ -100,6 +103,9 @@
...
@@ -100,6 +103,9 @@
<if
test=
"operatorId!=null "
>
<if
test=
"operatorId!=null "
>
OPERATOR_ID=#{operatorId,jdbcType = VARCHAR},
OPERATOR_ID=#{operatorId,jdbcType = VARCHAR},
</if>
</if>
<if
test=
"administratorsId!=null and administratorsId!=''"
>
ADMINISTRATORS_ID=#{administratorsId,jdbcType = VARCHAR},
</if>
</set>
</set>
<where>
<where>
AND USER_ID=#{userId}
AND USER_ID=#{userId}
...
@@ -236,6 +242,9 @@
...
@@ -236,6 +242,9 @@
<if
test=
"q.operatorId!=null "
>
<if
test=
"q.operatorId!=null "
>
AND OPERATOR_ID=#{q.operatorId}
AND OPERATOR_ID=#{q.operatorId}
</if>
</if>
<if
test=
"q.administratorsId!=null and q.administratorsId!=''"
>
AND ADMINISTRATORS_ID=#{q.administratorsId}
</if>
</if>
</if>
</sql>
</sql>
...
@@ -283,6 +292,9 @@
...
@@ -283,6 +292,9 @@
<if
test=
"q.operatorId!=null "
>
<if
test=
"q.operatorId!=null "
>
AND OPERATOR_ID=#{q.operatorId}
AND OPERATOR_ID=#{q.operatorId}
</if>
</if>
<if
test=
"q.administratorsId!=null and q.administratorsId!=''"
>
AND ADMINISTRATORS_ID=#{q.administratorsId}
</if>
</if>
</if>
</sql>
</sql>
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/WorkerMapper.xml
View file @
c86da07b
...
@@ -260,7 +260,7 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
...
@@ -260,7 +260,7 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED
<where>
<where>
<include
refid=
"listCommonWhere1"
/>
<include
refid=
"listCommonWhere1"
/>
</where>
</where>
ORDER BY SERIAL_NUMBER DESC
ORDER BY SERIAL_NUMBER DESC
,CLICKS ASC
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
</select>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment