|
|
@ -157,7 +157,7 @@ public class GoodsController { |
|
|
|
|| body.getGoodsId() == null |
|
|
|
|| body.getGoodsId() == null |
|
|
|
|| body.getOriginalPrice() == null |
|
|
|
|| body.getOriginalPrice() == null |
|
|
|
|| body.getSalePrice() == null |
|
|
|
|| body.getSalePrice() == null |
|
|
|
|| body.getPurLimit() == null |
|
|
|
// || body.getPurLimit() == null
|
|
|
|
|| body.getStock() == null |
|
|
|
|| body.getStock() == null |
|
|
|
|| body.getSalesEndTime() == null |
|
|
|
|| body.getSalesEndTime() == null |
|
|
|
|| StringUtils.isBlank(body.getShowImg()) |
|
|
|
|| StringUtils.isBlank(body.getShowImg()) |
|
|
@ -263,9 +263,23 @@ public class GoodsController { |
|
|
|
|
|
|
|
|
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
Map<String , Object> map = new HashMap<>(); |
|
|
|
map.put("title", title); |
|
|
|
map.put("title", title); |
|
|
|
map.put("goodsType", goodsType); |
|
|
|
|
|
|
|
|
|
|
|
if (goodsType != null) { |
|
|
|
|
|
|
|
GoodsType goodsType1 = goodsTypeService.queryDetail(goodsType); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (goodsType1.getParentId() == null) { |
|
|
|
|
|
|
|
map.put("goodsTypeParent", goodsType); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
map.put("goodsType", goodsType); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
map.put("goodsBrand", goodsBrand); |
|
|
|
map.put("goodsBrand", goodsBrand); |
|
|
|
map.put("merId", userModel.getAccount().getId()); |
|
|
|
|
|
|
|
|
|
|
|
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { |
|
|
|
|
|
|
|
map.put("merId", userModel.getAccount().getId()); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
map.put("type", type); |
|
|
|
map.put("type", type); |
|
|
|
map.put("status", status); |
|
|
|
map.put("status", status); |
|
|
|
|
|
|
|
|
|
|
@ -278,7 +292,6 @@ public class GoodsController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/getGoodsSpecsList",method = RequestMethod.GET) |
|
|
|
@RequestMapping(value="/getGoodsSpecsList",method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询商品规格列表") |
|
|
|
@ApiOperation(value = "查询商品规格列表") |
|
|
@ -366,6 +379,7 @@ public class GoodsController { |
|
|
|
public ResponseData deleteGoodsSpecs(@RequestParam(value = "id" , required = false) Long id) { |
|
|
|
public ResponseData deleteGoodsSpecs(@RequestParam(value = "id" , required = false) Long id) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
goodsSpecsService.delete(id , false); |
|
|
|
goodsSpecsService.delete(id , false); |
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success("删除成功"); |
|
|
|
return ResponseMsgUtil.success("删除成功"); |
|
|
@ -385,6 +399,11 @@ public class GoodsController { |
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
SessionObject sessionObject = userCenter.getSessionObject(request); |
|
|
|
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject(); |
|
|
|
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (userModel.getAccount().getObjectType() != SecUserObjectTypeEnum.type2.getCode()) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
GoodsMsg goodsMsg = goodsMsgService.queryDetail(id); |
|
|
|
GoodsMsg goodsMsg = goodsMsgService.queryDetail(id); |
|
|
|
|
|
|
|
|
|
|
|
if (goodsMsg.getStatus() == 1) { |
|
|
|
if (goodsMsg.getStatus() == 1) { |
|
|
|