diff --git a/rc-busness/ajax/getData.js b/rc-busness/ajax/getData.js index 8207ca71..f720c7fe 100644 --- a/rc-busness/ajax/getData.js +++ b/rc-busness/ajax/getData.js @@ -661,8 +661,20 @@ export const getOrderList = (user, status) => { } - //支付宝支付二维码 - export const generateOrderAlipay = (data) => { - return fetch('generateOrderAlipay', data, 'POST' ) - } + //支付宝支付二维码 + export const generateOrderAlipay = (orderNo, payType) => { + //Dictionary : 1: PC, 2: Mobile + let url = 'generateOrderAlipayPC'; + if(payType == 2) { + url = 'generateOrderAlipayPhone' + } + var data = { + //orderNo:orderNo + } + url = url+"?orderNo="+orderNo; + return fetch(url, data, 'POST') + //let ret = { "code": 1, "msg": "操作成功!", "success": true, "data": "
\n\n\n
\n" }; + //ret = JSON.parse(ret); + //return ret; + } \ No newline at end of file diff --git a/rc-busness/components/fixed-right.vue b/rc-busness/components/fixed-right.vue index d23b4379..3367b66f 100644 --- a/rc-busness/components/fixed-right.vue +++ b/rc-busness/components/fixed-right.vue @@ -55,7 +55,7 @@ export default { }, methods:{ ...mapMutations(["checkIsLogin"]), - lianxi(item,index){ + lianxi(item,index) { this.checkIsLogin(); let user = this.$store.state.userInfo; let curMemberId = (user?user.data.id:''); @@ -63,7 +63,8 @@ export default { //this.customerServerStop = true; /* Stop until 2022-2-10 */ var option = { - customer: {id: '', name: '', email: '', mobile: '', memberId: curMemberId} + customer: {id: '', name: '', email: '', mobile: '', memberId: curMemberId, types:'14054'}, + type:3 } dis_livchat(option); _hmt.push([ @@ -91,7 +92,8 @@ export default { //this.customerServerStop = true; /* Stop until 2022-2-10*/ var option = { - customer: {id: '', name: '', email: '', mobile: '', memberId: curMemberId} + customer: {id: '', name: '', email: '', mobile: '', memberId: curMemberId, types:'14053'}, + type:3 } dis_livchat(option); _hmt.push([ diff --git a/rc-busness/config/env-data.js b/rc-busness/config/env-data.js index 9a421f6f..09dec78c 100644 --- a/rc-busness/config/env-data.js +++ b/rc-busness/config/env-data.js @@ -343,6 +343,84 @@ let devData={ ], }, ] + }, + rxgoods:{ + dog:[ + { + title: "皇家成犬肠道全价处方粮", + productimage: "/images/rxgoods/dog-1.png", + detail: "帮助维持消化系统健康 满足爱宠能量需求 满足爱宠食欲减退", + ecPrice: "", + productCode:'30', + productList: [ + { + productCode: "30", + }, + ], + }, + { + title: "皇家成犬泌尿道全价处方粮", + productimage: "/images/rxgoods/dog-2.png", + detail: "高品质高易消化蛋白质 优化尿液PH值和 尿液离子浓度", + ecPrice: "", + productCode:'23', + productList: [ + { + productCode: "23", + }, + ], + }, + { + title: "皇家成犬皮肤全价处方粮", + productimage: "/images/rxgoods/dog-3.png", + detail: "抗氧化复合物协同作用帮助中和自由基 添加必须脂肪酸EPA和DHA 帮助维持肠道菌群支持消化系统健康", + ecPrice: "", + productCode:'27', + productList: [ + { + productCode: "27", + }, + ], + }, + ], + cat:[ + { + title: "皇家成猫泌尿道全价处方粮", + productimage: "/images/rxgoods/cat-1.png", + detail: "控制镁、钙及磷含量 促进尿液达到理想离子浓度及PH值 有助于猫咪适应环境带来的新挑战", + ecPrice: "", + productCode:'5', + productList: [ + { + productCode: "5", + }, + ], + }, + { + title: "皇家成猫肠道全价处方粮", + productimage: "/images/rxgoods/cat-2.png", + detail: "高易消化成分配以均衡的电解质 含有EPA、DHA、维生素E支持消化健康 益生元帮助促进肠道菌群平衡", + ecPrice: "", + productCode:'12', + productList: [ + { + productCode: "12", + }, + ], + }, + { + title: "皇家成猫皮肤被毛全价处方粮", + productimage: "/images/rxgoods/cat-3.png", + detail: "添加皮肤屏障复合物 添加必须脂肪酸EPA和DHA 帮助减少鸟粪石和草酸钙结石形成", + ecPrice: "", + productCode:'8', + productList: [ + { + productCode: "8", + }, + ], + }, + ] } }; @@ -693,6 +771,84 @@ let prdData={ ], }, ] + }, + rxgoods:{ + dog:[ + { + title: "皇家成犬肠道全价处方粮", + productimage: "/images/rxgoods/dog-1.png", + detail: "帮助维持消化系统健康 满足爱宠能量需求 满足爱宠食欲减退", + ecPrice: "", + productCode:'30', + productList: [ + { + productCode: "30", + }, + ], + }, + { + title: "皇家成犬泌尿道全价处方粮", + productimage: "/images/rxgoods/dog-2.png", + detail: "高品质高易消化蛋白质 优化尿液PH值和 尿液离子浓度", + ecPrice: "", + productCode:'23', + productList: [ + { + productCode: "23", + }, + ], + }, + { + title: "皇家成犬皮肤全价处方粮", + productimage: "/images/rxgoods/dog-3.png", + detail: "抗氧化复合物协同作用帮助中和自由基 添加必须脂肪酸EPA和DHA 帮助维持肠道菌群支持消化系统健康", + ecPrice: "", + productCode:'27', + productList: [ + { + productCode: "27", + }, + ], + }, + ], + cat:[ + { + title: "皇家成猫泌尿道全价处方粮", + productimage: "/images/rxgoods/cat-1.png", + detail: "控制镁、钙及磷含量 促进尿液达到理想离子浓度及PH值 有助于猫咪适应环境带来的新挑战", + ecPrice: "", + productCode:'5', + productList: [ + { + productCode: "5", + }, + ], + }, + { + title: "皇家成猫肠道全价处方粮", + productimage: "/images/rxgoods/cat-2.png", + detail: "高易消化成分配以均衡的电解质 含有EPA、DHA、维生素E支持消化健康 益生元帮助促进肠道菌群平衡", + ecPrice: "", + productCode:'12', + productList: [ + { + productCode: "12", + }, + ], + }, + { + title: "皇家成猫皮肤被毛全价处方粮", + productimage: "/images/rxgoods/cat-3.png", + detail: "添加皮肤屏障复合物 添加必须脂肪酸EPA和DHA 帮助减少鸟粪石和草酸钙结石形成", + ecPrice: "", + productCode:'8', + productList: [ + { + productCode: "8", + }, + ], + }, + ] } }; //Production data end diff --git a/rc-busness/nuxt.config.js b/rc-busness/nuxt.config.js index aec3fcbc..59813b85 100644 --- a/rc-busness/nuxt.config.js +++ b/rc-busness/nuxt.config.js @@ -2,8 +2,8 @@ const trackingScript = 'var dataLayer = window.dataLayer = window.dataLayer || [ const assetsUrl = 'var assetsUrl="/royalcanin-cdn-assets-new/css_js/";var isInitialized=false;'; export default { env: { - //NODE_ENV: 'development' - NODE_ENV: 'production' + NODE_ENV: 'development' + //NODE_ENV: 'production' }, // Global page headers: https://go.nuxtjs.dev/config-head head: { @@ -15,8 +15,8 @@ export default { script: [ //{ src: '/js/rem.js' }, // { src: '/js/flexible.js', type: 'text/javascript', charset: 'utf-8'}, - //{ src: 'https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14053/index.js' }, - { src: 'https://ocs.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14053/index.js' }, + { src: 'https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14054/index.js' }, + //{ src: 'https://ocs.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14053/index.js' }, //{ src: 'https://ocstest.royalcanin.com.cn:8081/livechat/chatapp/customer/branch/RoyalCanin/14054/index.js' }, { innerHTML: trackingScript, type: 'text/javascript', charset: 'utf-8'}, { innerHTML: assetsUrl, type: 'text/javascript', charset: 'utf-8'}, diff --git a/rc-busness/pages/personal/settlement.vue b/rc-busness/pages/personal/settlement.vue index 88466d22..aeeb60af 100644 --- a/rc-busness/pages/personal/settlement.vue +++ b/rc-busness/pages/personal/settlement.vue @@ -296,6 +296,8 @@ export default { return this.sumPrice * ( 1 - this.curCoupon.discount ); } } else { + this.discountAmount = 0; + this.curCoupon = {couponName:'未能使用该优惠券'}; return this.sumPrice; } }, diff --git a/rc-busness/pages/personal/userpay.vue b/rc-busness/pages/personal/userpay.vue index 5746e85d..4c376c71 100644 --- a/rc-busness/pages/personal/userpay.vue +++ b/rc-busness/pages/personal/userpay.vue @@ -93,10 +93,7 @@

