|
|
@@ -13,6 +13,7 @@
|
|
|
<result property="depId" column="dep_id" jdbcType="VARCHAR"/>
|
|
|
<result property="aid" column="aid" jdbcType="VARCHAR"/>
|
|
|
<result property="status" column="status" jdbcType="INTEGER"/>
|
|
|
+ <result property="type" column="type" jdbcType="INTEGER"/>
|
|
|
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
</resultMap>
|
|
|
@@ -20,8 +21,8 @@
|
|
|
<sql id="Base_Column_List">
|
|
|
id,url,serial_number,
|
|
|
name,reference,dep_id,
|
|
|
- aid,status,create_time,
|
|
|
- update_time
|
|
|
+ aid,status,type,
|
|
|
+ create_time,update_time
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
|
@@ -39,12 +40,12 @@
|
|
|
insert into standard_document
|
|
|
( id,url,serial_number
|
|
|
,name,reference,dep_id
|
|
|
- ,aid,status,create_time
|
|
|
- ,update_time)
|
|
|
+ ,aid,status,type
|
|
|
+ ,create_time,update_time)
|
|
|
values (#{id,jdbcType=INTEGER},#{url,jdbcType=VARCHAR},#{serialNumber,jdbcType=VARCHAR}
|
|
|
,#{name,jdbcType=VARCHAR},#{reference,jdbcType=VARCHAR},#{depId,jdbcType=VARCHAR}
|
|
|
- ,#{aid,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{createTime,jdbcType=TIMESTAMP}
|
|
|
- ,#{updateTime,jdbcType=TIMESTAMP})
|
|
|
+ ,#{aid,jdbcType=VARCHAR},#{status,jdbcType=INTEGER},#{type,jdbcType=INTEGER}
|
|
|
+ ,#{createTime,jdbcType=TIMESTAMP},#{updateTime,jdbcType=TIMESTAMP})
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.StandardDocument" useGeneratedKeys="true">
|
|
|
insert into standard_document
|
|
|
@@ -57,6 +58,7 @@
|
|
|
<if test="depId != null">dep_id,</if>
|
|
|
<if test="aid != null">aid,</if>
|
|
|
<if test="status != null">status,</if>
|
|
|
+ <if test="type != null">type,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
<if test="updateTime != null">update_time,</if>
|
|
|
</trim>
|
|
|
@@ -69,6 +71,7 @@
|
|
|
<if test="depId != null">#{depId,jdbcType=VARCHAR},</if>
|
|
|
<if test="aid != null">#{aid,jdbcType=VARCHAR},</if>
|
|
|
<if test="status != null">#{status,jdbcType=INTEGER},</if>
|
|
|
+ <if test="type != null">#{type,jdbcType=INTEGER},</if>
|
|
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
|
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
|
|
</trim>
|
|
|
@@ -97,6 +100,9 @@
|
|
|
<if test="status != null">
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
+ <if test="type != null">
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
<if test="createTime != null">
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
</if>
|
|
|
@@ -116,8 +122,32 @@
|
|
|
dep_id = #{depId,jdbcType=VARCHAR},
|
|
|
aid = #{aid,jdbcType=VARCHAR},
|
|
|
status = #{status,jdbcType=INTEGER},
|
|
|
+ type = #{type,jdbcType=INTEGER},
|
|
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
|
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
+
|
|
|
+ <resultMap id="DetailsMap" type="com.goafanti.standard.bo.OutStandardDocument">
|
|
|
+ <id property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="url" column="url" jdbcType="VARCHAR"/>
|
|
|
+ <result property="serialNumber" column="serial_number" jdbcType="VARCHAR"/>
|
|
|
+ <result property="name" column="name" jdbcType="VARCHAR"/>
|
|
|
+ <result property="reference" column="reference" jdbcType="VARCHAR"/>
|
|
|
+ <result property="depId" column="dep_id" jdbcType="VARCHAR"/>
|
|
|
+ <result property="aid" column="aid" jdbcType="VARCHAR"/>
|
|
|
+ <result property="type" column="type" jdbcType="INTEGER"/>
|
|
|
+ <result property="status" column="status" jdbcType="INTEGER"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
|
|
|
+ <result property="adminName" column="adminName" jdbcType="VARCHAR"/>
|
|
|
+ <result property="depName" column="depName" jdbcType="VARCHAR"/>
|
|
|
+ </resultMap>
|
|
|
+ <select id="selectDetailsById" resultMap="DetailsMap">
|
|
|
+ select
|
|
|
+ a.*,b.name adminName,c.name depName
|
|
|
+ from standard_document a left join admin b on a.aid=b.id
|
|
|
+ left join department c on a.dep_id=c.id
|
|
|
+ where a.id = #{id,jdbcType=INTEGER}
|
|
|
+ </select>
|
|
|
</mapper>
|