| | |
| | | package org.example.controller; |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.fasterxml.jackson.core.JsonProcessingException; |
| | |
| | | DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
| | | String formattedDateTime = now.format(formatter); |
| | | currency.setAddTime(formattedDateTime); |
| | | List<ConfigCurrency> configCurrencies = currencyMapper.selectList(new LambdaQueryWrapper<>(ConfigCurrency.class) |
| | | .eq(ConfigCurrency::getUserId,user.getId()) |
| | | .eq(ConfigCurrency::getCurrency, f.getCurrency()) |
| | | .eq(ConfigCurrency::getBuy, f.getBuy()) |
| | | .eq(ConfigCurrency::getSell, f.getSell()) |
| | | ); |
| | | if(CollectionUtil.isEmpty(configCurrencies)){ |
| | | currencyMapper.insert(currency); |
| | | } |
| | | }); |
| | | List<ConfigCurrency> configCurrencies = currencyMapper.selectList(new LambdaQueryWrapper<ConfigCurrency>().eq(ConfigCurrency::getUserId, user.getId())); |
| | | String key = "config_"; |