123
This commit is contained in:
@@ -2,6 +2,8 @@ package com.ruoyi.cai.controller.app;
|
||||
|
||||
|
||||
import com.ruoyi.cai.dto.app.query.AnchorUpdateReq;
|
||||
import com.ruoyi.cai.dto.app.query.anchor.UpdateOpenStatusReq;
|
||||
import com.ruoyi.cai.dto.app.query.anchor.UpdateOrderSwitchReq;
|
||||
import com.ruoyi.cai.dto.app.vo.AnchorJoinHomeVo;
|
||||
import com.ruoyi.cai.dto.app.vo.AnchorVo;
|
||||
import com.ruoyi.cai.dto.app.vo.CameraAuditVo;
|
||||
@@ -51,6 +53,25 @@ public class AnchorAppController {
|
||||
return R.ok(currentUserManager.anchorUpdate(anchorUpdate));
|
||||
}
|
||||
|
||||
@PostMapping("/updateOpenStatus")
|
||||
@Operation(summary = "修改视频通话")
|
||||
@Log(title = "修改视频通话", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||
public R<Boolean> updateOpenStatus(@RequestBody UpdateOpenStatusReq anchorUpdate){
|
||||
AnchorUpdateReq req = new AnchorUpdateReq();
|
||||
req.setOpenVideoStatus(anchorUpdate.getOpenVideoStatus());
|
||||
return R.ok(currentUserManager.anchorUpdate(req));
|
||||
}
|
||||
|
||||
|
||||
@PostMapping("/updateOrderSwitch")
|
||||
@Operation(summary = "是否隐藏通话次数")
|
||||
@Log(title = "是否隐藏通话次数", businessType = BusinessType.OTHER, isSaveDb = true)
|
||||
public R<Boolean> updateOrderSwitch(@RequestBody UpdateOrderSwitchReq anchorUpdate){
|
||||
AnchorUpdateReq req = new AnchorUpdateReq();
|
||||
req.setOrderSwitch(anchorUpdate.getOrderSwitch());
|
||||
return R.ok(currentUserManager.anchorUpdate(req));
|
||||
}
|
||||
|
||||
@GetMapping("/cameraAudit")
|
||||
@Operation(summary = "主播自拍认证")
|
||||
@Log(title = "主播自拍认证", businessType = BusinessType.OTHER, isSaveDb = false)
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.ruoyi.cai.dto.app.query.anchor;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UpdateOpenStatusReq {
|
||||
@Schema(description = "是否视频接听")
|
||||
private Integer openVideoStatus;
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.ruoyi.cai.dto.app.query.anchor;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class UpdateOrderSwitchReq {
|
||||
/**
|
||||
* 是否隐藏接单次数 1隐藏 2不隐藏
|
||||
*/
|
||||
@Schema(description = "是否隐藏接单次数")
|
||||
private Integer orderSwitch;
|
||||
}
|
||||
@@ -73,6 +73,9 @@ public class CurrentUserInfoVo {
|
||||
*/
|
||||
@Schema(description = "开启视频接听 0-否 1-是")
|
||||
private Integer openVideoStatus;
|
||||
|
||||
@Schema(description = "是否隐藏接单次数 1隐藏 2不隐藏")
|
||||
private Integer orderSwitch;
|
||||
/**
|
||||
* 状态 0 可用 1 不可用
|
||||
*/
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.ruoyi.cai.dto.app.vo.user.OnlineStatusVo;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
@@ -30,6 +31,12 @@ public class UserInfoVo {
|
||||
@Schema(description = "城市ID")
|
||||
private Integer cityId;
|
||||
|
||||
@Schema(description = "年龄")
|
||||
private Long age;
|
||||
|
||||
@Schema(description = "评分")
|
||||
private BigDecimal giveScore;
|
||||
|
||||
/**
|
||||
* 价格,默认50彩币
|
||||
*/
|
||||
|
||||
@@ -59,6 +59,7 @@ public class CurrentUserManager {
|
||||
res.setUserId(userId);
|
||||
Anchor anchor = anchorService.getByUserId(userId);
|
||||
res.setOpenVideoStatus(anchor == null ? 1 : anchor.getOpenVideoStatus());
|
||||
res.setOrderSwitch(anchor == null ? 2 : anchor.getOrderSwitch());
|
||||
UserCount userCount = userCountService.getByUserId(userId);
|
||||
res.setUserCount(BeanConvertUtil.convertTo(userCount, UserCountVo::new));
|
||||
Account account = accountService.getByUserId(userId);
|
||||
|
||||
@@ -30,6 +30,7 @@ import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* 用户Service业务层处理
|
||||
@@ -124,13 +125,16 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
vo.setAvatar(user.getAvatar());
|
||||
vo.setPrice(0L);
|
||||
vo.setServiceCount(0L);
|
||||
vo.setAge(user.getAge());
|
||||
vo.setOrderSwitch(1);
|
||||
vo.setGiveScore(BigDecimal.valueOf(5));
|
||||
if(anchor != null){
|
||||
vo.setPrice(anchor.getPrice());
|
||||
if(anchor.getOrderSwitch() == 2){ // 不隐藏接单数
|
||||
vo.setServiceCount(anchor.getServiceCount());
|
||||
}
|
||||
vo.setOrderSwitch(anchor.getOrderSwitch());
|
||||
vo.setGiveScore(anchor.getGiveScore());
|
||||
}
|
||||
vo.setCity(user.getCity());
|
||||
vo.setCityId(user.getCityId());
|
||||
|
||||
Reference in New Issue
Block a user