1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
package com.hxzk.service.impl;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hxzk.mapper.MapShowDao;
import com.hxzk.pojo.TbMapShow;
import com.hxzk.pojo.TbMessageHistory;
import com.hxzk.service.MapShowService;
import org.springframework.stereotype.Service;
 
import java.util.List;
@Service
public
class MapShowServiceImpl extends ServiceImpl<MapShowDao, TbMapShow> implements MapShowService {
 
    @Override
    public PageInfo<TbMapShow> findAll(Integer page, Integer limit) {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("type","三维地图");
        PageHelper.startPage(page,limit);
        List<TbMapShow> cardList = baseMapper.selectList(queryWrapper);
        PageInfo<TbMapShow> info = new PageInfo<>(cardList);
        return info;
    }
 
    @Override
    public List<TbMapShow> findAll() {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        return baseMapper.selectList(queryWrapper);
    }
 
    @Override
    public int upMapShow(TbMapShow mapShow) {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id",mapShow.getId());
        return baseMapper.update(mapShow,queryWrapper);
    }
 
    @Override
    public void UpBaiDuMap(String ishow,String typename) {
        TbMapShow mapShow = new TbMapShow();
        mapShow.setId(2L);
        mapShow.setIshow(ishow);
        mapShow.setType(typename);
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id",mapShow.getId());
        baseMapper.update(mapShow,queryWrapper);
    }
 
    @Override
    public void upErWei(String ishow) {
        TbMapShow mapShow = new TbMapShow();
        mapShow.setId(3L);
        mapShow.setIshow(ishow);
        QueryWrapper queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("id",mapShow.getId());
        baseMapper.update(mapShow,queryWrapper);
    }
 
    @Override
    public void upColor(String color) {
        QueryWrapper queryWrapper = new QueryWrapper<>();
        TbMapShow mapShow = new TbMapShow();
        mapShow.setColor(color);
        baseMapper.update(mapShow,queryWrapper);
    }
}