| | |
| | | order.setOrderNo(orderNo);
|
| | | banLiShopOrderMapper.updateByPrimaryKeySelective(update);
|
| | |
|
| | | // 增加销量
|
| | | banLiShopGoodsSetService.addSalesCount(order.getGoodsSet().getId(), 1);
|
| | | banLiShopGoodsService.addSalesCount(order.getGoods().getId(), 1);
|
| | |
|
| | | // 订单添加成功 ,延时通知后续
|
| | | sendPlaceOrderMsg(order.getId(), order.getUid());
|
| | | }
|
| | |
| | | @Override
|
| | | public List<BanLiShopOrder> listByUid(Long uid, int page, int pageSize) {
|
| | |
|
| | | return banLiShopOrderMapper.listByUid(null, uid, (page - 1) * pageSize, pageSize);
|
| | | return banLiShopOrderMapper.listByUidAndState(null, uid, (page - 1) * pageSize, pageSize);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countByUid(Long uid) {
|
| | | return banLiShopOrderMapper.countByUid(null, uid);
|
| | | return banLiShopOrderMapper.countByUidAndState(null, uid);
|
| | | }
|
| | |
|
| | | @Override
|
| | |
| | | update.setState(BanLiShopOrder.STATE_REJECT);
|
| | | update.setStateDesc(msg);
|
| | | update.setUpdateTime(new Date());
|
| | | update.setRejectTime(new Date());
|
| | | banLiShopOrderMapper.updateByPrimaryKeySelective(update);
|
| | | transactionManager.commit(transactionStatus);
|
| | | } catch (Exception e) {
|
| | |
| | | }
|
| | |
|
| | | if (pay.getHongBaoPrice() != null && pay.getHongBaoPrice().compareTo(new BigDecimal(0)) > 0) {
|
| | | BigDecimal money = redPackBalanceService.getBalance(uid);
|
| | | BigDecimal money = null;
|
| | | try {
|
| | | money = redPackBalanceService.getBalance(uid);
|
| | | } catch (RedPackBalanceException e) {
|
| | | throw new BanLiShopOrderException(25, "红包功能异常");
|
| | | }
|
| | | if (money.compareTo(pay.getHongBaoPrice()) < 0) {
|
| | | throw new BanLiShopOrderException(24, "红包余额不足");
|
| | | }
|
| | |
| | | return banLiShopOrderMapper.selectByOrderNo(orderNo);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public List<BanLiShopOrder> listByUidAndState(Long uid, List<Integer> stateList, int page, int pageSize) {
|
| | | return banLiShopOrderMapper.listByUidAndState(stateList, uid, (page - 1) * pageSize, pageSize);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public long countByUidAndState(Long uid, List<Integer> stateList) {
|
| | | return banLiShopOrderMapper.countByUidAndState(stateList, uid);
|
| | | }
|
| | |
|
| | | }
|