Commit 5fc10b1e by jinxin

Merge branch 'bugfix/2023-03-01' into 'master'

Bugfix/2023 03 01

See merge request !970
parents 23804876 68c6abd5
package com.gic.haoban.manage.web.controller;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.authcenter.commons.dto.AuthcenterUserDetails;
......@@ -493,7 +494,6 @@ public class EnterpriseController extends WebBaseController {
vo.setEnterpriseId(enterpriseId);
vo.setEnterpriseName(enterprise.getEnterpriseName());
vo.setBrandName(enterprise.getBrandName());
}
ClerkDTO clerk = clerkService.getSuperAdminByEnterpriseId(enterpriseId);
if (clerk != null) {
vo.setClerkId(clerk.getClerkId());
......@@ -502,6 +502,18 @@ public class EnterpriseController extends WebBaseController {
vo.setPhoneNumber(clerk.getPhoneNumber());
vo.setNationCode(clerk.getNationcode());
}
}else {
//enterpriseId 参数可以是企业id,也可以是企业名称
//按名称去查
EnterpriseAndUserDTO dto = enterpriseService.getEnterpriseAndUserByName(enterpriseId);
vo = EntityUtil.changeEntityByJSON(EnterpriseSearchVO.class, dto);
if (vo != null) {
EnterpriseDTO enterprise1 = enterpriseService.getEnterpriseById(vo.getEnterpriseId());
if (enterprise1 != null) {
vo.setBrandName(enterprise1.getBrandName());
}
}
}
return resultResponse(HaoBanErrCode.ERR_1, vo);
}
......
package com.gic.haoban.manage.web.controller;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
......@@ -225,7 +226,6 @@ public class WxEnterpriseController extends WebBaseController {
vo.setEnterpriseId(enterpriseId);
vo.setEnterpriseName(enterprise.getEnterpriseName());
vo.setBrandName(enterprise.getBrandName());
}
ClerkDTO clerk = clerkService.getSuperAdminByEnterpriseId(enterpriseId);
if (clerk != null) {
vo.setClerkId(clerk.getClerkId());
......@@ -234,6 +234,18 @@ public class WxEnterpriseController extends WebBaseController {
vo.setPhoneNumber(clerk.getPhoneNumber());
vo.setNationCode(clerk.getNationcode());
}
}else {
//enterpriseId 参数可以是企业id,也可以是企业名称
//按名称去查
EnterpriseAndUserDTO dto = enterpriseService.getEnterpriseAndUserByName(enterpriseId);
vo = EntityUtil.changeEntityByJSON(EnterpriseSearchVO.class, dto);
if (vo != null) {
EnterpriseDTO enterprise1 = enterpriseService.getEnterpriseById(vo.getEnterpriseId());
if (enterprise1 != null) {
vo.setBrandName(enterprise1.getBrandName());
}
}
}
return resultResponse(HaoBanErrCode.ERR_1, vo);
}
......
......@@ -50,6 +50,10 @@ public class MaidianLogController extends WebBaseController {
com.gic.clerk.api.dto.ClerkDTO clerkDTO = clerkService.getClerkByClerkCode(store.getEnterpriseId(), maidianLogDTO.getClerkCode());
maidianLogDTO.setEnterpriseId(store.getEnterpriseId());
if (clerkDTO != null) {
//导购变更门店
if (!clerkDTO.getStoreId().equals(maidianLogDTO.getStoreId())){
continue;
}
maidianLogDTO.setClerkId(clerkDTO.getClerkId());
}
}
......
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