dcs 1 年之前
父节点
当前提交
ea70ae27de

+ 13 - 0
virgo.core/src/main/java/com/bosshand/virgo/core/model/MgrOrganizationProject.java

@@ -37,6 +37,11 @@ public class MgrOrganizationProject {
      */
     private long merchantId;
 
+    /**
+     * 绑定组织id
+     */
+    private long bindOrganizationId;
+
     /**
      * 身份id
      */
@@ -98,6 +103,14 @@ public class MgrOrganizationProject {
         this.merchantId = merchantId;
     }
 
+    public long getBindOrganizationId() {
+        return bindOrganizationId;
+    }
+
+    public void setBindOrganizationId(long bindOrganizationId) {
+        this.bindOrganizationId = bindOrganizationId;
+    }
+
     public long getIdentityId() {
         return identityId;
     }

+ 4 - 2
virgo.core/src/main/resources/mapper/MgrOrganizationProjectMapper.xml

@@ -12,6 +12,7 @@
         <result column="clientId" property="clientId"/>
         <result column="agentId" property="agentId"/>
         <result column="merchantId" property="merchantId"/>
+        <result column="bindOrganizationId" property="bindOrganizationId"/>
         <result column="identityId" property="identityId"/>
     </resultMap>
 
@@ -36,13 +37,14 @@
             <if test="clientId!=0">and clientId=#{clientId}</if>
             <if test="agentId!=0">and agentId=#{agentId}</if>
             <if test="merchantId!=0">and merchantId=#{merchantId}</if>
+            <if test="bindOrganizationId!=0">and bindOrganizationId=#{bindOrganizationId}</if>
             <if test="identityId!=0">and identityId=#{identityId}</if>
         </where>
     </select>
 
     <insert id="insert">
-        insert into mgr_organization_project (organizationId, projectId, userId, clientId, agentId, merchantId, identityId)
-        value (#{organizationId}, #{projectId}, #{userId}, #{clientId}, #{agentId}, #{merchantId}, #{identityId})
+        insert into mgr_organization_project (organizationId, projectId, userId, clientId, agentId, merchantId, bindOrganizationId, identityId)
+        value (#{organizationId}, #{projectId}, #{userId}, #{clientId}, #{agentId}, #{merchantId}, #{bindOrganizationId}, #{identityId})
     </insert>
 
     <delete id="delete">

+ 1 - 1
virgo.manager/src/main/java/com/bosshand/virgo/controller/UserController.java

@@ -35,7 +35,7 @@ public class UserController {
     @RequestMapping(value = "/add/{organizationId}/{roleIds}", method = RequestMethod.POST)
     public Response addUser(@RequestBody MgrUser user, @PathVariable long organizationId, @PathVariable String roleIds) {
         userService.addUser(user, organizationId, roleIds);
-        return Response.ok();
+        return Response.ok(userService.getByPhone(user.getPhone()));
     }
 
     @ApiOperation(value = "删除用户", notes = "删除用户")