Commit 2f739f6e by YG8429

分享活动绑定查询修改

parent d2894fd0
...@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController; ...@@ -17,6 +17,7 @@ import share.common.core.controller.BaseController;
import share.common.core.domain.AjaxResult; import share.common.core.domain.AjaxResult;
import share.common.enums.BusinessType; import share.common.enums.BusinessType;
import share.system.domain.SConsumer; import share.system.domain.SConsumer;
import share.system.domain.vo.SConsumerVo;
import share.system.service.SConsumerService; import share.system.service.SConsumerService;
import share.common.utils.poi.ExcelUtil; import share.common.utils.poi.ExcelUtil;
import share.common.core.page.TableDataInfo; import share.common.core.page.TableDataInfo;
...@@ -34,6 +35,8 @@ public class SConsumerController extends BaseController ...@@ -34,6 +35,8 @@ public class SConsumerController extends BaseController
@Autowired @Autowired
private SConsumerService sConsumerService; private SConsumerService sConsumerService;
/** /**
* 查询会员用户列表 * 查询会员用户列表
*/ */
...@@ -46,6 +49,18 @@ public class SConsumerController extends BaseController ...@@ -46,6 +49,18 @@ public class SConsumerController extends BaseController
return getDataTable(list); return getDataTable(list);
} }
/**
* 查询会员用户列表
*/
// @PreAuthorize("@ss.hasPermi('system:consumer:list')")
@GetMapping("/selectConsumernotById")
public TableDataInfo selectConsumernotById(SConsumerVo sConsumer)
{
return sConsumerService.selectConsumernotById(sConsumer);
}
@GetMapping("/query") @GetMapping("/query")
public AjaxResult query() { public AjaxResult query() {
return success(sConsumerService.selectSConsumerList(new SConsumer())); return success(sConsumerService.selectSConsumerList(new SConsumer()));
......
...@@ -40,4 +40,13 @@ public class SConsumerVo extends SConsumer { ...@@ -40,4 +40,13 @@ public class SConsumerVo extends SConsumer {
private MemberConfigVo memberConfig; private MemberConfigVo memberConfig;
private Integer pageNum;
private Integer pageSize;
private Long newId;
} }
package share.system.service; package share.system.service;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import share.common.core.page.TableDataInfo;
import share.system.domain.SConsumer; import share.system.domain.SConsumer;
import share.system.domain.vo.SConsumerVo; import share.system.domain.vo.SConsumerVo;
import share.system.request.RegisterThirdSConsumerRequest; import share.system.request.RegisterThirdSConsumerRequest;
...@@ -128,4 +129,7 @@ public interface SConsumerService extends IService<SConsumer> ...@@ -128,4 +129,7 @@ public interface SConsumerService extends IService<SConsumer>
boolean unbind(SConsumer request); boolean unbind(SConsumer request);
boolean bind(SConsumer request); boolean bind(SConsumer request);
TableDataInfo selectConsumernotById(SConsumerVo sConsumer);
} }
...@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -13,6 +13,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import share.common.constant.SmsConstants; import share.common.constant.SmsConstants;
import share.common.core.page.TableDataInfo;
import share.common.enums.ConsumerCouponUseStatusEnum; import share.common.enums.ConsumerCouponUseStatusEnum;
import share.common.enums.PositionEnum; import share.common.enums.PositionEnum;
import share.common.enums.RoleTypeEnum; import share.common.enums.RoleTypeEnum;
...@@ -25,14 +26,19 @@ import share.system.domain.*; ...@@ -25,14 +26,19 @@ import share.system.domain.*;
import share.system.domain.vo.FrontTokenComponent; import share.system.domain.vo.FrontTokenComponent;
import share.system.domain.vo.MemberConfigVo; import share.system.domain.vo.MemberConfigVo;
import share.system.domain.vo.SConsumerVo; import share.system.domain.vo.SConsumerVo;
import share.system.mapper.ConsumerMemberMapper;
import share.system.mapper.SConsumerMapper; import share.system.mapper.SConsumerMapper;
import share.system.mapper.SStoreConsumerMapper; import share.system.mapper.SStoreConsumerMapper;
import share.system.request.RegisterThirdSConsumerRequest; import share.system.request.RegisterThirdSConsumerRequest;
import share.system.service.*; import share.system.service.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Comparator;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
/** /**
* 会员用户Service业务层处理 * 会员用户Service业务层处理
...@@ -61,6 +67,12 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer ...@@ -61,6 +67,12 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
@Autowired @Autowired
private MemberProgressLogService memberProgressLogService; private MemberProgressLogService memberProgressLogService;
@Autowired
private SConsumerService sConsumerService;
/** /**
* 查询会员用户 * 查询会员用户
* *
...@@ -326,6 +338,31 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer ...@@ -326,6 +338,31 @@ public class SConsumerServiceImpl extends ServiceImpl<SConsumerMapper, SConsumer
return flag; return flag;
} }
@Override
public TableDataInfo selectConsumernotById(SConsumerVo sConsumer) {
List<ConsumerMember> consumerMembers = consumerMemberService
.list(new LambdaQueryWrapper<ConsumerMember>()
.eq(ConsumerMember::getIsRights,YesNoEnum.yes.getIndex())
.ne(ConsumerMember::getConsumerId,sConsumer.getNewId()));
List<Long> collect = consumerMembers.stream().map(ConsumerMember::getConsumerId).collect(Collectors.toList());
LambdaQueryWrapper<SConsumer> uSConsumer = new LambdaQueryWrapper<SConsumer>();
uSConsumer.in(SConsumer::getId,collect);
int count = consumerMemberService.count(
new LambdaQueryWrapper<ConsumerMember>()
.eq(ConsumerMember::getIsRights, YesNoEnum.yes.getIndex())
.ne(ConsumerMember::getConsumerId, sConsumer.getNewId()));
List<SConsumer> userMap = sConsumerService.list(uSConsumer);
int start = (sConsumer.getPageNum() - 1) * sConsumer.getPageSize();
int end = Math.min(start + sConsumer.getPageSize(), count);
List<SConsumer> pagedList = userMap.subList(start, end);
TableDataInfo tableDataInfo = new TableDataInfo();
tableDataInfo.setRows(pagedList);
tableDataInfo.setTotal(count);
tableDataInfo.setCode(200);
tableDataInfo.setMsg("查询成功");
return tableDataInfo;
}
@Override @Override
public int addCleanConsumer(SConsumer sConsumer) { public int addCleanConsumer(SConsumer sConsumer) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment