ny
昨天 b6f169fe43a2b13f351aefc152374fc7f0bc8cb7
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
70
71
72
73
74
75
76
77
78
79
80
81
package jnpf.flowable.service.impl;
 
import jnpf.base.service.SuperServiceImpl;
import jnpf.flowable.entity.DelegateEntity;
import jnpf.flowable.entity.DelegateInfoEntity;
import jnpf.flowable.mapper.DelegateInfoMapper;
import jnpf.flowable.model.delegate.DelegateCrForm;
import jnpf.flowable.model.delegate.DelegateListVO;
import jnpf.flowable.model.delegate.DelegatePagination;
import jnpf.flowable.model.delegate.DelegateUpForm;
import jnpf.flowable.model.message.DelegateModel;
import jnpf.flowable.service.DelegateInfoService;
import jnpf.flowable.util.FlowUtil;
import jnpf.flowable.util.MsgUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 
import java.util.List;
 
/**
 * 类的描述
 *
 * @author JNPF@YinMai Info. Co., Ltd
 * @version 5.0.x
 * @since 2024/9/2 13:41
 */
@Service
public class DelegateInfoServiceImpl extends SuperServiceImpl<DelegateInfoMapper, DelegateInfoEntity> implements DelegateInfoService {
 
    @Autowired
    private MsgUtil msgUtil;
    @Autowired
    private FlowUtil flowUtil;
 
 
    @Override
    public List<DelegateListVO> getList(DelegatePagination pagination) {
        return this.baseMapper.getList(pagination);
    }
 
    @Override
    public List<DelegateInfoEntity> getList(List<String> delegateIds) {
        return this.baseMapper.getList(delegateIds);
    }
 
    @Override
    public List<DelegateInfoEntity> getList(String delegateId) {
        return this.baseMapper.getList(delegateId);
    }
 
    @Override
    public List<DelegateInfoEntity> getByToUserId(String toUserId) {
        return this.baseMapper.getByToUserId(toUserId);
    }
 
    @Override
    public List<DelegateInfoEntity> getByToUserIds(List<String> userIds) {
        return this.baseMapper.getByToUserIds(userIds);
    }
 
    @Override
    public void create(DelegateCrForm fo, DelegateEntity delegateEntity) {
        DelegateModel model = flowUtil.create(fo.getToUserId(), delegateEntity);
        msgUtil.delegateMsg(model);
    }
 
    @Override
    public void update(DelegateUpForm fo, DelegateEntity delegateEntity) {
        List<String> createList = flowUtil.update(fo.getToUserId(), delegateEntity);
        if (!createList.isEmpty()){
            DelegateModel model = flowUtil.create(createList, delegateEntity);
            msgUtil.delegateMsg(model);
        }
    }
 
    @Override
    public void delete(String delegateId) {
        this.baseMapper.delete(delegateId);
    }
 
}