fix
Helius
2022-07-11 cf566cbe51e917833f3e4e9820b8656b9c7c6a7c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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);
    }
 
}