V13
This commit is contained in:
@@ -14,16 +14,20 @@ public class AnchorListQuery {
|
||||
* 1-活跃查询
|
||||
* 2-新人查询
|
||||
* 3-同城查询
|
||||
* 4-时长
|
||||
* 5-魅力
|
||||
* 6-附近
|
||||
*/
|
||||
@Schema(description = "类型 0-默认 1-活跃 2-新人 3-同城")
|
||||
@Schema(description = "类型 0-默认 1-活跃 2-新人 3-同城 4-时长 5-魅力 6-附近")
|
||||
private Integer type;
|
||||
|
||||
@Schema(hidden = true, description = "是否开启视频接听")
|
||||
private Integer openVideoStatus;
|
||||
@Schema(description = "金币搜索")
|
||||
private Integer price;
|
||||
|
||||
@Schema(description = "城市(同城查询使用)")
|
||||
private Integer cityId;
|
||||
|
||||
@Schema(hidden = true, description = "是否开启视频接听")
|
||||
private Integer openVideoStatus;
|
||||
@Schema(hidden = true)
|
||||
private Integer onlineStatus;
|
||||
@Schema(hidden = true)
|
||||
|
||||
@@ -16,6 +16,11 @@ public class AnchorListVo {
|
||||
@Schema(description = "在线状态 0=离线,1=在线")
|
||||
private Integer online;
|
||||
|
||||
/**
|
||||
* 服务时长(分钟)
|
||||
*/
|
||||
private Integer serviceTime;
|
||||
|
||||
@Schema(description = "用户ID")
|
||||
private Long userId;
|
||||
/**
|
||||
|
||||
@@ -15,4 +15,6 @@ public class AppHomeConfig {
|
||||
private String servId = "4";
|
||||
@Schema(description = "首页弹窗内容")
|
||||
private String homeDialogText;
|
||||
@Schema(description = "土豆客服账号")
|
||||
private String tdKf;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ import lombok.Setter;
|
||||
*/
|
||||
@Getter
|
||||
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_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)),
|
||||
|
||||
@@ -13,6 +13,9 @@ public enum AnchorListQueryTypeEnum {
|
||||
ACTIVE(1,"活跃查询"),
|
||||
NEW(2,"新人查询"),
|
||||
CITY(3,"同城查询"),
|
||||
SERVICE_TIME(4,"时长"),
|
||||
LOVE(5,"魅力"),
|
||||
LOCATION(6,"附近"),
|
||||
;
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
package com.ruoyi.cai.manager;
|
||||
|
||||
import com.ruoyi.cai.mapper.AccountMapper;
|
||||
import com.ruoyi.cai.mapper.AnchorMapper;
|
||||
import com.ruoyi.cai.service.AnchorService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -13,15 +16,19 @@ public class AccountTotalManager {
|
||||
|
||||
@Resource
|
||||
private AccountMapper accountMapper;
|
||||
@Resource
|
||||
private AnchorMapper anchorMapper;
|
||||
|
||||
public void incsGuardIncomeCoin(Long userId, Long amount, Long businessLogId){
|
||||
log.info("开始收入统计 守护: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
||||
accountMapper.incsGuardIncomeIcon(userId, amount);
|
||||
anchorMapper.incsTotalIcon(userId,amount);
|
||||
}
|
||||
|
||||
public void incsGiftIncomeCoin(Long userId, Long amount, Long businessLogId){
|
||||
log.info("开始收入统计 礼物: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
||||
accountMapper.incsGiftIncomeIcon(userId, amount);
|
||||
anchorMapper.incsTotalIcon(userId,amount);
|
||||
}
|
||||
|
||||
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) {
|
||||
log.info("开始收入统计 视频: userId={},amount={}, businessLogId={}", userId, amount, businessLogId);
|
||||
accountMapper.incsVideoIncomeIcon(userId, amount);
|
||||
anchorMapper.incsTotalIcon(userId,amount);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,4 +30,6 @@ public interface AnchorMapper extends BaseMapper<Anchor> {
|
||||
boolean incsServiceTimeAndCount(@Param("toUid") Long toUid, @Param("callTime") Long callTime, @Param("count") int count);
|
||||
|
||||
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
|
||||
public Page<AnchorListVo> pageAppV2(PageQuery pageQuery, AnchorListQuery query) {
|
||||
if(query.getType() != null && query.getType() != 3){
|
||||
query.setCityId(null);
|
||||
if(query.getType() != null){
|
||||
if(query.getType() != 3 && query.getType() != 6){
|
||||
query.setCityId(null);
|
||||
}
|
||||
}
|
||||
if(query.getType() == null){
|
||||
query.setType(AnchorListQueryTypeEnum.DEFAULT.getCode());
|
||||
|
||||
@@ -88,17 +88,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</if>
|
||||
</select>
|
||||
<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,
|
||||
t2.price,t3.status as online
|
||||
select t1.id as user_id,t1.avatar,t1.gender,t1.nickname,t1.usercode,t2.service_time,
|
||||
<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
|
||||
join cai_anchor t2 on t1.id = t2.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
|
||||
<if test="query.cityId != null and query.cityId != ''">
|
||||
and t1.city_id = #{query.cityId}
|
||||
<if test="query.type != null and query.type == 3">
|
||||
<if test="query.cityId != null and query.cityId != ''">
|
||||
and t1.city_id = #{query.cityId}
|
||||
</if>
|
||||
</if>
|
||||
<if test="query.cityId != null and query.cityId != ''">
|
||||
and t1.city_id = #{query.cityId}
|
||||
<if test="query.price != null and query.price != 0">
|
||||
and t2.price = #{query.price}
|
||||
</if>
|
||||
<if test="query.onlineStatus != null">
|
||||
and t3.status = #{query.onlineStatus}
|
||||
@@ -122,6 +130,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="query.type == 3">
|
||||
order by t2.top_show_rank desc
|
||||
</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>
|
||||
</select>
|
||||
<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>
|
||||
</select>
|
||||
|
||||
|
||||
<update id="incsTotalIcon">
|
||||
update cai_anchor
|
||||
set anchor_total_coin = anchor_total_coin + #{amount}
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user