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.
86 lines
2.7 KiB
XML
86 lines
2.7 KiB
XML
4 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.glxp.api.admin.dao.basic.BasicUnitMaintainDao">
|
||
|
|
||
|
<select id="filterList" parameterType="com.glxp.api.admin.req.basic.BasicUnitMaintainFilterRequest"
|
||
|
resultType="com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity">
|
||
|
SELECT * FROM basic_corp
|
||
|
<where>
|
||
|
<if test="key != '' and key!=null">
|
||
|
and name like concat('%',#{key},'%') or spell like concat('%',#{key},'%') or erpId like
|
||
|
concat('%',#{key},'%')
|
||
|
</if>
|
||
|
|
||
|
</where>
|
||
|
|
||
|
|
||
|
</select>
|
||
|
|
||
|
|
||
|
<insert id="insertBasicUnitMaintain" keyProperty="id"
|
||
|
parameterType="com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity">
|
||
|
INSERT INTO basic_corp
|
||
|
(thirdId,erpId,name,spell,
|
||
|
addr,status,type,creditNo,contact,mobile)
|
||
|
values
|
||
|
(
|
||
|
#{thirdId},
|
||
|
#{erpId},
|
||
|
#{name},
|
||
|
#{spell},
|
||
|
#{addr},
|
||
|
#{status},
|
||
|
#{type},
|
||
|
#{creditNo},
|
||
|
#{contact},
|
||
|
#{mobile}
|
||
|
)
|
||
|
</insert>
|
||
|
|
||
|
<insert id="insert" parameterType="com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity">
|
||
|
insert INTO basic_corp(
|
||
|
thirdId,erpId,name,spell,addr,
|
||
|
status,type,creditNo,contact,mobile
|
||
|
) values
|
||
|
(
|
||
|
#{thirdId},
|
||
|
#{erpId},
|
||
|
#{name},
|
||
|
#{spell},
|
||
|
#{addr},
|
||
|
#{status},
|
||
|
#{type},
|
||
|
#{creditNo},
|
||
|
#{contact},
|
||
|
#{mobile}
|
||
|
)
|
||
|
</insert>
|
||
|
|
||
|
<update id="updateById" parameterType="com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity">
|
||
|
UPDATE basic_corp
|
||
|
<set>
|
||
|
<if test="thirdId != null">thirdId=#{thirdId},</if>
|
||
|
<if test="erpId != null">erpId=#{erpId},</if>
|
||
|
<if test="name != null">name=#{name},</if>
|
||
|
<if test="spell != null">spell=#{spell},</if>
|
||
|
<if test="addr != null">addr=#{addr},</if>
|
||
|
<if test="status != null">status=#{status},</if>
|
||
|
<if test="type != null">type=#{type},</if>
|
||
|
<if test="creditNo != null">creditNo=#{creditNo},</if>
|
||
|
<if test="contact != null">contact=#{contact},</if>
|
||
|
<if test="mobile != null">mobile=#{mobile},</if>
|
||
|
</set>
|
||
|
WHERE id=#{id}
|
||
|
</update>
|
||
|
|
||
|
<delete id="deleteById" parameterType="Map">
|
||
|
DELETE FROM basic_corp WHERE id = #{id}
|
||
|
</delete>
|
||
|
|
||
|
|
||
|
<select id="selectById" parameterType="Map" resultType="com.glxp.api.admin.entity.basic.BasicUnitMaintainEntity">
|
||
|
select * FROM basic_corp WHERE id = #{id}
|
||
|
</select>
|
||
|
</mapper>
|