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