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.
38 lines
1.2 KiB
XML
38 lines
1.2 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.udi.admin.dao.inout.UnitDao">
|
|
<insert id="insertUnits" parameterType="java.util.List">
|
|
INSERT INTO unit
|
|
(unitId,
|
|
name,
|
|
spell,
|
|
addr,
|
|
status,
|
|
type)
|
|
VALUES
|
|
<foreach collection="unitList" item="item" index="index"
|
|
separator=",">
|
|
(
|
|
#{item.unitId},
|
|
#{item.name},
|
|
#{item.spell},
|
|
#{item.addr},
|
|
#{item.status},
|
|
#{item.type})
|
|
</foreach>
|
|
ON DUPLICATE KEY UPDATE `name` = VALUES(`name`)
|
|
</insert>
|
|
<select id="listUnitKey" parameterType="java.lang.String" resultType="com.glxp.udi.admin.entity.inout.Unit">
|
|
select * from unit WHERE ( name like concat('%',#{key},'%') or spell like concat('%',#{key},'%') or unitId like concat('%',#{key},'%') )
|
|
</select>
|
|
<delete id="deleteAll">
|
|
delete from unit;
|
|
</delete>
|
|
<select id="selectById" parameterType="Map" resultType="com.glxp.udi.admin.entity.inout.Unit">
|
|
select * FROM unit WHERE id = #{id}
|
|
</select>
|
|
|
|
</mapper>
|
|
|