admin 管理员组

文章数量: 887021


2023年12月22日发(作者:linux 查看端口)

package ;import ;/** * @Author: hw * @Date: 2019/9/24 10:01 * @Description: TODO * @Version: 1.0 */@Datapublic class Account { private int id ; private String name ; private double money;}controller

package ller;import rapper;import ;import ;import t;import tMapper;import ntService;import red;import ping;import tMapping;import tParam;import ntroller;import ;/** * @Author: hw * @Date: 2019/9/24 11:03 * @Description: TODO * @Version: 1.0 */@RestController@RequestMapping("/account")public class AccountController { @Autowired private IAccountService accountService; @GetMapping("/list1") public List findAll(@RequestParam("pageNo") int pageNo,@RequestParam("pageSize") int pageSize){ QueryWrapper wrapper = new QueryWrapper<>(); ("id",1); IPage accountIPage = PageVo(new Page(pageNo, pageSize), 0); List records = ords(); n("总页数: "+es()); n("总记录数: "+al()); return records;// return All(); } @GetMapping("/list2") public List findList(){ return All(); }}service

package e;import ;import ;import t;import ce;import ;import ;/** *

* 服务类 *

* * @author sonhai * @since 2019-09-24 */public interface IAccountService extends IService { IPage selectPageVo(Page page, Integer id); List selectAll();}serviceimpl

package ;import ;import ;import ;import t;import tMapper;import ntService;import eImpl;import red;import e;import ;/** *

* 服务实现类 *

* * @author sonhai * @since 2019-09-24 */@Service@DS("slave")public class AccountServiceImpl extends ServiceImpl implements IAccountService { @Autowired private AccountMapper accountMapper; @Override public IPage selectPageVo(Page page, Integer id) { return PageVo(page,id); } @DS("master") @Override public List selectAll() { return List(null); }}mapper

trollerMappingHyphenStyle(true); lePrefix(uleName() + "_"); ategy(strategy); plateEngine(new FreemarkerTemplateEngine()); e(); }}


本文标签: 查看 服务 实现 端口 作者