|
@@ -1,7 +1,6 @@
|
|
package com.fire.admin.service.impl;
|
|
package com.fire.admin.service.impl;
|
|
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
|
import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
@@ -41,12 +40,7 @@ public class ChannelInfoServiceImpl extends ServiceImpl<ChannelInfoMapper, Chann
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public IPage<ChannelInfo> getChannelList(ChannelPageParam channelPageParam) {
|
|
public IPage<ChannelInfo> getChannelList(ChannelPageParam channelPageParam) {
|
|
- LambdaQueryWrapper<ChannelInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
|
|
|
- lambdaQueryWrapper.eq(channelPageParam.getChannelId() != null, ChannelInfo::getChannelId, channelPageParam.getChannelId())
|
|
|
|
- .eq(channelPageParam.getRelationId() != null, ChannelInfo::getSupplierId, channelPageParam.getRelationId())
|
|
|
|
- .like(channelPageParam.getChannelName() != null, ChannelInfo::getChannelName, channelPageParam.getChannelName())
|
|
|
|
- .eq(ChannelInfo::getIsDelete, 0);
|
|
|
|
- IPage<ChannelInfo> channelInfoList = baseMapper.selectPage(channelPageParam, lambdaQueryWrapper);
|
|
|
|
|
|
+ IPage<ChannelInfo> channelInfoList = baseMapper.selectChannelInfoList(channelPageParam);
|
|
if (channelInfoList != null) {
|
|
if (channelInfoList != null) {
|
|
for (ChannelInfo info : channelInfoList.getRecords()) {
|
|
for (ChannelInfo info : channelInfoList.getRecords()) {
|
|
info.setChannelProductInfos(channelProductService.getChannelProductList(info.getChannelId()));
|
|
info.setChannelProductInfos(channelProductService.getChannelProductList(info.getChannelId()));
|
|
@@ -90,12 +84,10 @@ public class ChannelInfoServiceImpl extends ServiceImpl<ChannelInfoMapper, Chann
|
|
public void insertChannelInfo(ChannelInfo channelInfo) {
|
|
public void insertChannelInfo(ChannelInfo channelInfo) {
|
|
channelInfo.setCreator("admin");
|
|
channelInfo.setCreator("admin");
|
|
channelInfo.setCreateTime(new Date());
|
|
channelInfo.setCreateTime(new Date());
|
|
-
|
|
|
|
int result = baseMapper.insert(channelInfo);
|
|
int result = baseMapper.insert(channelInfo);
|
|
if (result > 0) {
|
|
if (result > 0) {
|
|
// TODO: 2021/5/24 向MQ推送消息
|
|
// TODO: 2021/5/24 向MQ推送消息
|
|
}
|
|
}
|
|
-
|
|
|
|
}
|
|
}
|
|
|
|
|
|
@Override
|
|
@Override
|