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
e1d74d5a
Commit
e1d74d5a
authored
Nov 20, 2018
by
燕南天
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of gitlab.fqyxa.com:luoyangfei/store-system
parents
3ea75da1
6d880f79
Show whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
272 additions
and
42 deletions
+272
-42
WebWorkerController.java
.../java/cn/com/fqy/controller/mapi/WebWorkerController.java
+36
-5
StoreController.java
.../main/java/cn/com/fqy/controller/mgt/StoreController.java
+28
-1
SysUserController.java
...ain/java/cn/com/fqy/controller/mgt/SysUserController.java
+1
-1
WorkerController.java
...main/java/cn/com/fqy/controller/mgt/WorkerController.java
+27
-1
StoreDao.java
...re-system/src/main/java/cn/com/fqy/core/dao/StoreDao.java
+5
-0
WorkerDao.java
...e-system/src/main/java/cn/com/fqy/core/dao/WorkerDao.java
+4
-0
StoreService.java
...m/src/main/java/cn/com/fqy/core/service/StoreService.java
+12
-0
WorkerService.java
.../src/main/java/cn/com/fqy/core/service/WorkerService.java
+12
-0
StoreServiceImpl.java
...n/java/cn/com/fqy/core/service/impl/StoreServiceImpl.java
+49
-0
SysUserServiceImpl.java
...java/cn/com/fqy/core/service/impl/SysUserServiceImpl.java
+20
-20
WorkerServiceImpl.java
.../java/cn/com/fqy/core/service/impl/WorkerServiceImpl.java
+50
-0
AdministratorsMapper.xml
...rc/main/resources/mybatis/mapper/AdministratorsMapper.xml
+1
-1
StoreMapper.xml
...-system/src/main/resources/mybatis/mapper/StoreMapper.xml
+12
-0
SysUserMapper.xml
...ystem/src/main/resources/mybatis/mapper/SysUserMapper.xml
+3
-13
WorkerMapper.xml
...system/src/main/resources/mybatis/mapper/WorkerMapper.xml
+12
-0
No files found.
2code/server/store-system/src/main/java/cn/com/fqy/controller/mapi/WebWorkerController.java
View file @
e1d74d5a
package
cn
.
com
.
fqy
.
controller
.
mapi
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
javax.annotation.Resource
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
cn.com.fqy.common.ResultInfo
;
import
cn.com.fqy.common.constants.Constant
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Advert
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.model.Worker
;
...
...
@@ -67,8 +67,9 @@ public class WebWorkerController {
*/
@RequestMapping
(
"workerDetails"
)
@ResponseBody
public
ResultInfo
<
Worker
>
workerDetails
(
String
workerId
){
ResultInfo
<
Worker
>
resultInfo
=
new
ResultInfo
<>();
public
ResultInfo
<
Map
<
String
,
Object
>>
workerDetails
(
String
workerId
){
ResultInfo
<
Map
<
String
,
Object
>>
resultInfo
=
new
ResultInfo
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
workerId
==
null
||
""
.
equals
(
workerId
))
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"员工参数为空"
);
...
...
@@ -76,8 +77,38 @@ public class WebWorkerController {
}
Worker
res
=
workerService
.
getWorker
(
workerId
);
if
(
null
!=
res
)
{
Store
store
=
storeService
.
getStore
(
res
.
getStoreId
());
if
(
null
!=
store
)
{
map
.
put
(
"workerId"
,
res
.
getWorkerId
());
map
.
put
(
"workerName"
,
res
.
getWorkerName
());
map
.
put
(
"workerAge"
,
res
.
getWorkerAge
());
map
.
put
(
"workerNumber"
,
res
.
getWorkerNumber
());
map
.
put
(
"workerBirthday"
,
res
.
getWorkerBirthday
());
map
.
put
(
"workerAncestral"
,
res
.
getWorkerAncestral
());
map
.
put
(
"workerBust"
,
res
.
getWorkerBust
());
map
.
put
(
"workerHeight"
,
res
.
getWorkerHeight
());
map
.
put
(
"workerHipline"
,
res
.
getWorkerHipline
());
map
.
put
(
"workerHomePic"
,
res
.
getWorkerHomePic
());
map
.
put
(
"workerPic"
,
res
.
getWorkerPic
());
map
.
put
(
"workerResume"
,
res
.
getWorkerResume
());
map
.
put
(
"workerSex"
,
res
.
getWorkerSex
());
map
.
put
(
"workerWaist"
,
res
.
getWorkerWaist
());
map
.
put
(
"workerWeight"
,
res
.
getWorkerWeight
());
map
.
put
(
"storeId"
,
res
.
getStoreId
());
map
.
put
(
"brief"
,
res
.
getBrief
());
map
.
put
(
"clicks"
,
res
.
getClicks
());
map
.
put
(
"matureTime"
,
res
.
getMatureTime
());
map
.
put
(
"serialNumber"
,
res
.
getSerialNumber
());
map
.
put
(
"storeName"
,
res
.
getStoreName
());
map
.
put
(
"storeBrief"
,
store
.
getBrief
());
map
.
put
(
"storeCityName"
,
store
.
getCityName
());
map
.
put
(
"storeProvince"
,
store
.
getProvince
());
map
.
put
(
"storeCounty"
,
store
.
getCounty
());
map
.
put
(
"storeHomePic"
,
store
.
getStoreHomePic
());
map
.
put
(
"storePosition"
,
store
.
getStorePosition
());
}
resultInfo
.
setCode
(
"1"
);
resultInfo
.
setData
(
res
);
resultInfo
.
setData
(
map
);
}
else
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"员工信息丢失"
);
...
...
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/StoreController.java
View file @
e1d74d5a
...
...
@@ -18,6 +18,7 @@ import cn.com.fqy.core.common.PageFinder;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.model.SysUser
;
import
cn.com.fqy.core.model.Worker
;
import
cn.com.fqy.core.service.StoreService
;
import
cn.com.fqy.core.service.SysUserService
;
@Controller
...
...
@@ -59,7 +60,11 @@ public class StoreController extends BaseController {
if
(
store
!=
null
&&
store
.
getStoreId
()!=
null
&&!
""
.
equals
(
store
.
getStoreId
()))
{
resultInfo
=
storeService
.
updateStore
(
store
,
op
);
}
else
{
if
(
store
.
getUserId
()
==
null
||
""
.
equals
(
store
.
getUserId
()))
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"系统用户id为空"
);
return
resultInfo
;
}
resultInfo
=
storeService
.
addStore
(
store
,
op
);
}
return
resultInfo
;
...
...
@@ -117,4 +122,26 @@ public class StoreController extends BaseController {
}
return
result
;
}
/**
* 批量审核
* @param workerIds
* @return
*/
@RequestMapping
(
"batchStores"
)
@ResponseBody
public
ResultInfo
<
Store
>
batchStores
(
String
[]
storeIds
)
{
return
storeService
.
batchStoreUpdate
(
storeIds
,
getOperator
());
}
/**
* 批量展示
* @param workerIds
* @return
*/
@RequestMapping
(
"batchStoreShop"
)
@ResponseBody
public
ResultInfo
<
Store
>
batchStoreShop
(
String
[]
storeIds
)
{
return
storeService
.
batchStoreShopping
(
storeIds
,
getOperator
());
}
}
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/SysUserController.java
View file @
e1d74d5a
...
...
@@ -80,7 +80,7 @@ public class SysUserController extends BaseController {
sysUser
.
setMobilePhone
(
sysUserRoleIds
.
getMobilePhone
());
sysUser
.
setSex
(
sysUserRoleIds
.
getSex
());
sysUser
.
setDeptId
(
sysUserRoleIds
.
getDeptId
());
sysUser
.
setAdministratorsId
(
sysUserRoleIds
.
getAdministratorsId
());
//
sysUser.setAdministratorsId(sysUserRoleIds.getAdministratorsId());
if
(
sysUserRoleIds
.
getSysRole
()!=
null
)
{
String
[]
roleIds
=
sysUserRoleIds
.
getSysRole
();
List
<
SysRole
>
sysRoles
=
new
ArrayList
<
SysRole
>();
...
...
2code/server/store-system/src/main/java/cn/com/fqy/controller/mgt/WorkerController.java
View file @
e1d74d5a
...
...
@@ -6,6 +6,7 @@ import javax.annotation.Resource;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
cn.com.fqy.common.Operator
;
...
...
@@ -67,7 +68,11 @@ public class WorkerController extends BaseController {
if
(
worker
!=
null
&&
worker
.
getWorkerId
()!=
null
&&!
""
.
equals
(
worker
.
getWorkerId
()))
{
resultInfo
=
workerService
.
updateWorker
(
worker
,
op
);
}
else
{
if
(
worker
.
getUserId
()
==
null
||
""
.
equals
(
worker
.
getUserId
()))
{
resultInfo
.
setCode
(
"0"
);
resultInfo
.
setMsg
(
"系统用户id为空"
);
return
resultInfo
;
}
resultInfo
=
workerService
.
addWorker
(
worker
,
op
);
}
return
resultInfo
;
...
...
@@ -114,4 +119,25 @@ public class WorkerController extends BaseController {
}
return
result
;
}
/**
* 批量审核
* @param workerIds
* @return
*/
@RequestMapping
(
"batchWorkers"
)
@ResponseBody
public
ResultInfo
<
Worker
>
batchWorkers
(
String
[]
workerIds
)
{
return
workerService
.
batchWorkerUpdate
(
workerIds
,
getOperator
());
}
/**
* 批量展示
* @param workerIds
* @return
*/
@RequestMapping
(
"batchWorkerShop"
)
@ResponseBody
public
ResultInfo
<
Worker
>
batchWorkerShop
(
String
[]
workerIds
)
{
return
workerService
.
batchWorkerShopping
(
workerIds
,
getOperator
());
}
}
2code/server/store-system/src/main/java/cn/com/fqy/core/dao/StoreDao.java
View file @
e1d74d5a
...
...
@@ -8,4 +8,9 @@ import cn.com.fqy.core.model.Store;
*/
public
interface
StoreDao
extends
BaseDao
<
Store
,
String
>
{
public
int
updateAdByIds
(
String
[]
ids
);
public
int
updateShopByIds
(
String
[]
ids
);
}
2code/server/store-system/src/main/java/cn/com/fqy/core/dao/WorkerDao.java
View file @
e1d74d5a
...
...
@@ -15,4 +15,8 @@ public interface WorkerDao extends BaseDao<Worker,String> {
* @return
*/
public
List
<
Worker
>
getWorkerByIds
(
String
[]
ids
);
public
int
updateAdByIds
(
String
[]
ids
);
public
int
updateShopByIds
(
String
[]
ids
);
}
2code/server/store-system/src/main/java/cn/com/fqy/core/service/StoreService.java
View file @
e1d74d5a
...
...
@@ -8,6 +8,7 @@ import cn.com.fqy.core.common.BaseService;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.model.Worker
;
/**
* Store 服务接口类
...
...
@@ -78,4 +79,15 @@ public interface StoreService extends BaseService {
*/
public
void
fillDefaultValues
(
Store
obj
);
/**
* 根据 一组ID 修改一组数据
* @param workerId
* @return
*/
public
ResultInfo
<
Store
>
batchStoreUpdate
(
String
[]
storeIds
,
Operator
operator
);
public
ResultInfo
<
Store
>
batchStoreShopping
(
String
[]
storeIds
,
Operator
operator
);
}
2code/server/store-system/src/main/java/cn/com/fqy/core/service/WorkerService.java
View file @
e1d74d5a
...
...
@@ -7,6 +7,7 @@ import cn.com.fqy.common.ResultInfo;
import
cn.com.fqy.core.common.BaseService
;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.SysUser
;
import
cn.com.fqy.core.model.Worker
;
/**
...
...
@@ -84,5 +85,16 @@ public interface WorkerService extends BaseService {
* @return
*/
public
List
<
Worker
>
getWorkerSByIds
(
String
[]
ids
);
/**
* 根据 一组ID 修改一组数据
* @param workerId
* @return
*/
public
ResultInfo
<
Worker
>
batchWorkerUpdate
(
String
[]
workerIds
,
Operator
operator
);
public
ResultInfo
<
Worker
>
batchWorkerShopping
(
String
[]
workerIds
,
Operator
operator
);
}
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/StoreServiceImpl.java
View file @
e1d74d5a
...
...
@@ -21,6 +21,7 @@ import cn.com.fqy.core.common.PageFinder;
import
cn.com.fqy.core.dao.StoreDao
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.Store
;
import
cn.com.fqy.core.model.Worker
;
import
cn.com.fqy.core.service.StoreService
;
/**
...
...
@@ -298,4 +299,52 @@ public class StoreServiceImpl implements StoreService {
}
}
@Transactional
public
ResultInfo
<
Store
>
batchStoreUpdate
(
String
[]
storeIds
,
Operator
operator
)
{
ResultInfo
<
Store
>
resultInfo
=
new
ResultInfo
<
Store
>();
if
(
storeIds
==
null
||
storeIds
.
length
==
0
)
{
log
.
info
(
Constant
.
ERR_MSG_INVALID_ARG
+
" storeIds is null or empty array."
);
}
else
{
try
{
//调用dao,根据主键数组查询
int
count
=
storeDao
.
updateAdByIds
(
storeIds
);
if
(
count
>
0
)
{
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
}
else
{
resultInfo
.
setCode
(
Constant
.
FAIL
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
resultInfo
.
setCode
(
Constant
.
FAIL
);
resultInfo
.
setMsg
(
Constant
.
ERR_MSG_EXCEPTION_CATCHED
);
}
}
return
resultInfo
;
}
@Transactional
public
ResultInfo
<
Store
>
batchStoreShopping
(
String
[]
storeIds
,
Operator
operator
)
{
ResultInfo
<
Store
>
resultInfo
=
new
ResultInfo
<
Store
>();
if
(
storeIds
==
null
||
storeIds
.
length
==
0
)
{
log
.
info
(
Constant
.
ERR_MSG_INVALID_ARG
+
" storeIds is null or empty array."
);
}
else
{
try
{
//调用dao,根据主键数组查询
int
count
=
storeDao
.
updateShopByIds
(
storeIds
);
if
(
count
>
0
)
{
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
}
else
{
resultInfo
.
setCode
(
Constant
.
FAIL
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
resultInfo
.
setCode
(
Constant
.
FAIL
);
resultInfo
.
setMsg
(
Constant
.
ERR_MSG_EXCEPTION_CATCHED
);
}
}
return
resultInfo
;
}
}
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/SysUserServiceImpl.java
View file @
e1d74d5a
...
...
@@ -82,13 +82,13 @@ public class SysUserServiceImpl implements SysUserService {
sysUser
.
setIsDeleted
(
0
);
sysUser
.
setCreateTime
(
now
);
sysUser
.
setUpdateTime
(
now
);
int
count1
=
sysUserDao
.
add
(
sysUser
);
if
(
count1
>
0
)
{
Administrators
administrators
=
new
Administrators
();
administrators
.
setAdministratorsId
(
sysUser
.
getAdministratorsId
());
administrators
.
setSystemId
(
sysUser
.
getUserId
());
administratorsDao
.
update
(
administrators
);
}
sysUserDao
.
add
(
sysUser
);
//
if(count1>0) {
//
Administrators administrators = new Administrators();
//
administrators.setAdministratorsId(sysUser.getAdministratorsId());
//
administrators.setSystemId(sysUser.getUserId());
//
administratorsDao.update(administrators);
//
}
for
(
int
i
=
0
;
i
<
sysUser
.
getSysRole
().
size
();
i
++)
{
SysRole
sysRole
=
sysUser
.
getSysRole
().
get
(
i
);
...
...
@@ -156,19 +156,19 @@ public class SysUserServiceImpl implements SysUserService {
// 调用Dao执行更新操作,并判断更新语句执行结果
int
count
=
sysUserDao
.
update
(
sysUser
);
if
(
count
==
1
)
{
SysUser
su
=
sysUserDao
.
get
(
userId
);
if
(
null
!=
su
)
{
Administrators
admin
=
new
Administrators
();
admin
.
setAdministratorsId
(
su
.
getAdministratorsId
());
admin
.
setSystemId
(
null
);
int
count1
=
administratorsDao
.
update
(
admin
);
if
(
count1
==
1
)
{
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
}
else
{
resultInfo
.
setCode
(
Constant
.
FAIL
);
resultInfo
.
setMsg
(
"未释放店铺管理员!"
);
}
}
//
SysUser su = sysUserDao.get(userId);
//
if(null != su) {
//
Administrators admin= new Administrators();
//
admin.setAdministratorsId(su.getAdministratorsId());
//
admin.setSystemId(null);
//
int count1=administratorsDao.update(admin);
//
if(count1 == 1) {
//
resultInfo.setCode(Constant.SUCCESS);
//
}else {
//
resultInfo.setCode(Constant.FAIL);
//
resultInfo.setMsg("未释放店铺管理员!");
//
}
//
}
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
}
else
{
resultInfo
.
setCode
(
Constant
.
FAIL
);
...
...
2code/server/store-system/src/main/java/cn/com/fqy/core/service/impl/WorkerServiceImpl.java
View file @
e1d74d5a
...
...
@@ -20,6 +20,7 @@ import cn.com.fqy.common.constants.Constant;
import
cn.com.fqy.core.common.PageFinder
;
import
cn.com.fqy.core.dao.WorkerDao
;
import
cn.com.fqy.core.model.Query
;
import
cn.com.fqy.core.model.SysUser
;
import
cn.com.fqy.core.model.Worker
;
import
cn.com.fqy.core.service.WorkerService
;
...
...
@@ -320,4 +321,53 @@ public class WorkerServiceImpl implements WorkerService {
return
list
;
}
@Transactional
public
ResultInfo
<
Worker
>
batchWorkerUpdate
(
String
[]
workerIds
,
Operator
operator
)
{
ResultInfo
<
Worker
>
resultInfo
=
new
ResultInfo
<
Worker
>();
if
(
workerIds
==
null
||
workerIds
.
length
==
0
)
{
log
.
info
(
Constant
.
ERR_MSG_INVALID_ARG
+
" workerIds is null or empty array."
);
}
else
{
try
{
//调用dao,根据主键数组查询
int
count
=
workerDao
.
updateAdByIds
(
workerIds
);
if
(
count
>
0
)
{
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
}
else
{
resultInfo
.
setCode
(
Constant
.
FAIL
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
resultInfo
.
setCode
(
Constant
.
FAIL
);
resultInfo
.
setMsg
(
Constant
.
ERR_MSG_EXCEPTION_CATCHED
);
}
}
return
resultInfo
;
}
@Transactional
public
ResultInfo
<
Worker
>
batchWorkerShopping
(
String
[]
workerIds
,
Operator
operator
)
{
ResultInfo
<
Worker
>
resultInfo
=
new
ResultInfo
<
Worker
>();
if
(
workerIds
==
null
||
workerIds
.
length
==
0
)
{
log
.
info
(
Constant
.
ERR_MSG_INVALID_ARG
+
" workerIds is null or empty array."
);
}
else
{
try
{
//调用dao,根据主键数组查询
int
count
=
workerDao
.
updateShopByIds
(
workerIds
);
if
(
count
>
0
)
{
resultInfo
.
setCode
(
Constant
.
SUCCESS
);
}
else
{
resultInfo
.
setCode
(
Constant
.
FAIL
);
}
}
catch
(
Exception
e
)
{
log
.
error
(
e
.
getMessage
(),
e
);
TransactionAspectSupport
.
currentTransactionStatus
().
setRollbackOnly
();
resultInfo
.
setCode
(
Constant
.
FAIL
);
resultInfo
.
setMsg
(
Constant
.
ERR_MSG_EXCEPTION_CATCHED
);
}
}
return
resultInfo
;
}
}
2code/server/store-system/src/main/resources/mybatis/mapper/AdministratorsMapper.xml
View file @
e1d74d5a
...
...
@@ -99,7 +99,7 @@ POWER,SYSTEM_ID,CREATE_TIME,UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,ADMINISTRATORS
<if
test=
"power!=null and power!=''"
>
POWER=#{power,jdbcType = VARCHAR},
</if>
<if
test=
"systemId!=''"
>
<if
test=
"systemId!=
null and systemId!=
''"
>
SYSTEM_ID=#{systemId,jdbcType = VARCHAR},
</if>
<if
test=
"createTime!=null "
>
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/StoreMapper.xml
View file @
e1d74d5a
...
...
@@ -258,6 +258,18 @@ CITY_NAME,CITY_ID,PROVINCE_ID,COUNTY_ID,BRIEF
</where>
</update>
<update
id=
"updateAdByIds"
>
update T_STORE set IS_AUDITING=1
<where>
STORE_ID in
<foreach
item=
"item"
index=
"index"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</where>
</update>
<update
id=
"updateShopByIds"
>
update T_STORE set IS_SHOPPING=1
<where>
STORE_ID in
<foreach
item=
"item"
index=
"index"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</where>
</update>
<delete
id=
"delete"
>
delete from T_STORE
<where>
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/SysUserMapper.xml
View file @
e1d74d5a
...
...
@@ -19,7 +19,6 @@
<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"
/>
<result
column=
"ADMINISTRATORS_NAME"
property=
"administratorsName"
javaType=
"java.lang.String"
jdbcType=
"VARCHAR"
/>
</resultMap>
<resultMap
type=
"SysUser"
id=
"SysUserAss"
extends=
"SysUser"
>
<association
property=
"sysRole"
column=
"USER_ID"
...
...
@@ -164,11 +163,7 @@
</select>
<select
id=
"count2"
parameterType=
"Query"
resultType=
"Long"
>
select
count(*)
FROM
t_sys_user u
LEFT JOIN t_administrators a ON u.ADMINISTRATORS_ID = a.ADMINISTRATORS_ID
select count(*) from T_SYS_USER
<where>
<include
refid=
"listCommonWhere2"
/>
</where>
...
...
@@ -190,12 +185,7 @@
</select>
<select
id=
"pageList2"
parameterType=
"Query"
resultMap=
"SysUserAss"
>
SELECT
u.*,
a.ADMINISTRATORS_NAME
FROM
t_sys_user u
LEFT JOIN t_administrators a ON u.ADMINISTRATORS_ID = a.ADMINISTRATORS_ID
select * from T_SYS_USER
<where>
<include
refid=
"listCommonWhere2"
/>
</where>
...
...
@@ -288,7 +278,7 @@
AND IS_AVAILABLE=#{q.isAvailable}
</if>
<if
test=
"q.isDeleted!=null "
>
AND
u.
IS_DELETED=#{q.isDeleted}
AND IS_DELETED=#{q.isDeleted}
</if>
<if
test=
"q.createTime!=null "
>
AND CREATE_TIME=#{q.createTime}
...
...
2code/server/store-system/src/main/resources/mybatis/mapper/WorkerMapper.xml
View file @
e1d74d5a
...
...
@@ -232,6 +232,18 @@ UPDATE_TIME,OPERATOR_ID,OPERATOR_TYPE,SERIAL_NUMBER,IS_DELETED,STORE_NAME,BRIEF
</where>
</update>
<update
id=
"updateAdByIds"
>
update T_WORKER set IS_AUDITING=1
<where>
WORKER_ID in
<foreach
item=
"item"
index=
"index"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</where>
</update>
<update
id=
"updateShopByIds"
>
update T_WORKER set IS_SHOPPING=1
<where>
WORKER_ID in
<foreach
item=
"item"
index=
"index"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{item}
</foreach>
</where>
</update>
<delete
id=
"delete"
>
delete from T_WORKER
<where>
...
...
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