refactor(executor/people): 加 executorList 兜底, SQL 硬编码 unit_type='executor' (跟 sponsor 同模式)
- mapper BizPersonMapper.xml 新增 selectExecutorList, SQL 内硬编码 unit_type + parent_user_id=当前主账号 - controller 加 GET /business/person/executorList - service / mapper 接口同步声明 selectExecutorList - 前端 api/business/person.js 加 listExecutorPerson - executor/People.vue 改调 listExecutorPerson, 删 bizList + unitType 参数 效果: executor 端人员列表也走专属接口, 前端传 unitType 绕不开 SQL 兜底
This commit is contained in:
@@ -161,4 +161,22 @@
|
||||
</where>
|
||||
order by p.person_id desc
|
||||
</select>
|
||||
|
||||
<!-- executor 专属: 同 sponsor, SQL 硬编码 unit_type='executor' + parent_user_id=当前主账号 (前端绕不开) -->
|
||||
<select id="selectExecutorList" resultMap="BizPersonResult" parameterType="BizPerson">
|
||||
<include refid="selectFieldsWithAccount"/>
|
||||
<where>
|
||||
u.del_flag = '0'
|
||||
and p.unit_type = 'executor'
|
||||
and u.parent_user_id = #{params.executorOwnerUid}
|
||||
<if test="name != null and name != ''"> and p.name = #{name}</if>
|
||||
<if test="phone != null and phone != ''"> and p.phone = #{phone}</if>
|
||||
<if test="orgId != null"> and p.org_id = #{orgId}</if>
|
||||
<if test="department != null and department != ''"> and p.department = #{department}</if>
|
||||
<if test="position != null and position != ''"> and p.position = #{position}</if>
|
||||
<if test="role != null and role != ''"> and p.role = #{role}</if>
|
||||
<if test="status != null and status != ''"> and u.status = #{status}</if>
|
||||
</where>
|
||||
order by p.person_id desc
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user