yumeng 2 lat temu
rodzic
commit
9d028cb0c3

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

@@ -49,7 +49,7 @@ public interface UserAllocationMapper extends BaseMapper<UserAllocation> {
 
     List<Long> getValidProjectIds(@Param("mediaId") Integer mediaId);
 
-    List<UserAllocation> getAccountListByUserIdAndProductId(@Param("userId") String userId, @Param("projectId") Long projectId, @Param("productId") Long productId);
+    List<UserAllocation> getAccountListByUserIdAndProductId(@Param("userId") String userId, @Param("projectId") Long projectId, @Param("productId") Long productId,@Param("authName") String authName);
 
     List<JSONObject> getUserIdListByProductId(@Param("productId") Long productId, @Param("userId") String userId);
 

+ 4 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/common/module/mapper/xml/UserAllocationMapper.xml

@@ -23,7 +23,10 @@
         and
         cp.product_id=#{productId}
         <if test="userId != null and userId != ''">
-            and cua.user_id = #{userId}
+            and cua.user_id  =   #{userId}
+        </if>
+         <if test="authName != null and authName != ''">
+            and cua.auth_name like concat(concat('%',#{authName}),'%')
         </if>
         and account_status = 0
     </select>

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

@@ -45,7 +45,7 @@ public interface IUserAllocationService extends IService<UserAllocation> {
 
     List<Long> getAccountsByDeleteComment();
 
-    List<UserAllocation> getAccountListByUserIdAndProductId(String userId, Long projectId, Long productId);
+    List<UserAllocation> getAccountListByUserIdAndProductId(String userId, Long projectId, Long productId,String authName);
 
     Map<Long, List<JSONObject>> getAccountListByProjectList(List<JSONObject> projectList);
 

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

@@ -171,8 +171,8 @@ public class UserAllocationServiceImpl extends ServiceImpl<UserAllocationMapper,
     }
 
     @Override
-    public List<UserAllocation> getAccountListByUserIdAndProductId(String userId, Long projectId, Long productId) {
-        return userAllocationMapper.getAccountListByUserIdAndProductId(userId, projectId, productId);
+    public List<UserAllocation> getAccountListByUserIdAndProductId(String userId, Long projectId, Long productId,String authName) {
+        return userAllocationMapper.getAccountListByUserIdAndProductId(userId, projectId, productId,authName);
     }
 
     @Override

+ 4 - 7
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ctop/controller/UserAllocationController.java

@@ -156,7 +156,7 @@ public class UserAllocationController {
 
 
     @GetMapping(value = "/getAccountListByUserIdAndProductId")
-    public Result<List<ProjectMember>> getAccountListByUserIdAndProductId(String userId, Long productId, Integer mediaId) {
+    public Result<List<ProjectMember>> getAccountListByUserIdAndProductId(String userId, Long productId, Integer mediaId,String authName) {
         Result<List<ProjectMember>> result = new Result<>();
         String roleCode = sysRoleService.getRoleCodeByUserId(userId);
         if ("admin".equals(roleCode)) {
@@ -167,16 +167,13 @@ public class UserAllocationController {
         }
         List<Integer> mediaList = new ArrayList<>();
         mediaList.add(mediaId);
-        //    List<ProjectMember> projectList = projectMemberService.getOwnProjects(mediaList);
         List<ProjectMember> productList = projectMemberService.getOwnProducts(mediaList, productId);
-
-        //  projectMemberService.getOwnProjects(mediaList);
         List<ProjectMember> projectMemberList = new ArrayList<>();
         for (ProjectMember projectMember : productList) {
             if (!projectMember.getProductId().equals(productId)) {
                 continue;
             }
-            List<UserAllocation> userAllocationList = userAllocationService.getAccountListByUserIdAndProductId(userId, projectMember.getProjectId(), productId);
+            List<UserAllocation> userAllocationList = userAllocationService.getAccountListByUserIdAndProductId(userId, projectMember.getProjectId(), productId,authName);
             projectMember.setUserAllocationList(userAllocationList);
             projectMemberList.add(projectMember);
         }
@@ -186,7 +183,7 @@ public class UserAllocationController {
     }
 
     @GetMapping(value = "/getBytedanceAccountListByUserIdAndProductId")
-    public Result<List<ProjectMember>> getBytedanceAccountListByUserIdAndProductId(String userId, Long productId, Integer mediaId) {
+    public Result<List<ProjectMember>> getBytedanceAccountListByUserIdAndProductId(String userId, Long productId, Integer mediaId,String autnName) {
         Result<List<ProjectMember>> result = new Result<>();
         String roleCode = sysRoleService.getRoleCodeByUserId(userId);
         if ("admin".equals(roleCode)) {
@@ -201,7 +198,7 @@ public class UserAllocationController {
             if (!projectMember.getProductId().equals(productId)) {
                 continue;
             }
-            List<UserAllocation> userAllocationList = userAllocationService.getAccountListByUserIdAndProductId(userId, projectMember.getProjectId(), productId);
+            List<UserAllocation> userAllocationList = userAllocationService.getAccountListByUserIdAndProductId(userId, projectMember.getProjectId(), productId,autnName);
             projectMember.setUserAllocationList(userAllocationList);
             projectMemberList.add(projectMember);
         }