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.system.mapper.UserMerchantMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.modules.system.domain.UserMerchant"> |
| | | <id column="manager_id" property="managerId"/> |
| | | <result column="merchant_id" property="merchantId"/> |
| | | <result column="user_id" property="userId"/> |
| | | <result column="role_type" property="roleType"/> |
| | | <result column="permissions" property="permissions"/> |
| | | <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"> |
| | | manager_id, merchant_id, user_id, role_type, permissions, create_by, create_time, update_by, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from sys_user_merchant |
| | | <where> |
| | | <if test="criteria.userId != null"> |
| | | and user_id = #{criteria.userId} |
| | | </if> |
| | | <if test="criteria.roleType != null"> |
| | | and role_type = #{criteria.roleType} |
| | | </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 user_id desc |
| | | </select> |
| | | </mapper> |