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.mapper.BucketStorageMapper"> |
| | | <resultMap id="BaseResultMap" type="com.oying.domain.BucketStorage"> |
| | | <id column="bucket_id" property="bucketId"/> |
| | | <result column="real_name" property="realName"/> |
| | | <result column="name" property="name"/> |
| | | <result column="suffix" property="suffix"/> |
| | | <result column="path" property="path"/> |
| | | <result column="type" property="type"/> |
| | | <result column="size" property="size"/> |
| | | <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"> |
| | | bucket_id, real_name, name, suffix, path, type, size, create_by, create_time, update_by, update_time |
| | | </sql> |
| | | |
| | | <select id="findAll" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from tool_bucket_storage |
| | | <where> |
| | | <if test="criteria.blurry != null and criteria.blurry != ''"> |
| | | and (real_name like concat('%',#{criteria.blurry},'%') |
| | | or name like concat('%',#{criteria.blurry},'%') |
| | | or suffix like concat('%',#{criteria.blurry},'%') |
| | | or size like concat('%',#{criteria.blurry},'%') |
| | | or create_by like concat('%',#{criteria.blurry},'%') |
| | | ) |
| | | </if> |
| | | <if test="criteria.type != null and criteria.type != ''"> |
| | | and type = #{criteria.type} |
| | | </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 bucket_id desc |
| | | </select> |
| | | </mapper> |