he2802 преди 2 години
родител
ревизия
a556a8e3a0

+ 1 - 8
zhongzheng-api/src/main/java/com/zhongzheng/controller/user/UserController.java

@@ -186,14 +186,7 @@ public class UserController extends BaseController {
         return AjaxResult.success();
     }
 
-    @ApiOperation("获取公众号openid")
-    @PostMapping("/wx/gzh_bind")
-    public AjaxResult wx_gzh_bind(@RequestBody WxLoginBody loginBody)
-    {
-        ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
-        loginBody.setUserId(loginUser.getUser().getUserId());
-        return AjaxResult.success(wxLoginService.bindGzhUnionIdUser(loginBody));
-    }
+
 
     @ApiOperation("检查是否绑定公众号")
     @PreAuthorize("@ss.hasPermi('system:user:list')")

+ 9 - 3
zhongzheng-api/src/main/java/com/zhongzheng/controller/wx/WxLoginController.java

@@ -112,14 +112,20 @@ public class WxLoginController
     }
 
     @ApiOperation("考前获取用户小程序openid")
-    @PostMapping("/wx/exam/getOpenid")
+    @PostMapping("/app/common/wx/exam/getOpenid")
     public AjaxResult<Void> getExamOpenid(@RequestBody WxLoginBody loginBody)
     {
-        ClientLoginUser loginUser = wxTokenService.getLoginUser(ServletUtils.getRequest());
-        String openId = wxLoginService.getExamWxOpenId(loginBody,loginUser.getUser().getUserId());
+        String openId = wxLoginService.getExamWxOpenId(loginBody);
         return AjaxResult.success(openId);
     }
 
+    @ApiOperation("考前获取公众号openid")
+    @PostMapping("/app/common/wx/gzh_bind")
+    public AjaxResult wx_gzh_bind(@RequestBody WxLoginBody loginBody)
+    {
+        return AjaxResult.success(wxLoginService.bindGzhUnionIdUser(loginBody));
+    }
+
     @ApiOperation("小程序校验PC登录二维码")
     @PostMapping("/scan_login_check")
     public AjaxResult scanLoginCheck(@RequestBody WxLoginBody loginBody)

+ 4 - 1
zhongzheng-framework/src/main/java/com/zhongzheng/framework/web/service/WxLoginService.java

@@ -418,7 +418,10 @@ public class WxLoginService implements IWxLoginService {
         return openId;
     }
 
-    public String getExamWxOpenId(WxLoginBody loginBody, Long userId) {
+    public String getExamWxOpenId(WxLoginBody loginBody) {
+        if(Validator.isEmpty(loginBody.getCode())){
+            throw new CustomException("code缺失");
+        }
         initData();
         String openId;
 

+ 2 - 2
zhongzheng-system/src/main/resources/mapper/modules/top/TopDivideOrderMapper.xml

@@ -284,7 +284,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         WHERE
         1 = 1
         <if test="accomplishStartTime != null and accomplishStartTime != ''">
-            AND v.credit_time BETWEEN #{accomplishStartTime} and #{accomplishEndTime}
+            AND v.accomplish_time BETWEEN #{accomplishStartTime} and #{accomplishEndTime}
         </if>
         <if test="tenantId != null and tenantId != ''">
             AND v.tenant_id = #{tenantId}
@@ -295,7 +295,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="orderSn != null and orderSn != ''">
             AND v.order_sn = #{orderSn}
         </if>
-        AND v.credit_time > 0
+        AND v.finish_status = 1
 
     </select>