对比新文件 |
| | |
| | | <?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.gk.firework.Mapper.TransportCertificateArrivalRecordMapper" > |
| | | <resultMap id="BaseResultMap" type="com.gk.firework.Domain.TransportCertificateArrivalRecord" > |
| | | <!-- --> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="certificatecode" property="certificatecode" jdbcType="VARCHAR" /> |
| | | <result column="productname" property="productname" jdbcType="VARCHAR" /> |
| | | <result column="productcode" property="productcode" jdbcType="VARCHAR" /> |
| | | <result column="createby" property="createby" jdbcType="BIGINT" /> |
| | | <result column="createbyname" property="createbyname" jdbcType="VARCHAR" /> |
| | | <result column="createtime" property="createtime" jdbcType="TIMESTAMP" /> |
| | | <result column="validflag" property="validflag" jdbcType="BIT" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <!-- --> |
| | | id, certificatecode, productname, productcode, createby, createbyname, createtime, |
| | | validflag |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long" > |
| | | <!-- --> |
| | | select |
| | | <include refid="Base_Column_List" /> |
| | | from transportcertificatearrivalrecord |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | <select id="selectTransportArrivalPages" resultType="com.gk.firework.Domain.Vo.TransportArrivalSum"> |
| | | |
| | | select |
| | | record.certificatecode, |
| | | sum(record.arrivalnum) arrivalsum, |
| | | record.createbyname, |
| | | record.createtime |
| | | from transportcertificatearrivalrecord as record |
| | | where |
| | | record.validflag = 1 |
| | | and record.createbyname = #{params.enterprisenumber} |
| | | group by record.certificatecode |
| | | order by record.createtime desc |
| | | </select> |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long" > |
| | | <!-- --> |
| | | delete from transportcertificatearrivalrecord |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insertSelective" parameterType="com.gk.firework.Domain.TransportCertificateArrivalRecord" > |
| | | <!-- --> |
| | | insert into transportcertificatearrivalrecord |
| | | <trim prefix="(" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" > |
| | | id, |
| | | </if> |
| | | <if test="certificatecode != null" > |
| | | certificatecode, |
| | | </if> |
| | | <if test="productname != null" > |
| | | productname, |
| | | </if> |
| | | <if test="productcode != null" > |
| | | productcode, |
| | | </if> |
| | | <if test="createby != null" > |
| | | createby, |
| | | </if> |
| | | <if test="createbyname != null" > |
| | | createbyname, |
| | | </if> |
| | | <if test="createtime != null" > |
| | | createtime, |
| | | </if> |
| | | <if test="validflag != null" > |
| | | validflag, |
| | | </if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides="," > |
| | | <if test="id != null" > |
| | | #{id,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="certificatecode != null" > |
| | | #{certificatecode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="productname != null" > |
| | | #{productname,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="productcode != null" > |
| | | #{productcode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createby != null" > |
| | | #{createby,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="createbyname != null" > |
| | | #{createbyname,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createtime != null" > |
| | | #{createtime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="validflag != null" > |
| | | #{validflag,jdbcType=BIT}, |
| | | </if> |
| | | </trim> |
| | | </insert> |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.gk.firework.Domain.TransportCertificateArrivalRecord" > |
| | | <!-- --> |
| | | update transportcertificatearrivalrecord |
| | | <set > |
| | | <if test="certificatecode != null" > |
| | | certificatecode = #{certificatecode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="productname != null" > |
| | | productname = #{productname,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="productcode != null" > |
| | | productcode = #{productcode,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createby != null" > |
| | | createby = #{createby,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="createbyname != null" > |
| | | createbyname = #{createbyname,jdbcType=VARCHAR}, |
| | | </if> |
| | | <if test="createtime != null" > |
| | | createtime = #{createtime,jdbcType=TIMESTAMP}, |
| | | </if> |
| | | <if test="validflag != null" > |
| | | validflag = #{validflag,jdbcType=BIT}, |
| | | </if> |
| | | </set> |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | <update id="updateByPrimaryKey" parameterType="com.gk.firework.Domain.TransportCertificateArrivalRecord" > |
| | | <!-- --> |
| | | update transportcertificatearrivalrecord |
| | | set certificatecode = #{certificatecode,jdbcType=VARCHAR}, |
| | | productname = #{productname,jdbcType=VARCHAR}, |
| | | productcode = #{productcode,jdbcType=VARCHAR}, |
| | | createby = #{createby,jdbcType=BIGINT}, |
| | | createbyname = #{createbyname,jdbcType=VARCHAR}, |
| | | createtime = #{createtime,jdbcType=TIMESTAMP}, |
| | | validflag = #{validflag,jdbcType=BIT} |
| | | where id = #{id,jdbcType=BIGINT} |
| | | </update> |
| | | </mapper> |