|
@@ -7,35 +7,23 @@
|
|
|
<result property="ps_p_id" column="ps_p_id" />
|
|
|
<result property="ps_no" column="ps_no" />
|
|
|
<result property="ps_name" column="ps_name" />
|
|
|
- <result property="ps_status" column="ps_status" />
|
|
|
- <result property="ps_dck_id" column="ps_dck_id" />
|
|
|
<result property="ps_category" column="ps_category" />
|
|
|
+ <result property="dcb_id" column="dcb_id" />
|
|
|
+
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectDcSpecVo">
|
|
|
- select ps_id, ps_p_id, ps_no, ps_name, ps_dck_id,ps_category from dc_spec
|
|
|
+ select ps_id, ps_p_id, ps_no, ps_name, dcb_id,ps_category from dc_p_spec
|
|
|
</sql>
|
|
|
|
|
|
- <select id="selectDcSpecList" parameterType="DcSpec" resultMap="DcSpecResult">
|
|
|
- <include refid="selectDcSpecVo"/>
|
|
|
- <where>
|
|
|
- <if test="ps_p_id != null and ps_p_id != ''"> and ps_p_id = #{ps_p_id}</if>
|
|
|
- <if test="ps_no != null and ps_no != ''"> and ps_no = #{pa_no}</if>
|
|
|
- <if test="ps_name != null and ps_name != ''"> and ps_name like concat('%', #{ps_name}, '%')</if>
|
|
|
- <if test="ps_dck_id != null "> and ps_dck_id = #{ps_dck_id}</if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
-
|
|
|
- <!-- 其他SQL语句的参数名也需要相应修改 -->
|
|
|
-
|
|
|
|
|
|
<insert id="insertDcSpec" parameterType="DcSpec" useGeneratedKeys="true" keyProperty="ps_id">
|
|
|
- insert into dc_spec
|
|
|
+ insert into dc_p_spec
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="ps_p_id != null and ps_p_id != ''">ps_p_id,</if>
|
|
|
<if test="ps_no != null and ps_no != ''">ps_no,</if>
|
|
|
<if test="ps_name != null and ps_name != ''">ps_name,</if>
|
|
|
- <if test="ps_dck_id != null">ps_dck_id,</if>
|
|
|
+ <if test="dcb_id != null">dcb_id,</if>
|
|
|
<if test="ps_category != null">ps_category,</if>
|
|
|
|
|
|
</trim>
|
|
@@ -43,18 +31,34 @@
|
|
|
<if test="ps_p_id != null and ps_p_id != ''">#{ps_p_id},</if>
|
|
|
<if test="ps_no != null and ps_no != ''">#{ps_no},</if>
|
|
|
<if test="ps_name != null and ps_name != ''">#{ps_name},</if>
|
|
|
- <if test="ps_dck_id != null">#{ps_dck_id},</if>
|
|
|
+ <if test="dcb_id != null">#{dcb_id},</if>
|
|
|
<if test="ps_category != null">#{ps_category},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
+
|
|
|
+ <select id="selectDcSpecList" parameterType="DcSpec" resultMap="DcSpecResult">
|
|
|
+ <include refid="selectDcSpecVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="ps_p_id != null and ps_p_id != ''"> and ps_p_id = #{ps_p_id}</if>
|
|
|
+ <if test="ps_no != null and ps_no != ''"> and ps_no = #{pa_no}</if>
|
|
|
+ <if test="ps_name != null and ps_name != ''"> and ps_name like concat('%', #{ps_name}, '%')</if>
|
|
|
+ <if test="dcb_id != null "> and dcb_id = #{dcb_id}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!-- 其他SQL语句的参数名也需要相应修改 -->
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
<update id="updateDcSpec" parameterType="DcSpec">
|
|
|
- update dc_spec
|
|
|
+ update dc_p_spec
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="ps_p_id != null">ps_p_id = #{ps_p_id},</if>
|
|
|
<if test="ps_no != null">ps_no = #{ps_no},</if>
|
|
|
<if test="ps_name != null">ps_name = #{ps_name},</if>
|
|
|
- <if test="ps_dck_id != null">ps_dck_id = #{ps_dck_id},</if>
|
|
|
+ <if test="dcb_id != null">dcb_id = #{dcb_id},</if>
|
|
|
<if test="ps_category != null">ps_category = #{ps_category},</if>
|
|
|
</trim>
|
|
|
where ps_id = #{ps_id}
|
|
@@ -68,7 +72,7 @@
|
|
|
|
|
|
|
|
|
<delete id="deleteDcSpecById" parameterType="Integer">
|
|
|
- delete from dc_spec where ps_id = #{ps_id}
|
|
|
+ delete from dc_p_spec where ps_id = #{ps_id}
|
|
|
</delete>
|
|
|
|
|
|
</mapper>
|