这段代码是一个Java类,名为YonghuService,是一个服务类,用于提供对YonghuMapper操作的封装方法。其中包括以下方法:

  1. deleteByPrimaryKey(Integer id):根据主键id删除一条记录。
  2. insert(Yonghu entify):插入一条记录。
  3. insertSelective(Yonghu entify):插入一条记录,只插入非空字段。
  4. selectByPrimaryKey(Integer id):根据主键id查询一条记录。
  5. updateByPrimaryKeySelective(Yonghu entify):根据主键id更新一条记录,只更新非空字段。
  6. updateByPrimaryKey(Yonghu entify):根据主键id更新一条记录。
  7. selectByPage(Integer pageIndex, Integer pageSize, String searchKey):分页查询记录。
  8. login(String yonghuming, String mima, Integer juese):用户登录验证。
  9. list(Yonghu yonghu):查询所有记录。

其中@Resource注解表示将YonghuMapper注入到YonghuService中,使得YonghuService可以使用YonghuMapper中的方法。@Service注解表示该类是一个服务类,用于提供业务逻辑处理

package comdianservice;import comdiandomainYonghu;import comdianmapperYonghuMapper;import comgithubpagehelperPage;import comgithubpagehelperPageHelper;import orgspringframeworkstereotypeService;import

原文地址: https://www.cveoy.top/t/topic/dqhU 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录