增加交易圈当日统计功能
This commit is contained in:
parent
307f01147f
commit
81707c14e1
@ -89,4 +89,12 @@ public class AdminGroupInfoController {
|
|||||||
List<GroupCollectVO> list = groupInfoService.queryCollect(query, backendUserVO);
|
List<GroupCollectVO> list = groupInfoService.queryCollect(query, backendUserVO);
|
||||||
return CommonResult.success(list);
|
return CommonResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("后台查询交易圈当日统计")
|
||||||
|
@PostMapping("/admin/group/collect/queryToday")
|
||||||
|
public CommonResult<GroupCollectVO> queryTodayCollect(@Validated @RequestBody @ApiParam(required = true) OnlyIdQuery query,
|
||||||
|
@RequestAttribute(value = "backendUser", required = false) BackendUserVO backendUserVO) {
|
||||||
|
GroupCollectVO vo = groupInfoService.queryTodayCollect(query, backendUserVO);
|
||||||
|
return CommonResult.success(vo);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -28,9 +28,9 @@ import com.upchina.group.entity.GroupInfo;
|
|||||||
import com.upchina.group.entity.GroupSortEntity;
|
import com.upchina.group.entity.GroupSortEntity;
|
||||||
import com.upchina.group.mapper.GroupCollectMapper;
|
import com.upchina.group.mapper.GroupCollectMapper;
|
||||||
import com.upchina.group.mapper.GroupInfoMapper;
|
import com.upchina.group.mapper.GroupInfoMapper;
|
||||||
import com.upchina.group.query.*;
|
import com.upchina.group.query.QueryGroupCollectQuery;
|
||||||
import com.upchina.group.vo.GroupCollectVO;
|
|
||||||
import com.upchina.group.query.info.*;
|
import com.upchina.group.query.info.*;
|
||||||
|
import com.upchina.group.vo.GroupCollectVO;
|
||||||
import com.upchina.group.vo.GroupVO;
|
import com.upchina.group.vo.GroupVO;
|
||||||
import com.upchina.rbac.entity.UserDept;
|
import com.upchina.rbac.entity.UserDept;
|
||||||
import com.upchina.rbac.service.AuthService;
|
import com.upchina.rbac.service.AuthService;
|
||||||
@ -316,4 +316,12 @@ public class GroupInfoService {
|
|||||||
groupCache.delete(CacheKey.GroupKey.GROUP_INFO + id);
|
groupCache.delete(CacheKey.GroupKey.GROUP_INFO + id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public GroupCollectVO queryTodayCollect(OnlyIdQuery query, BackendUserVO backendUserVO) {
|
||||||
|
Integer groupId = query.getId();
|
||||||
|
LocalDate date = LocalDate.now();
|
||||||
|
GroupCollect groupCollect = groupCollectMapper.selectOne(Wrappers.<GroupCollect>lambdaQuery()
|
||||||
|
.eq(GroupCollect::getGroupId, groupId)
|
||||||
|
.eq(GroupCollect::getDate, date));
|
||||||
|
return groupCollect == null ? new GroupCollectVO(groupId, date) : new GroupCollectVO(groupCollect);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -46,6 +46,22 @@ public class GroupCollectVO {
|
|||||||
@ApiModelProperty("用户发布私聊数")
|
@ApiModelProperty("用户发布私聊数")
|
||||||
private Integer customerPrivateContent;
|
private Integer customerPrivateContent;
|
||||||
|
|
||||||
|
public GroupCollectVO(Integer groupId, LocalDate date) {
|
||||||
|
this.groupId = groupId;
|
||||||
|
this.date = date;
|
||||||
|
this.totalMembers = 0;
|
||||||
|
this.visitedMembers = 0;
|
||||||
|
this.newMembers = 0;
|
||||||
|
this.interactionMembers = 0;
|
||||||
|
this.privateChatMembers = 0;
|
||||||
|
this.advisorGroupContent = 0;
|
||||||
|
this.assistantGroupContent = 0;
|
||||||
|
this.customerGroupContent = 0;
|
||||||
|
this.advisorPrivateContent = 0;
|
||||||
|
this.assistantPrivateContent = 0;
|
||||||
|
this.customerPrivateContent = 0;
|
||||||
|
}
|
||||||
|
|
||||||
public GroupCollectVO(GroupCollect collect) {
|
public GroupCollectVO(GroupCollect collect) {
|
||||||
this.groupId = collect.getGroupId();
|
this.groupId = collect.getGroupId();
|
||||||
this.date = collect.getDate();
|
this.date = collect.getDate();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user