MCPcopy Index your code
hub / github.com/fuce1314/Springboot_v2 / SysCityService

Class SysCityService

src/main/java/com/fc/v2/service/SysCityService.java:24–127  ·  view source on GitHub ↗

城市设置 SysCityService @Title: SysCityService.java @Package com.fc.v2.service @author fuce_自动生成 @email 115889198@qq.com @date 2019-10-04 21:15:13

Source from the content-addressed store, hash-verified

22 * @date 2019-10-04 21:15:13
23 **/
24@Service
25public class SysCityService {
26 @Autowired
27 private SysCityMapper sysCityMapper;
28
29
30 /**
31 * 分页查询
32 * @param pageNum
33 * @param pageSize
34 * @return
35 */
36 public PageInfo<SysCity> list(Tablepar tablepar,String name){
37 SysCityExample testExample=new SysCityExample();
38 testExample.setOrderByClause("id ASC");
39 if(name!=null&&!"".equals(name)){
40 testExample.createCriteria().andCityNameLike("%"+name+"%");
41 }
42
43 PageHelper.startPage(tablepar.getPage(), tablepar.getLimit());
44 List<SysCity> list= sysCityMapper.selectByExample(testExample);
45 PageInfo<SysCity> pageInfo = new PageInfo<SysCity>(list);
46 return pageInfo;
47 }
48
49
50 public int deleteByPrimaryKey(String ids) {
51 Integer[] integers = ConvertUtil.toIntArray(",", ids);
52 List<Integer> stringB = Arrays.asList(integers);
53 SysCityExample example=new SysCityExample();
54 example.createCriteria().andIdIn(stringB);
55 return sysCityMapper.deleteByExample(example);
56 }
57
58
59
60 public SysCity selectByPrimaryKey(Integer id) {
61 return sysCityMapper.selectByPrimaryKey(id);
62 }
63
64
65
66 public int updateByPrimaryKeySelective(SysCity record) {
67 return sysCityMapper.updateByPrimaryKeySelective(record);
68 }
69
70 /**
71 * 添加
72 */
73
74 public int insertSelective(SysCity record) {
75 //添加雪花主键id
76 record.setId(null);
77 return sysCityMapper.insertSelective(record);
78 }
79
80
81

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected