Commit 47895842 authored by zhangfeng's avatar zhangfeng

Merge branch 'refs/heads/feature_member_score_zhangfeng' into feature_member_score

parents 81b95ff0 7acafb18
...@@ -50,7 +50,7 @@ public class OrderApiImpl implements OrderApi { ...@@ -50,7 +50,7 @@ public class OrderApiImpl implements OrderApi {
BeanUtils.copyProperties(orderDO, orderRespDTO); BeanUtils.copyProperties(orderDO, orderRespDTO);
// 设置目的地信息 // 设置目的地信息
OrderObjectiveDO orderObjectiveDO = objectiveService.getByOrderId(id); OrderObjectiveDO orderObjectiveDO = objectiveService.getByOrderId(orderDO.getOrderId());
if (orderObjectiveDO != null) { if (orderObjectiveDO != null) {
OrderObjectiveApiDO orderObjectiveApiDO = new OrderObjectiveApiDO(); OrderObjectiveApiDO orderObjectiveApiDO = new OrderObjectiveApiDO();
BeanUtils.copyProperties(orderObjectiveDO, orderObjectiveApiDO); BeanUtils.copyProperties(orderObjectiveDO, orderObjectiveApiDO);
...@@ -58,7 +58,7 @@ public class OrderApiImpl implements OrderApi { ...@@ -58,7 +58,7 @@ public class OrderApiImpl implements OrderApi {
} }
// 设置收货人信息 // 设置收货人信息
OrderConsigneeDO orderConsigneeByOrderId = orderConsigneeService.getOrderConsigneeByOrderId(id); OrderConsigneeDO orderConsigneeByOrderId = orderConsigneeService.getOrderConsigneeByOrderId(orderDO.getOrderId());
if (orderConsigneeByOrderId != null) { if (orderConsigneeByOrderId != null) {
OrderConsigneeApiDO orderConsigneeApiDO = new OrderConsigneeApiDO(); OrderConsigneeApiDO orderConsigneeApiDO = new OrderConsigneeApiDO();
BeanUtils.copyProperties(orderConsigneeByOrderId, orderConsigneeApiDO); BeanUtils.copyProperties(orderConsigneeByOrderId, orderConsigneeApiDO);
......
...@@ -18,6 +18,7 @@ public class RedeemRewardReqVO { ...@@ -18,6 +18,7 @@ public class RedeemRewardReqVO {
private Long memberId; private Long memberId;
@ApiModelProperty(value = "礼品id", required = true) @ApiModelProperty(value = "礼品id", required = true)
@NotNull(message = "礼品id不能为空")
private Long rewardId; private Long rewardId;
@ApiModelProperty(value = "兑换数量", required = true) @ApiModelProperty(value = "兑换数量", required = true)
......
...@@ -193,6 +193,9 @@ public class RedeemRewardApiImpl implements RedeemRewardApi { ...@@ -193,6 +193,9 @@ public class RedeemRewardApiImpl implements RedeemRewardApi {
Long rewardId = redeemRewardReqVOList.get(0).getRewardId(); Long rewardId = redeemRewardReqVOList.get(0).getRewardId();
// 查询礼品 // 查询礼品
RewardDO rewardDO = rewardMapper.selectById(rewardId); RewardDO rewardDO = rewardMapper.selectById(rewardId);
if (rewardDO == null) {
throw exception(REWARD_NOT_EXISTS);
}
// 礼品未开启 // 礼品未开启
if (rewardDO.getStatus() != RewardStatusEnum.ENABLED.getValue() || rewardService.validateExpire(rewardDO)) { if (rewardDO.getStatus() != RewardStatusEnum.ENABLED.getValue() || rewardService.validateExpire(rewardDO)) {
throw exception(REWARD_NOT_ENABLE); throw exception(REWARD_NOT_ENABLE);
......
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