This commit is contained in:
Carl 2022-01-30 15:52:41 +08:00
parent 3deeab7bc2
commit 3ca9cbe111
4 changed files with 19 additions and 11 deletions

View File

@ -131,7 +131,6 @@ public class OrderController {
Map<String, String> returnMap = new HashMap<>(); Map<String, String> returnMap = new HashMap<>();
returnMap.put("orderNumber", ordersEntity.getOrderNo()); returnMap.put("orderNumber", ordersEntity.getOrderNo());
returnMap.put("orderAmount", ordersEntity.getOrderAmount()); returnMap.put("orderAmount", ordersEntity.getOrderAmount());
// return ResponseDTO.succData(returnMap,wxpayService.generateQRCode(wxPayEntity));
return ResponseDTO.succData(returnMap, wxpayService.generateQRCode(wxPayEntity)); return ResponseDTO.succData(returnMap, wxpayService.generateQRCode(wxPayEntity));
} }
}catch (Exception e){ }catch (Exception e){

View File

@ -31,7 +31,11 @@ public class GoodService {
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
public GoodsEntity listGoodsByProductCode(String productCode){ public GoodsEntity listGoodsByProductCode(String productCode){
return goodsDao.findByProductCode(productCode); String ip = "https://shop.royalcanin.com.cn/royalcanin/royalcanin/";
GoodsEntity goodsEntity = goodsDao.findByProductCode(productCode);
goodsEntity.setShowImgFile(ip+goodsEntity.getPicture());
goodsEntity.setPicture(ip+goodsEntity.getPicture());
return goodsEntity;
} }
public List<GoodsEntity> listGoodsByNameBankNameTagUsedAge(String title,String petType){ public List<GoodsEntity> listGoodsByNameBankNameTagUsedAge(String title,String petType){

View File

@ -238,14 +238,19 @@ public class OrderService {
JSONObject jsonObject = JSONObject.parseObject(result); JSONObject jsonObject = JSONObject.parseObject(result);
String afterDecodeResult = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY); String afterDecodeResult = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY);
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(afterDecodeResult); com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(afterDecodeResult);
JSONObject jsonObjectResult = (JSONObject)jsonArray.get(0); for (int i = 0; i < jsonArray.size();i++){
if (queryEntity.getOrderNumber() != null &&queryEntity.getOrderNumber() != "") { JSONObject jsonObjectResult = (JSONObject)jsonArray.get(i);
OrderEntity orderEntity = ordersDao.findByOrderId(queryEntity.getOrderNumber()); OrderEntity orderEntity = ordersDao.findByOrderId(jsonObjectResult.getString("orderNumber"));
//新增支付方式paytype if (orderEntity == null){
jsonObjectResult.put("paytype",orderEntity.getPayType()); jsonObjectResult.put("paytype","0");
jsonObjectResult.put("basePoint",orderEntity.getBasePoint()); jsonObjectResult.put("basePoint","0");
} }else {
//新增支付方式paytype
jsonObjectResult.put("paytype",orderEntity.getPayType());
jsonObjectResult.put("basePoint",orderEntity.getBasePoint());
}
}
//记录服务响应时间 //记录服务响应时间
addOperatreFullData(url+"orderMaster/query",queryEntity.toString(),result, startTime,elapsedTime,acceptTime); addOperatreFullData(url+"orderMaster/query",queryEntity.toString(),result, startTime,elapsedTime,acceptTime);

View File

@ -46,8 +46,8 @@ public class WxpayService {
@Autowired @Autowired
private MemberAccountService memberAccountService; private MemberAccountService memberAccountService;
String url = "https://miniapp-test.royalcanin.com.cn/rcmini/h5/"; // String url = "https://miniapp-test.royalcanin.com.cn/rcmini/h5/";
// String url = "https://miniapp-product.royalcanin.com.cn/rcmini2020"; String url = "https://miniapp-product.royalcanin.com.cn/rcmini2020/h5/";
public String generateQRCode(WxPayEntity wxPayEntity) throws Exception { public String generateQRCode(WxPayEntity wxPayEntity) throws Exception {
WXPay wxpay = new WXPay(config); WXPay wxpay = new WXPay(config);