| | |
| | | <select id="selectApsPlantList" parameterType="ApsPlant" resultMap="ApsPlantResult"> |
| | | <include refid="selectApsPlantVo"/> |
| | | <where> |
| | | <if test="plantName != null and plantName != ''"> and plant_name like concat('%', #{plantName}, '%')</if> |
| | | <if test="plantCode != null and plantCode != ''"> and plant_code like concat('%', #{plantCode}, '%')</if> |
| | | <if test="plantName != null and plantName != ''"> and plant_name = #{plantName}</if> |
| | | <if test="plantCode != null and plantCode != ''"> and plant_code = #{plantCode}</if> |
| | | <if test="status != null and status != ''"> and status = #{status}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectApsPlantById" parameterType="Long" resultMap="ApsPlantResult"> |
| | | <select id="selectApsPlantById" parameterType="String" resultMap="ApsPlantResult"> |
| | | <include refid="selectApsPlantVo"/> |
| | | where id = #{id} |
| | | </select> |
| | |
| | | <insert id="insertApsPlant" parameterType="ApsPlant" useGeneratedKeys="true" keyProperty="id"> |
| | | insert into aps_plant |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | | <if test="id != null and id != ''" >id,</if> |
| | | <if test="plantName != null">plant_name,</if> |
| | | <if test="plantCode != null">plant_code,</if> |
| | | <if test="status != null">status,</if> |
| | |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="id != null">#{id},</if> |
| | | <if test="plantName != null">#{plantName},</if> |
| | | <if test="plantCode != null">#{plantCode},</if> |
| | | <if test="status != null">#{status},</if> |
| | |
| | | where id = #{id} |
| | | </update> |
| | | |
| | | <delete id="deleteApsPlantById" parameterType="Long"> |
| | | <delete id="deleteApsPlantById" parameterType="String"> |
| | | delete from aps_plant where id = #{id} |
| | | </delete> |
| | | |