dcs 8 月之前
父节点
当前提交
92cace576b

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

@@ -12,6 +12,11 @@ public class Merchant {
      */
      */
     private long organizationId;
     private long organizationId;
 
 
+    /**
+     * 项目id
+     */
+    private long projectId;
+
     /**
     /**
      * 行业分类
      * 行业分类
      */
      */
@@ -68,6 +73,14 @@ public class Merchant {
         this.organizationId = organizationId;
         this.organizationId = organizationId;
     }
     }
 
 
+    public long getProjectId() {
+        return projectId;
+    }
+
+    public void setProjectId(long projectId) {
+        this.projectId = projectId;
+    }
+
     public String getIndustryType() {
     public String getIndustryType() {
         return industryType;
         return industryType;
     }
     }

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

@@ -7,6 +7,7 @@
     <resultMap type="com.bosshand.virgo.api.model.Merchant" id="merchantResult">
     <resultMap type="com.bosshand.virgo.api.model.Merchant" id="merchantResult">
         <id column="id" property="id"/>
         <id column="id" property="id"/>
         <result column="organizationId" property="organizationId"/>
         <result column="organizationId" property="organizationId"/>
+        <result column="projectId" property="projectId"/>
         <result column="industryType" property="industryType"/>
         <result column="industryType" property="industryType"/>
         <result column="name" property="name"/>
         <result column="name" property="name"/>
         <result column="legalPerson" property="legalPerson"/>
         <result column="legalPerson" property="legalPerson"/>
@@ -18,8 +19,8 @@
     </resultMap>
     </resultMap>
 
 
     <insert id="insert" parameterType="com.bosshand.virgo.api.model.Merchant" useGeneratedKeys="true" keyProperty="id">
     <insert id="insert" parameterType="com.bosshand.virgo.api.model.Merchant" useGeneratedKeys="true" keyProperty="id">
-        INSERT INTO merchant(`organizationId`, `industryType`, `name`, `legalPerson`, `establishDate`, `businessTerm`, `registeredCapital`, `status`, `data`)
-        VALUES (#{organizationId}, #{industryType}, #{name}, #{legalPerson}, #{establishDate}, #{businessTerm}, #{registeredCapital}, #{status}, #{data})
+        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>
     </insert>
 
 
     <delete id="delete">
     <delete id="delete">
@@ -30,6 +31,7 @@
         UPDATE merchant
         UPDATE merchant
         <trim prefix="set" suffixOverrides=",">
         <trim prefix="set" suffixOverrides=",">
             <if test="organizationId!=0">organizationId=#{organizationId},</if>
             <if test="organizationId!=0">organizationId=#{organizationId},</if>
+            <if test="projectId!=0">projectId=#{projectId},</if>
             <if test="industryType!=null">industryType=#{industryType},</if>
             <if test="industryType!=null">industryType=#{industryType},</if>
             <if test="name!=null">name=#{name},</if>
             <if test="name!=null">name=#{name},</if>
             <if test="legalPerson!=null">legalPerson=#{legalPerson},</if>
             <if test="legalPerson!=null">legalPerson=#{legalPerson},</if>
@@ -50,6 +52,7 @@
         SELECT * FROM merchant
         SELECT * FROM merchant
         <where>
         <where>
             <if test="organizationId!=0">and organizationId=#{organizationId}</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>
             <if test="industryType!=null">and industryType=#{industryType}</if>
             <if test="name!=null">and name=#{name}</if>
             <if test="name!=null">and name=#{name}</if>
             <if test="legalPerson!=null">and legalPerson=#{legalPerson}</if>
             <if test="legalPerson!=null">and legalPerson=#{legalPerson}</if>
@@ -65,6 +68,7 @@
         SELECT count(*) FROM merchant
         SELECT count(*) FROM merchant
         <where>
         <where>
             <if test="organizationId!=0">and organizationId=#{organizationId}</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>
             <if test="industryType!=null">and industryType=#{industryType}</if>
             <if test="name!=null">and name=#{name}</if>
             <if test="name!=null">and name=#{name}</if>
             <if test="legalPerson!=null">and legalPerson=#{legalPerson}</if>
             <if test="legalPerson!=null">and legalPerson=#{legalPerson}</if>
@@ -80,6 +84,7 @@
         SELECT * FROM merchant
         SELECT * FROM merchant
         <where>
         <where>
             <if test="p.organizationId!=0">and organizationId=#{p.organizationId}</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>
             <if test="p.industryType!=null">and industryType=#{p.industryType}</if>
             <if test="p.name!=null">and name=#{p.name}</if>
             <if test="p.name!=null">and name=#{p.name}</if>
             <if test="p.legalPerson!=null">and legalPerson=#{p.legalPerson}</if>
             <if test="p.legalPerson!=null">and legalPerson=#{p.legalPerson}</if>