<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper (View Source for full doctype...)>
<sql id="Base_Column_List">electDiagarmId, customerId, electDiagarmName, diagramFilename, reserve, type, status, createBy, createDate, updateBy, updateDate, remark, delFlag</sql>
- <select id="selectByPrimaryKey" resultType="com.shangmai.elecqualityManage.bean.ElectricDiagramBean" parameterType="java.util.Map">
SELECT
<include refid="Base_Column_List" />
FROM ed_electricdiagram WHERE customerId = #{customerId} AND status = '0' AND delFlag = '0' limit ${(pagination.currentPageIndex -1) * pagination.eachPageSize}, ${pagination.eachPageSize}
</select>
<select id="countElectricDiagramList" parameterType="java.util.Map" resultType="java.lang.Integer">SELECT count(0) as count FROM ed_electricdiagram where customerId = #{customerId} AND status = '0' AND delFlag = '0'</select>
- <insert id="insertSelective" parameterType="com.shangmai.elecqualityManage.bean.ElectricDiagramBean">
insert into ed_electricdiagram
<if test="electDiagarmId != null">electDiagarmId,</if>
<if test="customerId != null">customerId,</if>
<if test="electDiagarmName != null">electDiagarmName,</if>
<if test="diagramFilename != null">diagramFilename,</if>
<if test="reserve != null">reserve,</if>
<if test="type != null">type,</if>
<if test="status != null">status,</if>
<if test="createBy != null">createBy,</if>
<if test="createDate != null">createDate,</if>
<if test="updateBy != null">updateBy,</if>
<if test="updateDate != null">updateDate,</if>
<if test="remark != null">remark,</if>
<if test="delFlag != null">delFlag,</if>
</trim>
<if test="electDiagarmId != null">#{electDiagarmId,jdbcType=INTEGER},</if>
<if test="customerId != null">#{customerId,jdbcType=VARCHAR},</if>
<if test="electDiagarmName != null">#{electDiagarmName,jdbcType=VARCHAR},</if>
<if test="diagramFilename != null">#{diagramFilename,jdbcType=VARCHAR},</if>
<if test="reserve != null">#{reserve,jdbcType=VARCHAR},</if>
<if test="type != null">#{type,jdbcType=CHAR},</if>
<if test="status != null">#{status,jdbcType=CHAR},</if>
<if test="createBy != null">#{createBy,jdbcType=VARCHAR},</if>
<if test="createDate != null">#{createDate,jdbcType=TIMESTAMP},</if>
<if test="updateBy != null">#{updateBy,jdbcType=VARCHAR},</if>
<if test="updateDate != null">#{updateDate,jdbcType=TIMESTAMP},</if>
<if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
<if test="delFlag != null">#{delFlag,jdbcType=CHAR},</if>
</trim>
</insert>
- <update id="updateByPrimaryKeySelective" parameterType="com.shangmai.elecqualityManage.bean.ElectricDiagramBean">
update ed_electricdiagram
<if test="customerId != null">customerId = #{customerId,jdbcType=VARCHAR},</if>
<if test="electDiagarmName != null">electDiagarmName = #{electDiagarmName,jdbcType=VARCHAR},</if>
<if test="diagramFilename != null">diagramFilename = #{diagramFilename,jdbcType=VARCHAR},</if>
<if test="reserve != null">reserve = #{reserve,jdbcType=VARCHAR},</if>
<if test="type != null">type = #{type,jdbcType=CHAR},</if>
<if test="status != null">status = #{status,jdbcType=CHAR},</if>
<if test="createBy != null">createBy = #{createBy,jdbcType=VARCHAR},</if>
<if test="createDate != null">createDate = #{createDate,jdbcType=TIMESTAMP},</if>
<if test="updateBy != null">updateBy = #{updateBy,jdbcType=VARCHAR},</if>
<if test="updateDate != null">updateDate = #{updateDate,jdbcType=TIMESTAMP},</if>
<if test="remark != null">remark = #{remark,jdbcType=VARCHAR},</if>
<if test="delFlag != null">delFlag = #{delFlag,jdbcType=CHAR},</if>
</set>
where electDiagarmId = #{electDiagarmId,jdbcType=VARCHAR}
</update>
<delete id="deleteElectricDiagram">delete from ed_electricdiagram where electDiagarmId = #{electDiagarmId}</delete>
</mapper>