From 30d8e227e8d823b6c38c3b9c90ac2df03b63befe Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期二, 25 二月 2025 16:41:22 +0800 Subject: [PATCH] 淘宝转链接口更新 --- fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoUnionConfigServiceImpl.java | 104 ++++++++++++++++++++++++++++------------------------ 1 files changed, 56 insertions(+), 48 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoUnionConfigServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoUnionConfigServiceImpl.java index 6d9b4b7..ccc0cc3 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoUnionConfigServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/taobao/TaoBaoUnionConfigServiceImpl.java @@ -1,48 +1,56 @@ -package com.yeshi.fanli.service.impl.taobao; - -import java.util.List; - -import javax.annotation.Resource; - -import org.springframework.cache.annotation.Cacheable; -import org.springframework.stereotype.Service; - -import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoUnionConfigMapper; -import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig; -import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService; - -@Service -public class TaoBaoUnionConfigServiceImpl implements TaoBaoUnionConfigService { - - @Resource - private TaoBaoUnionConfigMapper taoBaoUnionConfigMapper; - - @Override - public List<TaoBaoUnionConfig> getConfigByType(int type) { - return taoBaoUnionConfigMapper.selectByType(type); - } - @Cacheable(value = "configCache", key = "'getConfigByType-'+#type") - @Override - public List<TaoBaoUnionConfig> getConfigByTypeCache(int type) { - return getConfigByType(type); - } - - @Override - public void addConfig(TaoBaoUnionConfig config) { - TaoBaoUnionConfig oldConfig = getConfigByAppId(config.getAppId()); - if (oldConfig == null) { - taoBaoUnionConfigMapper.insertSelective(config); - } - } - - @Override - public TaoBaoUnionConfig getConfigByAppId(String appId) { - return taoBaoUnionConfigMapper.selectByAppId(appId); - } - @Cacheable(value = "configCache", key = "'getConfigByAppId-'+#appId") - @Override - public TaoBaoUnionConfig getConfigByAppIdCache(String appId) { - return getConfigByAppId(appId); - } - -} +package com.yeshi.fanli.service.impl.taobao; + +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.cache.annotation.Cacheable; +import org.springframework.stereotype.Service; + +import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoUnionConfigMapper; +import com.yeshi.fanli.entity.taobao.TaoBaoUnionConfig; +import com.yeshi.fanli.service.inter.taobao.TaoBaoUnionConfigService; + +@Service +public class TaoBaoUnionConfigServiceImpl implements TaoBaoUnionConfigService { + + @Resource + private TaoBaoUnionConfigMapper taoBaoUnionConfigMapper; + + @Override + public List<TaoBaoUnionConfig> getConfigByType(int type) { + return taoBaoUnionConfigMapper.selectByType(type); + } + + @Cacheable(value = "configCache", key = "'getConfigByType-'+#type") + @Override + public List<TaoBaoUnionConfig> getConfigByTypeCache(int type) { + return getConfigByType(type); + } + + @Override + public void addConfig(TaoBaoUnionConfig config) { + TaoBaoUnionConfig oldConfig = getConfigByAppId(config.getAppId()); + if (oldConfig == null) { + taoBaoUnionConfigMapper.insertSelective(config); + } + } + + @Override + public TaoBaoUnionConfig getConfigByAppId(String appId) { + return taoBaoUnionConfigMapper.selectByAppId(appId); + } + + @Cacheable(value = "configCache", key = "'getConfigByAppId-'+#appId") + @Override + public TaoBaoUnionConfig getConfigByAppIdCache(String appId) { + return getConfigByAppId(appId); + } + + @Cacheable(value = "configCache", key = "'getConfigByAppKeyCache-'+#appKey") + @Override + public TaoBaoUnionConfig getConfigByAppKeyCache(String appKey) { + return taoBaoUnionConfigMapper.selectByAppKey(appKey); + } + +} -- Gitblit v1.8.0