增加商品校验

This commit is contained in:
季圣华
2021-06-20 23:53:58 +08:00
parent e5ce3194ee
commit 09cf354086
4 changed files with 56 additions and 24 deletions

View File

@@ -55,8 +55,9 @@ public class MaterialController {
@RequestParam("otherField3") String otherField3, @RequestParam("unit") String unit,@RequestParam("unitId") Long unitId,
HttpServletRequest request)throws Exception {
Map<String, Object> objectMap = new HashMap<String, Object>();
int exist = materialService.checkIsExist(id, name, model, color, standard, mfrs,
otherField1, otherField2, otherField3, unit, unitId);
int exist = materialService.checkIsExist(id, name, StringUtil.toNull(model), StringUtil.toNull(color),
StringUtil.toNull(standard), StringUtil.toNull(mfrs), StringUtil.toNull(otherField1),
StringUtil.toNull(otherField2), StringUtil.toNull(otherField3), StringUtil.toNull(unit), unitId);
if(exist > 0) {
objectMap.put("status", true);
} else {