请返回商品结算页面重新支付

-
-
- -
+
@@ -114,7 +111,6 @@ export default { data() { return { util, - h5payRedirectUrl:'', activeIndex: 0, paymentTimer:undefined, isSucess: false, @@ -148,28 +144,44 @@ export default { }, mounted() { + let isWx = this.util.isWX(); + if(!isWx) { + //this.disableAlipay = false; //Disabled due to 0 deposit quota + } let stype=this.$route.query.stype; - this.userPayData = JSON.parse(this.$route.query.userPayData); this.defaultHandlePayment(); }, methods: { + detectQrcodeDisplay(){ + let payType = this.util.pickPaytype(); + switch(payType) { + case 1: + this.disableQrcode=false; + break; + case 2: + this.disableQrcode=true; + break; + case 3: + //TODO raise WX jsapi pay + break; + } + }, defaultHandlePayment() { let isMobile = this.util.isMobile(); let isWx = this.util.isWX(); let payType = this.util.pickPaytype(); if(!this.userPayData.wxPay || this.userPayData.wxPay.length<4) throw new Error("订单信息错误,请删除商品后再次购买"); - + this.detectQrcodeDisplay(); //Dictionary : 1: scan qrcode, 2:redirect 3: raise local app switch(payType) { case 1: - this.disableQrcode=false; this.qrtext=this.userPayData.wxPay; - this.payOrderWX(); + this.updateOrderNotification(); break; case 2: - this.disableQrcode=true; + this.$refs["h5SubmitForm"].innerHTML = '
'; break; case 3: //TODO raise WX jsapi pay @@ -185,13 +197,12 @@ export default { ]) }, goPayH5() { - let isMobile = this.util.isMobile(); - if(this.userPayData.wxPay && isMobile) { + if(this.userPayData.wxPay) { //this.$refs["h5SubmitForm"].action="http://47.96.75.242:10086/royalcanin/royalcanin/redirectUrlWXH5"; - this.$refs["h5SubmitForm"].action=this.userPayData.wxPay; - this.$refs["h5SubmitForm"].submit(); - //window.location.href=this.userPayData.wxPay;; - this.disableQrcode=true; + //this.$refs["h5SubmitForm"].action=this.userPayData.wxPay; + this.$refs["h5SubmitForm"].children[0].submit() + //window.location.href=this.userPayData.wxPay; + //this.disableQrcode=true; } else { throw new Error("订单信息错误,请删除商品后再次购买"); } @@ -217,21 +228,25 @@ export default { this.paytype = item.paytype; if (index == 1) { //支付宝 - let res = await generateOrderAlipay(this.userPayData.orderId); - this.qrtext = ''; + let isMobile = this.util.isMobile(); + isMobile = (isMobile?2:1); + let res = await generateOrderAlipay(this.userPayData.orderId, isMobile); if (res.success) { - - this.qrtext=res.data; + this.disableQrcode = true; + let virtualForm = res.data; + virtualForm = virtualForm.substr(0,virtualForm.indexOf("
")+7); + this.$refs["h5SubmitForm"].innerHTML = virtualForm; } - } else { this.userPayData = JSON.parse(this.$route.query.userPayData); - this.qrtext=this.userPayData.wxPay + this.qrtext=this.userPayData.wxPay; + this.$refs["h5SubmitForm"].innerHTML = '
'; + this.detectQrcodeDisplay(); } }, //支付监听 - async payOrderWX() { + async updateOrderNotification() { let res = await monitorOrderNotify(this.userPayData.orderId); if (res.success) { this.qrtext = '成功加入群的二维码'; @@ -250,7 +265,7 @@ export default { } else { let _self = this; this.paymentTimer = setTimeout(function(){ - _self.payOrderWX() + _self.updateOrderNotification() },5000); } diff --git a/rc-busness/pages/resentation/rxgoods.vue b/rc-busness/pages/resentation/rxgoods.vue new file mode 100644 index 00000000..8446aad1 --- /dev/null +++ b/rc-busness/pages/resentation/rxgoods.vue @@ -0,0 +1,245 @@ + + + + + \ No newline at end of file diff --git a/rc-busness/static/images/rxgoods/banner-mobile.png b/rc-busness/static/images/rxgoods/banner-mobile.png new file mode 100644 index 00000000..b3a2d128 Binary files /dev/null and b/rc-busness/static/images/rxgoods/banner-mobile.png differ diff --git a/rc-busness/static/images/rxgoods/banner.png b/rc-busness/static/images/rxgoods/banner.png new file mode 100644 index 00000000..ac4c610f Binary files /dev/null and b/rc-busness/static/images/rxgoods/banner.png differ diff --git a/rc-busness/static/images/rxgoods/cat-1.png b/rc-busness/static/images/rxgoods/cat-1.png new file mode 100644 index 00000000..f829da21 Binary files /dev/null and b/rc-busness/static/images/rxgoods/cat-1.png differ diff --git a/rc-busness/static/images/rxgoods/cat-2.png b/rc-busness/static/images/rxgoods/cat-2.png new file mode 100644 index 00000000..05db2c2b Binary files /dev/null and b/rc-busness/static/images/rxgoods/cat-2.png differ diff --git a/rc-busness/static/images/rxgoods/cat-3.png b/rc-busness/static/images/rxgoods/cat-3.png new file mode 100644 index 00000000..8108cee6 Binary files /dev/null and b/rc-busness/static/images/rxgoods/cat-3.png differ diff --git a/rc-busness/static/images/rxgoods/dog-1.png b/rc-busness/static/images/rxgoods/dog-1.png new file mode 100644 index 00000000..3c467ca3 Binary files /dev/null and b/rc-busness/static/images/rxgoods/dog-1.png differ diff --git a/rc-busness/static/images/rxgoods/dog-2.png b/rc-busness/static/images/rxgoods/dog-2.png new file mode 100644 index 00000000..68e573f7 Binary files /dev/null and b/rc-busness/static/images/rxgoods/dog-2.png differ diff --git a/rc-busness/static/images/rxgoods/dog-3.png b/rc-busness/static/images/rxgoods/dog-3.png new file mode 100644 index 00000000..7b0f639f Binary files /dev/null and b/rc-busness/static/images/rxgoods/dog-3.png differ diff --git a/smart-admin-service/pom.xml b/smart-admin-service/pom.xml index 195f81f3..6afc9b2f 100644 --- a/smart-admin-service/pom.xml +++ b/smart-admin-service/pom.xml @@ -325,7 +325,9 @@ dev - + + true + telework @@ -350,9 +352,7 @@ prod - - true - + diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/AliPayService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/AliPayService.java index 24474c3d..36b5392c 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/AliPayService.java +++ b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/AliPayService.java @@ -1,10 +1,12 @@ package net.lab1024.smartadmin.module.system.alipay; +import com.alibaba.fastjson.JSONObject; import com.alipay.api.AlipayClient; import com.alipay.api.DefaultAlipayClient; -import com.alipay.api.domain.AlipayTradePrecreateModel; -import com.alipay.api.request.AlipayTradePrecreateRequest; -import com.alipay.api.response.AlipayTradePrecreateResponse; +import com.alipay.api.request.AlipayTradePagePayRequest; +import com.alipay.api.request.AlipayTradeWapPayRequest; +import com.alipay.api.response.AlipayTradePagePayResponse; +import com.alipay.api.response.AlipayTradeWapPayResponse; import net.lab1024.smartadmin.module.system.alipay.alipayModel.AliPayEntity; import net.lab1024.smartadmin.module.system.alipay.conf.AlipayConfig; import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService; @@ -12,7 +14,6 @@ import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.UUID; @Service public class AliPayService { @@ -22,28 +23,49 @@ public class AliPayService { private OrderService orderService; - public String generateQRCode(AliPayEntity aliPayEntity) throws Exception { - AlipayTradePrecreateModel model = new AlipayTradePrecreateModel(); - model.setSubject("皇家宠物食品官方商城"); - model.setTotalAmount(aliPayEntity.getTotal_amount()); - model.setStoreId(UUID.randomUUID().toString()); - model.setTimeoutExpress("3m"); - model.setOutTradeNo(aliPayEntity.getOut_trade_no()); - model.setBody(aliPayEntity.getBody()); - model.setGoodsDetail(aliPayEntity.getGoodsDetail()); - AlipayTradePrecreateRequest request = new AlipayTradePrecreateRequest(); - request.setBizModel(model); + public String generateOrderPhone(AliPayEntity aliPayEntity) throws Exception { + JSONObject bizContent = new JSONObject(); + bizContent.put("subject","皇家宠物食品官方商城"); + bizContent.put("total_amount",String.format("%.2f", Double.parseDouble(aliPayEntity.getTotal_amount()))); + bizContent.put("out_trade_no",aliPayEntity.getOut_trade_no()); + bizContent.put("product_code", aliPayEntity.getProduct_code()); + bizContent.put("quit_url", AlipayConfig.return_url); + AlipayTradeWapPayRequest request = new AlipayTradeWapPayRequest(); + request.setBizContent(bizContent.toString()); request.setNotifyUrl(AlipayConfig.notify_url); + request.setReturnUrl(AlipayConfig.return_url); AlipayClient alipayClient = new DefaultAlipayClient(AlipayConfig.gatewayUrl, AlipayConfig.app_id, AlipayConfig.merchant_private_key, "json", AlipayConfig.charset, AlipayConfig.alipay_public_key, AlipayConfig.sign_type); - AlipayTradePrecreateResponse alipayTradePrecreateResponse = alipayClient.execute(request); - if (alipayTradePrecreateResponse.isSuccess()) { - String code = alipayTradePrecreateResponse.getQrCode(); - return code; + AlipayTradeWapPayResponse alipayTradeWapPayResponse = alipayClient.pageExecute(request); + if (alipayTradeWapPayResponse.isSuccess()) { + String body = alipayTradeWapPayResponse.getBody(); + return body; } else { - throw new RuntimeException("支付宝生成二维码失败"); + throw new RuntimeException("支付宝调用失败!"); } } + public String generateOrderPC(AliPayEntity aliPayEntity) throws Exception { + AlipayClient alipayClient = new DefaultAlipayClient(AlipayConfig.gatewayUrl, AlipayConfig.app_id, AlipayConfig.merchant_private_key, "json", AlipayConfig.charset, AlipayConfig.alipay_public_key, AlipayConfig.sign_type); + AlipayTradePagePayRequest request = new AlipayTradePagePayRequest (); + request.setNotifyUrl(AlipayConfig.notify_url); + request.setReturnUrl(AlipayConfig.return_url); + JSONObject bizContent = new JSONObject(); + bizContent.put("subject","皇家宠物食品官方商城"); + bizContent.put("total_amount",String.format("%.2f", Double.parseDouble(aliPayEntity.getTotal_amount()))); + bizContent.put("out_trade_no",aliPayEntity.getOut_trade_no()); + bizContent.put("product_code", "FAST_INSTANT_TRADE_PAY"); + request.setBizContent(bizContent.toString()); + + AlipayTradePagePayResponse alipayTradePagePayResponse = alipayClient.pageExecute(request); + if (alipayTradePagePayResponse.isSuccess()) { + String body = alipayTradePagePayResponse.getBody(); + return body; + } else { + throw new RuntimeException("支付宝调用失败!"); + } + } + + public void orderCallBackAliPay(String outTradeNo,String totalFee ) throws Exception { if (orderService.afterPaySucceedUpdateOrderStatus(outTradeNo,totalFee)) { QueryEntity queryEntity = new QueryEntity(); diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/AlipayController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/AlipayController.java index 33706d7b..cbc28a24 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/AlipayController.java +++ b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/AlipayController.java @@ -23,6 +23,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.notify.model.NotifyEntity; 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.util.MapRemoveNullUtil; import net.lab1024.smartadmin.util.SmartHttpUtil; import org.springframework.beans.factory.annotation.Autowired; @@ -89,88 +92,6 @@ public class AlipayController { } - -// -// @RequestMapping("royalcanin/updateOrderAliPay") -// public String returnUrl(HttpServletRequest request) throws Exception { -// Map params = new HashMap(); -// Map requestParams = request.getParameterMap(); -// for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext();) { -// String name = (String) iter.next(); -// String[] values = (String[]) requestParams.get(name); -// String valueStr = ""; -// for (int i = 0; i < values.length; i++) { -// valueStr = (i == values.length - 1) ? valueStr + values[i] -// : valueStr + values[i] + ","; -// } -// //乱码解决,这段代码在出现乱码时使用(如果感觉自己配置没问题,然后验签一直失败,就把这个注释掉试试,反正我的是这个问题) -// //valueStr = new String(valueStr.getBytes("ISO-8859-1"), "utf-8"); -// params.put(name, valueStr); -// } -// System.out.println("params:"+params); -// boolean signVerified = AlipaySignature.rsaCheckV1(params,AlipayConfig.alipay_public_key,AlipayConfig.charset,AlipayConfig.sign_type); //调用SDK验证签名 -// System.out.println(signVerified); -// //——请在这里编写您的程序(以下代码仅作参考)—— -// if(signVerified) { -// // 更新订单状态 -// //商户订单号 -// String out_trade_no = new String(request.getParameter("out_trade_no").getBytes("ISO-8859-1"),"UTF-8"); -// //付款金额 -// String total_amount = new String(request.getParameter("total_amount").getBytes("ISO-8859-1"),"UTF-8"); -// -// -// //支付宝交易号 -// String trade_no = new String(request.getParameter("trade_no").getBytes("ISO-8859-1"),"UTF-8"); -// OrderEntity orderEntity = orderService.findByOrderId(out_trade_no); -// String[] products = orderEntity.getProductCode().split(","); -// ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity(); -// double basePoint = 0; -// //自动获取会员积分 -// for (String product : products) { -// productMasterQueryEntity.setProductCode(product); -// Map paramMap = MapRemoveNullUtil.setConditionMap(productMasterQueryEntity); -// MapRemoveNullUtil.removeNullEntry(paramMap); -// paramMap.put("secret", "H5@2021"); -// paramMap.put("channelId", "15"); -// String sb = SmartHttpUtil.sendPostForm(url + "productMaster/query", paramMap, null); -// JSONObject jsonObject = JSONObject.parseObject(sb); -// com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data")); -// JSONObject jsonObjectData = (JSONObject) jsonArray.get(0); -// basePoint = basePoint + Double.parseDouble(jsonObjectData.getString("basePoint")); -// } -// MemberAccountChangeEntity memberAccountChangeEntity = new MemberAccountChangeEntity(); -// memberAccountChangeEntity.setChangeTypeId("1"); -// memberAccountChangeEntity.setChangeValue(StringUtil.toString(basePoint)); -// memberAccountChangeEntity.setMemberId(orderEntity.getMemberId()); -// memberAccountService.memberAccountChange(memberAccountChangeEntity); -// NotifyEntity notifyEntity = new NotifyEntity(); -// notifyEntity.setAppId(AlipayConfig.app_id); -// notifyEntity.setMchId(request.getParameter("seller_id")); -// notifyEntity.setSign(request.getParameter("sign")); -// notifyEntity.setResultCode(request.getParameter("code")); -// notifyEntity.setOpenid(request.getParameter("merchant_order_no")); -// notifyEntity.setOutTradeNo(out_trade_no); -// notifyEntity.setTotalFee(total_amount); -// notifyEntity.setTradeType(request.getParameter("sub_code")); -// notifyEntity.setFeeType("CNY"); -// notifyEntity.setNonceStr(trade_no); -// notifyService.insertNotify(notifyEntity); -// -// -// -// -// -// -// String trade_status= new String(request.getParameter("trade_status").getBytes("ISO-8859-1"),"UTF-8"); -// System.out.println("trade_status:"+trade_status); -// return "trade_no:"+trade_no+"
out_trade_no:"+out_trade_no+"
total_amount:"+total_amount; -// }else { -// return "验签失败"; -// } -// } - - - @RequestMapping("royalcanin/updateOrderAliPay") @ResponseBody public String alipayNotifyNotice(HttpServletRequest request, HttpServletRequest response) throws Exception { @@ -215,6 +136,10 @@ public class AlipayController { //付款金额 String total_amount = new String(request.getParameter("total_amount").getBytes("ISO-8859-1"), "UTF-8"); + //校验通知中的seller_id + String seller_id = new String(request.getParameter("seller_id").getBytes("ISO-8859-1"), "UTF-8"); + + if (trade_status.equals("TRADE_FINISHED")) { return "TRADE_FINISHED"; @@ -236,20 +161,20 @@ public class AlipayController { // ordersService.updateOrderStatus(out_trade_no, trade_no, total_amount); OrderEntity orderEntity = orderService.findByOrderId(out_trade_no); - String[] products = orderEntity.getProductCode().split(","); + String [] products = orderEntity.getProductCode().split(","); ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity(); double basePoint = 0; //自动获取会员积分 - for (String product : products) { + for (String product:products) { productMasterQueryEntity.setProductCode(product); - Map paramMap = MapRemoveNullUtil.setConditionMap(productMasterQueryEntity); + Map paramMap = MapRemoveNullUtil.setConditionMap(productMasterQueryEntity); MapRemoveNullUtil.removeNullEntry(paramMap); - paramMap.put("secret", "H5@2021"); - paramMap.put("channelId", "15"); - String sb = SmartHttpUtil.sendPostForm(url + "productMaster/query", paramMap, null); + paramMap.put("secret","H5@2021"); + paramMap.put("channelId","15"); + String sb = SmartHttpUtil.sendPostForm(url+"productMaster/query",paramMap,null); JSONObject jsonObject = JSONObject.parseObject(sb); com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data")); - JSONObject jsonObjectData = (JSONObject) jsonArray.get(0); + JSONObject jsonObjectData = (JSONObject)jsonArray.get(0); basePoint = basePoint + Double.parseDouble(jsonObjectData.getString("basePoint")); } MemberAccountChangeEntity memberAccountChangeEntity = new MemberAccountChangeEntity(); @@ -257,18 +182,58 @@ public class AlipayController { memberAccountChangeEntity.setChangeValue(StringUtil.toString(basePoint)); memberAccountChangeEntity.setMemberId(orderEntity.getMemberId()); memberAccountService.memberAccountChange(memberAccountChangeEntity); + + //更新订单信息 + QueryEntity queryEntity = new QueryEntity(); + queryEntity.setOrderNumber(out_trade_no); + 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(out_trade_no); + 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(total_amount); + addOrSaveEntity.setPaymentToken(trade_no); + addOrSaveEntity.setPaymentResult("SUCCESS"); + 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 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.setAppId(AlipayConfig.app_id); - notifyEntity.setMchId(request.getParameter("seller_id")); - notifyEntity.setSign(request.getParameter("sign")); - notifyEntity.setResultCode(request.getParameter("code")); - notifyEntity.setOpenid(request.getParameter("merchant_order_no")); + notifyEntity.setMchId(seller_id); + notifyEntity.setSign(AlipayConfig.sign_type); + notifyEntity.setResultCode(""); + notifyEntity.setOpenid(""); notifyEntity.setOutTradeNo(out_trade_no); notifyEntity.setTotalFee(total_amount); - notifyEntity.setTradeType(request.getParameter("sub_code")); + notifyEntity.setTimeEnd(""); + notifyEntity.setTradeType(""); notifyEntity.setFeeType("CNY"); - notifyEntity.setNonceStr(trade_no); + notifyEntity.setNonceStr(""); notifyService.insertNotify(notifyEntity); + orderService.afterPaySucceedUpdateOrderStatus(out_trade_no,total_amount); }else { return "验签失败"; } diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/conf/AlipayConfig.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/conf/AlipayConfig.java index badb8870..b77357bf 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/conf/AlipayConfig.java +++ b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/alipay/conf/AlipayConfig.java @@ -31,9 +31,9 @@ public class AlipayConfig { public static String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC9yEe5sOFYFmEW0GdVCyvuU5vXCLsk2lwWmfC/bh/kcjBaBNTaFSiuG1VFPWsNIKWEHLdbEwMQnq4WxhqYN741wXxJlOpvsECFYtGSL6szx7BDaTYATQGVk963SeKYplz5ZPlXg1QiKgcqS3brvnpxxtcS1JKCJ/6iJXJkZXxK2QIDAQAB"; // public static String alipay_public_key = "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCnxj/9qwVfgoUh/y2W89L6BkRAFljhNhgPdyPuBV64bfQNN1PjbCzkIM6qRdKBoLPXmKKMiFYnkd6rAoprih3/PrQEB/VsW8OoM8fxn67UDYuyBTqA23MML9q1+ilIZwBC2AQ2UBVOrFXfFl75p6/B5KsiNG9zpgmLCUYuLkxpLQIDAQAB"; // 服务器异步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 - public static String notify_url = "https://royalcanincn.escase.cn/jc/royalcanin/royalcanin/updateOrderAliPay"; + public static String notify_url = "https://shop.royalcanin.com.cn/royalcanin/royalcanin/royalcanin/updateOrderAliPay"; // 页面跳转同步通知页面路径 需http://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 - public static String return_url = "https://royalcanincn.escase.cn/jc/royalcanin/royalcanin/updateOrderAliPay"; + public static String return_url = "https://shop.royalcanin.com.cn"; // 签名方式 public static String sign_type = "RSA2"; diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/royalcanin/good/OrderController.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/royalcanin/good/OrderController.java index 7e7e6424..f19e716e 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/royalcanin/good/OrderController.java +++ b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/royalcanin/good/OrderController.java @@ -220,6 +220,85 @@ public class OrderController { return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL); } + @ApiOperation(value = "微信支付JSAPI订单", notes = "生成JSAPI订单") + @PostMapping("royalcanin/generateOrderWXJSAPI") + public ResponseDTO> generateOrderWXJSAPI(@RequestBody List ordersEntityList) throws Exception { + StringBuffer productId = new StringBuffer(); + StringBuffer productName = new StringBuffer(); + String memberId = ""; + String mobile = ""; + int buyCount = 0; + double total_fee = 0 ; + double basePoint = 0 ; + WxPayEntity wxPayEntity = new WxPayEntity(); + JSONArray orderDatilListJson = new JSONArray(); + OrdersEntity ordersEntity = new OrdersEntity(); + OrderAddress orderAddress = new OrderAddress(); + for (OrdersEntity ordersEntitys:ordersEntityList) { + cartService.cancelProduct(ordersEntitys.getMemberId(),ordersEntity.getProductCode()); + //存储orderDetailList + OrderDatilListEntity orderDatilListEntity= new OrderDatilListEntity(); + orderDatilListEntity.setProductName(ordersEntitys.getProductName()); + orderDatilListEntity.setPcs(ordersEntitys.getBuyCount()); + orderDatilListEntity.setProductCode(ordersEntitys.getProductCode()); + orderDatilListEntity.setEcPrice(ordersEntitys.getPayAmount()); + orderDatilListJson.add(orderDatilListEntity); + if(ordersEntitys.getCouponCode() != "" && ordersEntitys.getCouponCode() != null) { + CouponGetAllEntity couponGetAllEntity = new CouponGetAllEntity (); + couponGetAllEntity.setMemberId(ordersEntitys.getMemberId()); + couponGetAllEntity.setCouponCode(ordersEntitys.getCouponCode()); + String couponInfo = couponService.couponGetAll(couponGetAllEntity); + JSONObject jsonObject = JSONObject.parseObject(couponInfo); + com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data")); + JSONObject jsonObjectData = (JSONObject)jsonArray.get(0); + + ordersEntity.setCouponAmount(jsonObjectData.getString("couponAmount") == null ?jsonObjectData.getString("discount"):jsonObjectData.getString("couponAmount")); + ordersEntity.setCouponCode(jsonObjectData.getString("couponCode")); + ordersEntity.setCouponName(jsonObjectData.getString("couponName")); + ordersEntity.setCouponId(jsonObjectData.getString("couponId")); + total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount()); + }else{ + total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ; + } + basePoint = basePoint + ordersEntitys.getBasePoint(); + orderAddress.setAddressCityName(ordersEntitys.getOrderAddress().getAddressCityName()); + orderAddress.setAddressCountyName(ordersEntitys.getOrderAddress().getAddressCountyName()); + orderAddress.setAddressDetailInfo(ordersEntitys.getOrderAddress().getAddressDetailInfo()); + orderAddress.setAddressPhoneNumber(ordersEntitys.getOrderAddress().getAddressPhoneNumber()); + orderAddress.setAddressUserName(ordersEntitys.getOrderAddress().getAddressUserName()); + orderAddress.setAddressProvinceName(ordersEntitys.getOrderAddress().getAddressProvinceName()); + productId.append(ordersEntitys.getProductCode()+","); + productName.append(ordersEntitys.getProductName()+","); + memberId = ordersEntitys.getMemberId(); + mobile = ordersEntitys.getPhoneNumber(); + buyCount = buyCount + ordersEntitys.getBuyCount(); + } + ordersEntity.setOrderAddress(orderAddress); + ordersEntity.setProductCode(productId.substring(0,productId.length()-1)); + ordersEntity.setProductName(productName.substring(0,productName.length()-1)); + ordersEntity.setOrderAmount(StringUtil.toString(total_fee)); + ordersEntity.setMemberId(memberId); + ordersEntity.setPhoneNumber(mobile); + ordersEntity.setBuyCount(buyCount); + ordersEntity.setOrderNo(GenerateSequenceUtil.generateSequenceNo()); + ordersEntity.setOrderStatus("0"); + ordersEntity.setBasePoint(basePoint); + ordersEntity.setPayType("3"); + + if(orderService.generateOrder(ordersEntity,orderDatilListJson) == 1){ + wxPayEntity.setProduct_id(ordersEntity.getProductCode()); + wxPayEntity.setTotal_fee(StringUtil.toString(total_fee)); + wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo()); + + Map returnMap = new HashMap<>(); + returnMap.put("orderNumber",ordersEntity.getOrderNo()); + returnMap.put("orderAmount",ordersEntity.getOrderAmount()); + return ResponseDTO.succData(returnMap,wxpayService.dounifiedOrderJSAPI(wxPayEntity)); + } + return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL); + } + + @ApiOperation(value = "重新支付(二维码)", notes = "重新支付(二维码)") @PostMapping("royalcanin/repayOrderWX") public ResponseDTO repayOrderWX(String orderNo) throws Exception { @@ -277,6 +356,30 @@ public class OrderController { } } + @ApiOperation(value = "重新支付(JSAPI)", notes = "重新支付(JSAPI)") + @PostMapping("royalcanin/repayOrderJSAPI") + public ResponseDTO repayOrderWXJSAPI(String orderNo) throws Exception { + OrderEntity ordersEntity = orderService.findByOrderId(orderNo); + if(ordersEntity != null){ + QueryEntity queryEntity = new QueryEntity(); + queryEntity.setOrderNumber(ordersEntity.getOrderNo()); + String orderInfo = orderService.query(queryEntity); + com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(orderInfo); + JSONObject jsonObject = (JSONObject)jsonArray.get(0); + if(jsonObject.getString("status").equals("0")) { + WxPayEntity wxPayEntity = new WxPayEntity(); + wxPayEntity.setProduct_id(ordersEntity.getProductCode()); + wxPayEntity.setTotal_fee(jsonObject.getString("salesAmount")); + wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo()); + return ResponseDTO.succData(wxpayService.dounifiedOrderJSAPI(wxPayEntity)); + }else { + return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_ERROR,orderInfo); + } + }else { + return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER); + } + } + @@ -307,9 +410,9 @@ public class OrderController { } - @ApiOperation(value = "支付宝支付订单", notes = "生成订单") - @PostMapping("royalcanin/generateOrderAlipay") - public ResponseDTO generateOrderAliPay(String orderNo) throws Exception { + @ApiOperation(value = "支付宝支付订单PC", notes = "生成订单") + @PostMapping("royalcanin/generateOrderAlipayPC") + public ResponseDTO generateOrderAliPayPC(String orderNo) throws Exception { OrderEntity ordersEntity = orderService.findByOrderId(orderNo); if(ordersEntity != null) { QueryEntity queryEntity = new QueryEntity(); @@ -325,7 +428,7 @@ public class OrderController { aliPayEntity.setProduct_code(ordersEntity.getProductCode()); aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount()); aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo()); - return ResponseDTO.succData(aliPayService.generateQRCode(aliPayEntity)); + return ResponseDTO.succData(aliPayService.generateOrderPC(aliPayEntity)); } else { return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL); } @@ -336,6 +439,36 @@ public class OrderController { return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER); } } + @ApiOperation(value = "支付宝支付订单Phone", notes = "生成订单") + @PostMapping("royalcanin/generateOrderAlipayPhone") + public ResponseDTO generateOrderAliPayPhone(String orderNo) throws Exception { + OrderEntity ordersEntity = orderService.findByOrderId(orderNo); + if(ordersEntity != null) { + QueryEntity queryEntity = new QueryEntity(); + queryEntity.setOrderNumber(ordersEntity.getOrderNo()); + String orderInfo = orderService.query(queryEntity); + com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(orderInfo); + JSONObject jsonObject = (JSONObject)jsonArray.get(0); + if(jsonObject.getString("status").equals("0")) { + AliPayEntity aliPayEntity = new AliPayEntity(); + ordersEntity.setPayType("2"); + ordersEntity.setOrderStatus("0"); + if (orderService.updateOrder(ordersEntity.getOrderNo()) == 1) { + aliPayEntity.setProduct_code(ordersEntity.getProductCode()); + aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount()); + aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo()); + return ResponseDTO.succData(aliPayService.generateOrderPhone(aliPayEntity)); + } else { + return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL); + } + }else{ + return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_ERROR); + } + }else{ + return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER); + } + } + @PostMapping("royalcanin/updateOrderAliPay") public ResponseDTO alipayNotify(HttpServletRequest request) throws Exception { diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/wxpay/WxpayService.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/wxpay/WxpayService.java index 998d9479..714934de 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/wxpay/WxpayService.java +++ b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/module/system/wxpay/WxpayService.java @@ -250,7 +250,48 @@ public class WxpayService { } + /** + * /H5微信支付(预下单) + * @return + * @throws Exception + */ + public String dounifiedOrderJSAPI(WxPayEntity wxPayEntity) throws Exception { + //返回参数 + Map returnMap = new HashMap<>(); + WXPay wxpay = new WXPay(config); + //请求参数封装 + Map data = new HashMap<>(); + data.put("out_trade_no",wxPayEntity.getOut_trade_no()); + data.put("notify_url",config.notify_url); + data.put("fee_type","CNY"); + data.put("total_fee",getMoney(wxPayEntity.getTotal_fee())); + data.put("spbill_create_ip", SmartIPUtil.getLocalHostIP()); + data.put("trade_type", "JSAPI"); // 此处指定为H5支付 + data.put("body","皇家宠物食品官方商城"); + data.put("nonce_str", WXPayUtil.generateNonceStr()); + data.put("product_id",wxPayEntity.getProduct_id()); + String s = WXPayUtil.generateSignature(data, config.getKey()); //签名 + data.put("sign", s);//签名 + try { + //使用官方API请求预付订单 + Map response = wxpay.unifiedOrder(data); + String returnCode = response.get("return_code");//获取返回码 + //若返回码为SUCCESS,则会返回一个result_code,再对该result_code进行判断 + if (returnCode.equals("SUCCESS")) { + net.sf.json.JSONObject jsonResponse = net.sf.json.JSONObject.fromObject(response); + return jsonResponse.toString(); + } else { + returnMap.put("ok", "201"); + return ""; + } + } catch (Exception e) { + System.out.println(e); + return "ERROR!"; + //系统等其他错误的时候 + } + + } /** diff --git a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartJWTUtil.java b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartJWTUtil.java index de30c88a..3522f2cf 100644 --- a/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartJWTUtil.java +++ b/smart-admin-service/smart-admin-api/src/main/java/net/lab1024/smartadmin/util/SmartJWTUtil.java @@ -22,7 +22,7 @@ public class SmartJWTUtil { private static final String CLAIM_ID_KEY = "id"; //设置过期时间 - private static final long EXPIRE_DATE = 30 * 60 * 100000; + private static final long EXPIRE_DATE = 5256 * 60 * 100000; //token秘钥 private static final String TOKEN_SECRET = "smart-admin-jwt-key"; @@ -80,7 +80,7 @@ public class SmartJWTUtil { public static void main(String[] args) { String token = SmartJWTUtil.generateToken("884159"); System.out.println(token); - System.out.println(SmartJWTUtil.decodeToken(token)); + System.out.println(SmartJWTUtil.decodeToken("eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ijg4NDE1OSIsImV4cCI6MTY0NjM4Mzk1NH0.-ilK-e-49c88IxdkSW1QMNZQ3P2LG7iIsQRXYlrXjjo")); } } diff --git a/smart-admin-service/smart-admin-api/src/main/resources/static/30_1.jpg b/smart-admin-service/smart-admin-api/src/main/resources/static/30_1.jpg index 642b0638..b8c1c3e6 100644 Binary files a/smart-admin-service/smart-admin-api/src/main/resources/static/30_1.jpg and b/smart-admin-service/smart-admin-api/src/main/resources/static/30_1.jpg differ