|
|
@@ -0,0 +1,353 @@
|
|
|
+<?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.goafanti.common.dao.CopyrightInfoMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.goafanti.common.model.CopyrightInfo">
|
|
|
+ <id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
+ <result column="uid" jdbcType="VARCHAR" property="uid" />
|
|
|
+ <result column="serial_number" jdbcType="INTEGER" property="serialNumber" />
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
+ <result column="accept_time" jdbcType="TIMESTAMP" property="acceptTime" />
|
|
|
+ <result column="principal" jdbcType="VARCHAR" property="principal" />
|
|
|
+ <result column="contact" jdbcType="INTEGER" property="contact" />
|
|
|
+ <result column="copyright_info" jdbcType="VARCHAR" property="copyrightInfo" />
|
|
|
+ <result column="copyright_name" jdbcType="VARCHAR" property="copyrightName" />
|
|
|
+ <result column="status" jdbcType="INTEGER" property="status" />
|
|
|
+ <result column="work_issue" jdbcType="VARCHAR" property="workIssue" />
|
|
|
+ <result column="comment" jdbcType="VARCHAR" property="comment" />
|
|
|
+ <result column="outsource" jdbcType="VARCHAR" property="outsource" />
|
|
|
+ <result column="in_urgent" jdbcType="INTEGER" property="inUrgent" />
|
|
|
+ <result column="authorized_date" jdbcType="TIMESTAMP" property="authorizedDate" />
|
|
|
+ <result column="certificate_url" jdbcType="VARCHAR" property="certificateUrl" />
|
|
|
+ <result column="application_url" jdbcType="VARCHAR" property="applicationUrl" />
|
|
|
+ <result column="delete_sign" jdbcType="INTEGER" property="deleteSign" />
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id, uid, serial_number, create_time, accept_time, principal, contact, copyright_info,
|
|
|
+ copyright_name, status, work_issue, comment, outsource, in_urgent, authorized_date,
|
|
|
+ certificate_url, application_url, delete_sign
|
|
|
+ </sql>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from copyright_info
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <select id="findByPrimaryKey" parameterType="java.lang.String" resultType="com.goafanti.copyright.bo.CopyrightInfoDetail">
|
|
|
+ select ci.id,ci.serial_number as serialNumber, ci.create_time as createTime,
|
|
|
+ ci.accept_time as acceptTime, ci.contact, ci.copyright_name as copyrightName,
|
|
|
+ ci.status, ci.comment, ci.outsource, ci.in_urgent as inUrgent, ci.authorized_date as authorizedDate,
|
|
|
+ ci.work_issue as workIssue,ci.application_url as applicationUrl,ci.certificate_url as certificateUrl,
|
|
|
+ oi.location_province as province, oi.location_city as city,oi.location_area as area, oi.postcode,
|
|
|
+ oi.unit_name as unitName,
|
|
|
+ concat(oi.first_contacts,' ', oi.first_mobile) as firstContact,
|
|
|
+ concat(oi.second_contacts,' ', oi.second_mobile) as secondContact,
|
|
|
+ concat(oi.third_contacts,' ', oi.third_mobile) as thirdContact,
|
|
|
+ a.name as principal
|
|
|
+ from copyright_info ci
|
|
|
+ left join organization_identity oi on ci.uid = oi.uid
|
|
|
+ left join admin a on ci.principal = a.id
|
|
|
+ where ci.id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ delete from copyright_info
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.goafanti.common.model.CopyrightInfo">
|
|
|
+ insert into copyright_info (id, uid, serial_number,
|
|
|
+ create_time, accept_time, principal,
|
|
|
+ contact, copyright_info, copyright_name,
|
|
|
+ status, work_issue, comment,
|
|
|
+ outsource, in_urgent, authorized_date,
|
|
|
+ certificate_url, application_url, delete_sign
|
|
|
+ )
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{uid,jdbcType=VARCHAR}, #{serialNumber,jdbcType=INTEGER},
|
|
|
+ #{createTime,jdbcType=TIMESTAMP}, #{acceptTime,jdbcType=TIMESTAMP}, #{principal,jdbcType=VARCHAR},
|
|
|
+ #{contact,jdbcType=INTEGER}, #{copyrightInfo,jdbcType=VARCHAR}, #{copyrightName,jdbcType=VARCHAR},
|
|
|
+ #{status,jdbcType=INTEGER}, #{workIssue,jdbcType=VARCHAR}, #{comment,jdbcType=VARCHAR},
|
|
|
+ #{outsource,jdbcType=VARCHAR}, #{inUrgent,jdbcType=INTEGER}, #{authorizedDate,jdbcType=TIMESTAMP},
|
|
|
+ #{certificateUrl,jdbcType=VARCHAR}, #{applicationUrl,jdbcType=VARCHAR}, #{deleteSign,jdbcType=INTEGER}
|
|
|
+ )
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.goafanti.common.model.CopyrightInfo">
|
|
|
+ insert into copyright_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="uid != null">
|
|
|
+ uid,
|
|
|
+ </if>
|
|
|
+ <if test="serialNumber != null">
|
|
|
+ serial_number,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time,
|
|
|
+ </if>
|
|
|
+ <if test="acceptTime != null">
|
|
|
+ accept_time,
|
|
|
+ </if>
|
|
|
+ <if test="principal != null">
|
|
|
+ principal,
|
|
|
+ </if>
|
|
|
+ <if test="contact != null">
|
|
|
+ contact,
|
|
|
+ </if>
|
|
|
+ <if test="copyrightInfo != null">
|
|
|
+ copyright_info,
|
|
|
+ </if>
|
|
|
+ <if test="copyrightName != null">
|
|
|
+ copyright_name,
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status,
|
|
|
+ </if>
|
|
|
+ <if test="workIssue != null">
|
|
|
+ work_issue,
|
|
|
+ </if>
|
|
|
+ <if test="comment != null">
|
|
|
+ comment,
|
|
|
+ </if>
|
|
|
+ <if test="outsource != null">
|
|
|
+ outsource,
|
|
|
+ </if>
|
|
|
+ <if test="inUrgent != null">
|
|
|
+ in_urgent,
|
|
|
+ </if>
|
|
|
+ <if test="authorizedDate != null">
|
|
|
+ authorized_date,
|
|
|
+ </if>
|
|
|
+ <if test="certificateUrl != null">
|
|
|
+ certificate_url,
|
|
|
+ </if>
|
|
|
+ <if test="applicationUrl != null">
|
|
|
+ application_url,
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ delete_sign,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="uid != null">
|
|
|
+ #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="serialNumber != null">
|
|
|
+ #{serialNumber,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="acceptTime != null">
|
|
|
+ #{acceptTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="principal != null">
|
|
|
+ #{principal,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="contact != null">
|
|
|
+ #{contact,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="copyrightInfo != null">
|
|
|
+ #{copyrightInfo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="copyrightName != null">
|
|
|
+ #{copyrightName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="workIssue != null">
|
|
|
+ #{workIssue,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="comment != null">
|
|
|
+ #{comment,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="outsource != null">
|
|
|
+ #{outsource,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="inUrgent != null">
|
|
|
+ #{inUrgent,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="authorizedDate != null">
|
|
|
+ #{authorizedDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="certificateUrl != null">
|
|
|
+ #{certificateUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="applicationUrl != null">
|
|
|
+ #{applicationUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ #{deleteSign,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.goafanti.common.model.CopyrightInfo">
|
|
|
+ update copyright_info
|
|
|
+ <set>
|
|
|
+ <if test="uid != null">
|
|
|
+ uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="serialNumber != null">
|
|
|
+ serial_number = #{serialNumber,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="acceptTime != null">
|
|
|
+ accept_time = #{acceptTime,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="principal != null">
|
|
|
+ principal = #{principal,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="contact != null">
|
|
|
+ contact = #{contact,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="copyrightInfo != null">
|
|
|
+ copyright_info = #{copyrightInfo,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="copyrightName != null">
|
|
|
+ copyright_name = #{copyrightName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="workIssue != null">
|
|
|
+ work_issue = #{workIssue,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="comment != null">
|
|
|
+ comment = #{comment,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="outsource != null">
|
|
|
+ outsource = #{outsource,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="inUrgent != null">
|
|
|
+ in_urgent = #{inUrgent,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="authorizedDate != null">
|
|
|
+ authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="certificateUrl != null">
|
|
|
+ certificate_url = #{certificateUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="applicationUrl != null">
|
|
|
+ application_url = #{applicationUrl,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="deleteSign != null">
|
|
|
+ delete_sign = #{deleteSign,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.goafanti.common.model.CopyrightInfo">
|
|
|
+ update copyright_info
|
|
|
+ set uid = #{uid,jdbcType=VARCHAR},
|
|
|
+ serial_number = #{serialNumber,jdbcType=INTEGER},
|
|
|
+ create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
+ accept_time = #{acceptTime,jdbcType=TIMESTAMP},
|
|
|
+ principal = #{principal,jdbcType=VARCHAR},
|
|
|
+ contact = #{contact,jdbcType=INTEGER},
|
|
|
+ copyright_info = #{copyrightInfo,jdbcType=VARCHAR},
|
|
|
+ copyright_name = #{copyrightName,jdbcType=VARCHAR},
|
|
|
+ status = #{status,jdbcType=INTEGER},
|
|
|
+ work_issue = #{workIssue,jdbcType=VARCHAR},
|
|
|
+ comment = #{comment,jdbcType=VARCHAR},
|
|
|
+ outsource = #{outsource,jdbcType=VARCHAR},
|
|
|
+ in_urgent = #{inUrgent,jdbcType=INTEGER},
|
|
|
+ authorized_date = #{authorizedDate,jdbcType=TIMESTAMP},
|
|
|
+ certificate_url = #{certificateUrl,jdbcType=VARCHAR},
|
|
|
+ application_url = #{applicationUrl,jdbcType=VARCHAR},
|
|
|
+ delete_sign = #{deleteSign,jdbcType=INTEGER}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <select id="findListByPage" resultType="com.goafanti.copyright.bo.CopyrightInfoSummary" parameterType="String">
|
|
|
+ select ci.id,ci.serial_number as serialNumber, ci.create_time as createTime,
|
|
|
+ ci.accept_time as acceptTime, ci.contact,
|
|
|
+ ci.copyright_name as copyrightName, ci.status, ci.comment, ci.outsource, ci.in_urgent as inUrgent,
|
|
|
+ ci.authorized_date as authorizedDate, ci.work_issue as workIssue,
|
|
|
+ oi.location_province as province,oi.unit_name as unitName,
|
|
|
+ concat(oi.first_contacts,' ', oi.first_mobile) as firstContact,
|
|
|
+ concat(oi.second_contacts,' ', oi.second_mobile) as secondContact,
|
|
|
+ concat(oi.third_contacts,' ', oi.third_mobile) as thirdContact,
|
|
|
+ a.name as principal
|
|
|
+ from copyright_info ci
|
|
|
+ left join organization_identity oi on ci.uid = oi.uid
|
|
|
+ left join admin a on ci.principal = a.id
|
|
|
+ where ci.delete_sign = 0
|
|
|
+ <if test="province != null">
|
|
|
+ and oi.location_province = #{province,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and ci.status = #{status,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="unitName != null">
|
|
|
+ and oi.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="copyrightName != null">
|
|
|
+ and ci.copyright_name like CONCAT('%', #{copyrightName,jdbcType=VARCHAR}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="createStartTime != null">
|
|
|
+ and ci.create_time <![CDATA[ >= ]]> #{createStartTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="createEndTime != null">
|
|
|
+ and ci.create_time <![CDATA[ < ]]> #{createEndTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="acceptStartTime != null">
|
|
|
+ and ci.accept_time <![CDATA[ >= ]]> #{acceptStartTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="acceptEndTime != null">
|
|
|
+ and ci.accept_time <![CDATA[ < ]]> #{acceptEndTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="authStartTime != null">
|
|
|
+ and ci.authorized_date <![CDATA[ >= ]]> #{authStartTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="authEndTime != null">
|
|
|
+ and ci.authorized_date <![CDATA[ < ]]> #{authEndTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ order by ci.serial_number desc
|
|
|
+ <if test="page_sql!=null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="findListCount" resultType="java.lang.Integer" parameterType="String">
|
|
|
+ select count(*)
|
|
|
+ from copyright_info ci
|
|
|
+ left join organization_identity oi on ci.uid = oi.uid
|
|
|
+ where ci.delete_sign = 0
|
|
|
+ <if test="province != null">
|
|
|
+ and oi.location_province = #{province,jdbcType=VARCHAR}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and ci.status = #{status,jdbcType=INTEGER}
|
|
|
+ </if>
|
|
|
+ <if test="unitName != null">
|
|
|
+ and oi.unit_name like CONCAT('%', #{unitName,jdbcType=VARCHAR}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="copyrightName != null">
|
|
|
+ and ci.copyright_name like CONCAT('%', #{copyrightName,jdbcType=VARCHAR}, '%')
|
|
|
+ </if>
|
|
|
+ <if test="createStartTime != null">
|
|
|
+ and ci.create_time <![CDATA[ >= ]]> #{createStartTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="createEndTime != null">
|
|
|
+ and ci.create_time <![CDATA[ < ]]> #{createEndTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="acceptStartTime != null">
|
|
|
+ and ci.accept_time <![CDATA[ >= ]]> #{acceptStartTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="acceptEndTime != null">
|
|
|
+ and ci.accept_time <![CDATA[ < ]]> #{acceptEndTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="authStartTime != null">
|
|
|
+ and ci.authorized_date <![CDATA[ >= ]]> #{authStartTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="authEndTime != null">
|
|
|
+ and ci.authorized_date <![CDATA[ < ]]> #{authEndTime,jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|