支付回调不加书bug
This commit is contained in:
@@ -75,6 +75,19 @@ public class PointController {
|
||||
return R.ok().put("page",pointList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取脉穴文章详情
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getPointDetail")
|
||||
public R getPointDetail(@RequestBody Map<String,Object> map){
|
||||
Integer integer = Integer.valueOf(map.get("pointId").toString());
|
||||
PointEntity byId = pointService.getById(integer);
|
||||
List<String> strings = JSON.parseArray(byId.getImages(), String.class);
|
||||
byId.setImageList(strings);
|
||||
return R.ok().put("point",byId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加脉穴文章
|
||||
* @return
|
||||
@@ -111,4 +124,41 @@ public class PointController {
|
||||
pointService.updateById(pointEntity);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取脉穴分类列表通过父级id
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getPointCategoryByPid")
|
||||
public R getPointCategoryByPid(@RequestBody Map<String,Object> map){
|
||||
Integer pointCategoryId = Integer.valueOf(map.get("id").toString());
|
||||
List<PointCategoryEntity> categoryListByPid = pointCategoryService.getCategoryListByPid(pointCategoryId);
|
||||
return R.ok().put("category",categoryListByPid);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取脉穴文章标题列表通过分类id
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/getPointsByCategoryId")
|
||||
public R getPointsByCategoryId(@RequestBody Map<String,Object> map){
|
||||
Integer pointCategoryId = Integer.valueOf(map.get("pointCategoryId").toString());
|
||||
List<PointEntity> points = pointService.getPoints(pointCategoryId);
|
||||
return R.ok().put("points",points);
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索脉穴标题列表
|
||||
* @param map
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/searchPointList")
|
||||
public R searchPointList(@RequestBody Map<String,Object> map){
|
||||
String keywords = map.get("keywords").toString();
|
||||
List<PointEntity> pointEntities = pointService.searchPoint(keywords);
|
||||
return R.ok().put("points",pointEntities);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -9,18 +9,18 @@ wxpay.notifyUrl:https://testapi.nuttyreading.com/pay/payNotify
|
||||
# ?? url
|
||||
wxpay.refundNotifyUrl:http://pjm6m9.natappfree.cc/pay/refundNotify
|
||||
# key pem
|
||||
wxpay.keyPemPath:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
#wxpay.keyPemPath:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
#wxpay.keyPemPath:C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||
#wxpay.keyPemPath:D:/hs/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||
wxpay.keyPemPath:D:/hs/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||
# ???
|
||||
wxpay.serialNo:679AECB2F7AC4183033F713828892BA640E4EEE3
|
||||
# API v3 key
|
||||
wxpay.apiV3Key:4aYFklzaULeGlr7oJPZ6rHWKcxjihZUF
|
||||
# ????
|
||||
wxpay.wechatPayCertificateUrl:/usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
#wxpay.wechatPayCertificateUrl:/usr/local/hs/peanut_book/target/classes/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
#wxpay.wechatPayCertificateUrl:C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
# wxpay.wechatPayCertificateUrl:D:/hs/nuttyreading-java/src/main/resources/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
wxpay.wechatPayCertificateUrl:D:/hs/nuttyreading-java/src/main/resources/cent/wechatpay_7B5676E3CDF56680D0414A009CE501C844DBE2D6.pem
|
||||
# ?? url
|
||||
wxpay.privateKeyUrl:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
#wxpay.privateKeyUrl:/usr/local/hs/peanut_book/target/classes/cent/apiclient_key.pem
|
||||
#wxpay.privateKeyUrl:C:/Users/Cauchy/IdeaProjects/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||
#wxpay.privateKeyUrl:D:/hs/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||
wxpay.privateKeyUrl:D:/hs/nuttyreading-java/src/main/resources/cent/apiclient_key.pem
|
||||
Reference in New Issue
Block a user