|
|
|
<?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>
|
|
|
|
<if test="areaCode != null">areaCode=#{areaCode},</if>
|
|
|
|
</set>
|
|
|
|
WHERE customerId=#{customerId}
|
|
|
|
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<insert id="insertCompany" parameterType="com.glxp.udi.admin.entity.info.CompanyEntity">
|
|
|
|
INSERT INTO company(companyName,
|
|
|
|
bussinessStatus,creditNum,classes,area,
|
|
|
|
detailAddr,appId,appSecret,contacts,mobile,tel,email,customerId,areaCode) values
|
|
|
|
( #{companyName},
|
|
|
|
#{bussinessStatus},
|
|
|
|
#{creditNum},
|
|
|
|
#{classes},
|
|
|
|
#{area},
|
|
|
|
#{detailAddr},
|
|
|
|
#{appId},
|
|
|
|
#{appSecret},
|
|
|
|
#{contacts},
|
|
|
|
#{mobile},
|
|
|
|
#{tel},
|
|
|
|
#{email},
|
|
|
|
#{customerId},#{areaCode})
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|