Browse Source

认证通1.7.7版本功能开发

JiangChongBo 2 years ago
parent
commit
0417e74f05

+ 8 - 45
src/main/java/com/caimei/controller/admin/auth/AuthApi.java

@@ -859,11 +859,15 @@ public class AuthApi {
     }
 //------------------------------------------抖音挑战赛1.7.7版本----------------------------------------------------------------------------------------------------------------
     /**
-     * 新增参赛机构信息
+     * 查询机构信息(后端)
+     * @param mobile
      * @return
      */
-    @PostMapping("save/ross/info")
-    public ResponseJson saveRossInfo(@CurrentUser SysUser sysUser, @RequestBody String params) {
+    @GetMapping("/get/auth/info")
+    public ResponseJson<PageInfo<RossChallengeRoundVo>> getAuthInfo(String mobile,
+                                                                    @CurrentUser SysUser sysUser,
+                                                                @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                                                                @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){
         if (null == sysUser) {
             return ResponseJson.error("用户信息异常", null);
         }
@@ -873,48 +877,7 @@ public class AuthApi {
         if (null == authUserId) {
             return ResponseJson.error("供应商用户id不能为空", null);
         }
-        JSONObject jsonObject = JSONObject.parseObject(params);
-        String mobile=jsonObject.getString("mobile");
-        String licenseOssUrl=jsonObject.getString("licenseOssUrl");
-        String licenseOssName=jsonObject.getString("licenseOssName");
-        Integer authId=jsonObject.getInteger("authId");
-        Integer authuser=jsonObject.getInteger("authUserId");
-        //判断该账号是否已经参赛
-        List<RossChallengeRoundVo> infoByUserName = authService.getInfoByUserName(mobile);
-        if(null !=infoByUserName&&infoByUserName.size()>0){
-            return ResponseJson.success("您已报名",null);
-        }
-        RossChallengeRoundVo rossChallengeRoundVo=new RossChallengeRoundVo();
-        if(null!=authUserId){
-            rossChallengeRoundVo.setAuthUserId(authUserId);
-        }else{
-            rossChallengeRoundVo.setAuthUserId(authuser);
-        }
-        rossChallengeRoundVo.setUserName(mobile);
-        rossChallengeRoundVo.setAuthId(authId);
-        rossChallengeRoundVo.setLicenseOssUrl(licenseOssUrl);
-        rossChallengeRoundVo.setLicenseOssName(licenseOssName);
-        if(StringUtils.isEmpty(licenseOssUrl)&&StringUtils.isEmpty(licenseOssName)){
-            rossChallengeRoundVo.setAuthenticationStatus(1);
-        }else{
-            rossChallengeRoundVo.setAuthenticationStatus(0);
-        }
-        rossChallengeRoundVo.setContestStatus(1);
-        Date date=new Date();
-        SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
-//        String format = sf.format(date);
-        rossChallengeRoundVo.setContestTime(new java.sql.Timestamp(date.getTime()));
-        return authService.saveRossInfo(rossChallengeRoundVo);
-    }
-
-    /**
-     * 查询机构信息(后端)
-     * @param mobile
-     * @return
-     */
-    @GetMapping("/get/auth/info")
-    public ResponseJson<List<RossChallengeRoundVo>> getAuthInfo(String mobile){
-        return authService.getAuthInfo(mobile);
+        return authService.getAuthInfo(mobile,pageNum,pageSize,authUserId);
     }
     /**
      * 根据id删除机构信息

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

@@ -453,7 +453,55 @@ public class WxAuthApi {
         return authService.getActivitty(authUserId);
     }
 //--------------------------------------------挑战赛1.7.7(ROSS)-------------------------------------------------------------------------------------------------
-
+    /**
+     * 新增参赛机构信息
+     * @return
+     */
+    @PostMapping("save/ross/info")
+    public ResponseJson saveRossInfo(@CurrentUser SysUser sysUser, @RequestBody String params) {
+//        if (null == sysUser) {
+//            return ResponseJson.error("用户信息异常", null);
+//        }
+//        // 获取供应商用户id
+//        Integer userIdentity = sysUser.getUserIdentity();
+//        Integer authUserId = 2 == userIdentity ? sysUser.getId() : 3 == userIdentity ? sysUser.getParentId() : null;
+//        if (null == authUserId) {
+//            return ResponseJson.error("供应商用户id不能为空", null);
+//        }
+        JSONObject jsonObject = JSONObject.parseObject(params);
+        String mobile=jsonObject.getString("mobile");
+        String licenseOssUrl=jsonObject.getString("licenseOssUrl");
+        String licenseOssName=jsonObject.getString("licenseOssName");
+        Integer authId=jsonObject.getInteger("authId");
+        Integer authuser=jsonObject.getInteger("authUserId");
+        //判断该账号是否已经参赛
+        List<RossChallengeRoundVo> infoByUserName = authService.getInfoByUserName(mobile);
+        if(null !=infoByUserName&&infoByUserName.size()>0){
+            return ResponseJson.success("您已报名",infoByUserName);
+        }
+        RossChallengeRoundVo rossChallengeRoundVo=new RossChallengeRoundVo();
+//        if(null!=authUserId){
+//            rossChallengeRoundVo.setAuthUserId(authUserId);
+//        }else{
+            rossChallengeRoundVo.setAuthUserId(authuser);
+//        }
+        rossChallengeRoundVo.setAuthUserId(authuser);
+        rossChallengeRoundVo.setUserName(mobile);
+        rossChallengeRoundVo.setAuthId(authId);
+        rossChallengeRoundVo.setLicenseOssUrl(licenseOssUrl);
+        rossChallengeRoundVo.setLicenseOssName(licenseOssName);
+        if(StringUtils.isEmpty(licenseOssUrl)&&StringUtils.isEmpty(licenseOssName)){
+            rossChallengeRoundVo.setAuthenticationStatus(1);
+        }else{
+            rossChallengeRoundVo.setAuthenticationStatus(0);
+        }
+        rossChallengeRoundVo.setContestStatus(1);
+        Date date=new Date();
+        SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+//        String format = sf.format(date);
+        rossChallengeRoundVo.setContestTime(new java.sql.Timestamp(date.getTime()));
+        return authService.saveRossInfo(rossChallengeRoundVo);
+    }
     /**
      * 验证用户是否已经报名
      * @param mobile
@@ -488,8 +536,10 @@ public class WxAuthApi {
      * @return
      */
     @GetMapping("/get/video/all")
-    public ResponseJson<List<RossChallengeVideo>> getVideoAll(String mobileOrAuthpart,Integer clubUserId){
-        return authService.getVideoAll(mobileOrAuthpart,clubUserId);
+    public ResponseJson<PageInfo<RossChallengeVideo>> getVideoAll(String mobileOrAuthpart,Integer clubUserId,Integer authUserId,
+                                                              @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
+                                                              @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize){
+        return authService.getVideoAll(mobileOrAuthpart,clubUserId,authUserId,pageNum,pageSize);
     }
     /**
      * 验证机构是否已经上传了3个视频(点击上传视频时验证)
@@ -527,7 +577,7 @@ public class WxAuthApi {
         String cover=jsonObject.getString("cover");
         String ossUrl=jsonObject.getString("ossUrl");
         String linked=jsonObject.getString("linked");
-//        Integer authUserId=jsonObject.getInteger("authUserId");
+        Integer authUserId=jsonObject.getInteger("authUserId");
         RossChallengeVideo cr=new RossChallengeVideo();
         cr.setUserName(userName);
         cr.setCover(cover);
@@ -536,7 +586,7 @@ public class WxAuthApi {
         cr.setTitle(title);
         cr.setAuthId(authId);
         cr.setLinked(linked);
-//        cr.setAuthUserId(authUserId);
+        cr.setAuthUserId(authUserId);
         return authService.saveVideo(cr);
     }
 }

+ 5 - 3
src/main/java/com/caimei/mapper/cmMapper/AuthMapper.java

@@ -131,7 +131,7 @@ public interface AuthMapper {
     String getPrefix(Integer authUserId);
 
     void saveVideoInfo(@Param("userName") String userName,@Param("cover") String cover,@Param("ossUrl") String ossUrl,@Param("ossName") String ossName,@Param("title") String title,@Param("releaseTime") String releaseTime,@Param("authId") Integer authId,@Param("authUserId")Integer authUserId);
-    void saveVideo(@Param("userName") String userName,@Param("cover") String cover,@Param("ossUrl") String ossUrl,@Param("ossName") String ossName,@Param("title") String title,@Param("releaseTime") String releaseTime,@Param("authId") Integer authId,@Param("linked") String linked);
+    void saveVideo(@Param("userName") String userName,@Param("cover") String cover,@Param("ossUrl") String ossUrl,@Param("ossName") String ossName,@Param("title") String title,@Param("releaseTime") String releaseTime,@Param("authId") Integer authId,@Param("linked") String linked,@Param("authUserId")Integer authUserId);
 
     String getauthUserId(@Param("authId") Integer authId);
 
@@ -175,6 +175,8 @@ public interface AuthMapper {
 
     ChallengeRoundVo getChallengeRoundInfo(Integer videoID);
 
+    RossChallengeVideo getChallengeVideoInfo(Integer videoID);
+
     void upStatusById(Integer id);
 
     String getReleaseTime(@Param("userName")String userName );
@@ -192,7 +194,7 @@ public interface AuthMapper {
     RossChallengeRoundVo getcontestedInfoByUserName(@Param("mobile")String mobile);
 
 
-    List<RossChallengeVideo> getVideoAll(@Param("mobileOrAuthpart")String mobileOrAuthpart);
+    List<RossChallengeVideo> getVideoAll(@Param("mobileOrAuthpart")String mobileOrAuthpart,Integer authUserId);
 
     List<RossChallengeVideo> getVideoByUsername(@Param("mobile")String mobile);
 
@@ -200,7 +202,7 @@ public interface AuthMapper {
 
     void upVideoDiggCount(Integer videoId,Integer diggFlag,@Param("clubUserIds")String clubUserIds);
 
-    List<RossChallengeRoundVo> getAuthInfo(@Param("mobile")String mobile);
+    List<RossChallengeRoundVo> getAuthInfo(@Param("mobile")String mobile,@Param("authUserId")Integer authUserId,@Param("StartTime")String StartTime,@Param("endTime")String endTime);
 
     void delAuthInfoById(Integer id);
 

+ 4 - 0
src/main/java/com/caimei/model/vo/RossChallengeVideo.java

@@ -12,6 +12,10 @@ public class RossChallengeVideo {
      * 机构id
      */
     private Integer authId;
+    /**
+     * 供应商id
+     */
+    private Integer authUserId;
     /**
      * 用户登录账号
      */

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

@@ -330,7 +330,7 @@ public interface AuthService {
      * @param mobileOrAuthpart 电话号码或者机构名称
      * @return
      */
-    ResponseJson<List<RossChallengeVideo>> getVideoAll(String mobileOrAuthpart,Integer clubUserId);
+    ResponseJson<PageInfo<RossChallengeVideo>> getVideoAll(String mobileOrAuthpart,Integer clubUserId,Integer authUserId,Integer pageNum,Integer pageSize);
 
     /**
      * 根据手机号码查询该机构视频列表
@@ -357,7 +357,7 @@ public interface AuthService {
      * @param mobile
      * @return
      */
-    ResponseJson<List<RossChallengeRoundVo>> getAuthInfo(String mobile);
+    ResponseJson<PageInfo<RossChallengeRoundVo>> getAuthInfo(String mobile,Integer pageNum,Integer pageSize,Integer authUserId);
     /**
      * 根据id删除机构信息
      * @param id

+ 35 - 0
src/main/java/com/caimei/service/auth/impl/AuthClubServiceImpl.java

@@ -166,6 +166,8 @@ public class AuthClubServiceImpl implements AuthClubService {
             } else {
                 log.info("供应商添加机构用户-密码发送成功,手机号:" + mobile);
             }
+            //认证通1.7.7ROSS挑战赛挑战赛活动开启期间新增用户短信发送
+            smsRossRound(authUserId,mobile);
         } else {
             clubUser.setId(clubUserId);
             clubMapper.updateClubUser(clubUser);
@@ -173,6 +175,39 @@ public class AuthClubServiceImpl implements AuthClubService {
         return ResponseJson.success("保存机构用户成功");
     }
 
+    /**
+     * 认证通1.7.7ROSS挑战赛挑战赛活动开启期间新增用户短信发送
+     * @param authUserId
+     */
+    public void smsRossRound(Integer authUserId,String mobile){
+        //获取手机号码
+//        List<RossChallengeRoundVo> roundByAuthUserID = authMapper.getRoundByAuthUserID(authUserId);
+//        List<ClubUserVo> clubUserList = clubMapper.getClubUserList(authUserId, null, null, null);
+        //如果活动已经开始了,则用户报名成功后向用户发送短信
+        if(null!=authUserId){
+            ChallengeActivityVo activityTime = authMapper.getActivityTime(authUserId);
+            //判断活动是否开启
+            if(null!=activityTime &&null!=authUserId&&null!=activityTime.getStatus()&&activityTime.getStatus()==1){
+                //获取供应商名称
+                String authParty=authMapper.getAuthparty(authUserId);
+                if(authUserId==12){
+                    authParty="西班牙ROSS";
+                }
+                //短信类型:1通知短信,2验证码短信,3营销短信
+                Integer type=3;
+                String conn="[" + authParty + "]尊敬的会员,ROSS视频挑战赛报名通道已开启,点此【http://f6d.cn/Fgp6r】进入ROSS认证通,了解详情";
+                if(StringUtils.isNotEmpty(mobile)){
+                    Boolean aBoolean = SmsUtils.sendSms(type, mobile, conn);
+                    if(aBoolean){
+                        log.info("挑战赛短信发送成功"+mobile);
+                    }else{
+                        log.info("挑战赛短信发送失败"+mobile);
+                    }
+                }
+            }
+        }
+
+    }
     @Override
     public ResponseJson deleteClubUser(Integer clubUserId) {
         clubMapper.deleteClubUser(clubUserId);

+ 63 - 35
src/main/java/com/caimei/service/auth/impl/AuthServiceImpl.java

@@ -8,6 +8,7 @@ import com.caimei.components.RedisService;
 import com.caimei.config.FastDfsClient;
 import com.caimei.mapper.cmMapper.AuthMapper;
 import com.caimei.mapper.cmMapper.AuthProductMapper;
+import com.caimei.mapper.cmMapper.ClubMapper;
 import com.caimei.mapper.ldmMapper.LdmMapper;
 import com.caimei.model.ResponseJson;
 import com.caimei.model.po.*;
@@ -124,6 +125,9 @@ public class AuthServiceImpl implements AuthService {
     @Resource
     private RedisService redisService;
 
+    @Resource
+    private ClubMapper clubMapper;
+
     @Override
     public ResponseJson<PageInfo<AuthVo>> getAuthList(Integer listType, Integer authUserId, String authParty,
                                                       String mobile, Integer status, Integer starFlag, Integer auditStatus,
@@ -1275,7 +1279,7 @@ public class AuthServiceImpl implements AuthService {
         Date date=new Date();
         SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
         String releaseTime = sf.format(date).replace("T", "");
-        authMapper.saveVideo(ross.getUserName(),ross.getCover(),ross.getOssUrl(),ross.getOssName(),ross.getTitle(),releaseTime,ross.getAuthId(),ross.getLinked());
+        authMapper.saveVideo(ross.getUserName(),ross.getCover(),ross.getOssUrl(),ross.getOssName(),ross.getTitle(),releaseTime,ross.getAuthId(),ross.getLinked(),ross.getAuthUserId());
         return ResponseJson.success("保存成功",null);
     }
 
@@ -1706,9 +1710,9 @@ public class AuthServiceImpl implements AuthService {
     public ResponseJson downLoadChoseZip(String fileId,HttpServletResponse response){
         if (fileId.contains(",")) {
             String[] split = fileId.split(",");
-            ArrayList<ChallengeRoundVo> fileTreeVos = new ArrayList<>();
+            ArrayList<RossChallengeVideo> fileTreeVos = new ArrayList<>();
             for (String s : split) {
-                ChallengeRoundVo file = authMapper.getChallengeRoundInfo(Integer.valueOf(s));
+                RossChallengeVideo file = authMapper.getChallengeVideoInfo(Integer.valueOf(s));
                 fileTreeVos.add(file);
             }
             //有package则在服务器固定路径new file.mkdir
@@ -1721,7 +1725,7 @@ public class AuthServiceImpl implements AuthService {
             }
             boolean mkdirs = new File(filePath).mkdirs();
             Assert.isTrue(mkdirs, "文件夹创建失败");
-            for (ChallengeRoundVo challengeRoundVo : fileTreeVos) {
+            for (RossChallengeVideo challengeRoundVo : fileTreeVos) {
                     //普通文件直接下载到临时文件夹uuid下
                     String fileName = "";
                 String ossurl = challengeRoundVo.getOssUrl();
@@ -1783,8 +1787,8 @@ public class AuthServiceImpl implements AuthService {
             file.delete();
             FileZipUtils.deleteFile(new File(zipPath));
         }else {
-            ArrayList<ChallengeRoundVo> fileTreeVos = new ArrayList<>();
-            ChallengeRoundVo f = authMapper.getChallengeRoundInfo(Integer.valueOf(fileId));
+            ArrayList<RossChallengeVideo> fileTreeVos = new ArrayList<>();
+            RossChallengeVideo f = authMapper.getChallengeVideoInfo(Integer.valueOf(fileId));
                 fileTreeVos.add(f);
             //有package则在服务器固定路径new file.mkdir
             UUID uuid = UUID.randomUUID();
@@ -1796,7 +1800,7 @@ public class AuthServiceImpl implements AuthService {
             }
             boolean mkdirs = new File(filePath).mkdirs();
             Assert.isTrue(mkdirs, "文件夹创建失败");
-            for (ChallengeRoundVo challengeRoundVo : fileTreeVos) {
+            for (RossChallengeVideo challengeRoundVo : fileTreeVos) {
                 //普通文件直接下载到临时文件夹uuid下
                 String fileName = "";
                 String ossurl = challengeRoundVo.getOssUrl();
@@ -1937,7 +1941,14 @@ public class AuthServiceImpl implements AuthService {
      * @return
      */
     public ResponseJson<RossChallengeRoundVo> checkContestedInfo(String mobile){
-        return ResponseJson.success(authMapper.getcontestedInfoByUserName(mobile));
+        RossChallengeRoundVo ross=new RossChallengeRoundVo();
+        RossChallengeRoundVo rossChallengeRoundVo = authMapper.getcontestedInfoByUserName(mobile);
+        if(null!=rossChallengeRoundVo&&null!=rossChallengeRoundVo.getContestStatus()){
+            ross.setContestStatus(rossChallengeRoundVo.getContestStatus());
+        }else{
+            ross.setContestStatus(0);
+        }
+        return ResponseJson.success(ross);
     }
     /**
      * 获取已报名信息列表
@@ -1955,23 +1966,28 @@ public class AuthServiceImpl implements AuthService {
      * @return
      */
     @Override
-    public ResponseJson<List<RossChallengeVideo>> getVideoAll(String mobileOrAuthpart,Integer clubUserId){
-        List<RossChallengeVideo> videoAll = authMapper.getVideoAll(mobileOrAuthpart);
+    public ResponseJson<PageInfo<RossChallengeVideo>> getVideoAll(String mobileOrAuthpart,Integer clubUserId,Integer authUserId,Integer pageNum,Integer pageSize){
+        PageHelper.startPage(pageNum, pageSize);
+        List<RossChallengeVideo> videoAll = authMapper.getVideoAll(mobileOrAuthpart,authUserId);
+        PageInfo<RossChallengeVideo> pageData = new PageInfo<>(videoAll);
         //获取该用户点赞过的视频
-        if(null!=videoAll&& videoAll.size()>0){
-           for(RossChallengeVideo video:videoAll){
-               if (StringUtils.isNotEmpty(video.getClubUserIds())) {
-                   if (video.getClubUserIds().contains(clubUserId.toString())) {
-                       video.setDiggStatus(1);
-                   } else {
-                       video.setDiggStatus(0);
-                   }
-               } else {
-                   video.setDiggStatus(0);
-               }
-           };
+        //如果clubUserId为空,用户不能点赞,直接返回所有视频
+        if(null!=clubUserId){
+            if(null!=videoAll&& videoAll.size()>0){
+                for(RossChallengeVideo video:videoAll){
+                    if (StringUtils.isNotEmpty(video.getClubUserIds())) {
+                        if (video.getClubUserIds().contains(clubUserId.toString())) {
+                            video.setDiggStatus(1);
+                        } else {
+                            video.setDiggStatus(0);
+                        }
+                    } else {
+                        video.setDiggStatus(0);
+                    }
+                };
+            }
         }
-        return ResponseJson.success(videoAll);
+        return ResponseJson.success(pageData);
     }
 
     /**
@@ -1983,6 +1999,7 @@ public class AuthServiceImpl implements AuthService {
     public ResponseJson<List<RossChallengeVideo>> getVideoByUsername(String mobile,Integer clubUserId){
         List<RossChallengeVideo> videoByUsername = authMapper.getVideoByUsername(mobile);
         //获取该用户点赞过的视频
+        if(null!=clubUserId){
         if(null!=videoByUsername&& videoByUsername.size()>0){
             for(RossChallengeVideo video:videoByUsername){
                 if (StringUtils.isNotEmpty(video.getClubUserIds())) {
@@ -1996,6 +2013,8 @@ public class AuthServiceImpl implements AuthService {
                 }
             };
         }
+
+        }
         return ResponseJson.success(videoByUsername);
 
     }
@@ -2055,8 +2074,12 @@ public class AuthServiceImpl implements AuthService {
      * @return
      */
     @Override
-    public ResponseJson<List<RossChallengeRoundVo>> getAuthInfo(String mobile){
-        List<RossChallengeRoundVo> authInfo = authMapper.getAuthInfo(mobile);
+    public ResponseJson<PageInfo<RossChallengeRoundVo>> getAuthInfo(String mobile,Integer pageNum,Integer pageSize,Integer authUserId){
+        //获取活动时间内的机构列表信息
+        ChallengeActivityVo activityTime = authMapper.getActivityTime(authUserId);
+        PageHelper.startPage(pageNum, pageSize);
+        List<RossChallengeRoundVo> authInfo = authMapper.getAuthInfo(mobile,authUserId,activityTime.getStartTime(),activityTime.getEndTime());
+        PageInfo<RossChallengeRoundVo> pageData = new PageInfo<>(authInfo);
         if(null!=authInfo&&authInfo.size()>0){
             for (RossChallengeRoundVo search:authInfo) {
                 if(null != search.getContestTime()){
@@ -2067,7 +2090,7 @@ public class AuthServiceImpl implements AuthService {
                 }
             }
         }
-        return ResponseJson.success(authInfo);
+        return ResponseJson.success(pageData);
     }
 
     /**
@@ -2100,20 +2123,25 @@ public class AuthServiceImpl implements AuthService {
 
     public void smsSend(Integer authUserId){
         //获取手机号码
-        List<RossChallengeRoundVo> roundByAuthUserID = authMapper.getRoundByAuthUserID(authUserId);
+//        List<RossChallengeRoundVo> roundByAuthUserID = authMapper.getRoundByAuthUserID(authUserId);
+        List<ClubUserVo> clubUserList = clubMapper.getClubUserList(authUserId, null, null, null);
         //获取供应商名称
         String authParty=authMapper.getAuthparty(authUserId);
+        if(authUserId==12){
+            authParty="西班牙ROSS";
+        }
         //短信类型:1通知短信,2验证码短信,3营销短信
-        Integer type=1;
-        String conn="[" + authParty + "]认证通抖音视频挑战赛邀您参与获大奖,点击链接:https://zp.caimei365.com/12/ross/activity/challenge或去Ross认证通打开";
-        if(null!=roundByAuthUserID&& roundByAuthUserID.size()>0){
-            roundByAuthUserID.stream().forEach(round ->{
-                if(StringUtils.isNotEmpty(round.getUserName())){
-                    Boolean aBoolean = SmsUtils.sendSms(type, round.getUserName(), conn);
+        Integer type=3;
+        //[s{20}]尊敬的会员,ROSS视频挑战赛报名通道已开启,点此【http://f6d.cn/Fgp6r】进入ROSS认证通,了解详情。
+        String conn="[" + authParty + "]尊敬的会员,ROSS视频挑战赛报名通道已开启,点此【http://f6d.cn/Fgp6r】进入ROSS认证通,了解详情";
+        if(null!=clubUserList&& clubUserList.size()>0){
+            clubUserList.stream().forEach(round ->{
+                if(StringUtils.isNotEmpty(round.getMobile())){
+                    Boolean aBoolean = SmsUtils.sendSms(type, round.getMobile(), conn);
                     if(aBoolean){
-                        log.info("挑战赛短信发送成功"+round.getUserName());
+                        log.info("挑战赛短信发送成功"+round.getMobile());
                     }else{
-                        log.info("挑战赛短信发送失败"+round.getUserName());
+                        log.info("挑战赛短信发送失败"+round.getMobile());
                     }
                 }
             });

+ 13 - 5
src/main/resources/mapper/AuthMapper.xml

@@ -651,8 +651,8 @@
         values(#{userName},#{title},#{ossName},#{ossUrl},#{cover},#{releaseTime},#{authId},#{authUserId})
     </insert>
     <insert id="saveVideo">
-        insert into cm_ross_challenge_video(userName,title,ossName,ossUrl,cover,releaseTime,authId,linked)
-        values(#{userName},#{title},#{ossName},#{ossUrl},#{cover},#{releaseTime},#{authId},#{linked})
+        insert into cm_ross_challenge_video(userName,title,ossName,ossUrl,cover,releaseTime,authId,linked,authUserId)
+        values(#{userName},#{title},#{ossName},#{ossUrl},#{cover},#{releaseTime},#{authId},#{linked},#{authUserId})
     </insert>
     <select id="getauthUserId" resultType="java.lang.String">
         select authUserId
@@ -800,6 +800,11 @@
         from cm_challenge_round cr
         where cr.id=#{videoID}
     </select>
+    <select id="getChallengeVideoInfo" resultType="com.caimei.model.vo.RossChallengeVideo">
+        select cr.*
+        from cm_ross_challenge_video cr
+        where cr.id=#{videoID}
+    </select>
     <update id="upStatusById">
         update cm_challenge_activity set
             status = 0
@@ -836,7 +841,7 @@
     <select id="getVideoAll" resultType="com.caimei.model.vo.RossChallengeVideo">
         select cr.*,cba.authParty from cm_ross_challenge_video cr
         left join cm_brand_auth cba on cr.authId=cba.id
-        where 1=1
+        where cr.authUserId=#{authUserId}
         <if test="mobileOrAuthpart != null and mobileOrAuthpart != ''">
             and (cr.userName like concat('%', #{mobileOrAuthpart})
             or  cba.authParty like concat('%', #{mobileOrAuthpart},'%') )
@@ -867,9 +872,12 @@
         where id=#{videoId}
     </update>
     <select id="getAuthInfo" resultType="com.caimei.model.vo.RossChallengeRoundVo">
-        select * from cm_ross_challenge_round
+        select cr.*,cba.authParty from cm_ross_challenge_round cr
+        left join cm_brand_auth cba on cr.authId=cba.id
+        where cr.authUserId=#{authUserId}
+          and cr.contestTime &gt; #{StartTime} and cr.contestTime &lt; #{endTime}
         <if test="null!=mobile and mobile !=''">
-            where  userName like concat('%', #{mobile})
+            and  cr.userName like concat('%', #{mobile})
         </if>
         order by contestTime
     </select>