diff --git a/modules/common/system/controller/OrderController.java b/modules/common/system/controller/OrderController.java
index fbffaab..3364945 100644
--- a/modules/common/system/controller/OrderController.java
+++ b/modules/common/system/controller/OrderController.java
@@ -116,7 +116,7 @@ public class OrderController extends BaseController {
orderInfoService.saveBatch(order.getOrderInfoList());
// 创建微信订单
if (order.getPayType().equals(1)) {
- return success("下单成功",orderService.createWxOrder(order));
+// return success("下单成功",orderService.createWxOrder(order));
}
}
return fail("下单失败");
diff --git a/pom.xml b/pom.xml
index 78e9c36..e408efa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,349 +1,372 @@
- 4.0.0
+ 4.0.0
- com.gxwebsoft
- com-gxwebsoft-server
- 1.5.2
+ com.gxwebsoft
+ com-gxwebsoft-server
+ 1.5.2
- com-gxwebsoft-api
- WebSoftApi project for Spring Boot
+ com-gxwebsoft-api
+ WebSoftApi project for Spring Boot
-
- org.springframework.boot
- spring-boot-starter-parent
- 2.5.4
-
-
-
-
- 1.8
- UTF-8
- UTF-8
-
-
-
-
-
- org.springframework.boot
- spring-boot-devtools
- runtime
- true
-
-
-
-
- org.springframework.boot
- spring-boot-starter-test
- test
-
-
-
-
- org.springframework.boot
- spring-boot-starter-web
-
-
-
-
- org.springframework.boot
- spring-boot-starter-aop
-
-
-
-
- org.springframework.boot
- spring-boot-configuration-processor
- true
-
-
-
-
- org.projectlombok
- lombok
- true
-
-
-
-
- mysql
- mysql-connector-java
- runtime
-
-
-
-
- com.alibaba
- druid-spring-boot-starter
- 1.2.6
-
-
-
-
- com.baomidou
- mybatis-plus-boot-starter
- 3.4.3.3
-
-
-
-
- com.github.yulichang
- mybatis-plus-join-boot-starter
- 1.4.5
-
-
-
-
- com.baomidou
- mybatis-plus-generator
- 3.4.1
-
-
-
-
- cn.hutool
- hutool-core
- 5.8.11
-
-
- cn.hutool
- hutool-extra
- 5.8.11
-
-
- cn.hutool
- hutool-http
- 5.8.11
-
-
- cn.hutool
- hutool-crypto
- 5.8.11
-
-
-
-
- cn.afterturn
- easypoi-base
- 4.4.0
-
-
-
-
- org.apache.tika
- tika-core
- 2.1.0
-
-
-
-
- com.github.livesense
- jodconverter-core
- 1.0.5
-
-
-
-
- org.springframework.boot
- spring-boot-starter-mail
-
-
-
-
- com.ibeetl
- beetl
- 3.6.1.RELEASE
-
-
-
-
- io.springfox
- springfox-boot-starter
- 3.0.0
-
-
-
-
- org.springframework.boot
- spring-boot-starter-security
-
-
-
-
- io.jsonwebtoken
- jjwt-impl
- 0.11.2
-
-
- io.jsonwebtoken
- jjwt-jackson
- 0.11.2
-
-
-
-
- com.github.whvcse
- easy-captcha
- 1.6.2
-
-
-
-
- org.springframework.boot
- spring-boot-starter-data-redis
-
-
-
-
- com.aliyun
- aliyun-java-sdk-core
- 4.4.3
-
-
-
- com.alipay.sdk
- alipay-sdk-java
- 4.35.0.ALL
-
-
-
- org.bouncycastle
- bcprov-jdk15on
- 1.70
-
-
-
- commons-logging
- commons-logging
- 1.2
-
-
-
- com.alibaba
- fastjson
- 2.0.20
-
-
-
-
- com.google.zxing
- core
- 3.3.3
-
-
-
- com.google.code.gson
- gson
- 2.8.0
-
-
-
- com.vaadin.external.google
- android-json
- 0.0.20131108.vaadin1
- compile
-
-
-
-
- com.corundumstudio.socketio
- netty-socketio
- 2.0.3
-
-
-
-
- com.github.wechatpay-apiv3
- wechatpay-java
- 0.2.9
-
-
-
- com.github.binarywang
- weixin-java-miniapp
- 4.5.0
-
-
-
-
- com.aliyun.oss
- aliyun-sdk-oss
- 3.17.0
-
-
-
-
- com.nuonuo
- open-sdk
- 1.0.5.2
-
-
-
-
- com.aliyun
- green20220302
- 1.0.8
-
-
-
- org.springframework.boot
- spring-boot-starter-freemarker
-
-
-
-
- com.getui.push
- restful-sdk
- 1.0.0.14
-
-
-
-
-
-
-
- src/main/java
-
- **/*Mapper.xml
-
-
-
- src/main/resources
-
- **
-
-
-
-
-
+
org.springframework.boot
- spring-boot-maven-plugin
+ spring-boot-starter-parent
2.5.4
-
-
-
- org.projectlombok
- lombok
-
-
-
-
-
+
+
+
+
+ 1.8
+ UTF-8
+ UTF-8
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-devtools
+ runtime
+ true
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ redis.clients
+ jedis
+ 3.7.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-aop
+
+
+
+
+ org.springframework.boot
+ spring-boot-configuration-processor
+ true
+
+
+
+
+ org.projectlombok
+ lombok
+ true
+
+
+
+
+ mysql
+ mysql-connector-java
+ runtime
+
+
+
+
+ com.alibaba
+ druid-spring-boot-starter
+ 1.2.6
+
+
+
+
+ com.baomidou
+ mybatis-plus-boot-starter
+ 3.4.3.3
+
+
+
+
+ com.github.yulichang
+ mybatis-plus-join-boot-starter
+ 1.4.5
+
+
+
+
+ com.baomidou
+ mybatis-plus-generator
+ 3.4.1
+
+
+
+
+ cn.hutool
+ hutool-core
+ 5.8.11
+
+
+ cn.hutool
+ hutool-extra
+ 5.8.11
+
+
+ cn.hutool
+ hutool-http
+ 5.8.11
+
+
+ cn.hutool
+ hutool-crypto
+ 5.8.11
+
+
+ cn.hutool
+ hutool-db
+ 5.8.11
+
+
+ cn.hutool
+ hutool-json
+ 5.8.11
+
+
+
+
+ cn.afterturn
+ easypoi-base
+ 4.4.0
+
+
+
+
+ org.apache.tika
+ tika-core
+ 2.1.0
+
+
+
+
+ com.github.livesense
+ jodconverter-core
+ 1.0.5
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-mail
+
+
+
+
+ com.ibeetl
+ beetl
+ 3.6.1.RELEASE
+
+
+
+
+ io.springfox
+ springfox-boot-starter
+ 3.0.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-security
+
+
+
+
+ io.jsonwebtoken
+ jjwt-impl
+ 0.11.2
+
+
+ io.jsonwebtoken
+ jjwt-jackson
+ 0.11.2
+
+
+
+
+ com.github.whvcse
+ easy-captcha
+ 1.6.2
+
+
+
+
+ org.springframework.boot
+ spring-boot-starter-data-redis
+
+
+
+
+ com.aliyun
+ aliyun-java-sdk-core
+ 4.4.3
+
+
+
+ com.alipay.sdk
+ alipay-sdk-java
+ 4.35.0.ALL
+
+
+
+ org.bouncycastle
+ bcprov-jdk15on
+ 1.70
+
+
+
+ commons-logging
+ commons-logging
+ 1.2
+
+
+
+ com.alibaba
+ fastjson
+ 2.0.20
+
+
+
+
+ com.google.zxing
+ core
+ 3.3.3
+
+
+
+ com.google.code.gson
+ gson
+ 2.8.0
+
+
+
+ com.vaadin.external.google
+ android-json
+ 0.0.20131108.vaadin1
+ compile
+
+
+
+
+ com.corundumstudio.socketio
+ netty-socketio
+ 2.0.3
+
+
+
+
+ com.github.wechatpay-apiv3
+ wechatpay-java
+ 0.2.9
+
+
+
+ com.github.binarywang
+ weixin-java-miniapp
+ 4.5.0
+
+
+
+
+ com.aliyun.oss
+ aliyun-sdk-oss
+ 3.17.0
+
+
+
+
+ com.nuonuo
+ open-sdk
+ 1.0.5.2
+
+
+
+
+ com.aliyun
+ green20220302
+ 1.0.8
+
+
+
+ org.springframework.boot
+ spring-boot-starter-freemarker
+
+
+
+
+ com.getui.push
+ restful-sdk
+ 1.0.0.14
+
+
+
+
+
+
+
+ src/main/java
+
+ **/*Mapper.xml
+
+
+
+ src/main/resources
+
+ **
+
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+ 2.5.4
+
+
+
+ org.projectlombok
+ lombok
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 16
+ 16
+
+
+
-
+
-
-
- aliYunMaven
- https://maven.aliyun.com/repository/public
-
-
- com.e-iceblue
- e-iceblue
- https://repo.e-iceblue.cn/repository/maven-public/
-
-
+
+
+ aliYunMaven
+ https://maven.aliyun.com/repository/public
+
+
+ com.e-iceblue
+ e-iceblue
+ https://repo.e-iceblue.cn/repository/maven-public/
+
+
diff --git a/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java b/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java
index 5b69d10..cf33731 100644
--- a/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java
+++ b/src/main/java/com/gxwebsoft/common/core/security/SecurityConfig.java
@@ -68,7 +68,9 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
"/5zbYEPkyV4.txt",
"/api/love/user-plan-log/wx-pay/**",
"/api/cms/form-record",
- "/api/shop/merchant-account/getMerchantAccountByPhone"
+ "/api/shop/merchant-account/getMerchantAccountByPhone",
+ "/api/think/think-order/notify",
+ "/api/think/think-users-vip/notify"
)
.permitAll()
.anyRequest()
diff --git a/src/main/java/com/gxwebsoft/common/core/utils/RequestUtil.java b/src/main/java/com/gxwebsoft/common/core/utils/RequestUtil.java
index 78ca2c2..12f05d7 100644
--- a/src/main/java/com/gxwebsoft/common/core/utils/RequestUtil.java
+++ b/src/main/java/com/gxwebsoft/common/core/utils/RequestUtil.java
@@ -15,161 +15,182 @@ import java.util.HashMap;
@Component
public class RequestUtil {
- private static final String host = "https://server.gxwebsoft.com/api";
- private static String ACCESS_TOKEN;
- private static String TENANT_ID;
+ private static final String host = "https://server.gxwebsoft.com/api";
+ private static String ACCESS_TOKEN;
+ private static String TENANT_ID;
- public void setTenantId(String tenantId) {
- TENANT_ID = tenantId;
- }
-
- public void setAccessToken(String token) {
- ACCESS_TOKEN = token;
- }
-
- // 微信支付通知
- public String pushWxPayNotify(Transaction transaction, Payment payment){
- // 设置租户ID
- setTenantId(payment.getTenantId().toString());
- // 推送支付通知地址
- String path = payment.getNotifyUrl();
- try {
- // 链式构建请求
- return HttpRequest.post(path)
- .header("Tenantid", TENANT_ID)
- .body(JSONUtil.toJSONString(transaction))//表单内容
- .timeout(20000)//超时,毫秒
- .execute().body();
-
- } catch (Exception e) {
- e.printStackTrace();
+ public void setTenantId(String tenantId) {
+ TENANT_ID = tenantId;
}
- return "支付失败";
- }
-
- public User getUserByPhone(String phone) {
- String path = "/system/user/getByPhone/" + phone;
- try {
- // 链式构建请求
- String result = HttpRequest.get(host.concat(path))
- .header("Authorization", ACCESS_TOKEN)
- .header("Tenantid", TENANT_ID)
- .timeout(20000)//超时,毫秒
- .execute().body();
-
- JSONObject jsonObject = JSONObject.parseObject(result);
- final String data = jsonObject.getString("data");
- return JSONObject.parseObject(data, User.class);
- } catch (Exception e) {
- e.printStackTrace();
+ public void setAccessToken(String token) {
+ ACCESS_TOKEN = token;
}
- return null;
- }
- public User getByUserId(Integer userId) {
- String path = "/system/user/" + userId;
- try {
- // 链式构建请求
- String result = HttpRequest.get(host.concat(path))
- .header("Authorization", ACCESS_TOKEN)
- .header("Tenantid", TENANT_ID)
- .timeout(20000)//超时,毫秒
- .execute().body();
+ // 微信支付通知
+ public String pushWxPayNotify(Transaction transaction, Payment payment) {
+ // 设置租户ID
+ setTenantId(payment.getTenantId().toString());
+ // 推送支付通知地址
+ String path = payment.getNotifyUrl();
+ try {
+ // 链式构建请求
+ return HttpRequest.post(path)
+ .header("Tenantid", TENANT_ID)
+ .body(JSONUtil.toJSONString(transaction))//表单内容
+ .timeout(20000)//超时,毫秒
+ .execute().body();
- JSONObject jsonObject = JSONObject.parseObject(result);
- System.out.println("jsonObject = " + jsonObject);
- final String data = jsonObject.getString("data");
- return JSONObject.parseObject(data, User.class);
- } catch (Exception e) {
- e.printStackTrace();
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+ return "支付失败";
}
- return null;
- }
- // 新增用户
- public boolean saveUserByPhone(MerchantAccount merchantAccount) {
- String path = "/system/user/";
- try {
- HashMap map = new HashMap<>();
- map.put("nickname", merchantAccount.getRealName());
- map.put("username", merchantAccount.getPhone());
- map.put("realName", merchantAccount.getRealName());
- map.put("phone", merchantAccount.getPhone());
- map.put("password", merchantAccount.getPassword());
- final ArrayList