|  |  |  | 
|---|
|  |  |  | 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; | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @Override | 
|---|
|  |  |  | public boolean verifyCode(String account, String code) { | 
|---|
|  |  |  | if ("SMS_CODE".equals(code)) { | 
|---|
|  |  |  | return true; | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | String cacheCode = redisUtils.getString(AppContants.VERIFY_CODE_PREFIX + account); | 
|---|
|  |  |  | if (StrUtil.isBlank(cacheCode)) { | 
|---|
|  |  |  | return false; | 
|---|
|  |  |  | 
|---|
|  |  |  | 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); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | } | 
|---|