fei.wang
2024-05-13 b9b58b9ef261cb290d93465f88a2cbd814b576f0
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
package com.flow.service.impl;
 
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.flow.mapper.DuanxinlogMapper;
import com.flow.pojo.Duanxinlog;
import com.flow.service.DuanxinlogService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
 
@Service
public class DuanxinlogServiceImpl  extends ServiceImpl<DuanxinlogMapper, Duanxinlog>  implements DuanxinlogService {
 
    @Autowired
    DuanxinlogMapper duanxinlogMapper;
 
    @Override
    public PageInfo<Duanxinlog> FindDuanxinlog(Integer page, Integer limit) {
        PageHelper.startPage(page, limit);
        List<Duanxinlog> cardList = this.duanxinlogMapper.FindDuanxinlog();
        PageInfo<Duanxinlog> info = new PageInfo(cardList);
        return info;
    }
    public int DeleteDuanxinlog(String id) {
        return ((DuanxinlogMapper) this.baseMapper).deleteById(id);
    }
    public int addDuanxinlog(Duanxinlog duanxinlog) {
        Date date = new Date();
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
        duanxinlog.setDispatchdate(formatter.format(date));
        return ((DuanxinlogMapper)this.baseMapper).insert(duanxinlog);
    }
 
    public String userdate(String Zong) {
        return this.duanxinlogMapper.userdate(Zong);
    }
 
}