|
@@ -5,7 +5,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<mapper namespace="com.ruoyi.project.base.mapper.TBasePlantMapper">
|
|
|
|
|
|
<resultMap type="TBasePlant" id="TBasePlantResult">
|
|
|
- <result property="id" column="id" />
|
|
|
+ <result property="plantId" column="plant_id" />
|
|
|
<result property="plantCode" column="plant_code" />
|
|
|
<result property="plantName" column="plant_name" />
|
|
|
<result property="proAbility" column="pro_ability" />
|
|
@@ -23,15 +23,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTBasePlantVo">
|
|
|
- select id, plant_code, plant_name, pro_ability, plant_type, remarks, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_base_plant
|
|
|
+ select plant_id, plant_code, plant_name, pro_ability, plant_type, remarks, approve_status, approve_time, dept_id, del_flag, creater_code, createdate, updater_code, updatedate from t_base_plant
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectAllPlantName" resultMap="TBasePlantResult">
|
|
|
- select d.id,d.plant_name from t_base_plant d where del_flag=0 and approve_status=1
|
|
|
+ select d.plant_id,d.plant_name from t_base_plant d where del_flag=0 and approve_status=1
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTBasePlantList" parameterType="TBasePlant" resultMap="TBasePlantResult">
|
|
|
- select d.id, d.plant_code, d.plant_name, d.pro_ability, d.plant_type, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate from t_base_plant d
|
|
|
+ select d.plant_id, d.plant_code, d.plant_name, d.pro_ability, d.plant_type, d.remarks, d.approve_status, d.approve_time, d.dept_id, d.del_flag, d.creater_code, d.createdate, su.user_name updater, d.updatedate from t_base_plant d
|
|
|
left join sys_user su on su.user_id = d.updater_code
|
|
|
<where>
|
|
|
<if test="plantCode != null and plantCode != ''"> and plant_code = #{plantCode}</if>
|
|
@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="selectTBasePlantById" parameterType="Long" resultMap="TBasePlantResult">
|
|
|
<include refid="selectTBasePlantVo"/>
|
|
|
- where id = #{id}
|
|
|
+ where plant_id = #{plantId}
|
|
|
</select>
|
|
|
|
|
|
<select id="selectTBasePlantByName" parameterType="String" resultMap="TBasePlantResult">
|
|
@@ -111,17 +111,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="updaterCode != null">updater_code = #{updaterCode},</if>
|
|
|
<if test="updatedate != null">updatedate = #{updatedate},</if>
|
|
|
</trim>
|
|
|
- where id = #{id}
|
|
|
+ where plant_id = #{plantId}
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteTBasePlantById" parameterType="Long">
|
|
|
- update t_base_plant set del_flag=1 where id = #{id}
|
|
|
+ update t_base_plant set del_flag=1 where plant_id = #{plantId}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteTBasePlantByIds" parameterType="String">
|
|
|
- update t_base_plant set del_flag=1 where id in
|
|
|
- <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
+ update t_base_plant set del_flag=1 where plant_id in
|
|
|
+ <foreach item="plantId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{plant_id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
</mapper>
|