Commit 8299cc95 by xugaojun

修复员工全表查询问题

parent 7f808b9a
...@@ -22,7 +22,7 @@ public interface StaffMapper { ...@@ -22,7 +22,7 @@ public interface StaffMapper {
List<TabHaobanStaff> listByWxUserId(@Param("wxUserId") String wxUserId); List<TabHaobanStaff> listByWxUserId(@Param("wxUserId") String wxUserId);
List<TabHaobanStaff> listLikeName(@Param("staffName") String staffName); List<TabHaobanStaff> listLikeName(@Param("staffName") String staffName, @Param("wxEnterpriseId") String wxEnterpriseId);
Page<TabHaobanStaff> pageStaff(@Param("staffIds") Set<String> staffIds, @Param("activeFlag") Integer activeFlag, @Param("keyword") String keyword); Page<TabHaobanStaff> pageStaff(@Param("staffIds") Set<String> staffIds, @Param("activeFlag") Integer activeFlag, @Param("keyword") String keyword);
......
...@@ -99,7 +99,7 @@ public class AuditApiServiceImpl implements AuditApiService { ...@@ -99,7 +99,7 @@ public class AuditApiServiceImpl implements AuditApiService {
storeIds.addAll(storeIds1); storeIds.addAll(storeIds1);
} }
//模糊查staffName //模糊查staffName
List<TabHaobanStaff> staffList = staffMapper.listLikeName(search); List<TabHaobanStaff> staffList = staffMapper.listLikeName(search, wxEnterpriseId);
if (CollectionUtil.isNotEmpty(staffList)) { if (CollectionUtil.isNotEmpty(staffList)) {
List<String> staffIds2 = staffList.stream().map(s -> s.getStaffId()).collect(Collectors.toList()); List<String> staffIds2 = staffList.stream().map(s -> s.getStaffId()).collect(Collectors.toList());
staffIds.addAll(staffIds2); staffIds.addAll(staffIds2);
......
...@@ -316,7 +316,12 @@ ...@@ -316,7 +316,12 @@
<include refid="Base_Column_List"/> <include refid="Base_Column_List"/>
from tab_haoban_staff from tab_haoban_staff
where status_flag = 1 where status_flag = 1
and staff_name like CONCAT('%',#{staffName,jdbcType=VARCHAR},'%') <if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</if>
<if test="staffName != null and staffName != ''">
and staff_name like CONCAT('%',#{staffName,jdbcType=VARCHAR},'%')
</if>
</select> </select>
<select id="selectByUserIdAndEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String"> <select id="selectByUserIdAndEnterpriseId" resultMap="BaseResultMap" parameterType="java.lang.String">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment