Pu Zhibing
2024-10-22 af06cd29722f6cb1c431565c4710d9fe9b7b33a1
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
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, Integer language) throws Exception {
        if(type == 16 || type == 15 || type == 13 || type == 7 || type == 4 || type == 5 || type == 8 || type == 9 || type == 10){
            language = 1;
        }
        String s = agreementMapper.queryByType(language, type, 2);
        if(ToolUtil.isEmpty(s)){
            s = agreementMapper.queryByType(language, type, null);
        }
        return s;
    }
}