|
@@ -1,5 +1,6 @@
|
|
|
package com.fuint.module.backendApi.controller;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
|
|
|
import com.fuint.common.Constants;
|
|
|
import com.fuint.common.dto.AccountInfo;
|
|
|
import com.fuint.common.dto.ParamDto;
|
|
@@ -151,7 +152,7 @@ public class BackendStaffController extends BaseController {
|
|
|
@PreAuthorize("@pms.hasPermission('staff:list')")
|
|
|
public ResponseObject saveHandler(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
|
|
|
String token = request.getHeader("Access-Token");
|
|
|
- Long id = Long.valueOf(params.get("id") == null ? "0" : params.get("id").toString());
|
|
|
+ Long id = params.get("id") == null ||params.get("id").equals("") ? null :Long.parseLong( params.get("id").toString());
|
|
|
Long storeId = Long.valueOf(params.get("storeId") == null ? "0" : params.get("storeId").toString());
|
|
|
String category = params.get("category") == null ? "0" : params.get("category").toString();
|
|
|
String mobile = params.get("mobile") == null ? "" : CommonUtil.replaceXSS(params.get("mobile").toString());
|
|
@@ -170,7 +171,7 @@ public class BackendStaffController extends BaseController {
|
|
|
}
|
|
|
|
|
|
MtStaff mtStaff = new MtStaff();
|
|
|
- if (StringUtil.isNotEmpty(String.valueOf(id))) {
|
|
|
+ if (ObjectUtils.isNotEmpty(id)) {
|
|
|
mtStaff = staffService.queryStaffById(Long.valueOf(id));
|
|
|
}
|
|
|
|