|
|
|
<?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.UnitMaintainDao">
|
|
|
|
|
|
|
|
<select id="filterList" parameterType="com.glxp.api.admin.req.basic.BasicUnitMaintainFilterRequest"
|
|
|
|
resultType="com.glxp.api.admin.entity.basic.UnitMaintainEntity">
|
|
|
|
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>
|
|
|
|
<if test="id != '' and id != null">
|
|
|
|
AND id = #{id}
|
|
|
|
</if>
|
|
|
|
<if test="unitId != '' and unitId != null">
|
|
|
|
AND unitId = #{unitId}
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<insert id="insertUnitMaintain" keyProperty="id"
|
|
|
|
parameterType="com.glxp.api.admin.entity.basic.UnitMaintainEntity">
|
|
|
|
INSERT INTO basic_corp
|
|
|
|
(thirdId,erpId,name,spell,
|
|
|
|
addr,status,type,contact,mobile,creditNo)
|
|
|
|
values
|
|
|
|
(
|
|
|
|
#{thirdId},
|
|
|
|
#{erpId},
|
|
|
|
#{name},
|
|
|
|
#{spell},
|
|
|
|
#{addr},
|
|
|
|
#{status},
|
|
|
|
#{type},
|
|
|
|
#{contact},
|
|
|
|
#{mobile},
|
|
|
|
#{creditNo}
|
|
|
|
)
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<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.UnitMaintainEntity">
|
|
|
|
select * FROM basic_corp WHERE id = #{id}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectThirdInfoByErpId" resultType="com.glxp.api.admin.entity.basic.UnitMaintainEntity">
|
|
|
|
select thirdId, thirdName
|
|
|
|
from basic_corp
|
|
|
|
where erpId = #{erpId}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectByThirdSys" resultType="com.glxp.api.admin.entity.basic.UnitMaintainEntity">
|
|
|
|
select *
|
|
|
|
from basic_corp
|
|
|
|
where ${thirdIdSys} = #{thirdId}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectByErpId" resultType="com.glxp.api.admin.entity.basic.UnitMaintainEntity">
|
|
|
|
select *
|
|
|
|
from basic_corp
|
|
|
|
where erpId = #{erpId}
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectNameByErpId" resultType="java.lang.String">
|
|
|
|
select name from basic_corp where erpId = #{erpId}
|
|
|
|
</select>
|
|
|
|
</mapper>
|