彭雪彬
2025-07-15 a7501803a3ca43310e57a5dd912e5047919c2e43
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
33
34
35
36
37
<?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.oying.modules.pc.product.mapper.ProductAuditMapper">
    <resultMap id="BaseResultMap" type="com.oying.modules.pc.product.domain.ProductAudit">
        <id column="audit_id" property="auditId"/>
        <result column="product_id" property="productId"/>
        <result column="type" property="type"/>
        <result column="status" property="status"/>
        <result column="data" property="data"/>
        <result column="reason" property="reason"/>
        <result column="auditor" property="auditor"/>
        <result column="audit_time" property="auditTime"/>
        <result column="create_by" property="createBy"/>
        <result column="create_time" property="createTime"/>
        <result column="update_by" property="updateBy"/>
        <result column="update_time" property="updateTime"/>
    </resultMap>
 
    <sql id="Base_Column_List">
        audit_id, product_id, type, status, reason, auditor, audit_time, data, create_by, create_time, update_by, update_time
    </sql>
 
    <select id="findAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from pc_product_audit
        <where>
            <if test="criteria.productId != null">
                and product_id = #{criteria.productId}
            </if>
            <if test="criteria.type != null and criteria.type != ''">
                and type = #{criteria.type}
            </if>
        </where>
        order by audit_id desc
    </select>
</mapper>