|
|
@@ -17,10 +17,14 @@
|
|
|
<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
|
|
|
+ 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
|
|
|
@@ -28,6 +32,23 @@
|
|
|
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}
|
|
|
@@ -37,13 +58,15 @@
|
|
|
create_time, accept_time, principal,
|
|
|
contact, copyright_info, copyright_name,
|
|
|
status, work_issue, comment,
|
|
|
- outsource, in_urgent, authorized_date
|
|
|
+ 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}
|
|
|
+ #{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">
|
|
|
@@ -94,6 +117,15 @@
|
|
|
<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">
|
|
|
@@ -141,6 +173,15 @@
|
|
|
<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">
|
|
|
@@ -188,6 +229,15 @@
|
|
|
<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>
|
|
|
@@ -206,7 +256,98 @@
|
|
|
comment = #{comment,jdbcType=VARCHAR},
|
|
|
outsource = #{outsource,jdbcType=VARCHAR},
|
|
|
in_urgent = #{inUrgent,jdbcType=INTEGER},
|
|
|
- authorized_date = #{authorizedDate,jdbcType=TIMESTAMP}
|
|
|
+ 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>
|