This commit is contained in:
dute7liang
2024-01-07 16:42:24 +08:00
parent 31af6fdc76
commit fad404fe58
52 changed files with 257 additions and 176 deletions

View File

@@ -22,13 +22,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="decrCoin">
update cai_account
set coin = coin - #{coin}
where user_id = #{userId} and (coin - #{coin}) > 0
where user_id = #{userId} and (coin - #{coin}) >= 0
</update>
<update id="decrIncomeCoin">
update cai_account
set income_coin = income_coin - #{incomeCoin}
where user_id = #{userId} and (income_coin - #{incomeCoin}) > 0
where user_id = #{userId} and (income_coin - #{incomeCoin}) >= 0
</update>
<update id="incsIncomeCoin">

View File

@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by t1.create_time desc
</select>
<select id="pageApp" resultType="com.ruoyi.cai.dto.app.vo.AnchorListVo">
select t1.avatar,t1.gender,t1.city,t1.nickname,t1.usercode,t1.city_id,t1.city,t2.give_score
select t1.id as user_id,t1.avatar,t1.gender,t1.city,t1.nickname,t1.usercode,t1.city_id,t1.city,t2.give_score
from cai_user t1
join cai_anchor t2 on t1.id = t2.user_id
join cai_user_online t3 on t1.id = t3.user_id

View File

@@ -28,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and t3.id is not null
</if>
<if test="query.type != null and query.type == 3">
and t1.city_id = #{query.city}
and t1.city_id = #{query.cityId}
</if>
order by t1.create_time desc
</select>

View File

@@ -11,7 +11,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="createTime" column="create_time"/>
</resultMap>
<select id="pageApp" resultType="com.ruoyi.cai.dto.app.vo.user.UserListVo">
select t2.avatar,t2.gender,t2.city,t2.nickname,t2.usercode,t2.age
select t2.id as user_id,t2.avatar,t2.gender,t2.city_id,t2.city,t2.nickname,t2.usercode,t2.age
from cai_user_blacklist t1
join cai_user t2 on t1.user_id = t2.id
where t1.user_id = #{userId}

View File

@@ -17,7 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where invite_id = #{userId}
</select>
<select id="inviteUserPage" resultType="com.ruoyi.cai.dto.app.vo.user.UserListVo">
select t2.avatar,t2.gender,t2.city,t2.nickname,t2.usercode,t2.age, t1.create_time as bind_time
select t1.user_id,t2.avatar,t2.gender,t2.city,t2.nickname,t2.usercode,t2.age, t1.create_time as bind_time
from cai_user_invite t1
join cai_user t2 on t1.user_id = t2.id
where t1.invite_id = #{inviteId}

View File

@@ -19,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and t1.mobile = #{query.mobile}
</if>
<if test="query.usercode != null and query.usercode != ''">
and t1.usercode like concat('%',#{query.usercode},'%')
and t1.usercode = #{query.usercode}
</if>
<if test="query.gender != null">
and t1.gender = #{query.gender}
@@ -31,7 +31,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by t2.last_login_time desc
</select>
<select id="pageApp" resultType="com.ruoyi.cai.dto.app.vo.user.UserListVo">
select t1.avatar,t1.gender,t1.city,t1.city_id,t1.nickname,t1.usercode,t1.age,t2.last_live_time
select t1.avatar,t1.id as user_id,t1.gender,t1.city,t1.city_id,t1.nickname,t1.usercode,t1.age,t2.last_live_time as bind_time
from cai_user t1
join cai_user_online t2 on t1.id = t2.user_id
where t1.status = 0
@@ -47,7 +47,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
order by t2.last_live_time desc
</select>
<select id="greetPageApp" resultType="com.ruoyi.cai.dto.app.vo.user.UserListVo">
select t1.avatar,t1.gender,t1.city,t1.city_id,t1.nickname,t1.usercode,t1.age,t2.last_live_time
select t1.avatar,t1.id as user_id,t1.gender,t1.city,t1.city_id,t1.nickname,t1.usercode,t1.age,t2.last_live_time as bind_time
from cai_user t1
join cai_user_online t2 on t1.id = t2.user_id
where t1.status = 0

View File

@@ -14,7 +14,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="pageApp" resultType="com.ruoyi.cai.dto.app.vo.user.UserStarOrVisitorList">
select
t1.create_time as happen_time,t1.is_watch,
t2.avatar,t2.gender,t2.city,t2.nickname,t2.usercode,t2.age
t2.id as user_id,
t2.avatar,t2.gender,t2.city_id,t2.city,t2.nickname,t2.usercode,t2.age
from cai_user_visitor t1
join cai_user t2 on t1.user_id = t2.id
<where>
@@ -25,7 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
and t1.user_id = #{query.userId}
</if>
</where>
order by create_time desc
order by t1.create_time desc
</select>