init
This commit is contained in:
@@ -18,7 +18,7 @@ public interface AnchorService extends IService<Anchor> {
|
||||
|
||||
void joinAnchor(Long userId);
|
||||
|
||||
void closeAnchor(Long userId);
|
||||
boolean closeAnchor(Long userId);
|
||||
|
||||
Page<AnchorAdminVo> pageAdmin(PageQuery pageQuery, AnchorAdminVo bo);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@ import com.ruoyi.cai.domain.Dynamic;
|
||||
import com.ruoyi.cai.dto.admin.vo.DynamicAdminVo;
|
||||
import com.ruoyi.cai.dto.app.query.DynamicAddReq;
|
||||
import com.ruoyi.cai.dto.app.query.DynamicQuery;
|
||||
import com.ruoyi.cai.dto.app.query.IdRes;
|
||||
import com.ruoyi.cai.dto.app.vo.DynamicListVo;
|
||||
import com.ruoyi.common.core.domain.PageQuery;
|
||||
|
||||
@@ -34,4 +35,8 @@ public interface DynamicService extends IService<Dynamic> {
|
||||
void deleteDynamic(Long id);
|
||||
|
||||
void clearDynamic(Integer hours);
|
||||
|
||||
boolean auditSuccess(List<Long> ids);
|
||||
|
||||
boolean auditFail(Long id);
|
||||
}
|
||||
|
||||
@@ -39,6 +39,8 @@ public interface UserService extends IService<User> {
|
||||
|
||||
boolean removeUser(Long id);
|
||||
|
||||
void resetNickname(Long id);
|
||||
|
||||
void resetAvatar(Long id);
|
||||
|
||||
void refreshByAge();
|
||||
|
||||
@@ -75,7 +75,7 @@ public class AnchorServiceImpl extends ServiceImpl<AnchorMapper, Anchor> impleme
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public void closeAnchor(Long userId){
|
||||
public boolean closeAnchor(Long userId){
|
||||
User user = userService.getById(userId);
|
||||
Anchor anchor = this.getByUserId(userId);
|
||||
if(user == null){
|
||||
@@ -91,6 +91,7 @@ public class AnchorServiceImpl extends ServiceImpl<AnchorMapper, Anchor> impleme
|
||||
throw new ServiceException("取消主播失败");
|
||||
}
|
||||
this.removeById(anchor.getId());
|
||||
return boo;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -20,6 +20,7 @@ import com.ruoyi.cai.enums.SystemConfigEnum;
|
||||
import com.ruoyi.cai.manager.InnerUserFilter;
|
||||
import com.ruoyi.cai.manager.SystemConfigManager;
|
||||
import com.ruoyi.cai.mapper.DynamicMapper;
|
||||
import com.ruoyi.cai.notice.YunxinHttpService;
|
||||
import com.ruoyi.cai.service.CitysService;
|
||||
import com.ruoyi.cai.service.DynamicImagesService;
|
||||
import com.ruoyi.cai.service.DynamicService;
|
||||
@@ -64,6 +65,8 @@ public class DynamicServiceImpl extends ServiceImpl<DynamicMapper, Dynamic> impl
|
||||
private CitysService citysService;
|
||||
@Autowired
|
||||
private InnerUserFilter innerUserFilter;
|
||||
@Autowired
|
||||
private YunxinHttpService yunxinHttpService;
|
||||
|
||||
@Override
|
||||
public void unTop(Long id){
|
||||
@@ -215,4 +218,28 @@ public class DynamicServiceImpl extends ServiceImpl<DynamicMapper, Dynamic> impl
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean auditSuccess(List<Long> ids) {
|
||||
return this.update(Wrappers.lambdaUpdate(Dynamic.class)
|
||||
.set(Dynamic::getAuditStatus,AuditStatusEnum.SUCCESS.getCode())
|
||||
.eq(Dynamic::getAuditStatus,AuditStatusEnum.AUDITING.getCode())
|
||||
.in(Dynamic::getId,ids));
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean auditFail(Long id) {
|
||||
Dynamic dynamic = this.getById(id);
|
||||
if(dynamic == null){
|
||||
return false;
|
||||
}
|
||||
boolean update = this.update(Wrappers.lambdaUpdate(Dynamic.class)
|
||||
.set(Dynamic::getAuditStatus, AuditStatusEnum.FAIL.getCode())
|
||||
.eq(Dynamic::getAuditStatus, AuditStatusEnum.AUDITING.getCode())
|
||||
.eq(Dynamic::getId, id));
|
||||
if(update){
|
||||
yunxinHttpService.dynamicAuditMessage(dynamic.getUserId());
|
||||
}
|
||||
return update;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -129,6 +129,7 @@ public class RechargeOrderServiceImpl extends ServiceImpl<RechargeOrderMapper,Re
|
||||
resp.setSuccess(true);
|
||||
resp.setConsumeLogId(consumeLog.getId());
|
||||
resp.setUserId(user.getId());
|
||||
resp.setUser(user);
|
||||
resp.setTraceId(traceId);
|
||||
resp.setPrice(rechargeOrder.getPrice());
|
||||
resp.setRechargeCoin(rechargeOrder.getRechargeCoin());
|
||||
|
||||
@@ -15,6 +15,7 @@ import com.ruoyi.cai.dto.app.vo.user.UserInfoVo;
|
||||
import com.ruoyi.cai.dto.app.vo.user.UserListVo;
|
||||
import com.ruoyi.cai.enums.GenderEnum;
|
||||
import com.ruoyi.cai.mapper.UserMapper;
|
||||
import com.ruoyi.cai.notice.YunxinHttpService;
|
||||
import com.ruoyi.cai.service.*;
|
||||
import com.ruoyi.cai.util.UserUtil;
|
||||
import com.ruoyi.cai.ws.service.RoomService;
|
||||
@@ -242,6 +243,30 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements Us
|
||||
|
||||
@Resource
|
||||
private ImUserRefClient userRefClient;
|
||||
@Autowired
|
||||
private YunxinHttpService yunxinHttpService;
|
||||
|
||||
@Override
|
||||
public void resetNickname(Long id){
|
||||
User user = this.getById(id);
|
||||
if(user == null){
|
||||
return;
|
||||
}
|
||||
boolean update = this.update(Wrappers.lambdaUpdate(User.class)
|
||||
.eq(User::getId, user.getId())
|
||||
.set(User::getNickname, "用户" + user.getUsercode()));
|
||||
if(!update){
|
||||
return;
|
||||
}
|
||||
UpdateUinfoReq uinfoReq = new UpdateUinfoReq();
|
||||
uinfoReq.setAccid(user.getId()+"");
|
||||
uinfoReq.setName("用户"+user.getUsercode());
|
||||
YxCommonR r = userRefClient.updateUinfo(uinfoReq);
|
||||
if(!r.isSuccess()){
|
||||
log.error("云信更新失败,需要检查!{}", JSON.toJSONString(r));
|
||||
}
|
||||
yunxinHttpService.nickAuditMessage(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void resetAvatar(Long id) {
|
||||
|
||||
Reference in New Issue
Block a user