Commit ce4f4717 by 墨竹

fix:活码进行是否开启活码功能企业过滤

parent 50746122
...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -4,6 +4,7 @@ import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.clerk.api.dto.ClerkDTO; import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService; import com.gic.clerk.api.service.ClerkService;
import com.gic.clerk.api.service.RightService;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.PageUtil; import com.gic.haoban.common.utils.PageUtil;
...@@ -66,6 +67,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -66,6 +67,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
private MemberApiService memberApiService; private MemberApiService memberApiService;
@Autowired @Autowired
private ClerkService clerkService; private ClerkService clerkService;
@Autowired
private RightService rightService;
@Override @Override
public List<StaffClerkRelationDTO> listBindCode(String wxEnterpriseId, String enterpriseId, Set<String> clerkCodeList) { public List<StaffClerkRelationDTO> listBindCode(String wxEnterpriseId, String enterpriseId, Set<String> clerkCodeList) {
...@@ -167,17 +170,21 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -167,17 +170,21 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
if (StringUtils.isNotBlank(staffClerkRelationId)) { if (StringUtils.isNotBlank(staffClerkRelationId)) {
String wxEnterpriseId = dto.getWxEnterpriseId(); String wxEnterpriseId = dto.getWxEnterpriseId();
Integer manageFlag = dto.getManageFlag(); Integer manageFlag = dto.getManageFlag();
String enterpriseId = dto.getEnterpriseId();
//导购和店长需要设置主门店 //导购和店长需要设置主门店
if (manageFlag != null && manageFlag == 1) { if (manageFlag != null && manageFlag == 1) {
//do nothing //do nothing
} else { } else {
logger.info("设置主门店并创建活码:manageFlag:{},staffId:{}", manageFlag, staffId); logger.info("设置主门店并创建活码:manageFlag:{},staffId:{}", manageFlag, staffId);
clerkMainStoreRelatedService.getMainStoreByStaffId(staffId, wxEnterpriseId); clerkMainStoreRelatedService.getMainStoreByStaffId(staffId, wxEnterpriseId);
//有活码权限的企业
boolean flag = rightService.hasRightForAdmin(enterpriseId, "hb_m0206");
if (flag) {
// 绑定自动创建活码 // 绑定自动创建活码
HmQrcodeQDTO hmQrcodeQDTO = new HmQrcodeQDTO(); HmQrcodeQDTO hmQrcodeQDTO = new HmQrcodeQDTO();
hmQrcodeQDTO.setHmType(1); hmQrcodeQDTO.setHmType(1);
hmQrcodeQDTO.setWxEnterpriseId(wxEnterpriseId); hmQrcodeQDTO.setWxEnterpriseId(wxEnterpriseId);
hmQrcodeQDTO.setEnterpriseId(dto.getEnterpriseId()); hmQrcodeQDTO.setEnterpriseId(enterpriseId);
hmQrcodeQDTO.setName(tabHaobanStaff.getStaffName()); hmQrcodeQDTO.setName(tabHaobanStaff.getStaffName());
hmQrcodeQDTO.setPassFlag(1); hmQrcodeQDTO.setPassFlag(1);
hmQrcodeQDTO.setStoreId(dto.getStoreId()); hmQrcodeQDTO.setStoreId(dto.getStoreId());
...@@ -185,6 +192,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -185,6 +192,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
hmQrcodeQDTO.setInvokingType(channelCode); hmQrcodeQDTO.setInvokingType(channelCode);
hmQrcodeApiService.add(hmQrcodeQDTO); hmQrcodeApiService.add(hmQrcodeQDTO);
} }
}
//推入日志 //推入日志
staffClerkBindLogService.pushToMq(staffId, optStaffId, BindTypeEnum.BIND.getVal(), channelCode, staffClerkRelationId); staffClerkBindLogService.pushToMq(staffId, optStaffId, BindTypeEnum.BIND.getVal(), channelCode, staffClerkRelationId);
} }
......
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