package comdianservice;import comdiandomainYonghu;import comdianmapperYonghuMapper;import comgithubpagehelperPage;import comgithubpagehelperPageHelper;import orgspringframeworkstereotypeService;import
这段代码是一个Java类,名为YonghuService,是一个服务类,用于提供对YonghuMapper操作的封装方法。其中包括以下方法:
- deleteByPrimaryKey(Integer id):根据主键id删除一条记录。
- insert(Yonghu entify):插入一条记录。
- insertSelective(Yonghu entify):插入一条记录,只插入非空字段。
- selectByPrimaryKey(Integer id):根据主键id查询一条记录。
- updateByPrimaryKeySelective(Yonghu entify):根据主键id更新一条记录,只更新非空字段。
- updateByPrimaryKey(Yonghu entify):根据主键id更新一条记录。
- selectByPage(Integer pageIndex, Integer pageSize, String searchKey):分页查询记录。
- login(String yonghuming, String mima, Integer juese):用户登录验证。
- list(Yonghu yonghu):查询所有记录。
其中@Resource注解表示将YonghuMapper注入到YonghuService中,使得YonghuService可以使用YonghuMapper中的方法。@Service注解表示该类是一个服务类,用于提供业务逻辑处理
原文地址: https://www.cveoy.top/t/topic/dqhU 著作权归作者所有。请勿转载和采集!