helixiao 1 年之前
父節點
當前提交
d1e62a1041

+ 9 - 0
src/main/java/com/ydtech/modules/admin/dao/SysAgencyLeaderMapper.java

@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.ydtech.modules.admin.model.SysAgencyLeader;
 import com.ydtech.modules.admin.model.dto.AgencyUserInsAreaDto;
 import com.ydtech.modules.admin.model.dto.DeptBalanceDto;
+import com.ydtech.modules.admin.model.dto.SysAgencyLeaderPageDto;
 import com.ydtech.modules.admin.model.vo.AgencyUserInsAreaVo;
 import com.ydtech.modules.admin.model.vo.DeptBalanceVo;
 import org.apache.ibatis.annotations.Mapper;
@@ -39,5 +40,13 @@ public interface SysAgencyLeaderMapper extends BaseMapper<SysAgencyLeader> {
     HashMap<String, Object> getAreaCompanyByUserId(@Param("orderNoList") List<String> orderNoList);
 
     List<AgencyUserInsAreaVo> queryUserInsAreaExcel(@Param("dto")AgencyUserInsAreaDto agencyUserInsAreaDto);
+
+    /**
+     * 正常员工
+     * @param page
+     * @param sysAgencyLeaderPageDto
+     * @return
+     */
+    IPage<SysAgencyLeader> queryLeaderPage(Page page,@Param("dto") SysAgencyLeaderPageDto sysAgencyLeaderPageDto);
 }
 

+ 18 - 1
src/main/resources/mapper/modules/admin/SysAgencyLeaderMapper.xml

@@ -134,7 +134,7 @@
         from ins_area_company iac
         left join ins_orders io on io.orderno = iac.orderno
         <where>
-            iac.orderstatus=3
+            iac.orderstatus = 3
             <if test="dto.userId !=null  and  dto.userId !=''">
                 and io.userid = #{dto.userId}
             </if>
@@ -149,5 +149,22 @@
         ORDER BY iac.createtime
     </select>
 
+    <select id="queryLeaderPage" resultType="com.ydtech.modules.admin.model.SysAgencyLeader">
+        select *
+        from sys_agency_leader sal
+        left join sys_user su on su.id = sal.user_id
+        <where>
+            sal.del_flag = 1 and su.status !=0
+            <if test="dto.userId !=null  and  dto.userId !=''">
+                and sal.user_id like concat('%', #{dto.userId}, '%')
+            </if>
+            <if test="dto.userName !=null  and  dto.userName !=''">
+                and su.name like concat('%', #{dto.userName}, '%')
+            </if>
+
+        </where>
+        ORDER BY sal.id desc
+    </select>
+
 </mapper>