bug
This commit is contained in:
@@ -0,0 +1,26 @@
|
|||||||
|
package com.peanut.modules.common.controller;
|
||||||
|
|
||||||
|
import com.peanut.common.utils.R;
|
||||||
|
import com.peanut.modules.common.service.TaihuWelfareService;
|
||||||
|
import com.peanut.modules.common.to.ParamTo;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@RestController("commonTaihuWelfare")
|
||||||
|
@RequestMapping("common/taihuWelfare")
|
||||||
|
public class TaihuWelfareController {
|
||||||
|
@Autowired
|
||||||
|
private TaihuWelfareService taihuWelfareService;
|
||||||
|
|
||||||
|
@RequestMapping("/getTaihuWelfareArticleList")
|
||||||
|
public R getTaihuWelfareArticleList(@RequestBody ParamTo param){
|
||||||
|
return taihuWelfareService.getTaihuWelfareArticleList(param);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
package com.peanut.modules.common.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.peanut.common.utils.R;
|
||||||
|
import com.peanut.modules.common.entity.TaihuWelfareEntity;
|
||||||
|
import com.peanut.modules.common.to.ParamTo;
|
||||||
|
|
||||||
|
public interface TaihuWelfareService extends IService<TaihuWelfareEntity> {
|
||||||
|
|
||||||
|
R getTaihuWelfareArticleList(ParamTo param);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
package com.peanut.modules.common.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.common.utils.R;
|
||||||
|
import com.peanut.modules.common.dao.TaihuWelfareDao;
|
||||||
|
import com.peanut.modules.common.entity.TaihuWelfareEntity;
|
||||||
|
import com.peanut.modules.common.service.TaihuWelfareService;
|
||||||
|
import com.peanut.modules.common.to.ParamTo;
|
||||||
|
|
||||||
|
public class TaihuWelfareServiceImpl extends ServiceImpl<TaihuWelfareDao, TaihuWelfareEntity> implements TaihuWelfareService {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R getTaihuWelfareArticleList(ParamTo param) {
|
||||||
|
LambdaQueryWrapper<TaihuWelfareEntity> wrapper = new LambdaQueryWrapper<>();
|
||||||
|
wrapper.orderByAsc(TaihuWelfareEntity::getSort);
|
||||||
|
Page<TaihuWelfareEntity> taihuWelfareEntityPage = this.getBaseMapper().selectPage(new Page<>(param.getPage(), param.getLimit()), wrapper);
|
||||||
|
return R.ok().put("page",taihuWelfareEntityPage);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user