12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?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.hssx.cloudmodel.mapper.MouldOperationDynamicsMapper">
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMap" type="com.hssx.cloudmodel.entity.MouldOperationDynamics">
- <id column="id" property="id"/>
- <result column="file_id" property="fileId"/>
- <result column="operator_id" property="operatorId"/>
- <result column="operator_name" property="operatorName"/>
- <result column="indate" property="indate"/>
- <result column="file_name" property="fileName"/>
- <result column="belong_type" property="belongType"/>
- <result column="content" property="content"/>
- <result column="mould_id" property="mouldId"/>
- <result column="is_pass" property="isPass"/>
- <result column="applicant_id" property="applicantId"/>
- <result column="applicant_name" property="applicantName"/>
- </resultMap>
- <!-- 通用查询映射结果 -->
- <resultMap id="BaseResultMapVO" type="com.hssx.cloudmodel.entity.vo.MouldOperationDynamicsVO">
- <id column="id" property="id"/>
- <result column="file_id" property="fileId"/>
- <result column="operator_id" property="operatorId"/>
- <result column="operator_name" property="operatorName"/>
- <result column="indate" property="indate"/>
- <result column="file_name" property="fileName"/>
- <result column="belong_type" property="belongType"/>
- <result column="content" property="content"/>
- <result column="mould_id" property="mouldId"/>
- <result column="is_pass" property="isPass"/>
- <result column="applicant_id" property="applicantId"/>
- <result column="applicant_name" property="applicantName"/>
- <result column="mouldNo" property="mouldNo"/>
- </resultMap>
- <!-- 通用查询结果列 -->
- <sql id="Base_Column_List">
- id, file_id, operator_id, operator_name, indate, file_name, belong_type, content, mould_id, is_pass, applicant_id, applicant_name
- </sql>
- <select id="selectOperationDynamicsList" resultMap="BaseResultMap">
- select
- <include refid="Base_Column_List"/>
- from
- tb_mould_operation_dynamics
- <where>
- mould_id = #{userVO.mouldId}
- and content = '下载'
- <if test="userVO.startTime != null and userVO.endTime != null">
- and DATE_FORMAT(indate,'%Y-%m-%d') between #{userVO.startTime} and #{userVO.endTime}
- </if>
- </where>
- </select>
- <select id="getlist" resultMap="BaseResultMapVO">
- select
- tmod.id, tmod.file_id, tmod.operator_id, tmod.operator_name, tmod.indate, tmod.file_name, tmod.belong_type,
- tmod.content, tmod.mould_id, tmod.is_pass, tmod.applicant_id, tmod.applicant_name,tbm.model_no mouldNo
- from
- tb_mould_operation_dynamics tmod
- left join
- tb_mould tbm
- on
- tmod.mould_id = tbm.id
- <where>
- tmod.mould_id in
- <foreach collection="list" index="index" open="(" item="item" close=")" separator=",">
- #{item}
- </foreach>
- and tmod.belong_type = #{mouldOperationDynamics.belongType}
- Order By tmod.id desc
- </where>
- </select>
- </mapper>
|