Merge branch 'score-shop' of http://120.27.238.55:7000/r/xzx into score-shop
| | |
| | | throw new RestException(-3, "无权限操作"); |
| | | } |
| | | |
| | | if (userId.equals(order.getJhyId())) { |
| | | order.setStatus(JhyOrder.ORDER_STATUS_WAITING); |
| | | } else { |
| | | order.setStatus(JhyOrder.ORDER_STATUS_CANCEL); |
| | | } |
| | | |
| | | jhyOrderMapper.updateByPrimaryKey(order); |
| | | } |
| | | |
| | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "JhyOrderListVo", description = "集物员订单列表返回参数类") |
| | | public class JhyOrderListVo { |
| | |
| | | @ApiModelProperty(value = "重量") |
| | | private String weight; |
| | | |
| | | @ApiModelProperty(value = "取货时间") |
| | | private String receivingTime; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | |
| | | ,a.weight |
| | | ,a.status |
| | | ,a.remark |
| | | ,date_format(a.receiving_time, '%Y-%m-%d %H:%i') receivingTime |
| | | ,CONCAT(a.reserve_date, ' ', a.reserve_time) reserveTime |
| | | ,GROUP_CONCAT(b.title) items |
| | | ,c.username jhyName |
| | |
| | | </if> |
| | | </where> |
| | | group by a.id |
| | | order by a.receiving_time desc, a.id desc |
| | | </select> |
| | | </mapper> |
| | |
| | | } |
| | | |
| | | AccountInfo accountInfo = accountInfoMapper.selectAccountInfoByUserId(addGoodsOrderDto.getUserId()); |
| | | |
| | | log.info("积分:{}", accountInfo.getCollectScore()); |
| | | if (accountInfo.getCollectScore() == null) { |
| | | throw new RestException(-3, "积分不足"); |
| | | } |
| | | |
| | | BigDecimal totalPrice = sku.getPresentPrice().multiply(BigDecimal.valueOf(addGoodsOrderDto.getCnt())); |
| | | BigDecimal score = new BigDecimal(accountInfo.getCollectScore()); |
| | | log.info("积分:{}", score); |
| | | log.info("积分1:{}", totalPrice); |
| | | if (score.compareTo(totalPrice) < 0) { |
| | | throw new RestException(-3, "积分不足"); |
| | | } |