Przeglądaj źródła

更新供应商申请信息

chao 4 lat temu
rodzic
commit
be6a23812a

+ 4 - 4
src/main/java/com/caimei365/user/components/WeChatService.java

@@ -144,14 +144,14 @@ public class WeChatService {
         String requestUrl = "https://api.weixin.qq.com/sns/jscode2session";
         String requestUrl = "https://api.weixin.qq.com/sns/jscode2session";
         Map<String, String> requestUrlParam = new HashMap<String, String>(4);
         Map<String, String> requestUrlParam = new HashMap<String, String>(4);
         // 小程序appId
         // 小程序appId
-        requestUrlParam.put("appId", miniAppId);
+        requestUrlParam.put("appid", miniAppId);
         log.info("appId: ---" + miniAppId);
         log.info("appId: ---" + miniAppId);
         // 小程序appSecret
         // 小程序appSecret
-        requestUrlParam.put("appSecret", miniAppSecret);
+        requestUrlParam.put("secret", miniAppSecret);
         // 小程序端返回的code
         // 小程序端返回的code
-        requestUrlParam.put("code", code);
+        requestUrlParam.put("js_code", code);
         // 默认参数
         // 默认参数
-        requestUrlParam.put("grantType", "authorization_code");
+        requestUrlParam.put("grant_type", "authorization_code");
         // 发送post请求读取调用微信接口获取openid用户唯一标识
         // 发送post请求读取调用微信接口获取openid用户唯一标识
         String infos;
         String infos;
         try {
         try {

+ 0 - 1
src/main/java/com/caimei365/user/controller/RegisterApi.java

@@ -3,7 +3,6 @@ package com.caimei365.user.controller;
 import com.caimei365.user.idempotent.Idempotent;
 import com.caimei365.user.idempotent.Idempotent;
 import com.caimei365.user.model.ResponseJson;
 import com.caimei365.user.model.ResponseJson;
 import com.caimei365.user.model.dto.*;
 import com.caimei365.user.model.dto.*;
-import com.caimei365.user.model.po.ShopPo;
 import com.caimei365.user.service.RegisterService;
 import com.caimei365.user.service.RegisterService;
 import io.swagger.annotations.*;
 import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;

+ 1 - 1
src/main/java/com/caimei365/user/service/impl/LoginServiceImpl.java

@@ -248,7 +248,7 @@ public class LoginServiceImpl implements LoginService {
             return ResponseJson.error(-2, "您的企业账号已被冻结,请联系客服处理", null);
             return ResponseJson.error(-2, "您的企业账号已被冻结,请联系客服处理", null);
         }
         }
         // 供应商
         // 供应商
-        if (3 == loginUser.getUserIdentity() && null != loginUser.getShopStatus()) {
+        if (null != loginUser.getShopStatus() && null != loginUser.getUserIdentity() && 3 == loginUser.getUserIdentity()) {
 
 
             if (3 == loginUser.getShopStatus()) {
             if (3 == loginUser.getShopStatus()) {
                 return ResponseJson.error(-2, "您的企业账号正在加速审核中,审核通过后即可登录", null);
                 return ResponseJson.error(-2, "您的企业账号正在加速审核中,审核通过后即可登录", null);

+ 1 - 1
src/main/resources/mapper/LoginMapper.xml

@@ -62,7 +62,7 @@
                u.password as password
                u.password as password
         from serviceprovider s
         from serviceprovider s
         left join user u on s.userID = u.userID
         left join user u on s.userID = u.userID
-        where s.openid = #{openid} and u.validFlag = 1
+        where s.openid = #{openId} and u.validFlag = 1
         limit 1
         limit 1
     </select>
     </select>
     <select id="getServiceProviderByUserId" resultType="com.caimei365.user.model.vo.ServiceProviderVo">
     <select id="getServiceProviderByUserId" resultType="com.caimei365.user.model.vo.ServiceProviderVo">