Commit fc283f3b by qwmqiuwenmin

fix

parent cb29e507
......@@ -37,6 +37,8 @@ import com.gic.haoban.manage.web.vo.LoginVO;
import com.gic.haoban.manage.web.vo.StoreVo;
import com.gic.redis.data.util.RedisUtil;
import okhttp3.internal.http2.ErrorCode;
@RestController
public class DepartmentContoller extends WebBaseController{
......@@ -127,7 +129,10 @@ public class DepartmentContoller extends WebBaseController{
department.setChainId(dto.getChainId() + Constant.ID_SEPARATOR + dto.getDepartmentId());
department.setIsStore(0);
department.setLevel(dto.getLevel() + 1);
departmentApiService.add(department);
HaobanResponse hr = departmentApiService.add(department);
if(hr.getErrorCode() != 1){
return resultResponse(HaoBanErrCode.ERR_DEFINE, hr.getMessage(), null, hr.getMessage());
}
return resultResponse(HaoBanErrCode.ERR_1,department);
......
......@@ -38,6 +38,7 @@ public class WebBaseController {
public HaobanResponse resultResponse(HaoBanErrCode errCode, String message,Object data,String detailError) {
HaobanResponse response = new HaobanResponse();
response.setMessage(message);
response.setDetailError(detailError);
response.setErrorCode(errCode.getCode());
return response;
}
......
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