Commit 814c025c authored by fangxinjiang's avatar fangxinjiang

代码优化

parent 599a7482
......@@ -16,22 +16,15 @@
*/
package com.yifu.cloud.plus.v1.consumer.service.impl;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.consumer.entity.Consumer;
import com.yifu.cloud.plus.v1.consumer.mapper.ConsumerMapper;
import com.yifu.cloud.plus.v1.consumer.service.ConsumerService;
import com.yifu.cloud.plus.v1.provider.entity.Provider;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprProviderProperties;
import com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil;
import com.yifu.cloud.plus.v1.yifu.common.security.util.SecurityUtils;
import io.seata.spring.annotation.GlobalTransactional;
import lombok.RequiredArgsConstructor;
import lombok.SneakyThrows;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.data.redis.support.collections.RedisStore;
import org.springframework.security.oauth2.provider.token.store.redis.RedisTokenStore;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
......@@ -53,7 +46,7 @@ public class ConsumerServiceImpl extends ServiceImpl<ConsumerMapper, Consumer> i
@Transactional
@Override
public Boolean saveTestSeata(Consumer consumer) {
Provider provider = new Provider();
/*Provider provider = new Provider();
provider.setNicename(consumer.getNicename());
provider.setUsername(consumer.getUsername());
provider.setCreateBy(consumer.getCreateBy());
......@@ -62,7 +55,7 @@ public class ConsumerServiceImpl extends ServiceImpl<ConsumerMapper, Consumer> i
provider.setUpdateTime(consumer.getUpdateTime());
R result = HttpDaprUtil.invokeMethodPost(daprProperties.getAppUrl(),daprProperties.getAppId(), "/provider", provider, Provider.class,null);
baseMapper.insert(consumer);
baseMapper.insert(consumer);*/
return true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment