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

26 lines
1.3 KiB

6 years ago
<?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.toesbieya.my.mapper.BizDocumentHistoryMapper">
<select id="getByPid" resultType="com.toesbieya.my.model.entity.BizDocumentHistory">
select *
from biz_document_history
where pid = #{pid}
order by id desc
</select>
<select id="search" resultType="com.toesbieya.my.model.entity.BizDocumentHistory"
parameterType="com.toesbieya.my.model.vo.search.DocumentHistorySearch">
select *
from biz_document_history
where 1
<if test="pid!=null and pid!=''">and pid=#{pid}</if>
<if test="uid!=null and uid!=''">and uid in (${uid})</if>
<if test="uname!=null and uname!=''">and uname like "%"#{uname}"%"</if>
<if test="type!=null and type!=''">and type in (${type}})</if>
order by id desc
</select>
<insert id="add" parameterType="com.toesbieya.my.model.entity.BizDocumentHistory">
insert into biz_document_history (pid, type, uid, uname, status_before, status_after, time, info)
VALUES (#{pid}, #{type}, #{uid}, #{uname}, #{status_before}, #{status_after}, #{time}, #{info})
</insert>
</mapper>