puzhibing
2023-02-15 2811bab657aab4145b65a45a824fb63e93b58e30
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
package com.stylefeng.guns.modular.system.service.impl;
 
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.stylefeng.guns.core.util.ToolUtil;
import com.stylefeng.guns.modular.system.dao.AgreementMapper;
import com.stylefeng.guns.modular.system.model.Agreement;
import com.stylefeng.guns.modular.system.service.IAgreementService;
import org.springframework.stereotype.Service;
 
import javax.annotation.Resource;
 
 
@Service
public class AgreementServiceImpl extends ServiceImpl<AgreementMapper, Agreement> implements IAgreementService {
 
    @Resource
    private AgreementMapper agreementMapper;
 
 
    /**
     * 获取协议内容
     * @param type
     * @return
     * @throws Exception
     */
    @Override
    public String queryByType(Integer type) throws Exception {
        String s = agreementMapper.queryByType(type, 1);
        if(ToolUtil.isEmpty(s)){
            s = agreementMapper.queryByType(type, null);
        }
        return s;
    }
}