New file |
| | |
| | | <?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.sh.mapper.OrderReturnReasonMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.sh.domain.OrderReturnReason"> |
| | | <id column="reason_id" property="reasonId"/> |
| | | <result column="reason_name" property="reasonName"/> |
| | | <result column="sort" property="sort"/> |
| | | <result column="reason_status" property="reasonStatus"/> |
| | | <result column="create_by" property="createBy"/> |
| | | <result column="update_by" property="updateBy"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List"> |
| | | reason_id, reason_name, sort, reason_status, create_by, update_by, create_time, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from sh_order_return_reason |
| | | <where> |
| | | <if test="criteria.reasonStatus != null"> |
| | | and reason_status = #{criteria.reasonStatus} |
| | | </if> |
| | | <if test="criteria.reasonName != null"> |
| | | and reason_name like concat('%',#{criteria.reasonName},'%') |
| | | </if> |
| | | <if test="criteria.createTime != null and criteria.createTime.size() > 0"> |
| | | AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]} |
| | | </if> |
| | | </where> |
| | | order by sort desc |
| | | </select> |
| | | <select id="miniQuery" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from sh_order_return_reason |
| | | where reason_status = true |
| | | order by sort desc |
| | | </select> |
| | | </mapper> |