ソースを参照

账户信息增加绑定企业字段

guq 7 年 前
コミット
7383152a95

+ 14 - 5
applications/operation/operation-server/src/main/java/com/usoftchina/saas/operation/dto/AccountDTO.java

@@ -25,9 +25,22 @@ public class AccountDTO implements Serializable{
     private Date createTime;
     private long creatorId;
     private Date updateTime;
+
+    public Boolean getEnabled() {
+        return enabled;
+    }
+
+    public int getBind() {
+        return bind;
+    }
+
+    public void setBind(int bind) {
+        this.bind = bind;
+    }
+
     private long updaterId;
     private Long uu;
-
+    private int bind;
     public String getUsername() {
         return username;
     }
@@ -77,10 +90,6 @@ public class AccountDTO implements Serializable{
         this.type = type;
     }
 
-    public Boolean isEnabled() {
-        return enabled;
-    }
-
     public void setEnabled(Boolean enabled) {
         this.enabled = enabled;
     }

+ 3 - 1
applications/operation/operation-server/src/main/resources/mapper/AccoutMapper.xml

@@ -14,6 +14,7 @@
         <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
         <result column="updater_id" jdbcType="BIGINT" property="updaterId"/>
         <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
+        <result column="bind" jdbcType="INTEGER" property="bind"/>
     </resultMap>
 
     <resultMap id="loginMap" type="com.usoftchina.saas.operation.dto.LoginDTO">
@@ -38,7 +39,8 @@
     </resultMap>
 
     <select id="findAccountByCondition" parameterType="string" resultMap="BaseResultMap">
-        select * from saas_account.ac_account  <where>
+        select * from (select   count(account_id) bind  ,ac_account.*
+        from saas_account.ac_account left join saas_account.ac_account_company on ac_account.id=account_id GROUP BY id)account  <where>
         <if test="con != null">
             ${con}
         </if>