| | |
| | | <insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice" useGeneratedKeys="true"> |
| | | insert into pr_device |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null and id !=''">id,</if> |
| | | <if test="proId != null and proId !=''">pro_id,</if> |
| | | <if test="batchId != null and batchId !=''">batch_id,</if> |
| | | <if test="id != null">id,</if> |
| | | <if test="proId != null">pro_id,</if> |
| | | <if test="batchId != null">batch_id,</if> |
| | | <if test="deviceNo != null and deviceNo !=''">device_no,</if> |
| | | <if test="status != null and status !=''">status,</if> |
| | | <if test="status != null">status,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null and id !=''">#{id,jdbcType=BIGINT},</if> |
| | | <if test="proId != null and proId !=''">#{proId,jdbcType=BIGINT},</if> |
| | | <if test="batchId != null and batchId !=''">#{batchId,jdbcType=BIGINT},</if> |
| | | <if test="id != null">#{id,jdbcType=BIGINT},</if> |
| | | <if test="proId != null">#{proId,jdbcType=BIGINT},</if> |
| | | <if test="batchId != null">#{batchId,jdbcType=BIGINT},</if> |
| | | <if test="deviceNo != null and deviceNo !=''">#{deviceNo},</if> |
| | | <if test="status != null and status !=''">#{status,jdbcType=TINYINT},</if> |
| | | <if test="status != null">#{status,jdbcType=TINYINT},</if> |
| | | </trim> |
| | | </insert> |
| | | <insert id="insertBatch" parameterType="java.util.List"> |
| | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.dy.pmsGlobal.pojoPr.PrDevice"> |
| | | update pr_device |
| | | <set> |
| | | <if test="proId != null and proId !=''"> |
| | | <if test="proId != null"> |
| | | pro_id = #{proId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="batchId != null and batchId !=''"> |
| | | <if test="batchId != null"> |
| | | batch_id = #{batchId,jdbcType=BIGINT}, |
| | | </if> |
| | | <if test="deviceNo != null and deviceNo !=''"> |
| | | device_no = #{deviceNo}, |
| | | </if> |
| | | <if test="status != null and status !=''"> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT} |
| | | </if> |
| | | </set> |
| | |
| | | <include refid="Base_Column_List" /> |
| | | from pr_device |
| | | <trim prefix="where" suffixOverrides="and"> |
| | | <if test="id != null and id !=''"> |
| | | <if test="id != null"> |
| | | id = #{id,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="proId != null and proId !=''"> |
| | | <if test="proId != null"> |
| | | pro_id = #{proId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="batchId != null and batchId !=''"> |
| | | <if test="batchId != null"> |
| | | batch_id = #{batchId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="deviceNo != null and deviceNo !=''"> |
| | | device_no = #{deviceNo,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="status != null and status !=''"> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT} and |
| | | </if> |
| | | </trim> |
| | |
| | | select count(1) |
| | | from pr_device |
| | | <trim prefix="where" suffixOverrides="and"> |
| | | <if test="id != null and id !=''"> |
| | | <if test="id != null"> |
| | | id = #{id,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="proId != null and proId !=''"> |
| | | <if test="proId != null"> |
| | | pro_id = #{proId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="batchId != null and batchId !=''"> |
| | | <if test="batchId != null"> |
| | | batch_id = #{batchId,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="deviceNo != null and deviceNo !=''"> |
| | | device_no = #{deviceNo,jdbcType=BIGINT} and |
| | | </if> |
| | | <if test="status != null and status !=''"> |
| | | <if test="status != null"> |
| | | status = #{status,jdbcType=TINYINT} and |
| | | </if> |
| | | </trim> |