Commit 540ac890 by guojuxing

共享门店的导购不能编辑,不能转移店长&去掉批量修改状态功能

parent bf2aee61
......@@ -193,7 +193,7 @@ public interface ClerkApiService {
* @Title: updateClerkStatus
* @Description: 批量修改导购状态
* @author zhiwj
* @param enterpriseId 企业id
* @param enterpriseId 企业id 当前操作商户
* @param clerkIds 导购ids
* @param status 状态
* @param userId
......@@ -371,11 +371,12 @@ public interface ClerkApiService {
* @Title: updateClerkLeader
* @Description:
* @author zhiwj
* @param currentEnterpriseId 当前操作商户
* @param clerkId
* @return com.gic.api.base.commons.ServiceResponse
* @throws
*/
ServiceResponse updateClerkLeader(Integer clerkId);
ServiceResponse updateClerkLeader(Integer currentEnterpriseId, Integer clerkId);
/***
* syncClerkToWeimob
......
......@@ -589,7 +589,7 @@ public class ClerkApiServiceImpl implements ClerkApiService {
}
List<TabClerk> clerkList = this.clerkService.listClerkByIds(clerkIdList);
//编辑权限验证
validStoreIsOther(clerkList.get(0).getEnterpriseId(), clerkList.get(0).getStoreInfoId());
validStoreIsOther(enterpriseId, clerkList.get(0).getStoreInfoId());
Map<Integer, TabClerk> clerkIdMap = clerkList.stream().collect(Collectors.toMap(TabClerk::getClerkId, TabClerk -> TabClerk));
//过滤掉默认导购
......@@ -895,10 +895,10 @@ public class ClerkApiServiceImpl implements ClerkApiService {
}
@Override
public ServiceResponse updateClerkLeader(Integer clerkId) {
public ServiceResponse updateClerkLeader(Integer currentEnterpriseId, Integer clerkId) {
TabClerk clerk = this.clerkService.getById(clerkId);
validStoreIsOther(clerk.getEnterpriseId(), clerk.getStoreInfoId());
validStoreIsOther(currentEnterpriseId, clerk.getStoreInfoId());
clerk.setPositionId(com.gic.store.constant.Constants.CLERK_LEADER_POSITION_ID);
String positionName = this.clerkPositionService.getByClerkPositionId(clerk.getPositionId()).getPositionName();
......
......@@ -334,7 +334,7 @@ public class ClerkController extends DownloadUtils {
@RequestMapping("/update-clerk-leader")
public RestResponse updateClerkLeader(Integer clerkId) {
ServiceResponse serviceResponse = clerkApiService.updateClerkLeader(clerkId);
ServiceResponse serviceResponse = clerkApiService.updateClerkLeader(UserDetailUtils.getUserDetail().getEnterpriseId(), clerkId);
return ResultControllerUtils.commonResult(serviceResponse);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment