zhs 3 éve
szülő
commit
304c7b9508

+ 1 - 1
src/main/java/com/supplier/config/InterceptConfig.java

@@ -53,6 +53,6 @@ public class InterceptConfig implements WebMvcConfigurer {
     public void addInterceptors(InterceptorRegistry registry) {
         registry.addInterceptor(new JWTIntercept())
                 .addPathPatterns("/**")   // 正常情况下 拦截所有请求/**,因测试需要就先拦截/user/test
-                .excludePathPatterns("/wx/login/**",  "/page/*", "/js/**", "/i18n/**", "/css/**", "/images/**", "/layui/**", "/json/**" ,"/remixicon/**", "/wxpay/**","/appPay/**", "http://a1-v2.easemob.com/**", "http://39.97.9.52/*", "http://47.95.246.247/**", "ws://39.102.159.61/**", "/page/registered/**");  //放心登录接口,因为要通过登录获取token
+                .excludePathPatterns("/", "/wx/login/**",  "/page/*", "/js/**", "/i18n/**", "/css/**", "/images/**", "/layui/**", "/json/**" ,"/remixicon/**", "/wxpay/**","/appPay/**", "http://a1-v2.easemob.com/**", "http://39.97.9.52/*", "http://47.95.246.247/**", "ws://39.102.159.61/**", "/page/registered/**");  //放心登录接口,因为要通过登录获取token
     }
 }

+ 0 - 10
src/main/java/com/supplier/controller/IndexController.java

@@ -146,16 +146,6 @@ public class IndexController {
         return "personal/ceshi";
     }
 
-    /**
-     * 登录
-     * @param model
-     * @return
-     */
-    @RequestMapping("Login")
-    public String Login(Model model){
-        return "Login";
-    }
-
     /**
      * 注册
      * @param model

+ 20 - 0
src/main/java/com/supplier/controller/LoginController.java

@@ -0,0 +1,20 @@
+package com.supplier.controller;
+
+import org.springframework.stereotype.Controller;
+import org.springframework.ui.Model;
+import org.springframework.web.bind.annotation.RequestMapping;
+
+@Controller
+@RequestMapping("/")
+public class LoginController {
+
+    /**
+     * 登录
+     * @param model
+     * @return
+     */
+    @RequestMapping("/")
+    public String Login(Model model){
+        return "Login";
+    }
+}

+ 6 - 3
src/main/java/com/supplier/controller/WxPayAppController.java

