初次提交
This commit is contained in:
@ -0,0 +1,76 @@
|
||||
<?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.ho.business.mapper.PointPolysemyConfigMapper">
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id,point_id,value,name,name as name_zh,name_en,symbol
|
||||
</sql>
|
||||
|
||||
<insert id="insertList" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into point_polysemy_config (point_id,value,name,name_en,symbol)
|
||||
values
|
||||
<foreach item="item" collection="list" index="index" separator=",">
|
||||
(
|
||||
#{item.pointId},#{item.value},#{item.name},#{item.nameEn},#{item.symbol}
|
||||
)
|
||||
</foreach>
|
||||
|
||||
</insert>
|
||||
|
||||
<insert id="insertOne" keyColumn="id" keyProperty="id" useGeneratedKeys="true">
|
||||
insert into point_polysemy_config (point_id,value,name,symbol)
|
||||
values(#{pointId},#{value},#{name},#{symbol}
|
||||
</insert>
|
||||
|
||||
<update id="updateById" parameterType="com.ho.business.entity.PointPolysemyConfig">
|
||||
update point_polysemy_config
|
||||
<set>
|
||||
<if test="value != null">value = #{value},</if>
|
||||
<if test="name != null">name = #{name},</if>
|
||||
<if test="symbol != null">symbol = #{symbol},</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectByPointIds" resultType="com.ho.business.entity.PointPolysemyConfig">
|
||||
select <include refid="Base_Column_List"/>
|
||||
from point_polysemy_config
|
||||
<where>
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and point_id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<delete id="deleteByIds">
|
||||
delete
|
||||
from point_polysemy_config
|
||||
<where>
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByPointIds">
|
||||
delete
|
||||
from point_polysemy_config
|
||||
<where>
|
||||
<if test="ids != null and ids.size() != 0">
|
||||
and point_id in
|
||||
<foreach collection="ids" open="(" close=")" separator="," item="item">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user