Commit a6ee177e by 徐高华

Merge branch 'master_xgh_我的客户迭代' into 'developer'

查询导购需要带wxEnterpriseId

See merge request !445
parents e9654c9a 9631eca4
......@@ -56,7 +56,7 @@ public interface StaffClerkRelationApiService {
* @param channelCode
* @return
*/
boolean unbindByStaffAndClerkId(String staffId, String clerkId, int channelCode);
boolean unbindByStaffAndClerkId(String staffId, String clerkId, int channelCode,String wxEnterpriseId);
/**
* 解绑门店
......
......@@ -14,7 +14,7 @@ public interface StaffClerkRelationService {
List<StaffClerkRelationDTO> listBindCodeByStaffId(List<String> enterpriseIdList, String staffId);
boolean delBind(String clerkId, String optStaffId, int channelCode , String newClerkId);
boolean delBind(String clerkId, String optStaffId, int channelCode , String newClerkId , String wxEnterpriseId);
/**
* 解绑-删除绑定(门店级别)
......
......@@ -81,9 +81,12 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
}
@Override
public boolean delBind(String oldClerkId, String optStaffId, int channelCode, String newClerkId) {
public boolean delBind(String oldClerkId, String optStaffId, int channelCode, String newClerkId, String wxEnterpriseId) {
TabHaobanStaff staff = this.staffService.selectById(optStaffId) ;
StaffClerkRelationDTO clerkRelation = mapper.getOneByClerkId(oldClerkId, staff.getWxEnterpriseId());
if(null != staff) {
wxEnterpriseId = staff.getWxEnterpriseId() ;
}
StaffClerkRelationDTO clerkRelation = mapper.getOneByClerkId(oldClerkId, wxEnterpriseId);
if (null == clerkRelation) {
logger.info("老的绑定关联不存在,clerkId={}", oldClerkId);
return true;
......
......@@ -216,7 +216,7 @@ public class AuditApiServiceImpl implements AuditApiService {
if (StringUtils.isNotBlank(batchId)) {
insertBatchLog(batchId, AuditRsultType.success.getCode(), tab);
}
staffClerkRelationApiService.unbindByStaffAndClerkId(optStaffId, obj.getClerkId(), ChannelCodeEnum.AUDIT_UNBIND.getCode());
staffClerkRelationApiService.unbindByStaffAndClerkId(optStaffId, obj.getClerkId(), ChannelCodeEnum.AUDIT_UNBIND.getCode(),obj.getWxEnterpriseId());
staffDepartmentRelatedApiService.sendClerkDel(obj.getClerkName(), obj.getClerkCode(), tab.getCommitStoreId(), 1, "");
} else if (auditType == AuditType.CLERK_UNBIND.getCode()) {
//解绑申请,无需审核,直接通过
......
......@@ -341,7 +341,7 @@ public class MessageApiServiceImpl implements MessageApiService {
List<StaffClerkRelationDTO> staffClerkRelationDTOS = staffClerkRelationApiService.listByStaffId(wxEnterpriseId, staffId);
if (CollectionUtils.isNotEmpty(staffClerkRelationDTOS)) {
for (StaffClerkRelationDTO staffClerkRelationDTO : staffClerkRelationDTOS) {
staffClerkRelationApiService.unbindByStaffAndClerkId(staffId, staffClerkRelationDTO.getClerkId(), ChannelCodeEnum.ADMIN_UNBIND.getCode());
staffClerkRelationApiService.unbindByStaffAndClerkId(staffId, staffClerkRelationDTO.getClerkId(), ChannelCodeEnum.ADMIN_UNBIND.getCode(),wxEnterpriseId);
}
}
}
......
......@@ -250,8 +250,8 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
@Override
public boolean unbindByStaffAndClerkId(String staffId, String clerkId, int channelCode) {
return staffClerkRelationService.delBind(clerkId, staffId, channelCode, null);
public boolean unbindByStaffAndClerkId(String staffId, String clerkId, int channelCode,String wxEnterpriseId) {
return staffClerkRelationService.delBind(clerkId, staffId, channelCode, null,wxEnterpriseId);
}
@Override
......@@ -482,7 +482,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
Integer status = clerkDTO.getStatus();
logger.info("导购删除,clerkId:{},status:{}", clerkId, status);
if (!status.equals(1)) {
staffClerkRelationService.delBind(clerkId, "-1", ChannelCodeEnum.GIC_CLERK_DEL_UNBIND.getCode(), null);
staffClerkRelationService.delBind(clerkId, "-1", ChannelCodeEnum.GIC_CLERK_DEL_UNBIND.getCode(), null,null);
}
} else if (type == 2) {
logger.info("导购门店转移,新的导购和门店,clerkId={},storeId={}", clerkId, clerkSyncQDTO.getStoreId());
......@@ -524,7 +524,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
} else if (clerkType == 2) {
logger.info("区经变更为导购,解绑:{}", clerkId);
//解绑
staffClerkRelationService.delBind(clerkId, "-1", ChannelCodeEnum.GIC_CLERK_DEL_UNBIND.getCode(), null);
staffClerkRelationService.delBind(clerkId, "-1", ChannelCodeEnum.GIC_CLERK_DEL_UNBIND.getCode(), null,null);
}
}
}
......@@ -537,7 +537,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
if (flag) {
String oldClerkId = oldRelationDTO.getClerkId();
this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), clerkSyncQDTO.getClerkId());
this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), clerkSyncQDTO.getClerkId(),oldRelationDTO.getWxEnterpriseId());
// 设置新的ID
oldRelationDTO.setClerkId(clerkSyncQDTO.getClerkId());
oldRelationDTO.setStoreId(clerkSyncQDTO.getStoreId());
......@@ -548,7 +548,7 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
}
} else {
String oldClerkId = oldRelationDTO.getClerkId();
this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), null);
this.staffClerkRelationService.delBind(oldClerkId, "-1", ChannelCodeEnum.SYNC_UNBIND.getCode(), null,null);
// 设置新的ID
oldRelationDTO.setClerkId(clerkSyncQDTO.getClerkId());
oldRelationDTO.setStoreId(clerkSyncQDTO.getStoreId());
......
......@@ -313,7 +313,7 @@ public class StaffController extends WebBaseController {
@RequestMapping("del-clerk-relation")
public HaobanResponse delStaffClerkList(String clerkId) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
boolean b = staffClerkRelationApiService.unbindByStaffAndClerkId(login.getStaffId(), clerkId, ChannelCodeEnum.ADMIN_UNBIND.getCode());
boolean b = staffClerkRelationApiService.unbindByStaffAndClerkId(login.getClerkId(), clerkId, ChannelCodeEnum.ADMIN_UNBIND.getCode(),login.getWxEnterpriseId());
return resultResponse(HaoBanErrCode.ERR_1, b);
}
......
......@@ -1020,7 +1020,7 @@ public class WxStaffController extends WebBaseController {
//解绑
@RequestMapping("unbind-staff")
public HaobanResponse unBindStaff(String clerkId, String clerkCode, String staffId, String storeId, String enterpriseId, Integer manageFlag) {
public HaobanResponse unBindStaff(String wxEnterpriseId ,String clerkId, String clerkCode, String staffId, String storeId, String enterpriseId, Integer manageFlag) {
logger.info("解绑 操作人:{},备操作人:{},操作门店:{}", staffId, clerkId, storeId);
if (StringUtils.isAnyBlank(clerkId, clerkCode, staffId)) {
return resultResponse(HaoBanErrCode.ERR_2);
......@@ -1037,7 +1037,7 @@ public class WxStaffController extends WebBaseController {
if (staffClerkRelation == null) {
return resultResponse(HaoBanErrCode.ERR_111145);
}
staffClerkRelationApiService.unbindByStaffAndClerkId(staffId, clerkId, ChannelCodeEnum.SELF_UNBIND.getCode());
staffClerkRelationApiService.unbindByStaffAndClerkId(staffId, clerkId, ChannelCodeEnum.SELF_UNBIND.getCode(),wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_1);
}
......
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