|
@@ -137,8 +137,12 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
|
|
boolean b = updateById(orders);
|
|
boolean b = updateById(orders);
|
|
if (!b) throw new RuntimeException("购买异常,请重新登录或联系管理员!");
|
|
if (!b) throw new RuntimeException("购买异常,请重新登录或联系管理员!");
|
|
|
|
|
|
- //todo:给每个购买他商品的边民发一条支付成功消息,通知边民发起缴税申请以及缴费申请
|
|
|
|
|
|
+
|
|
TbOrders t = getById(id);
|
|
TbOrders t = getById(id);
|
|
|
|
+ //修改对应的一级市场订单状态:BeingOrder值为已被下单
|
|
|
|
+ levelOneServerInterface.updateBeingOrder(t.getLevelOneOrderId());
|
|
|
|
+
|
|
|
|
+ //todo:给每个购买他商品的边民发一条支付成功消息,通知边民发起缴税申请以及缴费申请
|
|
MessageDto dto = new MessageDto();
|
|
MessageDto dto = new MessageDto();
|
|
dto.setUrl("/pages/market/two/leader/order");
|
|
dto.setUrl("/pages/market/two/leader/order");
|
|
dto.setUserId(t.getLeaderId());
|
|
dto.setUserId(t.getLeaderId());
|
|
@@ -285,7 +289,7 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
|
|
/**
|
|
/**
|
|
* 增 一级市场已完成订单进行转售时,新增二级市场订单
|
|
* 增 一级市场已完成订单进行转售时,新增二级市场订单
|
|
*/
|
|
*/
|
|
- boolean addOrderByResale(SoMap so) {
|
|
|
|
|
|
+ public boolean addOrderByResale(SoMap so) {
|
|
OrderDto orderDto = levelOneServerInterface.getOrderDtoById(so.getLong("id"));
|
|
OrderDto orderDto = levelOneServerInterface.getOrderDtoById(so.getLong("id"));
|
|
if (null == orderDto) throw new RuntimeException("当前一级市场订单为空,请联系管理员!");
|
|
if (null == orderDto) throw new RuntimeException("当前一级市场订单为空,请联系管理员!");
|
|
|
|
|
|
@@ -324,6 +328,25 @@ public class TbOrdersService extends ServiceImpl<TbOrdersMapper, TbOrders> imple
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * 根据一级市场id查询二级市场订单
|
|
|
|
+ */
|
|
|
|
+ public TbOrders getByLevelOneOrderId(SoMap so) {
|
|
|
|
+ Long levelOneOrderId = so.getLong("levelOneOrderId");
|
|
|
|
+ LambdaQueryWrapper<TbOrders> wrapper = new LambdaQueryWrapper<>();
|
|
|
|
+ wrapper.eq(TbOrders::getLevelOneOrderId, levelOneOrderId);
|
|
|
|
+ List<TbOrders> tbOrders = tbOrdersMapper.selectList(wrapper);
|
|
|
|
+
|
|
|
|
+ if(tbOrders.size()>0) return tbOrders.get(0);
|
|
|
|
+ return null;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /**
|
|
|
|
+ * 修改转售金额
|
|
|
|
+ */
|
|
|
|
+ public boolean updateResalePrice(TbOrders tbOrders) {
|
|
|
|
+ return updateById(tbOrders);
|
|
|
|
+ }
|
|
|
|
+ /**
|
|
* 增 二级市场订单
|
|
* 增 二级市场订单
|
|
*/
|
|
*/
|
|
boolean addByDetail(GoodsDemandVo goodsDemandVo) {
|
|
boolean addByDetail(GoodsDemandVo goodsDemandVo) {
|