mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-04 19:26:41 +08:00
Merge branch 'sit-Carl' into sit-Leung-v3
This commit is contained in:
commit
41fbcc358e
@ -152,6 +152,11 @@ public class GoodController {
|
|||||||
public String transferProductSearchTag() throws Exception {
|
public String transferProductSearchTag() throws Exception {
|
||||||
return goodService.productSearchQuery();
|
return goodService.productSearchQuery();
|
||||||
}
|
}
|
||||||
|
@ApiOperation(value = "同步筛选标签信息", notes = "同步筛选标签信息")
|
||||||
|
@PostMapping("royalcanin/productSearchTag/remoteGetProductSearchTagData")
|
||||||
|
public void remoteGetProductSearchTagData() throws Exception {
|
||||||
|
goodService.remoteGetProductSearchTagData();
|
||||||
|
}
|
||||||
|
|
||||||
public ResponseDTO<String> addOperatreFullData(String type, String params, Long startTime, Long elapsedTime, Long acceptTime,String code,String msg)throws Exception{
|
public ResponseDTO<String> addOperatreFullData(String type, String params, Long startTime, Long elapsedTime, Long acceptTime,String code,String msg)throws Exception{
|
||||||
SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||||
|
@ -84,6 +84,15 @@ public class GoodService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String productSearchQuery()throws Exception{
|
public String productSearchQuery()throws Exception{
|
||||||
|
Map<String, String> paramMap = new HashMap<>();
|
||||||
|
paramMap.put("secret","H5@2021");
|
||||||
|
paramMap.put("channelId","15");
|
||||||
|
String sb = SmartHttpUtil.sendPostForm(url+"productSearchTag/query",paramMap,null);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(sb);
|
||||||
|
String result = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
public void remoteGetProductSearchTagData()throws Exception{
|
||||||
Map<String, String> paramMap = new HashMap<>();
|
Map<String, String> paramMap = new HashMap<>();
|
||||||
paramMap.put("secret","H5@2021");
|
paramMap.put("secret","H5@2021");
|
||||||
paramMap.put("channelId","15");
|
paramMap.put("channelId","15");
|
||||||
@ -105,7 +114,6 @@ public class GoodService {
|
|||||||
productSearchTagEntity.setTagCode(jsonObjectResult.getString("tagCode"));
|
productSearchTagEntity.setTagCode(jsonObjectResult.getString("tagCode"));
|
||||||
productSearchTagService.installAllSearchTag(productSearchTagEntity);
|
productSearchTagService.installAllSearchTag(productSearchTagEntity);
|
||||||
}
|
}
|
||||||
return result;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableName;
|
|||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@TableName("t_royalcanin_productSearchTag")
|
@TableName("t_royalcanin_productsearchtag")
|
||||||
public class ProductSearchTagEntity {
|
public class ProductSearchTagEntity {
|
||||||
|
|
||||||
private String id ;
|
private String id ;
|
||||||
|
@ -16,8 +16,7 @@ import java.io.*;
|
|||||||
public class MyConfig implements WXPayConfig {
|
public class MyConfig implements WXPayConfig {
|
||||||
|
|
||||||
|
|
||||||
public String notify_url = "https://shop.royalcanin.com.cn/royalcanin/royalcanin/updateOrderWX";
|
public String notify_url = "https://shop.royalcanin.com.cn/royalcanin/royalcanin/royalcanin/updateOrderWX";
|
||||||
|
|
||||||
// 微信支付h5 回调地址
|
// 微信支付h5 回调地址
|
||||||
public static String NOTIFY_URL_H5 = "https://shop.royalcanin.com.cn";
|
public static String NOTIFY_URL_H5 = "https://shop.royalcanin.com.cn";
|
||||||
|
|
||||||
|
@ -9,6 +9,9 @@ import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService
|
|||||||
import net.lab1024.smartadmin.module.system.royalcanin.memberAccount.MemberAccountChangeEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.memberAccount.MemberAccountChangeEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.notify.model.NotifyEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.notify.model.NotifyEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.notify.service.NotifyService;
|
import net.lab1024.smartadmin.module.system.royalcanin.notify.service.NotifyService;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.AddOrSaveEntity;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.OrderCouponEntity;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
||||||
import net.lab1024.smartadmin.module.system.wxpay.sdk.WXPay;
|
import net.lab1024.smartadmin.module.system.wxpay.sdk.WXPay;
|
||||||
import net.lab1024.smartadmin.module.system.wxpay.sdk.WXPayUtil;
|
import net.lab1024.smartadmin.module.system.wxpay.sdk.WXPayUtil;
|
||||||
import net.lab1024.smartadmin.module.system.wxpay.wxPayModel.WxPayEntity;
|
import net.lab1024.smartadmin.module.system.wxpay.wxPayModel.WxPayEntity;
|
||||||
@ -90,7 +93,6 @@ public class WxpayService {
|
|||||||
SortedMap<String, String> sortedMap = WXPayUtil.getSortedMap(callBackMap);
|
SortedMap<String, String> sortedMap = WXPayUtil.getSortedMap(callBackMap);
|
||||||
// 校验签名是否正确
|
// 校验签名是否正确
|
||||||
if (!WXPayUtil.isCorrectSign(sortedMap, config.getKey())) {
|
if (!WXPayUtil.isCorrectSign(sortedMap, config.getKey())) {
|
||||||
System.out.println("签名校验成功!");
|
|
||||||
// 更新订单状态
|
// 更新订单状态
|
||||||
if ("SUCCESS".equals(sortedMap.get("result_code"))) {
|
if ("SUCCESS".equals(sortedMap.get("result_code"))) {
|
||||||
String outTradeNo = sortedMap.get("out_trade_no"); // 流水号
|
String outTradeNo = sortedMap.get("out_trade_no"); // 流水号
|
||||||
@ -118,7 +120,42 @@ public class WxpayService {
|
|||||||
memberAccountChangeEntity.setMemberId(orderEntity.getMemberId());
|
memberAccountChangeEntity.setMemberId(orderEntity.getMemberId());
|
||||||
memberAccountService.memberAccountChange(memberAccountChangeEntity);
|
memberAccountService.memberAccountChange(memberAccountChangeEntity);
|
||||||
|
|
||||||
|
//更新订单信息
|
||||||
|
QueryEntity queryEntity = new QueryEntity();
|
||||||
|
queryEntity.setOrderNumber(outTradeNo);
|
||||||
|
String orderEntityJson = orderService.query(queryEntity);
|
||||||
|
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(orderEntityJson);
|
||||||
|
JSONObject jsonObject = (JSONObject)jsonArray.get(0);
|
||||||
|
if(orderEntity != null) {
|
||||||
|
AddOrSaveEntity addOrSaveEntity = new AddOrSaveEntity();
|
||||||
|
addOrSaveEntity.setOrderNumber(outTradeNo);
|
||||||
|
addOrSaveEntity.setPhoneNumber(orderEntity.getPhoneNumber());
|
||||||
|
addOrSaveEntity.setStatus("1");
|
||||||
|
addOrSaveEntity.setOrderDetailList(jsonObject.getString("orderDetailList"));
|
||||||
|
addOrSaveEntity.setDeliveryType(jsonObject.getString("deliveryType"));
|
||||||
|
addOrSaveEntity.setSalesAmount(jsonObject.getString("salesAmount"));
|
||||||
|
addOrSaveEntity.setOrderDate(jsonObject.getString("orderDate"));
|
||||||
|
addOrSaveEntity.setAddressCityName(jsonObject.getString("addressCityName"));
|
||||||
|
addOrSaveEntity.setAddressCountyName(jsonObject.getString("addressCountyName"));
|
||||||
|
addOrSaveEntity.setAddressDetailInfo(jsonObject.getString("addressDetailInfo"));
|
||||||
|
addOrSaveEntity.setAddressPhoneNumber(jsonObject.getString("addressPhoneNumber"));
|
||||||
|
addOrSaveEntity.setAddressProvinceName(jsonObject.getString("addressProvinceName"));
|
||||||
|
addOrSaveEntity.setAddressUserName(jsonObject.getString("addressUserName"));
|
||||||
|
addOrSaveEntity.setPaymentAmount(totalFee);
|
||||||
|
addOrSaveEntity.setPaymentToken(sortedMap.get("transaction_id"));
|
||||||
|
if (orderEntity.getCouponCode() != "" && null != orderEntity.getCouponCode()) {
|
||||||
|
//coupon json化
|
||||||
|
OrderCouponEntity orderCouponEntity = new OrderCouponEntity();
|
||||||
|
orderCouponEntity.setCouponCode(orderEntity.getCouponCode());
|
||||||
|
orderCouponEntity.setCouponName(orderEntity.getCouponName());
|
||||||
|
orderCouponEntity.setCouponId(orderEntity.getCouponId());
|
||||||
|
Map<String, String> orderCouponParamMap = MapRemoveNullUtil.setConditionMap(orderCouponEntity);
|
||||||
|
MapRemoveNullUtil.removeNullEntry(orderCouponParamMap);
|
||||||
|
net.sf.json.JSONObject orderCouponJson = net.sf.json.JSONObject.fromObject(orderCouponParamMap);
|
||||||
|
addOrSaveEntity.setOrderCoupon(orderCouponJson.toString());
|
||||||
|
}
|
||||||
|
orderService.addOrSave(addOrSaveEntity);
|
||||||
|
}
|
||||||
NotifyEntity notifyEntity = new NotifyEntity();
|
NotifyEntity notifyEntity = new NotifyEntity();
|
||||||
notifyEntity.setAppId(sortedMap.get("appid"));
|
notifyEntity.setAppId(sortedMap.get("appid"));
|
||||||
notifyEntity.setMchId(sortedMap.get("mch_id"));
|
notifyEntity.setMchId(sortedMap.get("mch_id"));
|
||||||
|
Loading…
Reference in New Issue
Block a user