Ssm uses full annotations to add, delete, modify, and query cases: DeptServiceImpl and ssmdeptserviceimpl
DeptServiceImpl for adding, deleting, modifying, and querying cases using full annotations in ssm
/*** @ Title: DeptServiceImpl. java * @ Package org. service. impl * @ Description: TODO: * @ author A18ccms A18ccms_gmail_com * @ date 11:04:09 * @ version V1.0 */package org. service. impl; import java. util. list; import org. dao. IDeptMapper; import org. entity. dept; import org. service. IDeptService; import org. springframework. beans. factory. annotation. autowired; import org. springframework. stereotype. component;/***** Project name: test_springmvc_16qn2 * Class Name: DeptServiceImpl * class description: * created by: Mu Xiongxiong * created by: 11:04:09 * modified: mu Xiongxiong * modification time: 11:04:09 * modification remarks: * @ version ** // injection transaction @ Componentpublic class DeptServiceImpl implements IDeptService {// Department @ Autowired private IDeptMapper deptMapper; /** (non-Javadoc) * <p> Description (Description): delete </p> * <p> Title: deleteByPrimaryKey </p> * @ param id * @ return * @ see org. service. IDeptService # deleteByPrimaryKey (java. lang. integer) * // @ Override public int deleteByPrimaryKey (Integer id) {// TODO Auto-generated method stub return deptMapper. deleteByPrimaryKey (id);}/** (non-Javadoc) * <p> Description (Description): Add </p> * <p> Title: insert </p> * @ param record * @ return * @ see org. service. IDeptService # insert (org. entity. dept) */@ Override public int insert (Dept record) {return deptMapper. insert (record);}/** (non-Javadoc) * <p> Description (Description): query by number </p> * <p> Title: selectByPrimaryKey </p> * @ param id * @ return * @ see org. service. IDeptService # selectByPrimaryKey (java. lang. integer) * // @ Override public Dept selectByPrimaryKey (Integer id) {return deptMapper. selectByPrimaryKey (id);}/** (non-Javadoc) * <p> Description (Description): Modify </p> * <p> Title: updateByPrimaryKeySelective </p> * @ param record * @ return * @ see org. service. IDeptService # updateByPrimaryKeySelective (org. entity. dept) */@ Override public int updateByPrimaryKey (Dept record) {// TODO Auto-generated method stub return deptMapper. updateByPrimaryKey (record);}/** (non-Javadoc) * <p> Description (Description): Query all </p> * <p> Title: findDeptAll </p> * @ return * @ see org. service. IDeptService # findDeptAll () */@ Override public List <Dept> findDeptAll () {// TODO Auto-generated method stub return deptMapper. findDeptAll ();}}