app 用户登录 用户注册

新增 登录过滤器 仅对app作用
This commit is contained in:
2024-03-28 10:59:15 +08:00
parent 57dc6be120
commit 09e29ca20b
10 changed files with 451 additions and 119 deletions

View File

@@ -3,6 +3,7 @@
<mapper namespace="com.chaozhanggui.system.cashierservice.dao.TbUserInfoMapper">
<resultMap id="BaseResultMap" type="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
<id column="id" jdbcType="INTEGER" property="id" />
<id column="user_id" jdbcType="INTEGER" property="userId" />
<result column="amount" jdbcType="DECIMAL" property="amount" />
<result column="charge_amount" jdbcType="DECIMAL" property="chargeAmount" />
<result column="line_of_credit" jdbcType="DECIMAL" property="lineOfCredit" />
@@ -47,15 +48,16 @@
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" />
<result column="bind_parent_at" jdbcType="BIGINT" property="bindParentAt" />
<result column="grand_parent_id" jdbcType="VARCHAR" property="grandParentId" />
<result column="password" jdbcType="VARCHAR" property="password" />
</resultMap>
<sql id="Base_Column_List">
id, amount, charge_amount, line_of_credit, consume_amount, consume_number, total_score,
id,user_id, amount, charge_amount, line_of_credit, consume_amount, consume_number, total_score,
lock_score, card_no, card_password, level_id, head_img, nick_name, telephone, wx_ma_app_id,
birth_day, sex, mini_app_open_id, open_id, union_id, code, type, identify, status,
parent_id, parent_level, parent_type, project_id, merchant_id, is_resource, is_online,
is_vip, vip_effect_at, tips, source_path, is_sales_person, is_attention_mp, city,
search_word, last_log_in_at, last_leave_at, created_at, updated_at, bind_parent_at,
grand_parent_id
grand_parent_id,password
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
@@ -69,7 +71,7 @@
</delete>
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo" useGeneratedKeys="true" keyProperty="id">
insert into tb_user_info (id, amount, charge_amount,
insert into tb_user_info (id,user_id, amount, charge_amount,
line_of_credit, consume_amount, consume_number,
total_score, lock_score, card_no,
card_password, level_id, head_img,
@@ -83,9 +85,9 @@
tips, source_path, is_sales_person,
is_attention_mp, city, search_word,
last_log_in_at, last_leave_at, created_at,
updated_at, bind_parent_at, grand_parent_id
updated_at, bind_parent_at, grand_parent_id,password
)
values (#{id,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{chargeAmount,jdbcType=DECIMAL},
values (#{id,jdbcType=INTEGER},#{userId,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL}, #{chargeAmount,jdbcType=DECIMAL},
#{lineOfCredit,jdbcType=DECIMAL}, #{consumeAmount,jdbcType=DECIMAL}, #{consumeNumber,jdbcType=INTEGER},
#{totalScore,jdbcType=INTEGER}, #{lockScore,jdbcType=INTEGER}, #{cardNo,jdbcType=VARCHAR},
#{cardPassword,jdbcType=VARCHAR}, #{levelId,jdbcType=VARCHAR}, #{headImg,jdbcType=VARCHAR},
@@ -99,7 +101,7 @@
#{tips,jdbcType=VARCHAR}, #{sourcePath,jdbcType=VARCHAR}, #{isSalesPerson,jdbcType=TINYINT},
#{isAttentionMp,jdbcType=TINYINT}, #{city,jdbcType=VARCHAR}, #{searchWord,jdbcType=VARCHAR},
#{lastLogInAt,jdbcType=BIGINT}, #{lastLeaveAt,jdbcType=BIGINT}, #{createdAt,jdbcType=BIGINT},
#{updatedAt,jdbcType=BIGINT}, #{bindParentAt,jdbcType=BIGINT}, #{grandParentId,jdbcType=VARCHAR}
#{updatedAt,jdbcType=BIGINT}, #{bindParentAt,jdbcType=BIGINT}, #{grandParentId,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
@@ -108,6 +110,9 @@
<if test="id != null">
id,
</if>
<if test="userId != null and userId != ''">
user_id,
</if>
<if test="amount != null">
amount,
</if>
@@ -240,11 +245,17 @@
<if test="grandParentId != null">
grand_parent_id,
</if>
<if test="password != null and password != ''">
password
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=INTEGER},
</if>
<if test="userId != null and userId != ''">
#{userId,jdbcType=INTEGER},
</if>
<if test="amount != null">
#{amount,jdbcType=DECIMAL},
</if>
@@ -377,11 +388,17 @@
<if test="grandParentId != null">
#{grandParentId,jdbcType=VARCHAR},
</if>
<if test="password != null and password != ''">
#{password,jdbcType=VARCHAR}
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
update tb_user_info
<set>
<if test="userId != null and userId != ''">
user_id = #{userId,jdbcType=INTEGER},
</if>
<if test="amount != null">
amount = #{amount,jdbcType=DECIMAL},
</if>
@@ -514,12 +531,16 @@
<if test="grandParentId != null">
grand_parent_id = #{grandParentId,jdbcType=VARCHAR},
</if>
<if test="password != null and password != ''">
password = #{password,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.chaozhanggui.system.cashierservice.entity.TbUserInfo">
update tb_user_info
set amount = #{amount,jdbcType=DECIMAL},
set user_id = #{userId,jdbcType=INTEGER},
amount = #{amount,jdbcType=DECIMAL},
charge_amount = #{chargeAmount,jdbcType=DECIMAL},
line_of_credit = #{lineOfCredit,jdbcType=DECIMAL},
consume_amount = #{consumeAmount,jdbcType=DECIMAL},
@@ -562,13 +583,22 @@
created_at = #{createdAt,jdbcType=BIGINT},
updated_at = #{updatedAt,jdbcType=BIGINT},
bind_parent_at = #{bindParentAt,jdbcType=BIGINT},
grand_parent_id = #{grandParentId,jdbcType=VARCHAR}
grand_parent_id = #{grandParentId,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR}
where id = #{id,jdbcType=INTEGER}
</update>
<select id="selectByOpenId" resultMap="BaseResultMap">
select * from tb_user_info where mini_app_open_id=#{openId}
</select>
</select>
<select id="selectUserByPhone" resultMap="BaseResultMap">
select * from tb_user_info where telephone=#{phone} AND source_path=#{source}
</select>
<select id="selectByPhone" resultMap="BaseResultMap">
select * from tb_user_info where telephone=#{phone} AND source_path='APP' AND user_id is null
</select>
</mapper>