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.

55 lines
2.0 KiB
XML

5 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.udi.admin.dao.info.CompanyDao">
<select id="findCompany" parameterType="java.lang.Long"
resultType="com.glxp.udi.admin.entity.info.CompanyEntity">
SELECT * FROM company where CustomerId = #{CustomerId}
</select>
<update id="modifyCompany" parameterType="com.glxp.udi.admin.entity.info.CompanyEntity">
UPDATE company
<set>
<if test="companyName != null">companyName=#{companyName},</if>
<if test="bussinessStatus != null">bussinessStatus=#{bussinessStatus},</if>
<if test="creditNum != null">creditNum=#{creditNum},</if>
<if test="classes != null">classes=#{classes},</if>
<if test="area != null">area=#{area},</if>
<if test="detailAddr != null">detailAddr=#{detailAddr},</if>
<if test="appId != null">appId=#{appId},</if>
<if test="appSecret != null">appSecret=#{appSecret},</if>
<if test="contacts != null">contacts=#{contacts},</if>
<if test="mobile != null">mobile=#{mobile},</if>
<if test="tel != null">tel=#{tel},</if>
<if test="email != null">email=#{email},</if>
5 years ago
<if test="areaCode != null">areaCode=#{areaCode},</if>
5 years ago
</set>
WHERE customerId=#{customerId}
</update>
<insert id="insertCompany" parameterType="com.glxp.udi.admin.entity.info.CompanyEntity">
INSERT INTO company(companyName,
bussinessStatus,creditNum,classes,area,
5 years ago
detailAddr,appId,appSecret,contacts,mobile,tel,email,customerId,areaCode) values
5 years ago
( #{companyName},
#{bussinessStatus},
#{creditNum},
#{classes},
#{area},
#{detailAddr},
#{appId},
#{appSecret},
#{contacts},
#{mobile},
#{tel},
#{email},
5 years ago
#{customerId},#{areaCode})
5 years ago
</insert>
</mapper>