yumeng 2 rokov pred
rodič
commit
c4874ff5df

+ 1 - 1
module-common/src/main/java/cn/com/ctop/common/module/mapper/UserAllocationMapper.java

@@ -63,5 +63,5 @@ public interface UserAllocationMapper extends BaseMapper<UserAllocation> {
 
     List<Long> getIdList();
 
-    List<String> getAccountListByProjectV2(@Param("projectId") Long projectId);
+    List<String> getAccountListByProjectV2(@Param("list") List<Long> list );
 }

+ 6 - 1
module-common/src/main/java/cn/com/ctop/common/module/mapper/xml/UserAllocationMapper.xml

@@ -244,7 +244,12 @@
 
     </select>
     <select id="getAccountListByProjectV2" resultType="java.lang.String" parameterType="java.lang.Long">
-        SELECT  account_id  FROM ctop_user_allocation where project_id = #{projectId}
+        SELECT  account_id  FROM ctop_user_allocation where project_id
+        in
+         <foreach collection="list" item="list" separator="," open="(" close=")">
+        #{list}
+    </foreach>
+
     </select>
 
 </mapper>

+ 1 - 1
module-common/src/main/java/cn/com/ctop/common/module/service/IUserAllocationService.java

@@ -70,5 +70,5 @@ public interface IUserAllocationService extends IService<UserAllocation> {
 
     List<Long> getIdList();
 
-    List<String> getAccountListByProjectV2(Long projectId);
+    List<String> getAccountListByProjectV2( List<Long> list);
 }

+ 2 - 2
module-common/src/main/java/cn/com/ctop/common/module/service/impl/UserAllocationServiceImpl.java

@@ -227,7 +227,7 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
     }
 
     @Override
-    public List<String> getAccountListByProjectV2(Long projectId) {
-        return userAllocationMapper.getAccountListByProjectV2(projectId);
+    public List<String> getAccountListByProjectV2(List<Long> list) {
+        return userAllocationMapper.getAccountListByProjectV2(list);
     }
 }

+ 12 - 1
module-toutiao/src/main/java/cn/com/ctop/toutiao/modules/agent/service/impl/AgentManagementServiceImpl.java

@@ -276,7 +276,18 @@ public class AgentManagementServiceImpl implements AgentManagementService {
         ca.add(Calendar.DATE, -1);
 
         try {
-         //   List<String> accountIdList = userAllocationService.getAccountListByProjectV2(11940886L);
+            //12630885
+            //12690885
+            //13050885
+            //10140903
+
+          /*  List<Long> list = new ArrayList<>();
+            list.add(12630885L);
+            list.add(12690885L);
+            list.add(13050885L);
+            list.add(10140903L);
+
+            List<String> accountIdList = userAllocationService.getAccountListByProjectV2(list);*/
 
             List<String> accountIdList = ctopAgentAccountMapper.getAllAccountId();
 //            List<String> accountIdList = new ArrayList<>();