Commit 58d6360e by huangZW

111

parent 289b8958
......@@ -48,9 +48,19 @@ public class StaffDTO implements Serializable{
private String staffDepartmentRelatedId;
private int clerkType;
private static final long serialVersionUID = 1L;
public String getStaffDepartmentRelatedId() {
public int getClerkType() {
return clerkType;
}
public void setClerkType(int clerkType) {
this.clerkType = clerkType;
}
public String getStaffDepartmentRelatedId() {
return staffDepartmentRelatedId;
}
......
......@@ -15,9 +15,12 @@ import org.springframework.web.bind.annotation.RestController;
import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.csp.sentinel.util.StringUtil;
import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.StaffDTO;
import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO;
......@@ -38,7 +41,8 @@ public class ClerkController extends WebBaseController{
private StaffApiService staffApiService;
@Autowired
private StaffDepartmentRelatedApiService staffDepartmentRelatedApiService;
@Autowired
private StoreService storeService;
//导购列表
@RequestMapping("/clerk-list")
public HaobanResponse clerkList(String storeId,String bindFlag,String departmentId) {
......@@ -93,7 +97,7 @@ public class ClerkController extends WebBaseController{
}
//选择成员列表
@RequestMapping("/staff-list")
public HaobanResponse staffList(String departmentId) {
public HaobanResponse staffList(String storeId,String departmentId) {
boolean b = StringUtils.isAnyBlank(departmentId);
logger.info("b===========================>{}",b);
if(StringUtils.isAnyBlank(departmentId)){
......@@ -116,6 +120,23 @@ public class ClerkController extends WebBaseController{
dto.setBindFlag(0);
}
}
String storeClerkCode = "";
StoreDTO storeDTO = storeService.getStore(storeId);
if(storeDTO!=null){
String clerkId = storeDTO.getClerkId();
ClerkDTO clerkDTO = clerkService.getClerkByClerkId(clerkId);
if(clerkDTO!=null){
storeClerkCode = clerkDTO.getClerkCode();
}
}
if(StringUtil.isNotBlank(storeClerkCode)){
for(StaffDTO dto :resultlist){
if(storeClerkCode.equals(dto.getClerkCode())){
dto.setClerkType(1);
}
}
}
return resultResponse(HaoBanErrCode.ERR_1,resultlist);
}
......
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