1 Star 0 Fork 0

Peter77/api-design

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
AgingItemDao.xml 4.94 KB
一键复制 编辑 原始数据 按行查看 历史
CHENHUAMING 提交于 2021-06-29 19:17 . OK
<?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.best.tnet.basic.dao.aging.AgingItemDao">
<resultMap id="resultMap" type="com.best.tnet.basic.pojo.aging.po.AgingItemPO">
<result column="id" jdbcType="BIGINT" property="id"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="creator" jdbcType="VARCHAR" property="creator"/>
<result column="creator_name" jdbcType="VARCHAR" property="creatorName"/>
<result column="last_update_time" jdbcType="TIMESTAMP" property="lastUpdateTime"/>
<result column="last_updator" jdbcType="VARCHAR" property="lastUpdator"/>
<result column="last_updator_name" jdbcType="VARCHAR" property="lastUpdatorName"/>
<result column="optlock" jdbcType="INTEGER" property="optlock"/>
<result column="status" jdbcType="VARCHAR" property="status"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="domain_id" jdbcType="BIGINT" property="domainId"/>
<result column="aging_header_id" jdbcType="BIGINT" property="agingHeaderId"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="match_type" jdbcType="VARCHAR" property="matchType"/>
<result column="transport_mode" jdbcType="VARCHAR" property="transportMode"/>
<result column="src_addr_type" jdbcType="VARCHAR" property="srcAddrType"/>
<result column="dest_addr_type" jdbcType="VARCHAR" property="destAddrType"/>
<result column="calc_pattern" jdbcType="VARCHAR" property="calcPattern"/>
<result column="base_on_materials_property" jdbcType="VARCHAR" property="baseOnMaterialsProperty"/>
</resultMap>
<insert id="create" parameterType="com.best.tnet.basic.pojo.aging.po.AgingItemPO" keyProperty="id" keyColumn = "id" useGeneratedKeys="true">
insert into tn_aging_item (
id,
create_time,
creator,
creator_name,
last_update_time,
last_updator,
last_updator_name,
optlock,
status,
remark,
domain_id,
aging_header_id,
name,
match_type,
transport_mode,
src_addr_type,
dest_addr_type,
calc_pattern,
base_on_materials_property
)
values (
#{id,jdbcType=BIGINT},
sysdate(),
#{creator,jdbcType=VARCHAR},
#{creatorName,jdbcType=VARCHAR},
sysdate(),
#{lastUpdator,jdbcType=VARCHAR},
#{lastUpdatorName,jdbcType=VARCHAR},
#{optlock,jdbcType=INTEGER},
#{status,jdbcType=VARCHAR},
#{remark,jdbcType=VARCHAR},
#{domainId,jdbcType=BIGINT},
#{agingHeaderId,jdbcType=BIGINT},
#{name,jdbcType=VARCHAR},
#{matchType,jdbcType=VARCHAR},
#{transportMode,jdbcType=VARCHAR},
#{srcAddrType,jdbcType=VARCHAR},
#{destAddrType,jdbcType=VARCHAR},
#{calcPattern,jdbcType=VARCHAR},
#{baseOnMaterialsProperty,jdbcType=VARCHAR}
)
</insert>
<update id="update">
update tn_aging_item set
id = #{id,jdbcType=BIGINT},
creator = #{creator,jdbcType=VARCHAR},
creator_name = #{creatorName,jdbcType=VARCHAR},
last_update_time = sysdate(),
last_updator = #{lastUpdator,jdbcType=VARCHAR},
last_updator_name = #{lastUpdatorName,jdbcType=VARCHAR},
optlock = optlock + 1,
status = #{status,jdbcType=VARCHAR},
remark = #{remark,jdbcType=VARCHAR},
domain_id = #{domainId,jdbcType=BIGINT},
aging_header_id = #{agingHeaderId,jdbcType=BIGINT},
name = #{name,jdbcType=VARCHAR},
match_type = #{matchType,jdbcType=VARCHAR},
transport_mode = #{transportMode,jdbcType=VARCHAR},
src_addr_type = #{srcAddrType,jdbcType=VARCHAR},
dest_addr_type = #{destAddrType,jdbcType=VARCHAR},
calc_pattern = #{calcPattern,jdbcType=VARCHAR},
base_on_materials_property = #{baseOnMaterialsProperty,jdbcType=VARCHAR}
where id = #{id,jdbcType=BIGINT} and optlock = #{optlock,jdbcType=INTEGER}
</update>
<delete id="remove" parameterType="long">
delete from tn_aging_item where id = #{id, jdbcType=BIGINT}
</delete>
<delete id="removeByIds" parameterType="java.util.List">
delete from tn_aging_item where id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{list[${index}], jdbcType=BIGINT}
</foreach>
</delete>
<select id="get" resultMap="resultMap" parameterType="long">
select * from tn_aging_item where id = #{id, jdbcType=BIGINT}
</select>
<select id="getByIds" resultMap="resultMap" >
select * from tn_aging_item where id in
<foreach item="item" index="index" collection="list" open="(" separator="," close=")">
#{list[${index}], jdbcType=BIGINT}
</foreach>
</select>
<select id="searchByPage" resultMap="resultMap" >
select * from tn_aging_item order by id desc
</select>
<select id="getAll" resultMap="resultMap" >
select * from tn_aging_item
</select>
</mapper>
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/peter9975/api-design.git
[email protected]:peter9975/api-design.git
peter9975
api-design
api-design
master

搜索帮助