fix:设置初始状态

上级 0503d7e7
...@@ -124,11 +124,6 @@ ...@@ -124,11 +124,6 @@
<artifactId>mybatis-plus-extension</artifactId> <artifactId>mybatis-plus-extension</artifactId>
<version>3.5.1</version> <version>3.5.1</version>
</dependency> </dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
<version>1.4.0</version>
</dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
<artifactId>dynamic-datasource-spring-boot-starter</artifactId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
......
package com.kwan.springbootkwan.controller;
import com.kwan.springbootkwan.entity.User;
import com.kwan.springbootkwan.service.IUserService;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/seata")
public class SeataControlller {
@Autowired
private IUserService userService;
@ApiOperation(value = "保存用户", notes = "保存用户")
@RequestMapping(value = "/save", method = RequestMethod.GET)
public User save() {
//保存用户
User user = new User();
user.setName("秦梓淞");
user.setSex("男");
return userService.saveUser(user);
}
}
...@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil; ...@@ -5,6 +5,7 @@ import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.kwan.springbootkwan.entity.CsdnUserInfo; import com.kwan.springbootkwan.entity.CsdnUserInfo;
import com.kwan.springbootkwan.enums.CollectStatus; import com.kwan.springbootkwan.enums.CollectStatus;
import com.kwan.springbootkwan.enums.CommentStatus;
import com.kwan.springbootkwan.enums.LikeStatus; import com.kwan.springbootkwan.enums.LikeStatus;
import com.kwan.springbootkwan.service.CsdnService; import com.kwan.springbootkwan.service.CsdnService;
import com.kwan.springbootkwan.service.CsdnUserInfoService; import com.kwan.springbootkwan.service.CsdnUserInfoService;
...@@ -43,7 +44,7 @@ public class CsdnSchedule { ...@@ -43,7 +44,7 @@ public class CsdnSchedule {
for (CsdnUserInfo csdnUserInfo : list) { for (CsdnUserInfo csdnUserInfo : list) {
csdnUserInfo.setLikeStatus(LikeStatus.UN_PROCESSED.getCode()); csdnUserInfo.setLikeStatus(LikeStatus.UN_PROCESSED.getCode());
csdnUserInfo.setCollectStatus(CollectStatus.UN_PROCESSED.getCode()); csdnUserInfo.setCollectStatus(CollectStatus.UN_PROCESSED.getCode());
// csdnUserInfo.setCommentStatus(CommentStatus.UN_PROCESSED.getCode()); csdnUserInfo.setCommentStatus(CommentStatus.RESTRICTED_COMMENTS.getCode());
csdnUserInfoService.updateById(csdnUserInfo); csdnUserInfoService.updateById(csdnUserInfo);
} }
} }
......
...@@ -27,7 +27,6 @@ spring: ...@@ -27,7 +27,6 @@ spring:
# mysql # mysql
datasource: datasource:
dynamic: dynamic:
seata: true
primary: kwan-ds primary: kwan-ds
datasource: datasource:
kwan-ds: kwan-ds:
......
...@@ -23,20 +23,6 @@ spring: ...@@ -23,20 +23,6 @@ spring:
mvc: mvc:
pathmatch: pathmatch:
matching-strategy: ant_path_matcher matching-strategy: ant_path_matcher
#seata:
# tx-service-group: default_tx_group
#seata:
# application-id: spring-boot-name
# tx-service-group: my-tx-group
# service:
# vgroup-mapping:
# my-tx-group: seata-server
# grouplist:
# seata-server: 127.0.0.1:8091
# enabled: true
#mybatis-plus配置 #mybatis-plus配置
mybatis-plus: mybatis-plus:
......
service {
#事务组名称
vgroup_mapping.my-tx-group ="seata-server"
default.grouplist ="127.0.0.1:8091'
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册