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.
udiwms-java/api-admin/src/main/resources/mybatis/mapper/basic/UnitMaintainDao.xml

75 lines
2.4 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.UnitMaintainDao">
<select id="filterList" parameterType="com.glxp.api.admin.req.basic.BasicUnitMaintainFilterRequest"
4 years ago
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">
4 years ago
AND id = #{id}
</if>
<if test="unitId != '' and unitId != null">
AND unitId = #{unitId}
</if>
4 years ago
</where>
</select>
4 years ago
4 years ago
<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>
3 years ago
<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>
4 years ago
</mapper>