JiangChongBo 2 年之前
父节点
当前提交
eb586251aa

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

@@ -133,7 +133,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,@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,@Param("authUserId")Integer authUserId,@Param("clubUserId")Integer clubUserId);
 
     String getauthUserId(@Param("authId") Integer authId);
 

+ 3 - 0
src/main/java/com/caimei/mapper/cmMapper/ClubMapper.java

@@ -57,4 +57,7 @@ public interface ClubMapper {
 
     //根据id更新authid到V1.7.7版本信息ross挑战赛机构表
     void upAuthByid(Integer clubUserId,Integer authId);
+    //根据id更新authid到V1.7.7版本信息ross挑战赛视频表
+    void upVideoAuthByid(Integer clubUserId,Integer authId);
+
 }

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

@@ -60,4 +60,9 @@ public class RossChallengeVideo {
      * 是否点赞(0,未点赞;1已点赞)
      */
     private Integer diggStatus;
+
+    /**
+     * 用户id
+     */
+    private Integer clubUserId;
 }

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

@@ -263,6 +263,8 @@ public class AuthClubServiceImpl implements AuthClubService {
         clubMapper.saveBindAuth(authId,authParty,authUserId,clubUserId);
         //1.7.7ross挑战赛新加逻辑:更新机构信息到挑战赛表
         clubMapper.upAuthByid(clubUserId,authId);
+        //1.7.7ross挑战赛新加逻辑:更新机构信息到视频表
+        clubMapper.upVideoAuthByid(clubUserId,authId);
         return ResponseJson.success("绑定机构成功");
     }
 }

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

@@ -539,6 +539,7 @@ public class AuthServiceImpl implements AuthService {
             Integer clubUserId = authMapper.getClubUserIdByAuthId(authId);
             //1.7.7ross挑战赛新加逻辑:更新机构信息到挑战赛表
             clubMapper.upAuthByid(clubUserId,authId);
+            clubMapper.upVideoAuthByid(clubUserId,authId);
         }
         if (1 == source) {
             authMapper.updateAuthAuditStatus(authId, status, auditStatus, invalidReason, auditBy, auditTime);
@@ -1284,7 +1285,9 @@ 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(),ross.getAuthUserId());
+        //根据手机号获取clubuserid
+        Integer clubUserId = authMapper.getClubUserId(ross.getUserName());
+        authMapper.saveVideo(ross.getUserName(),ross.getCover(),ross.getOssUrl(),ross.getOssName(),ross.getTitle(),releaseTime,ross.getAuthId(),ross.getLinked(),ross.getAuthUserId(),clubUserId);
         return ResponseJson.success("保存成功",null);
     }
 

+ 4 - 4
src/main/resources/mapper/AuthMapper.xml

@@ -145,9 +145,9 @@
         where authId = #{authId}
     </delete>
     <select id="getClubUserIdByAuthId" resultType="java.lang.Integer">
-        select * from cm_brand_club_user cbcu1 left join cm_brand_auth a
+        select id from cm_brand_club_user cbcu1 left join cm_brand_auth a
         on a.createBy = cbcu1.id
-        where a.authId=#{authId}
+        where a.id=#{authId}
     </select>
     <select id="getAuthList" resultType="com.caimei.model.vo.AuthVo">
         select a.id as authId, a.authUserId, authParty, cbcu2.mobile, a.status, a.auditStatus, a.shopAuditStatus,
@@ -656,8 +656,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,authUserId)
-        values(#{userName},#{title},#{ossName},#{ossUrl},#{cover},#{releaseTime},#{authId},#{linked},#{authUserId})
+        insert into cm_ross_challenge_video(userName,title,ossName,ossUrl,cover,releaseTime,authId,linked,authUserId,clubUserId)
+        values(#{userName},#{title},#{ossName},#{ossUrl},#{cover},#{releaseTime},#{authId},#{linked},#{authUserId},#{clubUserId})
     </insert>
     <select id="getauthUserId" resultType="java.lang.String">
         select authUserId

+ 5 - 0
src/main/resources/mapper/ClubMapper.xml

@@ -201,4 +201,9 @@
             authenticationStatus=1
         where clubUserId = #{clubUserId}
     </update>
+    <update id="upVideoAuthByid">
+        update cm_ross_challenge_video
+        set authId = #{authId}
+        where clubUserId = #{clubUserId}
+    </update>
 </mapper>