| | |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <resultMap id="JoinResultMap" type="com.oying.modules.pc.store.view.StoreAuditView"> |
| | | <result column="store_name" property="storeName"/> |
| | | <result column="audit_id" property="auditId"/> |
| | | <result column="store_id" property="storeId"/> |
| | | <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, store_id, type, status, reason, auditor, audit_time, data, create_by, create_time, update_by, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | <sql id="Join_Column_List"> |
| | | s.store_name, |
| | | sa.audit_id, sa.store_id, sa.type, sa.status, sa.reason, sa.auditor, sa.audit_time, sa.data, sa.create_by, sa.create_time, sa.update_by, sa.update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="JoinResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from pc_store_audit |
| | | <include refid="Join_Column_List"/> |
| | | from pc_store_audit as sa left join pc_store s on sa.store_id = s.store_id |
| | | <where> |
| | | <if test="criteria.blurry != null and criteria.blurry != ''"> |
| | | and s.store_name like concat('%', #{criteria.blurry}, '%') |
| | | </if> |
| | | <if test="criteria.storeName != null and criteria.storeName != ''"> |
| | | and s.store_name like concat('%', #{criteria.storeName}, '%') |
| | | </if> |
| | | <if test="criteria.storeId != null"> |
| | | and store_id = #{criteria.storeId} |
| | | and sa.store_id = #{criteria.storeId} |
| | | </if> |
| | | <if test="criteria.type != null and criteria.type != ''"> |
| | | and type = #{criteria.type} |
| | | and sa.type = #{criteria.type} |
| | | </if> |
| | | <if test="criteria.status != null"> |
| | | and sa.status = #{criteria.status} |
| | | </if> |
| | | <if test="criteria.createBy != null and criteria.createBy != ''"> |
| | | and sa.create_by = #{criteria.createBy} |
| | | </if> |
| | | </where> |
| | | order by audit_id desc |
| | | order by sa.audit_id desc |
| | | </select> |
| | | </mapper> |