@@ -190,20 +190,23 @@ public class WxPayAppController extends WxPayUtils {
                         .setTradeType((String)packageParams.get("trade_type"))
                         .setPrepayId((String)packageParams.get("transaction_id"))
                         .setOpenId((String)packageParams.get("openid"))
-                        .setTimeEnd((String)packageParams.get("time_end"));
+                        .setTimeEnd((String)packageParams.get("time_end"))
+                        .setPayType("微信支付");
                 //如果自定义参数是gysTopUp则代表的是供应商充值余额
                 if(((String) packageParams.get("attach")).indexOf("gysTopUp") != -1){
                     WxPay buySupplier = new WxPay()
                             .setCode(((String) packageParams.get("attach")).split(",")[2])
                             .setUuid(((String) packageParams.get("attach")).split(",")[1])
-                            .setTotalFee((float)Integer.parseInt((String)packageParams.get("total_fee")) / 100 + "");
+                            .setTotalFee((float)Integer.parseInt((String)packageParams.get("total_fee")) / 100 + "")
+                            .setPayType("微信支付");
                     wxPayService.updateBuySupplier(buySupplier); //充值
                 } else if(((String) packageParams.get("attach")).indexOf("gysOfferNum") != -1){ //报价单次数购买
                     BuyOfferNum buyOfferNum = new BuyOfferNum()
                             .setCode(((String) packageParams.get("attach")).split(",")[2])
                             .setUuid(((String) packageParams.get("attach")).split(",")[1])
                             .setPayAmount((float)Integer.parseInt((String)packageParams.get("total_fee")) / 100 + "")
-                            .setOfferNum(((String) packageParams.get("attach")).split(",")[3]);
+                            .setOfferNum(((String) packageParams.get("attach")).split(",")[3])
+                            .setPayType("微信支付");
                     wxPayService.updateBuyOfferNum(buyOfferNum);//购买次数
                 } else { //报价单购买
                     wxPayService.payUpdate(wxPay);

+ 4 - 0
src/main/java/com/supplier/model/BuyOfferNum.java

@@ -36,4 +36,8 @@ public class BuyOfferNum implements Serializable {
      * 购买用户
      */
     private String code;
+    /**
+     * 充值方式
+     */
+    private String payType;
 }

+ 4 - 0
src/main/java/com/supplier/model/WxPay.java

@@ -76,4 +76,8 @@ public class WxPay implements Serializable {
      * 用户编号
      */
     private String code;
+    /**
+     * 支付方式
+     */
+    private String payType;
 }

+ 5 - 2
src/main/resources/config/mapping/WxPayMapper.xml

@@ -43,6 +43,9 @@
                 <if test="timeEnd != null and timeEnd != ''">
                     time_end = #{timeEnd},
                 </if>
+                <if test="payType != null and payType != ''">
+                    pay_type = #{payType},
+                </if>
             </trim>
             where release_uuid = #{releaseUuid}
         </set>
@@ -173,7 +176,7 @@
     </update>
     <!-- 完善充值记录 -->
     <update id="updateBuySupplier" parameterType="WxPay">
-        update bus_top_up_record set jdrq = CONVERT(VARCHAR(100), SYSDATETIME(), 20),total_fee=#{totalFee} where code = #{code} and uuid = #{uuid}
+        update bus_top_up_record set jdrq = CONVERT(VARCHAR(100), SYSDATETIME(), 20),total_fee=#{totalFee},pay_type=#{payType} where code = #{code} and uuid = #{uuid}
     </update>
     <!-- 查询用户是否充值成功 -->
     <select id="getTopUp" resultType="int" parameterType="WxPay">
@@ -194,7 +197,7 @@
     </delete>
     <!-- 购买记录添加金额 -->
     <update id="updateBuyOfferNum" parameterType="BuyOfferNum">
-        update bus_buy_offer_num set pay_amount = #{payAmount} where code = #{code} and uuid = #{uuid}
+        update bus_buy_offer_num set pay_amount = #{payAmount},pay_type=#{payType} where code = #{code} and uuid = #{uuid}
     </update>
     <!-- 查询用户是否购买次数成功 -->
     <select id="getOfferNum" resultType="int" parameterType="BuyOfferNum">

+ 2 - 2
src/main/resources/static/js/Login/index.js

@@ -16,7 +16,7 @@ layui.use(["layer", "form"], function(){
         }
         //发送验证码
         $.ajax({
-            url: "http://192.168.0.116:9600/supplier/checkTele",
+            url: "https://www.tuyatrip.com/api/supplier/checkTele",
             type: "get",
             data: {
                 "phone": tel
@@ -68,7 +68,7 @@ layui.use(["layer", "form"], function(){
         }
         //登录
         $.ajax({
-            url: "http://192.168.0.116:9600/supplier/updateUser",
+            url: "https://www.tuyatrip.com/api/supplier/updateUser",
             type: "get",
             data: {
                 "phone": tel,

+ 1 - 1
src/main/resources/static/js/indexHome/function.js

@@ -484,7 +484,7 @@ function clickHeadHove(obj){
         }, function () {
             localStorage.clear(); //清空缓存
             conn.close();
-            window.location.href="/page/Login";
+            window.location.href="/";
         },function (){
             layer.closeAll()
         })

+ 1 - 1
src/main/resources/static/js/indexHome/index.js

@@ -5,7 +5,7 @@ layui.use(["layer", "form", "upload"], function(){
     upload = layui.upload;
     if(localStorage.getItem("token") == null){
         layer.msg("请先登录", {icon: 2}, function (){
-            window.location.href="/page/Login";
+            window.location.href="/";
         })
     }
     //禁用鼠标右击

+ 1 - 1
src/main/resources/static/js/registered/index.js

@@ -128,7 +128,7 @@ layui.use(["layer", "form", "laydate", "upload"], function(){
             return false;
         }
         $.ajax({
-            url: "http://192.168.0.116:9600/supplier/registered",
+            url: "https://www.tuyatrip.com/api/supplier/registered",
             type: "post",
             data: $("#form").serialize(),
             dataType: "json",