Explorar o código

达人添加 区分媒体校验

zhaoxian %!s(int64=2) %!d(string=hai) anos
pai
achega
140c1febc1

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KuaishouPromoterMapper.java

@@ -93,7 +93,7 @@ public interface KuaishouPromoterMapper {
 
     KuaishouPromoter getOnlyPromoterInfoByUserId(@Param("promoterId") String promoterId, @Param("userId") Long userId);
 
-    Integer getUserPromotersCount(@Param("userId") Long userId);
+    Integer getUserPromotersCount(@Param("userId") Long userId, @Param("mediaId") String mediaId);
 
     Integer getBoundCount(@Param("userId") Long userId);
 

+ 1 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouPromoterServiceImpl.java

@@ -227,7 +227,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
             }
         }
         //查询 设置可绑定达人数
-        Integer count = kuaishouPromoterMapper.getUserPromotersCount(promoter.getUserId());
+        Integer count = kuaishouPromoterMapper.getUserPromotersCount(promoter.getUserId(), promoter.getMediaId());
         if (Check.isNotNull(count)) {
             //查询 已绑定达人数
             Integer hCount = kuaishouPromoterMapper.getBoundCount(promoter.getUserId());

+ 1 - 0
ruixuan-live/src/main/resources/mapper/isc/KuaishouPromoterMapper.xml

@@ -498,6 +498,7 @@
         select promoters_count
         from user_promoters_count
         where user_id = #{userId}
+          AND media_id = #{mediaId}
     </select>
 
     <select id="getBoundCount" resultType="java.lang.Integer">