| | |
| | | import cc.mrbird.febs.mall.mapper.DataDictionaryCustomMapper; |
| | | import cc.mrbird.febs.mall.service.ICommonService; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import lombok.RequiredArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | public List<AppVersion> findAppVersion() { |
| | | return appVersionMapper.selectList(null); |
| | | } |
| | | |
| | | @Override |
| | | public void addDataDic(String type, String code, Object value, String description) { |
| | | DataDictionaryCustom dic = dataDictionaryCustomMapper.selectDicDataByTypeAndCode(type, code); |
| | | |
| | | String data = JSONObject.toJSONString(value); |
| | | if (dic != null) { |
| | | dic.setValue(data); |
| | | dataDictionaryCustomMapper.updateById(dic); |
| | | return; |
| | | } |
| | | |
| | | dic = new DataDictionaryCustom(); |
| | | dic.setCode(code); |
| | | dic.setType(type); |
| | | dic.setValue(data); |
| | | dic.setDescription(description); |
| | | dataDictionaryCustomMapper.insert(dic); |
| | | } |
| | | } |