|
@@ -6,6 +6,16 @@
|
|
|
|
|
|
<resultMap type="com.bosshand.virgo.api.model.Merchant" id="merchantResult">
|
|
|
<id column="id" property="id"/>
|
|
|
+ <result column="address" property="address"/>
|
|
|
+ <result column="businessScope" property="businessScope"/>
|
|
|
+ <result column="corporateScale" property="corporateScale"/>
|
|
|
+ <result column="corporatePhilosophy" property="corporatePhilosophy"/>
|
|
|
+ <result column="corporateCulture" property="corporateCulture"/>
|
|
|
+ <result column="contactInformation" property="contactInformation"/>
|
|
|
+ <result column="fax" property="fax"/>
|
|
|
+ <result column="email" property="email"/>
|
|
|
+
|
|
|
+
|
|
|
<result column="organizationId" property="organizationId"/>
|
|
|
<result column="projectId" property="projectId"/>
|
|
|
<result column="industryType" property="industryType"/>
|
|
@@ -19,8 +29,8 @@
|
|
|
</resultMap>
|
|
|
|
|
|
<insert id="insert" parameterType="com.bosshand.virgo.api.model.Merchant" useGeneratedKeys="true" keyProperty="id">
|
|
|
- INSERT INTO merchant(`organizationId`, `projectId`, `industryType`, `name`, `legalPerson`, `establishDate`, `businessTerm`, `registeredCapital`, `status`, `data`)
|
|
|
- VALUES (#{organizationId}, #{projectId}, #{industryType}, #{name}, #{legalPerson}, #{establishDate}, #{businessTerm}, #{registeredCapital}, #{status}, #{data})
|
|
|
+ INSERT INTO merchant(`address`, `businessScope`, `corporateScale`, `corporatePhilosophy`, `corporateCulture`, `contactInformation`, `fax`, `email`, `organizationId`, `projectId`, `industryType`, `name`, `legalPerson`, `establishDate`, `businessTerm`, `registeredCapital`, `status`, `data`)
|
|
|
+ VALUES (#{address}, #{businessScope}, #{corporateScale}, #{corporatePhilosophy}, #{corporateCulture}, #{contactInformation}, #{fax}, #{email}, #{organizationId}, #{projectId}, #{industryType}, #{name}, #{legalPerson}, #{establishDate}, #{businessTerm}, #{registeredCapital}, #{status}, #{data})
|
|
|
</insert>
|
|
|
|
|
|
<delete id="delete">
|
|
@@ -30,6 +40,15 @@
|
|
|
<update id="update" parameterType="com.bosshand.virgo.api.model.Merchant">
|
|
|
UPDATE merchant
|
|
|
<trim prefix="set" suffixOverrides=",">
|
|
|
+ <if test="address!=null">address=#{address},</if>
|
|
|
+ <if test="businessScope!=null">businessScope=#{businessScope},</if>
|
|
|
+ <if test="corporateScale!=null">corporateScale=#{corporateScale},</if>
|
|
|
+ <if test="corporatePhilosophy!=null">corporatePhilosophy=#{corporatePhilosophy},</if>
|
|
|
+ <if test="corporateCulture!=null">corporateCulture=#{corporateCulture},</if>
|
|
|
+ <if test="contactInformation!=null">contactInformation=#{contactInformation},</if>
|
|
|
+ <if test="fax!=null">fax=#{fax},</if>
|
|
|
+ <if test="email!=null">email=#{email},</if>
|
|
|
+
|
|
|
<if test="organizationId!=0">organizationId=#{organizationId},</if>
|
|
|
<if test="projectId!=0">projectId=#{projectId},</if>
|
|
|
<if test="industryType!=null">industryType=#{industryType},</if>
|
|
@@ -51,6 +70,15 @@
|
|
|
<select id="getList" resultMap="merchantResult">
|
|
|
SELECT * FROM merchant
|
|
|
<where>
|
|
|
+ <if test="address!=null">and address=#{address}</if>
|
|
|
+ <if test="businessScope!=null">and businessScope=#{businessScope}</if>
|
|
|
+ <if test="corporateScale!=null">and corporateScale=#{corporateScale}</if>
|
|
|
+ <if test="corporatePhilosophy!=null">and corporatePhilosophy=#{corporatePhilosophy}</if>
|
|
|
+ <if test="corporateCulture!=null">and corporateCulture=#{corporateCulture}</if>
|
|
|
+ <if test="contactInformation!=null">and contactInformation=#{contactInformation}</if>
|
|
|
+ <if test="fax!=null">and fax=#{fax}</if>
|
|
|
+ <if test="email!=null">and email=#{email}</if>
|
|
|
+
|
|
|
<if test="organizationId!=0">and organizationId=#{organizationId}</if>
|
|
|
<if test="projectId!=0">and projectId=#{projectId}</if>
|
|
|
<if test="industryType!=null">and industryType=#{industryType}</if>
|
|
@@ -67,6 +95,15 @@
|
|
|
<select id="getTotalCount" parameterType="com.bosshand.virgo.api.model.LookRecord" resultType="Integer">
|
|
|
SELECT count(*) FROM merchant
|
|
|
<where>
|
|
|
+ <if test="address!=null">and address=#{address}</if>
|
|
|
+ <if test="businessScope!=null">and businessScope=#{businessScope}</if>
|
|
|
+ <if test="corporateScale!=null">and corporateScale=#{corporateScale}</if>
|
|
|
+ <if test="corporatePhilosophy!=null">and corporatePhilosophy=#{corporatePhilosophy}</if>
|
|
|
+ <if test="corporateCulture!=null">and corporateCulture=#{corporateCulture}</if>
|
|
|
+ <if test="contactInformation!=null">and contactInformation=#{contactInformation}</if>
|
|
|
+ <if test="fax!=null">and fax=#{fax}</if>
|
|
|
+ <if test="email!=null">and email=#{email}</if>
|
|
|
+
|
|
|
<if test="organizationId!=0">and organizationId=#{organizationId}</if>
|
|
|
<if test="projectId!=0">and projectId=#{projectId}</if>
|
|
|
<if test="industryType!=null">and industryType=#{industryType}</if>
|
|
@@ -83,6 +120,15 @@
|
|
|
<select id="getLimit" resultMap="merchantResult">
|
|
|
SELECT * FROM merchant
|
|
|
<where>
|
|
|
+ <if test="p.address!=null">and address=#{p.address}</if>
|
|
|
+ <if test="p.businessScope!=null">and businessScope=#{p.businessScope}</if>
|
|
|
+ <if test="p.corporateScale!=null">and corporateScale=#{p.corporateScale}</if>
|
|
|
+ <if test="p.corporatePhilosophy!=null">and corporatePhilosophy=#{p.corporatePhilosophy}</if>
|
|
|
+ <if test="p.corporateCulture!=null">and corporateCulture=#{p.corporateCulture}</if>
|
|
|
+ <if test="p.contactInformation!=null">and contactInformation=#{p.contactInformation}</if>
|
|
|
+ <if test="p.fax!=null">and fax=#{p.fax}</if>
|
|
|
+ <if test="p.email!=null">and email=#{p.email}</if>
|
|
|
+
|
|
|
<if test="p.organizationId!=0">and organizationId=#{p.organizationId}</if>
|
|
|
<if test="p.projectId!=0">and projectId=#{p.projectId}</if>
|
|
|
<if test="p.industryType!=null">and industryType=#{p.industryType}</if>
|