yumeng před 2 roky
rodič
revize
df28c10cf9

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

@@ -113,7 +113,7 @@ public interface KuaishouItemCollectSamplesMapper {
 
     void batchProcess(@Param("ids") JSONArray ids,@Param("status") Integer status);
 
-    List<KuaishouItemCollectSamples> getListByPromoterId(@Param("promoterId") Long promoterId);
+    List<KuaishouItemCollectSamples> getListByPromoterId(@Param("promoterId") Long promoterId,@Param("userId") Long userId);
 
     Integer checkByRelateIdAndPromoterId(@Param("relateId") Long relateId, @Param("promoterId") Long promoterId);
 }

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

@@ -108,6 +108,6 @@ public interface IKuaishouItemCollectSamplesService {
 
     void batchAddLogs(List<KuaishouItemCollectSampleLog> logs);
 
-    List<KuaishouItemCollectSamples> getListByPromoterId(Long promoterId);
+    List<KuaishouItemCollectSamples> getListByPromoterId(Long promoterId,Long userId);
 }
 

+ 2 - 2
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouItemCollectSamplesServiceImpl.java

@@ -665,8 +665,8 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
     }
 
     @Override
-    public List<KuaishouItemCollectSamples> getListByPromoterId(Long promoterId) {
-        return kuaishouItemCollectSamplesMapper.getListByPromoterId(promoterId);
+    public List<KuaishouItemCollectSamples> getListByPromoterId(Long promoterId,Long userId) {
+        return kuaishouItemCollectSamplesMapper.getListByPromoterId(promoterId,userId);
     }
 
     // 渠道—数据分析

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

@@ -361,7 +361,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
     @Override
     public Result deleteKuaishouPromoterById(Long id, Long userId) {
         KuaishouPromoter promoter = kuaishouPromoterMapper.selectKuaishouPromoterById(id);
-        List<KuaishouItemCollectSamples> list = kuaishouItemCollectSamplesService.getListByPromoterId(promoter.getPromoterId());
+        List<KuaishouItemCollectSamples> list = kuaishouItemCollectSamplesService.getListByPromoterId(promoter.getPromoterId(),userId);
         for (KuaishouItemCollectSamples item : list) {
             if (item.getCollectSampleStatus() != 2 && item.getCollectSampleStatus() != 7) {
                 return Result.error("该达人还有未完成的领样申请,请在完成后进行解绑!");

+ 2 - 0
ruixuan-live/src/main/resources/mapper/isc/KuaishouItemCollectSamplesMapper.xml

@@ -641,6 +641,8 @@
     <select id="getListByPromoterId" resultMap="KuaishouItemCollectSamplesResult">
         <include refid="selectKuaishouItemCollectSamplesVo"/>
         where promoter_id = #{promoterId}
+        and collect_sample_id = #{userId}
+        and collect_sample_status not in(2,7)
     </select>
 
     <select id="queryProductList" resultType="com.alibaba.fastjson.JSONObject">