This commit is contained in:
wuchunlei
2024-05-27 14:52:55 +08:00
12 changed files with 169 additions and 11 deletions

View File

@@ -0,0 +1,10 @@
package com.peanut.modules.master.service;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.peanut.modules.common.entity.TaihuWelfareEntity;
public interface TaihuWelfareService extends IService<TaihuWelfareEntity> {
Page getArticleList(int page,int limit);
}

View File

@@ -44,7 +44,8 @@ public class ShopStoreToProductServiceImpl extends ServiceImpl<ShopStoreToProduc
.stream().map(ShopStoreToProductEntity::getProductId).collect(Collectors.toList());
LambdaQueryWrapper<ShopProduct> shopProductLambdaQueryWrapper = new LambdaQueryWrapper<>();
shopProductLambdaQueryWrapper.like(StringUtils.isNotBlank(param.getKeywords()),ShopProduct::getProductName,param.getKeywords());
shopProductLambdaQueryWrapper.notIn(ShopProduct::getProductId,collect);
shopProductLambdaQueryWrapper.eq(param.getType().equals("00"),ShopProduct::getGoodsType,param.getType());
shopProductLambdaQueryWrapper.notIn(collect.size()>0,ShopProduct::getProductId,collect);
Page<ShopProduct> shopProductPage = shopProductDao.selectPage(new Page<>(param.getPage(), param.getLimit()), shopProductLambdaQueryWrapper);
return shopProductPage;
}
@@ -69,6 +70,9 @@ public class ShopStoreToProductServiceImpl extends ServiceImpl<ShopStoreToProduc
@Override
public R editStoreProductSort(Map<String, Integer> map) {
ShopStoreToProductEntity info = this.getById(map.get("id"));
if (info==null){
return R.error("查找失败!");
}
info.setSort(map.get("sort"));
this.updateById(info);
return R.ok().put("result",info);

View File

@@ -0,0 +1,21 @@
package com.peanut.modules.master.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.peanut.modules.common.dao.TaihuWelfareDao;
import com.peanut.modules.common.entity.TaihuWelfareEntity;
import com.peanut.modules.master.service.TaihuWelfareService;
import org.springframework.stereotype.Service;
@Service("masterTaihuWelfareService")
public class TaihuWelfareServiceImpl extends ServiceImpl<TaihuWelfareDao, TaihuWelfareEntity> implements TaihuWelfareService {
@Override
public Page getArticleList(int page, int limit) {
LambdaQueryWrapper<TaihuWelfareEntity> wrapper = new LambdaQueryWrapper<>();
wrapper.orderByAsc(TaihuWelfareEntity::getSort);
Page<TaihuWelfareEntity> taihuWelfareEntityPage = this.getBaseMapper().selectPage(new Page<>(page, limit), wrapper);
return taihuWelfareEntityPage;
}
}