bug
This commit is contained in:
@@ -23,11 +23,9 @@ public class TaihuWelfareController {
|
|||||||
return taihuWelfareService.getTaihuWelfareArticleList(param);
|
return taihuWelfareService.getTaihuWelfareArticleList(param);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/getTaihuWelfareProductList")
|
||||||
public R getTaihuWelfareProductList(){
|
public R getTaihuWelfareProductList(@RequestBody ParamTo param){
|
||||||
|
return taihuWelfareService.getTaihuWelfareProductList(param);
|
||||||
|
|
||||||
return null;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,4 +8,6 @@ import com.peanut.modules.common.to.ParamTo;
|
|||||||
public interface TaihuWelfareService extends IService<TaihuWelfareEntity> {
|
public interface TaihuWelfareService extends IService<TaihuWelfareEntity> {
|
||||||
|
|
||||||
R getTaihuWelfareArticleList(ParamTo param);
|
R getTaihuWelfareArticleList(ParamTo param);
|
||||||
|
|
||||||
|
R getTaihuWelfareProductList(ParamTo param);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,15 +3,22 @@ package com.peanut.modules.common.service.impl;
|
|||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.github.yulichang.wrapper.MPJLambdaWrapper;
|
||||||
import com.peanut.common.utils.R;
|
import com.peanut.common.utils.R;
|
||||||
|
import com.peanut.modules.common.dao.ShopStoreToProductDao;
|
||||||
import com.peanut.modules.common.dao.TaihuWelfareDao;
|
import com.peanut.modules.common.dao.TaihuWelfareDao;
|
||||||
|
import com.peanut.modules.common.entity.ShopProduct;
|
||||||
|
import com.peanut.modules.common.entity.ShopStoreToProductEntity;
|
||||||
import com.peanut.modules.common.entity.TaihuWelfareEntity;
|
import com.peanut.modules.common.entity.TaihuWelfareEntity;
|
||||||
import com.peanut.modules.common.service.TaihuWelfareService;
|
import com.peanut.modules.common.service.TaihuWelfareService;
|
||||||
import com.peanut.modules.common.to.ParamTo;
|
import com.peanut.modules.common.to.ParamTo;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@Service("commonTaihuWelfareService")
|
@Service("commonTaihuWelfareService")
|
||||||
public class TaihuWelfareServiceImpl extends ServiceImpl<TaihuWelfareDao, TaihuWelfareEntity> implements TaihuWelfareService {
|
public class TaihuWelfareServiceImpl extends ServiceImpl<TaihuWelfareDao, TaihuWelfareEntity> implements TaihuWelfareService {
|
||||||
|
@Autowired
|
||||||
|
private ShopStoreToProductDao shopStoreToProductDao;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public R getTaihuWelfareArticleList(ParamTo param) {
|
public R getTaihuWelfareArticleList(ParamTo param) {
|
||||||
@@ -20,4 +27,15 @@ public class TaihuWelfareServiceImpl extends ServiceImpl<TaihuWelfareDao, TaihuW
|
|||||||
Page<TaihuWelfareEntity> taihuWelfareEntityPage = this.getBaseMapper().selectPage(new Page<>(param.getPage(), param.getLimit()), wrapper);
|
Page<TaihuWelfareEntity> taihuWelfareEntityPage = this.getBaseMapper().selectPage(new Page<>(param.getPage(), param.getLimit()), wrapper);
|
||||||
return R.ok().put("page",taihuWelfareEntityPage);
|
return R.ok().put("page",taihuWelfareEntityPage);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R getTaihuWelfareProductList(ParamTo param) {
|
||||||
|
MPJLambdaWrapper<ShopStoreToProductEntity> wrapper = new MPJLambdaWrapper<>();
|
||||||
|
wrapper.selectAll(ShopProduct.class);
|
||||||
|
wrapper.leftJoin(ShopProduct.class,ShopProduct::getProductId,ShopStoreToProductEntity::getProductId);
|
||||||
|
wrapper.eq(ShopStoreToProductEntity::getStoreId,1);
|
||||||
|
wrapper.orderByAsc(ShopStoreToProductEntity::getSort);
|
||||||
|
Page<ShopStoreToProductEntity> shopStoreToProductEntityPage = shopStoreToProductDao.selectPage(new Page<>(param.getPage(), param.getLimit()), wrapper);
|
||||||
|
return R.ok().put("page",shopStoreToProductEntityPage);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user