|
|
@ -57,6 +57,9 @@ public class GoodsController { |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private UserCenter userCenter; |
|
|
|
private UserCenter userCenter; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private GoodsUserAddressService deliveryAddressService; |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/editGoodsMsg",method = RequestMethod.POST) |
|
|
|
@RequestMapping(value="/editGoodsMsg",method = RequestMethod.POST) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "编辑商品信息") |
|
|
|
@ApiOperation(value = "编辑商品信息") |
|
|
@ -277,7 +280,7 @@ public class GoodsController { |
|
|
|
map.put("goodsBrand", goodsBrand); |
|
|
|
map.put("goodsBrand", goodsBrand); |
|
|
|
|
|
|
|
|
|
|
|
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { |
|
|
|
if (userModel.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { |
|
|
|
map.put("merId", userModel.getAccount().getId()); |
|
|
|
map.put("merId", userModel.getAccount().getObjectId()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
map.put("type", type); |
|
|
|
map.put("type", type); |
|
|
@ -399,11 +402,6 @@ 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) { |
|
|
@ -441,6 +439,28 @@ public class GoodsController { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "/findDeliveryAddressById", method = RequestMethod.GET) |
|
|
|
|
|
|
|
@ResponseBody |
|
|
|
|
|
|
|
@ApiOperation(value = "查询收货地址详情") |
|
|
|
|
|
|
|
public ResponseData findDeliveryAddressById( |
|
|
|
|
|
|
|
@RequestParam(value = "id", required = true) Long id |
|
|
|
|
|
|
|
) { |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
GoodsUserAddress deliveryAddress = deliveryAddressService.queryDetail(id); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (deliveryAddress == null) { |
|
|
|
|
|
|
|
log.error("GoodsDetailController -> findGoodsDetailById() error!"); |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未找到相信息"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(deliveryAddress); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
|
|
|
|
log.error("GoodsDetailController --> findGoodsDetailById() error!", e); |
|
|
|
|
|
|
|
return ResponseMsgUtil.exception(e); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|