| | |
| | | and customer_type = #{c.customerType} |
| | | </if> |
| | | <!-- 公海查询:type = 1(公海客户)--> |
| | | <if test="c.type != null and c.type == 1"> |
| | | <!--<if test="c.type != null and c.type == 1"> |
| | | and type = #{c.type} |
| | | </if> |
| | | </if>--> |
| | | <!-- 私海查询:type = 0(私海客户)或者 type = 1(公海客户)且已被分配,并且是自己领用、自己创建或者共享给自己的客户 --> |
| | | <if test="c.type != null and c.type == 0"> |
| | | <!--<if test="c.type != null and c.type == 0"> |
| | | and ( |
| | | (type = #{c.type} or (type = 1 and is_assigned = 1)) |
| | | and ( |
| | |
| | | ) |
| | | ) |
| | | ) |
| | | </if> |
| | | </if>--> |
| | | </where> |
| | | order by maintenance_time desc |
| | | </select> |
| | | |
| | | <select id="list" resultType="com.ruoyi.basic.vo.CustomerVo"> |
| | |
| | | and customer_type = #{c.customerType} |
| | | </if> |
| | | <!-- 公海查询:type = 1(公海客户)--> |
| | | <if test="c.type != null and c.type == 1"> |
| | | <!--<if test="c.type != null and c.type == 1"> |
| | | and type = #{c.type} |
| | | </if> |
| | | </if>--> |
| | | <!-- 私海查询:type = 0(私海客户)或者 type = 1(公海客户)且已被分配,并且是自己领用、自己创建或者共享给自己的客户 --> |
| | | <if test="c.type != null and c.type == 0"> |
| | | <!--<if test="c.type != null and c.type == 0"> |
| | | and ( |
| | | (type = #{c.type} or (type = 1 and is_assigned = 1)) |
| | | and ( |
| | |
| | | ) |
| | | ) |
| | | ) |
| | | </if> |
| | | </if>--> |
| | | </where> |
| | | </select> |
| | | |
| | |
| | | group by sl.id |
| | | )T2 on T2.id = sl.id |
| | | where sl.customer_id = #{customerId} |
| | | order by sl.execution_date |
| | | </select> |
| | | </mapper> |