Commit 9d16beb7 by levphon

微信小程序C端账号体系

1 parent 187b9729
...@@ -30,8 +30,8 @@ public class User extends BaseEntity { ...@@ -30,8 +30,8 @@ public class User extends BaseEntity {
/** /**
* 关联人(账户)id * 关联人(账户)id
*/ */
@Column(name = "linker_id") @Column(name = "rel_user_id")
private Long linkerId; private Long relUserId;
/** /**
* 状态:0白名单,临时封禁(blacklist>0,值为封禁天数),永久封禁(del_flag=-1) * 状态:0白名单,临时封禁(blacklist>0,值为封禁天数),永久封禁(del_flag=-1)
......
package cn.com.glsx.app.modules.model; package cn.com.glsx.app.modules.model;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data; import lombok.Data;
@Data @Data
...@@ -16,6 +17,8 @@ public class AppUser { ...@@ -16,6 +17,8 @@ public class AppUser {
* 用户类型:normal常规用户,shared被分享用户,见枚举MiniUserType * 用户类型:normal常规用户,shared被分享用户,见枚举MiniUserType
*/ */
private String userType; private String userType;
@JsonIgnore
private Integer blacklist; private Integer blacklist;
} }
\ No newline at end of file \ No newline at end of file
...@@ -33,15 +33,15 @@ ...@@ -33,15 +33,15 @@
</select> </select>
<select id="selectAppUserByUserId" resultType="cn.com.glsx.app.modules.model.AppUser"> <select id="selectAppUserByUserId" resultType="cn.com.glsx.app.modules.model.AppUser">
select tcu.linker_id as userId, select tcu.rel_user_id as userId,
tcu.id as cuserId, tcu.id as cuserId,
tcula.union_id as unionId, tcula.account,
tcu.account, tcula2.username,
tcula.username,
tcu.blacklist tcu.blacklist
from t_cust_user_local_account tcula from t_cust_user_local_auth tcula
inner join t_cust_user_auth_rel tcuar on tcula.id = tcuar.auth_id inner join t_cust_user_auth_rel tcuar on tcula.id = tcuar.auth_id
left join t_cust_user tcu on tcu.id = tcuar.user_id left join t_cust_user_local_account tcula2 on tcuar.auth_id = tcula2.auth_id
left join t_cust_user tcu on tcuar.user_id = tcu.id
where tcula.del_flag = 0 where tcula.del_flag = 0
and tcuar.auth_type = 'local' and tcuar.auth_type = 'local'
and tcuar.user_id = #{userId} limit 1 and tcuar.user_id = #{userId} limit 1
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<result column="token" jdbcType="VARCHAR" property="token"/> <result column="token" jdbcType="VARCHAR" property="token"/>
<result column="expire_in" jdbcType="INTEGER" property="expireIn"/> <result column="expire_in" jdbcType="INTEGER" property="expireIn"/>
<result column="try_times" jdbcType="INTEGER" property="tryTimes"/> <result column="try_times" jdbcType="INTEGER" property="tryTimes"/>
<result column="linker_id" jdbcType="INTEGER" property="linkerId"/> <result column="rel_user_id" jdbcType="INTEGER" property="relUserId"/>
<result column="blacklist" jdbcType="TINYINT" property="blacklist"/> <result column="blacklist" jdbcType="TINYINT" property="blacklist"/>
<result column="del_flag" jdbcType="TINYINT" property="delFlag"/> <result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
<result column="created_date" jdbcType="TIMESTAMP" property="createdDate"/> <result column="created_date" jdbcType="TIMESTAMP" property="createdDate"/>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<!-- <!--
WARNING - @mbg.generated WARNING - @mbg.generated
--> -->
id, token, expire_in, try_times, linker_id, blacklist, del_flag, created_date, created_by, updated_date, id, token, expire_in, try_times, rel_user_id, blacklist, del_flag, created_date, created_by, updated_date,
updated_by updated_by
</sql> </sql>
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
</select> </select>
<insert id="saveOrUpdate" useGeneratedKeys="true" keyProperty="id" parameterType="cn.com.glsx.app.modules.entity.User"> <insert id="saveOrUpdate" useGeneratedKeys="true" keyProperty="id" parameterType="cn.com.glsx.app.modules.entity.User">
INSERT INTO t_cust_user (id, linker_id, blacklist, del_flag, created_date) INSERT INTO t_cust_user (id, rel_user_id, blacklist, del_flag, created_date)
VALUES (#{id}, #{linkerId}, #{blacklist}, 0, sysdate()) ON DUPLICATE KEY VALUES (#{id}, #{linkerId}, #{blacklist}, 0, sysdate()) ON DUPLICATE KEY
UPDATE updated_date = sysdate() UPDATE updated_date = sysdate()
</insert> </insert>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!