|
|
@@ -1,6 +1,7 @@
|
|
|
package com.cyksj.web.controller.manage;
|
|
|
|
|
|
import cn.dev33.satoken.annotation.SaCheckPermission;
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Assert;
|
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
|
@@ -15,6 +16,7 @@ import com.cyksj.mapper.OrderDonMapper;
|
|
|
import com.cyksj.mapper.UserFuncPropertyMapper;
|
|
|
import com.cyksj.mapper.UserMapper;
|
|
|
import com.cyksj.mapper.corp.CorpUserFollowRelationMapper;
|
|
|
+import com.cyksj.mapper.market.task.UserBindDetailMapper;
|
|
|
import com.cyksj.model.entity.*;
|
|
|
import com.cyksj.model.manage.views.UserView;
|
|
|
import com.cyksj.model.request.UserBalanceReq;
|
|
|
@@ -59,6 +61,8 @@ public class CmsUserController{
|
|
|
|
|
|
private final UserMapper userMapper;
|
|
|
|
|
|
+ private final UserBindDetailMapper userBindDetailMapper;
|
|
|
+
|
|
|
private final GroupRelationClearService groupRelationClearService;
|
|
|
|
|
|
private final GroupsRelationMapper groupsRelationMapper;
|
|
|
@@ -72,7 +76,7 @@ public class CmsUserController{
|
|
|
private final UserBenefitsService UserBenefitsService;
|
|
|
|
|
|
@GetMapping("/get")
|
|
|
- public Result<SearchResult<UserView>> get(String otherPhone, Long sharedId, String userid, Long businessId, String sort, String order) {
|
|
|
+ public Result<SearchResult<UserView>> get(Long id, String otherPhone, Long sharedId, String userid, Long businessId, String sort, String order) {
|
|
|
MapBuilder builder = MapUtils.flatBuilder(request.getParameterMap());
|
|
|
String otherSql = StrUtil.EMPTY;
|
|
|
if (StrUtil.isNotBlank(otherPhone)) {
|
|
|
@@ -84,6 +88,12 @@ public class CmsUserController{
|
|
|
}
|
|
|
otherSql += String.format("us.shared_id in (select user_id from user_distribute where business_id = %s)", businessId);
|
|
|
}
|
|
|
+ if (id != null) {
|
|
|
+ List<Long> relationUserIdList = userBindRelationService.getRelationUserIdList(id, null);
|
|
|
+ if (CollUtil.isNotEmpty(relationUserIdList)) {
|
|
|
+ builder.field(UserView::getId, relationUserIdList).op(Operator.InList);
|
|
|
+ }
|
|
|
+ }
|
|
|
if (StrUtil.isNotBlank(otherSql)) {
|
|
|
builder.put("otherConditionSql", otherSql);
|
|
|
}
|
|
|
@@ -106,6 +116,16 @@ public class CmsUserController{
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 查看排除绑定重复用户数 真实用户数
|
|
|
+ */
|
|
|
+ @GetMapping("/get/real/userNum")
|
|
|
+ public Result<Integer> getRealUserNum() {
|
|
|
+ Integer unBindUserNum = userMapper.selectUnBindUserNum();
|
|
|
+ Integer bindUserNum = userBindDetailMapper.selectCount(null);
|
|
|
+ return GatewayResponse.SUCCESS.newBuilder().toResult(unBindUserNum + bindUserNum);
|
|
|
+ }
|
|
|
+
|
|
|
/**
|
|
|
* 修改用户的拉黑状态
|
|
|
*/
|