派生自 projectDept/qhighschool

yn147
2023-05-10 96286178ee1c257c130cb2ad964a781f36c4eee5
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
package com.qxueyou.scc.base.service.impl;
 
 
import org.springframework.stereotype.Service;
 
import com.qxueyou.scc.base.model.Result;
import com.qxueyou.scc.base.service.IDictionaryService;
import com.qxueyou.scc.base.util.CollectionUtils;
 
/**
 * 配置服务,读取配置项
 * 
 * @author lyl
 *
 */
@Service
public class DictionaryService extends CommonAppService implements IDictionaryService {
 
    @Override
    public String getConfig(String key) {
        String hql="select value from SysDictionary where dicKey=?";
        
        return  findUnique(hql, CollectionUtils.newList(key), String.class) ;
    }
 
    @Override
    public Result updateConfig(String key, String value) {
        
        return bulkUpdate("update SysDictionary set value=? where dicKey=?", new Object[] {value,key});
    }
 
    
}