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, 2);
|
if(ToolUtil.isEmpty(s)){
|
s = agreementMapper.queryByType(type, null);
|
}
|
return s;
|
}
|
}
|