You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-wms-java/src/main/resources/mybatis/mapper/schedule/ScheduleDao.xml

46 lines
1.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.glxp.api.dao.schedule.ScheduledDao">
<insert id="insertScheduled" keyProperty="id"
parameterType="com.glxp.api.entity.system.ScheduledEntity">
insert INTO sys_scheduled
(cronName, cron, customerId)
values (#{cronName},
#{cron},
#{customerId})
</insert>
<update id="modifyScheduled" parameterType="com.glxp.api.entity.system.ScheduledEntity">
UPDATE sys_scheduled
<set>
<if test="cron != null">cron=#{cron},</if>
</set>
WHERE cronName=#{cronName}
</update>
<delete id="deleteScheduled" parameterType="java.lang.String">
delete
from sys_scheduled
where id = #{id}
</delete>
<select id="findScheduled" parameterType="com.glxp.api.req.system.ScheduledRequest"
resultType="com.glxp.api.entity.system.ScheduledEntity">
select * from sys_scheduled
<where>
<if test="cronName != null and cronName != ''">
and cronName = #{cronName}
</if>
<if test="customerId != null and customerId != ''">
and customerId = #{customerId}
</if>
</where>
limit 1
</select>
</mapper>