JiangChongBo 2 年之前
父節點
當前提交
08b7e3e964

+ 3 - 3
src/main/java/com/caimei/controller/wechat/WxAuthApi.java

@@ -476,9 +476,9 @@ public class WxAuthApi {
         Integer authuser=jsonObject.getInteger("authUserId");
 //        Integer clubUserId=jsonObject.getInteger("clubUserId");
         //判断该账号是否已经参赛
-        List<RossChallengeRoundVo> infoByUserName = authService.getInfoByUserName(mobile);
-        if(null !=infoByUserName&&infoByUserName.size()>0){
-            return ResponseJson.success("您已报名",infoByUserName);
+        RossChallengeRoundVo infoByUserName = authService.getInfoByUserName(mobile,authuser);
+        if(null !=infoByUserName&&infoByUserName.getContestStatus()==1){
+            return ResponseJson.success("您已报名",mobile);
         }
         RossChallengeRoundVo rossChallengeRoundVo=new RossChallengeRoundVo();
 //        if(null!=authUserId){

+ 1 - 1
src/main/java/com/caimei/service/auth/AuthService.java

@@ -313,7 +313,7 @@ public interface AuthService {
      * @param userName
      * @return
      */
-    List<RossChallengeRoundVo> getInfoByUserName(String userName);
+    RossChallengeRoundVo getInfoByUserName(String userName,Integer authUserId);
     /**
      * 验证用户是否已经报名
      * @param mobile

+ 1 - 1
src/main/java/com/caimei/service/auth/impl/AuthProductServiceImpl.java

@@ -504,7 +504,7 @@ public class AuthProductServiceImpl implements AuthProductService {
             // 添加认证日期信息
             if (null != product.getAuthDates()) {
                 SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd");
-                map.put("addWord3_content", format.format(product.getCreateTime()));
+                map.put("addWord3_content", format.format(product.getAuthDates()));
                 map.put("addWord3_color", "218,185,107");
                 map.put("addWord3_type", "思源宋体");
                 map.put("addWord3_style", Font.PLAIN);

+ 16 - 2
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -1994,8 +1994,22 @@ public class AuthServiceImpl implements AuthService {
      * @return
      */
     @Override
-    public List<RossChallengeRoundVo> getInfoByUserName(String userName){
-        return authMapper.getInfoByUserName(userName);
+    public RossChallengeRoundVo getInfoByUserName(String userName,Integer authUserId){
+        //获取活动时间
+        ChallengeActivityVo activityTime = authMapper.getActivityTime(authUserId);
+        //活动时间内用户是否参与比赛
+        RossChallengeRoundVo ross=new RossChallengeRoundVo();
+        if(null!=activityTime&&StringUtils.isNotEmpty(activityTime.getStartTime())&&StringUtils.isNotEmpty(activityTime.getEndTime())){
+            RossChallengeRoundVo rossChallengeRoundVo = authMapper.getcontestedInfoByUserName(userName,activityTime.getStartTime(),activityTime.getEndTime());
+            if(null!=rossChallengeRoundVo&&null!=rossChallengeRoundVo.getContestStatus()){
+                ross.setContestStatus(rossChallengeRoundVo.getContestStatus());
+            }else{
+                ross.setContestStatus(0);
+            }
+        }else{
+            ross.setContestStatus(0);
+        }
+        return ross;
     }
     /**
      * 验证用户是否已经报名