feiyu02
2024-08-15 196bb14112448857a885e32dc4149e308e00b01a
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
package cn.flightfeather.supervision.lightshare.service.Impl
 
import cn.flightfeather.supervision.domain.entity.Complaint
import cn.flightfeather.supervision.domain.entity.Punishment
import cn.flightfeather.supervision.domain.mapper.ComplaintMapper
import cn.flightfeather.supervision.domain.mapper.PunishmentMapper
import cn.flightfeather.supervision.lightshare.service.ComplaintService
import org.springframework.stereotype.Service
import tk.mybatis.mapper.entity.Example
 
@Service
class ComplaintServiceImpl(
        val complaintMapper: ComplaintMapper,
        val punishmentMapper: PunishmentMapper
): ComplaintService{
 
    override fun getComplaints(userId: String): List<Complaint> {
        return complaintMapper.selectByExample(Example(Complaint::class.java).apply {
            createCriteria().andEqualTo("cpSceneid", userId)
            orderBy("cpTime").desc()
        })
    }
 
    override fun saveComplaint(info: Complaint): Int {
        // TODO: 2023/3/20 not yet implemented
        return 0
    }
 
    override fun updateComplaint(info: Complaint): Int {
        // TODO: 2023/3/20 not yet implemented
        return 0
    }
 
    override fun getPunishment(userId: String): List<Punishment> {
        return punishmentMapper.selectByExample(Example(Punishment::class.java).apply {
            createCriteria().andEqualTo("pmSceneId", userId)
            orderBy("pmTime").desc()
        })
    }
 
    override fun savePunishment(info: Punishment): Int {
        // TODO: 2023/3/20 not yet implemented
        return 0
    }
 
    override fun updatePunishment(info: Punishment): Int {
        // TODO: 2023/3/20 not yet implemented
        return 0
    }
}