Ver Fonte

客户转移&客户转移申请

xdd há 2 meses atrás
pai
commit
55441b3331

+ 8 - 1
fs-admin/src/main/java/com/fs/company/controller/CompanyUserController.java

@@ -20,7 +20,7 @@ import com.fs.common.core.page.TableDataInfo;
 
 /**
  * 企业员工信息Controller
- * 
+ *
  * @author fs
  * @date 2021-10-04
  */
@@ -112,6 +112,13 @@ public class CompanyUserController extends BaseController
         return R.ok().put("data",list);
     }
 
+    @GetMapping("/getAllUserListLimit")
+    public R getAllUserListLimit(@RequestParam(required = false) Long companyId,
+                                 @RequestParam(required = false) String keywords){
+        List<CompanyUser> list = companyUserService.getAllUserListLimit(companyId,keywords);
+        return R.ok().put("data", list);
+    }
+
     @GetMapping("/getUserListByDeptId")
     public R getUserListByDeptId(CompanyUser user)
     {

+ 3 - 2
fs-service-system/src/main/java/com/fs/company/mapper/CompanyUserMapper.java

@@ -240,8 +240,6 @@ public interface CompanyUserMapper
     @Select("select qw_user_id FROM company_user where user_id=#{companyUserId}")
     String selectQwUserIdsByCompany(Long companyUserId);
 
-    List<String> selectCompanyUserNameByIds(@Param("companyUserIds")String companyUserIds);
-
     @Select("select * from company_user where user_id=#{userId}")
     CompanyUser selectCompanyUserByUserId(Long userId);
 
@@ -257,4 +255,7 @@ public interface CompanyUserMapper
     List<CompanyUser> selectCompanyUserByIds(Set<Long> ids);
 
     List<CompanyUser> selectAllCompanyUserByParentId(Long parentId);
+
+    List<CompanyUser> getAllUserListLimit(@Param("companyId") Long companyId,
+                                          @Param("keywords") String keywords);
 }

+ 2 - 0
fs-service-system/src/main/java/com/fs/company/service/ICompanyUserService.java

@@ -136,4 +136,6 @@ public interface ICompanyUserService {
     List<CompanyUser> selectCompanyUserByIds(Set<Long> ids);
 
     List<CompanyUser> selectAllCompanyUserByParentId(Long parentId);
+
+    List<CompanyUser> getAllUserListLimit(Long companyId, String keywords);
 }

+ 6 - 0
fs-service-system/src/main/java/com/fs/company/service/impl/CompanyUserServiceImpl.java

@@ -401,4 +401,10 @@ public class CompanyUserServiceImpl implements ICompanyUserService
         return companyUserMapper.selectAllCompanyUserByParentId(parentId);
     }
 
+    @Override
+    public List<CompanyUser> getAllUserListLimit(Long companyId, String keywords) {
+
+        return companyUserMapper.getAllUserListLimit(companyId,keywords);
+    }
+
 }

+ 16 - 0
fs-service-system/src/main/resources/mapper/company/CompanyUserMapper.xml

@@ -382,6 +382,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             del_flag = 0
             AND parent_id = #{parentId}
     </select>
+    <select id="getAllUserListLimit" resultType="com.fs.company.domain.CompanyUser">
+        SELECT * FROM company_user
+        <where>
+            <if test="companyId != null">
+                AND company_id != #{companyId}
+            </if>
+            <if test="keywords != null and keywords != ''">
+                AND (
+                phonenumber LIKE CONCAT(#{keywords}, '%')
+                OR user_name LIKE CONCAT(#{keywords}, '%')
+                OR nick_name LIKE CONCAT(#{keywords}, '%')
+                )
+            </if>
+        </where>
+        limit 10
+    </select>
 
 
 </mapper>