Commit 71626b43 by huangZW

111

parent 017c0cc5
......@@ -16,7 +16,9 @@ import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO;
import com.gic.haoban.manage.api.service.DepartmentApiService;
import com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.vo.ClerkVo;
......@@ -26,15 +28,25 @@ public class ClerkController extends WebBaseController{
@Autowired
private ClerkService clerkService;
@Autowired
private DepartmentApiService departmentApiService;
@Autowired
private StaffDepartmentRelatedApiService staffDepartmentRelatedApiService;
//未绑定的clerkCode列表
@RequestMapping("/clerk-code-list")
public HaobanResponse clerkCodeList(String storeId,String departmentId) {
public HaobanResponse clerkCodeList(String departmentId) {
List<StaffDepartmentRelatedDTO> list = staffDepartmentRelatedApiService.listByDepartmentId(departmentId);
List<ClerkVo> result = new ArrayList<ClerkVo>();
if(StringUtils.isAnyBlank(storeId,departmentId)){
if(StringUtils.isAnyBlank(departmentId)){
return resultResponse(HaoBanErrCode.ERR_2);
}
DepartmentDTO departmentDTO = departmentApiService.selectById(departmentId);
if(departmentDTO == null){
return resultResponse(HaoBanErrCode.ERR_10009);
}
String storeId = departmentDTO.getRelatedId();
if(StringUtils.isAnyBlank(departmentId)){
return resultResponse(HaoBanErrCode.ERR_10009);
}
String bindFlag = "0";
//绑定的clerk
if("1".equals(bindFlag)){
......
......@@ -77,6 +77,7 @@ public enum HaoBanErrCode {
ERR_10007(10007,"成员不存在"),
ERR_10008(10008,"请不要过于频繁点击"),
ERR_10009(10009,"门店不存在"),
ERR_DEFINE(-888, "自定义错误"),
ERR_OTHER(-999, "未知错误code");
......
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