dcs 6 months ago
parent
commit
f4741f8473

+ 104 - 0
virgo.api/src/main/java/com/bosshand/virgo/api/model/Merchant.java

@@ -7,6 +7,46 @@ public class Merchant {
 
     private long id;
 
+    /**
+     * 企业地址
+     */
+    private String address;
+
+    /**
+     * 经营范围
+     */
+    private String businessScope;
+
+    /**
+     * 企业规模
+     */
+    private String corporateScale;
+
+    /**
+     * 企业理念
+     */
+    private String corporatePhilosophy;
+
+    /**
+     * 企业文化
+     */
+    private String corporateCulture;
+
+    /**
+     * 联系方式
+     */
+    private String contactInformation;
+
+    /**
+     * 传真
+     */
+    private String fax;
+
+    /**
+     * 邮箱
+     */
+    private String email;
+
     /**
      * 组织id
      */
@@ -65,6 +105,70 @@ public class Merchant {
         this.id = id;
     }
 
+    public String getAddress() {
+        return address;
+    }
+
+    public void setAddress(String address) {
+        this.address = address;
+    }
+
+    public String getBusinessScope() {
+        return businessScope;
+    }
+
+    public void setBusinessScope(String businessScope) {
+        this.businessScope = businessScope;
+    }
+
+    public String getCorporateScale() {
+        return corporateScale;
+    }
+
+    public void setCorporateScale(String corporateScale) {
+        this.corporateScale = corporateScale;
+    }
+
+    public String getCorporatePhilosophy() {
+        return corporatePhilosophy;
+    }
+
+    public void setCorporatePhilosophy(String corporatePhilosophy) {
+        this.corporatePhilosophy = corporatePhilosophy;
+    }
+
+    public String getCorporateCulture() {
+        return corporateCulture;
+    }
+
+    public void setCorporateCulture(String corporateCulture) {
+        this.corporateCulture = corporateCulture;
+    }
+
+    public String getContactInformation() {
+        return contactInformation;
+    }
+
+    public void setContactInformation(String contactInformation) {
+        this.contactInformation = contactInformation;
+    }
+
+    public String getFax() {
+        return fax;
+    }
+
+    public void setFax(String fax) {
+        this.fax = fax;
+    }
+
+    public String getEmail() {
+        return email;
+    }
+
+    public void setEmail(String email) {
+        this.email = email;
+    }
+
     public long getOrganizationId() {
         return organizationId;
     }

+ 48 - 2
virgo.api/src/main/resources/mapper/MerchantMapper.xml

@@ -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>