| | |
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.factory.RedPackDetailFactory;
|
| | | import com.yeshi.fanli.util.rocketmq.MQTopicName;
|
| | | import com.yeshi.fanli.util.shop.BanLiShopUtil;
|
| | | import com.yeshi.fanli.util.shop.BanLiShopOrderUtil;
|
| | |
|
| | | @Service
|
| | | public class BanLiShopOrderServiceImpl implements BanLiShopOrderService {
|
| | |
| | | banLiShopOrderMapper.insertSelective(order);
|
| | |
|
| | | // 添加订单号
|
| | | String orderNo = BanLiShopUtil.createOrderNo(order.getId());
|
| | | String orderNo = BanLiShopOrderUtil.createOrderNo(order.getId());
|
| | | // 更新订单号
|
| | | BanLiShopOrder update = new BanLiShopOrder();
|
| | | update.setId(order.getId());
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Transactional
|
| | | @Override
|
| | | public void rejectOrder(Long id, String msg) throws BanLiShopOrderException {
|
| | | // 判断订单是否处于付款状态
|
| | |
| | | throw new BanLiShopOrderException(1, "订单未处于待审核状态");
|
| | |
|
| | | // TODO 订单退款
|
| | |
|
| | | BanLiShopOrder update = new BanLiShopOrder();
|
| | | update.setState(BanLiShopOrder.STATE_REJECT);
|
| | | update.setStateDesc(msg);
|
| | | update.setUpdateTime(new Date());
|
| | | banLiShopOrderMapper.updateByPrimaryKeySelective(update);
|
| | | }
|
| | |
|
| | | }
|