gongchunyi
3 天以前 bbc5a867aea31cf50265cd2031d0b319bca1e158
src/main/resources/mapper/basic/CustomerMapper.xml
@@ -33,11 +33,11 @@
                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 (
@@ -50,8 +50,9 @@
                        )
                    )
                )
            </if>
            </if>-->
        </where>
        order by maintenance_time desc
    </select>
    <select id="list" resultType="com.ruoyi.basic.vo.CustomerVo">
@@ -87,11 +88,11 @@
                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 (
@@ -104,7 +105,7 @@
                        )
                    )
                )
            </if>
            </if>-->
        </where>
    </select>
@@ -159,5 +160,6 @@
            group by  sl.id
        )T2 on T2.id = sl.id
        where sl.customer_id = #{customerId}
        order by sl.execution_date
    </select>
</mapper>