“djh”
2025-11-26 cf4a5deced71464d424ce5931774f6df0c4c6bb3
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gkhy.exam.system.mapper.CustomerInventoryMapper">
 
    <select id="selectInventoryList" resultType="com.gkhy.exam.system.domain.CustomerInventory">
        SELECT
            ci.`id`,
            ci.`company_id`,
            sc.`name` as company_name,
            ci.`customer_name`,
            ci.`customer_addr`,
            ci.`person`,
            ci.`phone`,
            ci.`emil`,
            ci.`remark`,
            ci.`del_flag`,
            ci.`create_by`,
            ci.`create_time`,
            ci.`update_by`,
            ci.`update_time`
        FROM
            `customer_inventory` ci
                LEFT JOIN sys_company sc ON ci.company_id = sc.id
        WHERE
            ci.del_flag = 1
        <if test="companyId!=null">
            and ci.company_id = #{companyId}
        </if>
        ORDER BY
            ci.create_time DESC
    </select>
</mapper>