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
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
104 additions
and
14 deletions
+104
-14
AdministratorsController.java
...a/cn/com/fqy/controller/mgt/AdministratorsController.java
+23
-2
StoreController.java
.../main/java/cn/com/fqy/controller/mgt/StoreController.java
+23
-2
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
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -12,6 +14,7 @@ import cn.com.fqy.core.common.BaseController;
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.Store
;
import
cn.com.fqy.core.service.AdministratorsService
;
@Controller
@RequestMapping
(
"administrators"
)
...
...
@@ -70,7 +73,25 @@ public class AdministratorsController extends BaseController{
administrators
.
setIsDeleted
(
1
);
administrators
.
setAdministratorsId
(
administratorsId
);
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
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -69,7 +71,26 @@ public class StoreController extends BaseController {
store
.
setIsDeleted
(
1
);
store
.
setStoreId
(
storeId
);
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
;
import
java.util.List
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
...
...
@@ -10,6 +12,7 @@ import cn.com.fqy.common.Operator;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.core.common.BaseController
;
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.Worker
;
import
cn.com.fqy.core.service.WorkerService
;
...
...
@@ -71,4 +74,26 @@ public class WorkerController extends BaseController {
worker
.
setWorkerId
(
workerId
);
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> {
private
String
operatorId
;
private
List
<
SysRole
>
sysRole
;
private
String
flag
;
//店铺管理员编号
private
String
administratorsId
;
/*Auto generated properties end*/
...
...
@@ -85,6 +87,14 @@ public class SysUser extends Entity<String> {
this
.
userName
=
userName
;
}
public
String
getAdministratorsId
()
{
return
administratorsId
;
}
public
void
setAdministratorsId
(
String
administratorsId
)
{
this
.
administratorsId
=
administratorsId
;
}
public
String
getPassword
(){
return
password
;
}
...
...
@@ -242,12 +252,13 @@ public class SysUser extends Entity<String> {
@Override
public
String
toString
()
{
return
"SysUser ["
+
"userId = "
+
userId
+
", userName = "
+
userName
+
", password = "
+
password
+
", realName = "
+
realName
+
", sex = "
+
sex
+
", mobilePhone = "
+
mobilePhone
+
", memo = "
+
memo
+
", isAvailable = "
+
isAvailable
+
", isDeleted = "
+
isDeleted
+
", createTime = "
+
createTime
+
", createTimeStart = "
+
createTimeStart
+
", createTimeEnd = "
+
createTimeEnd
+
", updateTime = "
+
updateTime
+
", updateTimeStart = "
+
updateTimeStart
+
", updateTimeEnd = "
+
updateTimeEnd
+
", operatorType = "
+
operatorType
+
", operatorId = "
+
operatorId
+
"]"
;
return
"SysUser [userId="
+
userId
+
", userName="
+
userName
+
", password="
+
password
+
", realName="
+
realName
+
", sex="
+
sex
+
", mobilePhone="
+
mobilePhone
+
", memo="
+
memo
+
", isAvailable="
+
isAvailable
+
", isDeleted="
+
isDeleted
+
", deptId="
+
deptId
+
", createTime="
+
createTime
+
", createTimeStart="
+
createTimeStart
+
", createTimeEnd="
+
createTimeEnd
+
", updateTime="
+
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
<where>
<include
refid=
"listCommonWhere1"
/>
</where>
ORDER BY SERIAL_NUMBER DESC
ORDER BY SERIAL_NUMBER DESC
,CLICKS ASC
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</select>
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/SysUserMapper.xml
View file @
c86da07b
...
...
@@ -18,6 +18,7 @@
<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=
"FLAG"
property=
"flag"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
<result
column=
"ADMINISTRATORS_ID"
property=
"administratorsId"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
</resultMap>
<resultMap
type=
"SysUser"
id=
"SysUserAss"
extends=
"SysUser"
>
<association
property=
"sysRole"
column=
"USER_ID"
...
...
@@ -39,7 +40,8 @@
CREATE_TIME,
UPDATE_TIME,
OPERATOR_TYPE,
OPERATOR_ID
OPERATOR_ID,
ADMINISTRATORS_ID
) values (
#{userId,jdbcType = VARCHAR},
#{userName,jdbcType = VARCHAR},
...
...
@@ -54,7 +56,8 @@
#{createTime,jdbcType = TIMESTAMP},
#{updateTime,jdbcType = TIMESTAMP},
#{operatorType,jdbcType = TINYINT},
#{operatorId,jdbcType = VARCHAR}
#{operatorId,jdbcType = VARCHAR},
#{administratorsId,jdbcType = VARCHAR}
)
</insert>
...
...
@@ -100,6 +103,9 @@
<if
test=
"operatorId!=null "
>
OPERATOR_ID=#{operatorId,jdbcType = VARCHAR},
</if>
<if
test=
"administratorsId!=null and administratorsId!=''"
>
ADMINISTRATORS_ID=#{administratorsId,jdbcType = VARCHAR},
</if>
</set>
<where>
AND USER_ID=#{userId}
...
...
@@ -236,6 +242,9 @@
<if
test=
"q.operatorId!=null "
>
AND OPERATOR_ID=#{q.operatorId}
</if>
<if
test=
"q.administratorsId!=null and q.administratorsId!=''"
>
AND ADMINISTRATORS_ID=#{q.administratorsId}
</if>
</if>
</sql>
...
...
@@ -283,6 +292,9 @@
<if
test=
"q.operatorId!=null "
>
AND OPERATOR_ID=#{q.operatorId}
</if>
<if
test=
"q.administratorsId!=null and q.administratorsId!=''"
>
AND ADMINISTRATORS_ID=#{q.administratorsId}
</if>
</if>
</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
<where>
<include
refid=
"listCommonWhere1"
/>
</where>
ORDER BY SERIAL_NUMBER DESC
ORDER BY SERIAL_NUMBER DESC
,CLICKS ASC
<![CDATA[LIMIT #{rowIndex},#{pageSize} ]]>
</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