New file |
| | |
| | | package com.xcong.farmer.cms; |
| | | |
| | | import com.xcong.farmer.cms.modules.system.entity.ArticleEntity; |
| | | import com.xcong.farmer.cms.modules.system.mapper.ArticleMapper; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.test.context.SpringBootTest; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2022-07-11 |
| | | **/ |
| | | @SpringBootTest |
| | | public class ArticleTest { |
| | | |
| | | @Autowired |
| | | private ArticleMapper articleMapper; |
| | | |
| | | @Test |
| | | public void articleColumnIdUpdateTest() { |
| | | Long columnId = 83L; |
| | | ArticleEntity article = articleMapper.selectById(88L); |
| | | |
| | | System.out.println(!article.getColumnId().equals(columnId)); |
| | | if (!article.getColumnId().equals(columnId) && article.getBeforeColumnId() == null) { |
| | | article.setBeforeColumnId(article.getColumnId()); |
| | | } |
| | | |
| | | System.out.println(1); |
| | | } |
| | | |
| | | } |