0325-海宁pad走访

This commit is contained in:
2026-03-25 14:37:28 +08:00
parent 59e05e85b1
commit 15891708de
9 changed files with 344 additions and 6 deletions

View File

@@ -1425,4 +1425,22 @@
order by vi.sign_in_time desc
</select>
<update id="updateVisitInfoFeedback" parameterType="VisitInfoFeedbackUpdateDTO">
update visit_info vi
left join sys_dept d on vi.dept_id = d.dept_id
set vi.source = #{source},
vi.intention_product_value = #{intentionProductValue},
vi.update_by = #{userName},
vi.update_time = sysdate()
where vi.id = #{id}
<if test="userRole != null">
<choose>
<when test="userRole == 'manager'"> and vi.vis_id = #{userName} </when>
<when test="userRole == 'outlet'"> and d.dept_id = #{deptId} </when>
<when test="userRole == 'branch'"> and (d.dept_id = #{deptId} or find_in_set(#{deptId},d.ancestors)) </when>
<when test="userRole in {'head', 'ops', 'public', 'private'}"> and left(d.dept_id,3) = left(#{deptId},3) </when>
</choose>
</if>
</update>
</mapper>