V13
This commit is contained in:
4
doc/20250926.sql
Normal file
4
doc/20250926.sql
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
ALTER TABLE cai_account
|
||||||
|
ADD COLUMN `anchor_total_coin` bigint(20) default 0 COMMENT '主播总收入';
|
||||||
|
ALTER TABLE cai_anchor
|
||||||
|
ADD COLUMN `anchor_total_coin` bigint(20) default 0 COMMENT '主播总收入';
|
||||||
@@ -61,6 +61,7 @@ public class IndexController {
|
|||||||
public R<AppHomeConfig> config(){
|
public R<AppHomeConfig> config(){
|
||||||
AppHomeConfig appHomeConfig = homeManager.config();
|
AppHomeConfig appHomeConfig = homeManager.config();
|
||||||
appHomeConfig.setHomeDialogText(systemConfigManager.getSystemConfig(SystemConfigEnum.HOME_DIALOG_TEXT));
|
appHomeConfig.setHomeDialogText(systemConfigManager.getSystemConfig(SystemConfigEnum.HOME_DIALOG_TEXT));
|
||||||
|
appHomeConfig.setTdKf(systemConfigManager.getSystemConfig(SystemConfigEnum.TD_KF));
|
||||||
return R.ok(appHomeConfig);
|
return R.ok(appHomeConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -103,6 +104,11 @@ public class IndexController {
|
|||||||
@Log(title = "首页查询主播接口V2", businessType = BusinessType.OTHER,isPrintResponseData = false, isSaveDb = false)
|
@Log(title = "首页查询主播接口V2", businessType = BusinessType.OTHER,isPrintResponseData = false, isSaveDb = false)
|
||||||
public R<List<AnchorListVo>> anchorPageV2(PageQuery page, AnchorListQuery query){
|
public R<List<AnchorListVo>> anchorPageV2(PageQuery page, AnchorListQuery query){
|
||||||
List<AnchorListVo> home = homeManager.getHomeV2(page, query);
|
List<AnchorListVo> home = homeManager.getHomeV2(page, query);
|
||||||
|
home.forEach(i -> {
|
||||||
|
if(i.getServiceTime() != null){
|
||||||
|
i.setServiceTime(i.getServiceTime()/60);
|
||||||
|
}
|
||||||
|
});
|
||||||
return R.ok(home);
|
return R.ok(home);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -14,16 +14,20 @@ public class AnchorListQuery {
|
|||||||
* 1-活跃查询
|
* 1-活跃查询
|
||||||
* 2-新人查询
|
* 2-新人查询
|
||||||
* 3-同城查询
|
* 3-同城查询
|
||||||
|
* 4-时长
|
||||||
|
* 5-魅力
|
||||||
|
* 6-附近
|
||||||
*/
|
*/
|
||||||
@Schema(description = "类型 0-默认 1-活跃 2-新人 3-同城")
|
@Schema(description = "类型 0-默认 1-活跃 2-新人 3-同城 4-时长 5-魅力 6-附近")
|
||||||
private Integer type;
|
private Integer type;
|
||||||
|
|
||||||
@Schema(hidden = true, description = "是否开启视频接听")
|
@Schema(description = "金币搜索")
|
||||||
private Integer openVideoStatus;
|
private Integer price;
|
||||||
|
|
||||||
@Schema(description = "城市(同城查询使用)")
|
@Schema(description = "城市(同城查询使用)")
|
||||||
private Integer cityId;
|
private Integer cityId;
|
||||||
|
@Schema(hidden = true, description = "是否开启视频接听")
|
||||||
|
private Integer openVideoStatus;
|
||||||
@Schema(hidden = true)
|
@Schema(hidden = true)
|
||||||
private Integer onlineStatus;
|
private Integer onlineStatus;
|
||||||
@Schema(hidden = true)
|
@Schema(hidden = true)
|
||||||
|
|||||||
@@ -16,6 +16,11 @@ public class AnchorListVo {
|
|||||||
@Schema(description = "在线状态 0=离线,1=在线")
|
@Schema(description = "在线状态 0=离线,1=在线")
|
||||||
private Integer online;
|
private Integer online;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务时长(分钟)
|
||||||
|
*/
|
||||||
|
private Integer serviceTime;
|
||||||
|
|
||||||
@Schema(description = "用户ID")
|
@Schema(description = "用户ID")
|
||||||
private Long userId;
|
private Long userId;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -15,4 +15,6 @@ public class AppHomeConfig {
|
|||||||
private String servId = "4";
|
private String servId = "4";
|
||||||
@Schema(description = "首页弹窗内容")
|
@Schema(description = "首页弹窗内容")
|
||||||
private String homeDialogText;
|
private String homeDialogText;
|
||||||
|
@Schema(description = "土豆客服账号")
|
||||||
|
private String tdKf;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import lombok.Setter;
|
|||||||
*/
|
*/
|
||||||
@Getter
|
@Getter
|
||||||
public enum SystemConfigEnum {
|
public enum SystemConfigEnum {
|
||||||
|
TD_KF("", "土豆客服账号",SystemConfigGroupEnum.BUSINESS),
|
||||||
RANK_LOVE_DAY_AWARD("13800,10800,8800,5800,3800,2800,2800,2800,2800,2800,2800", "魅力榜日榜前10名奖励", SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
RANK_LOVE_DAY_AWARD("13800,10800,8800,5800,3800,2800,2800,2800,2800,2800,2800", "魅力榜日榜前10名奖励", SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
||||||
RANK_LOVE_WEEK_AWARD("88800,58800,38800,28800,18800,13800,13800,13800,13800,13800,13800,13800", "魅力榜周榜前10名奖励",SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
RANK_LOVE_WEEK_AWARD("88800,58800,38800,28800,18800,13800,13800,13800,13800,13800,13800,13800", "魅力榜周榜前10名奖励",SystemConfigGroupEnum.BUSINESS, new NumberListSystemConfigCheck(10)),
|
||||||
RANK_INVITE_DAY_AWARD("13800,10800,8800,5800,3800,2800,2800,2800,2800,2800,2800", "邀请榜日榜前10名奖励",SystemConfigGroupEnum.BUSINESS,new NumberListSystemConfigCheck(10)),
|
RANK_INVITE_DAY_AWARD("13800,10800,8800,5800,3800,2800,2800,2800,2800,2800,2800", "邀请榜日榜前10名奖励",SystemConfigGroupEnum.BUSINESS,new NumberListSystemConfigCheck(10)),
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ public enum AnchorListQueryTypeEnum {
|
|||||||
ACTIVE(1,"活跃查询"),
|
ACTIVE(1,"活跃查询"),
|
||||||
NEW(2,"新人查询"),
|
NEW(2,"新人查询"),
|
||||||
CITY(3,"同城查询"),
|
CITY(3,"同城查询"),
|
||||||
|
SERVICE_TIME(4,"时长"),
|
||||||
|
LOVE(5,"魅力"),
|
||||||
|
LOCATION(6,"附近"),
|
||||||
;
|
;
|
||||||
private final Integer code;
|
private final Integer code;
|
||||||
private final String text;
|
private final String text;
|
||||||
|
|||||||
@@ -1,7 +1,10 @@
|
|||||||
package com.ruoyi.cai.manager;
|
package com.ruoyi.cai.manager;
|
||||||
|
|
||||||
import com.ruoyi.cai.mapper.AccountMapper;
|
import com.ruoyi.cai.mapper.AccountMapper;
|
||||||
|
import com.ruoyi.cai.mapper.AnchorMapper;
|
||||||
|
import com.ruoyi.cai.service.AnchorService;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
@@ -13,15 +16,19 @@ public class AccountTotalManager {
|
|||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private AccountMapper accountMapper;
|
private AccountMapper accountMapper;
|
||||||
|
@Resource
|
||||||
|
private AnchorMapper anchorMapper;
|
||||||
|
|
||||||
public void incsGuardIncomeCoin(Long userId, Long amount, Long businessLogId){
|
public void incsGuardIncomeCoin(Long userId, Long amount, Long businessLogId){
|
||||||
log.info("开始收入统计 守护: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
log.info("开始收入统计 守护: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
||||||
accountMapper.incsGuardIncomeIcon(userId, amount);
|
accountMapper.incsGuardIncomeIcon(userId, amount);
|
||||||
|
anchorMapper.incsTotalIcon(userId,amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void incsGiftIncomeCoin(Long userId, Long amount, Long businessLogId){
|
public void incsGiftIncomeCoin(Long userId, Long amount, Long businessLogId){
|
||||||
log.info("开始收入统计 礼物: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
log.info("开始收入统计 礼物: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
||||||
accountMapper.incsGiftIncomeIcon(userId, amount);
|
accountMapper.incsGiftIncomeIcon(userId, amount);
|
||||||
|
anchorMapper.incsTotalIcon(userId,amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void incsMessageIncomeCoin(Long userId, Long amount, Long businessLogId) {
|
public void incsMessageIncomeCoin(Long userId, Long amount, Long businessLogId) {
|
||||||
@@ -32,10 +39,11 @@ public class AccountTotalManager {
|
|||||||
public void incsVideoIncomeCoin(Long userId, Long amount, Long businessLogId) {
|
public void incsVideoIncomeCoin(Long userId, Long amount, Long businessLogId) {
|
||||||
log.info("开始收入统计 视频: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
log.info("开始收入统计 视频: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
||||||
accountMapper.incsVideoIncomeIcon(userId, amount);
|
accountMapper.incsVideoIncomeIcon(userId, amount);
|
||||||
|
anchorMapper.incsTotalIcon(userId,amount);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void incsPayIncomeCoin(Long userId, Long rechargeCoin, BigDecimal price, Long consumeLogId) {
|
public void incsPayIncomeCoin(Long userId, Long rechargeCoin, BigDecimal price, Long consumeLogId) {
|
||||||
log.info("开始收入统计 充值: userId={},price={},rechargeCoin={}, businessLogId={}", userId, price, rechargeCoin,consumeLogId);
|
log.info("开始用户充值统计 充值: userId={},price={},rechargeCoin={}, businessLogId={}", userId, price, rechargeCoin,consumeLogId);
|
||||||
accountMapper.incsPayTotal(userId, rechargeCoin, price);
|
accountMapper.incsPayTotal(userId, rechargeCoin, price);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -30,4 +30,6 @@ public interface AnchorMapper extends BaseMapper<Anchor> {
|
|||||||
boolean incsServiceTimeAndCount(@Param("toUid") Long toUid, @Param("callTime") Long callTime, @Param("count") int count);
|
boolean incsServiceTimeAndCount(@Param("toUid") Long toUid, @Param("callTime") Long callTime, @Param("count") int count);
|
||||||
|
|
||||||
List<AnchorStatusDTO> anchorStatus(@Param("userList") Set<Long> userList);
|
List<AnchorStatusDTO> anchorStatus(@Param("userList") Set<Long> userList);
|
||||||
|
|
||||||
|
void incsTotalIcon(@Param("userId") Long userId, @Param("amount") Long amount);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,8 +123,10 @@ public class AnchorServiceImpl extends ServiceImpl<AnchorMapper, Anchor> impleme
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Page<AnchorListVo> pageAppV2(PageQuery pageQuery, AnchorListQuery query) {
|
public Page<AnchorListVo> pageAppV2(PageQuery pageQuery, AnchorListQuery query) {
|
||||||
if(query.getType() != null && query.getType() != 3){
|
if(query.getType() != null){
|
||||||
query.setCityId(null);
|
if(query.getType() != 3 && query.getType() != 6){
|
||||||
|
query.setCityId(null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if(query.getType() == null){
|
if(query.getType() == null){
|
||||||
query.setType(AnchorListQueryTypeEnum.DEFAULT.getCode());
|
query.setType(AnchorListQueryTypeEnum.DEFAULT.getCode());
|
||||||
|
|||||||
@@ -88,17 +88,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="pageAppV2" resultType="com.ruoyi.cai.dto.app.vo.AnchorListVo">
|
<select id="pageAppV2" resultType="com.ruoyi.cai.dto.app.vo.AnchorListVo">
|
||||||
select t1.id as user_id,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.nickname,t1.usercode,t2.service_time,
|
||||||
t2.price,t3.status as online
|
<if test="query.type != null and query.type == 6">
|
||||||
|
<if test="query.cityId != null and query.cityId != ''">
|
||||||
|
if(t1.city_id = #{query.cityId},'0',t1.city_id) as city_desc,
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
|
t1.city_id,t1.city,t2.give_score,
|
||||||
|
t2.price,t3.status as online
|
||||||
from cai_user t1
|
from cai_user t1
|
||||||
join cai_anchor t2 on t1.id = t2.user_id
|
join cai_anchor t2 on t1.id = t2.user_id
|
||||||
join cai_user_online t3 on t1.id = t3.user_id
|
join cai_user_online t3 on t1.id = t3.user_id
|
||||||
where t1.status = 0 and t1.is_anchor = 1 and t2.index_display = 1 and t1.usercode > 100
|
where t1.status = 0 and t1.is_anchor = 1 and t2.index_display = 1 and t1.usercode > 100
|
||||||
<if test="query.cityId != null and query.cityId != ''">
|
<if test="query.type != null and query.type == 3">
|
||||||
and t1.city_id = #{query.cityId}
|
<if test="query.cityId != null and query.cityId != ''">
|
||||||
|
and t1.city_id = #{query.cityId}
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
<if test="query.cityId != null and query.cityId != ''">
|
<if test="query.price != null and query.price != 0">
|
||||||
and t1.city_id = #{query.cityId}
|
and t2.price = #{query.price}
|
||||||
</if>
|
</if>
|
||||||
<if test="query.onlineStatus != null">
|
<if test="query.onlineStatus != null">
|
||||||
and t3.status = #{query.onlineStatus}
|
and t3.status = #{query.onlineStatus}
|
||||||
@@ -122,6 +130,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="query.type == 3">
|
<if test="query.type == 3">
|
||||||
order by t2.top_show_rank desc
|
order by t2.top_show_rank desc
|
||||||
</if>
|
</if>
|
||||||
|
<if test="query.type == 4">
|
||||||
|
order by t2.service_time desc
|
||||||
|
</if>
|
||||||
|
<if test="query.type == 5">
|
||||||
|
order by t2.anchor_total_coin desc
|
||||||
|
</if>
|
||||||
|
<if test="query.type == 6">
|
||||||
|
<if test="query.cityId != null and query.cityId != ''">
|
||||||
|
order by city_desc
|
||||||
|
</if>
|
||||||
|
<if test="query.cityId == null or query.cityId == ''">
|
||||||
|
order by t2.top_show_rank desc
|
||||||
|
</if>
|
||||||
|
</if>
|
||||||
</if>
|
</if>
|
||||||
</select>
|
</select>
|
||||||
<select id="anchorStatus" resultType="com.ruoyi.cai.dto.app.vo.anchor.AnchorStatusDTO">
|
<select id="anchorStatus" resultType="com.ruoyi.cai.dto.app.vo.anchor.AnchorStatusDTO">
|
||||||
@@ -141,5 +163,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="incsTotalIcon">
|
||||||
|
update cai_anchor
|
||||||
|
set anchor_total_coin = anchor_total_coin + #{amount}
|
||||||
|
where user_id = #{userId}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user