支付回调不加书bug
This commit is contained in:
@@ -11,4 +11,6 @@ public interface PointCategoryService extends IService<PointCategoryEntity> {
|
||||
|
||||
List<PointCategoryEntity> getCategoryList();
|
||||
|
||||
List<PointCategoryEntity> getCategoryListByPid(Integer id);
|
||||
|
||||
}
|
||||
|
||||
@@ -11,4 +11,8 @@ public interface PointService extends IService<PointEntity> {
|
||||
|
||||
|
||||
Page<PointEntity> getPointList(Map<String,Object> map);
|
||||
|
||||
List<PointEntity> getPoints(Integer pointCategoryId);
|
||||
|
||||
List<PointEntity> searchPoint(String keywords);
|
||||
}
|
||||
|
||||
@@ -410,6 +410,8 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
BigDecimal totalWeight = new BigDecimal(0);
|
||||
List<ExpressCommodity> commodityList = new ArrayList<>();
|
||||
List<Integer> buyOrderIdList = new ArrayList<>();
|
||||
Integer ln = 0;
|
||||
String remark ="";
|
||||
for (BuyOrderProduct buyOrderProduct : buyOrderProductList) {
|
||||
buyOrderIdList.add(buyOrderProduct.getOrderId());
|
||||
int productId = buyOrderProduct.getProductId();
|
||||
@@ -422,10 +424,15 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
totalWeight = totalWeight.add(
|
||||
BigDecimal.valueOf(product.getWeight().doubleValue()).multiply(new BigDecimal(buyOrderProduct.getQuantity())).divide(BigDecimal.valueOf(1000),2,RoundingMode.HALF_UP)
|
||||
);
|
||||
// totalWeight = totalWeight.setScale(0, RoundingMode.UP);//对数值做增量舍,单位是g
|
||||
if(ln>0){
|
||||
remark += commodity.getGoodsName();
|
||||
}
|
||||
commodityList.add(commodity);
|
||||
ln++;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 获取用户地址
|
||||
Integer orderId = buyOrderProductList.get(0).getOrderId();
|
||||
|
||||
@@ -459,6 +466,7 @@ public class BuyOrderServiceImpl extends ServiceImpl<BuyOrderDao, BuyOrder> impl
|
||||
expressOrder.setCity(buyOrder.getCity());
|
||||
expressOrder.setCounty(buyOrder.getDistrict());
|
||||
expressOrder.setAddress(buyOrder.getAddress());
|
||||
expressOrder.setRemark(remark);
|
||||
// 生成快递面单
|
||||
ExpressOrderResponseVo response = expressOrderService.placeExpressOrder(expressOrder);
|
||||
String expressOrderSn = response.getOrder().getLogisticCode();
|
||||
|
||||
@@ -77,7 +77,7 @@ public class ExpressOrderServiceImpl extends ServiceImpl<ExpressOrderDao, Expres
|
||||
orderRequestVo.setCommodity(expressOrder.getCommodity());
|
||||
orderRequestVo.setWeight(expressOrder.getTotalWeight().doubleValue());
|
||||
orderRequestVo.setRemark(expressOrder.getRemark());
|
||||
orderRequestVo.setTemplateSize("130");
|
||||
orderRequestVo.setTemplateSize("150");
|
||||
String requestData = JSONObject.toJSONString(orderRequestVo);
|
||||
|
||||
Map<String, String> params = new HashMap<>();
|
||||
|
||||
@@ -32,4 +32,13 @@ public class PointCategoryServiceImpl extends ServiceImpl<PointCategoryDao, Poin
|
||||
return list;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<PointCategoryEntity> getCategoryListByPid(Integer id) {
|
||||
LambdaQueryWrapper<PointCategoryEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PointCategoryEntity::getPid,id);
|
||||
wrapper.orderByDesc(PointCategoryEntity::getSort);
|
||||
List<PointCategoryEntity> list = list(wrapper);
|
||||
return list;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,11 +43,27 @@ public class PointServiceImpl extends ServiceImpl<PointDao, PointEntity> impleme
|
||||
return pointEntityPage;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PointEntity> getPoints(Integer pointCategoryId) {
|
||||
LambdaQueryWrapper<PointEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PointEntity::getPointCategoryId,pointCategoryId);
|
||||
List<PointEntity> list = list(wrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PointEntity> searchPoint(String keywords) {
|
||||
LambdaQueryWrapper<PointEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.like(PointEntity::getTitle,keywords);
|
||||
wrapper.orderByDesc(PointEntity::getSort);
|
||||
List<PointEntity> list = list(wrapper);
|
||||
return list;
|
||||
}
|
||||
|
||||
private void createIds(Integer id,List<Integer> list){
|
||||
private void createIds(Integer id, List<Integer> list){
|
||||
LambdaQueryWrapper<PointCategoryEntity> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(PointCategoryEntity::getPid,id);
|
||||
wrapper.orderByDesc(PointCategoryEntity::getSort);
|
||||
List<PointCategoryEntity> pointCategoryEntities = pointCategoryDao.selectList(wrapper);
|
||||
for (PointCategoryEntity p :pointCategoryEntities){
|
||||
createIds(p.getId(),list);
|
||||
|
||||
Reference in New Issue
Block a user