Commit 24c5f1ea by 墨竹

fix:会员工具增加主门店

parent 8f373ff7
...@@ -89,6 +89,8 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -89,6 +89,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
private Config config; private Config config;
@Autowired @Autowired
private WxApplicationApiService wxApplicationApiService; private WxApplicationApiService wxApplicationApiService;
@Autowired
private ClerkMainStoreRelatedApiService clerkMainStoreRelatedApiService;
/** /**
...@@ -422,6 +424,17 @@ public class WxEnterpriseInfoController extends WebBaseController { ...@@ -422,6 +424,17 @@ public class WxEnterpriseInfoController extends WebBaseController {
logger.info("企业不存在没有绑定,wxEnterpriseId:{}", wxEnterpriseId); logger.info("企业不存在没有绑定,wxEnterpriseId:{}", wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_400002); return resultResponse(HaoBanErrCode.ERR_400002);
} }
StaffDTO staffDTO = staffApiService.selectByUserIdAndEnterpriseId(wxUserId,wxEnterpriseId);
if (staffDTO == null) {
logger.info("查询到该员工,wxUserId:{}", wxUserId);
return resultResponse(HaoBanErrCode.ERR_400017);
}
String staffId = staffDTO.getStaffId();
ClerkMainStoreRelatedDTO clerkMainStoreRelatedDTO = clerkMainStoreRelatedApiService.getWxEnterpriseIdAndStaffId(wxEnterpriseId, staffId);
if (clerkMainStoreRelatedDTO == null) {
logger.info("未设置主门店,wxUserId:{}", wxUserId);
return resultResponse(HaoBanErrCode.ERR_400021);
}
//获取自建客户详情 //获取自建客户详情
ExternalUserDTO externalUserDTO = memberUnionidRelatedApiService.getCorpSelfExternalUseridInfo(wxEnterpriseId, wxUserId, externalUserid); ExternalUserDTO externalUserDTO = memberUnionidRelatedApiService.getCorpSelfExternalUseridInfo(wxEnterpriseId, wxUserId, externalUserid);
if (externalUserDTO == null) { if (externalUserDTO == null) {
......
...@@ -94,6 +94,7 @@ public enum HaoBanErrCode { ...@@ -94,6 +94,7 @@ public enum HaoBanErrCode {
ERR_400018(400018, "已有待审核的门店字段信息提交,请等待审核完再提交"), ERR_400018(400018, "已有待审核的门店字段信息提交,请等待审核完再提交"),
ERR_400019(400019, "门店面积不合法"), ERR_400019(400019, "门店面积不合法"),
ERR_400020(400020, "门店图片不能为空"), ERR_400020(400020, "门店图片不能为空"),
ERR_400021(400021, "您还未绑定主门店,请前往好办-我的-设置中操作设为主门店"),
/** /**
* 文件不存在 * 文件不存在
......
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