jiangping
2023-10-26 687d0fc2de844e09864cc2ea2b24550069a50546
server/services/src/main/java/com/doumee/service/system/impl/SystemDictDataServiceImpl.java
@@ -89,7 +89,7 @@
    @Override
    public SystemDictData findOne(SystemDictData systemDictData) {
        Wrapper<SystemDictData> wrapper = new QueryWrapper<>(systemDictData);
        Wrapper<SystemDictData> wrapper = new QueryWrapper<>(systemDictData).last(" limit 1");
        return systemDictDataMapper.selectOne(wrapper );
    }
@@ -142,13 +142,13 @@
            String jasonStr = MiniProgrammeDTO.toUnderlineJSONString(miniProgrammeDTO);
            JSONObject parse = (JSONObject) JSONObject.parse(jasonStr);
            parse.entrySet().forEach(s->{
                if (StringUtils.isNotBlank((String)s.getValue())){
//                if (StringUtils.isNotBlank((String)s.getValue())){
                    UpdateWrapper<SystemDictData> wrapper = new UpdateWrapper<>();
                    wrapper.lambda()
                            .eq(SystemDictData::getLabel,s.getKey().toUpperCase())
                            .set(SystemDictData::getCode,s.getValue());
                    systemDictDataMapper.update(null,wrapper);
                }
//                }
            });
        } catch (JsonProcessingException e) {
            throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"字典值解析有误");