| | |
| | | |
| | | @Override |
| | | public void addDataDic(String type, String code, Object value, String description) { |
| | | DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(type, code); |
| | | addDataDic(type, code, value, description, true); |
| | | } |
| | | |
| | | String data = JSONObject.toJSONString(value); |
| | | @Override |
| | | public void addDataDic(String type, String code, Object value, String description, boolean isJson) { |
| | | DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(type, code); |
| | | String data = null; |
| | | if (isJson) { |
| | | data = JSONObject.toJSONString(value); |
| | | } else { |
| | | data = (String) value; |
| | | } |
| | | |
| | | if (dic != null) { |
| | | dic.setValue(data); |
| | | dataDictionaryCustomMapper.updateById(dic); |