mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 去除链式调用注解 不符合规范导致很多奇葩问题 例如: copy为空问题
This commit is contained in:
@ -44,7 +44,11 @@ public class TestBatchController extends BaseController {
|
||||
public AjaxResult<Void> add() {
|
||||
List<TestDemo> list = new ArrayList<>();
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
list.add(new TestDemo().setOrderNum(-1L).setTestKey("批量新增").setValue("测试新增"));
|
||||
TestDemo testDemo = new TestDemo();
|
||||
testDemo.setOrderNum(-1L);
|
||||
testDemo.setTestKey("批量新增");
|
||||
testDemo.setValue("测试新增");
|
||||
list.add(testDemo);
|
||||
}
|
||||
return toAjax(testDemoMapper.insertBatch(list) ? 1 : 0);
|
||||
}
|
||||
@ -60,12 +64,16 @@ public class TestBatchController extends BaseController {
|
||||
public AjaxResult<Void> addOrUpdate() {
|
||||
List<TestDemo> list = new ArrayList<>();
|
||||
for (int i = 0; i < 1000; i++) {
|
||||
list.add(new TestDemo().setOrderNum(-1L).setTestKey("批量新增").setValue("测试新增"));
|
||||
}
|
||||
TestDemo testDemo = new TestDemo();
|
||||
testDemo.setOrderNum(-1L);
|
||||
testDemo.setTestKey("批量新增");
|
||||
testDemo.setValue("测试新增");
|
||||
list.add(testDemo); }
|
||||
testDemoMapper.insertBatch(list);
|
||||
for (int i = 0; i < list.size(); i++) {
|
||||
TestDemo testDemo = list.get(i);
|
||||
testDemo.setTestKey("批量新增或修改").setValue("批量新增或修改");
|
||||
testDemo.setTestKey("批量新增或修改");
|
||||
testDemo.setValue("批量新增或修改");
|
||||
if (i % 2 == 0) {
|
||||
testDemo.setId(null);
|
||||
}
|
||||
|
@ -7,7 +7,6 @@ import com.ruoyi.common.enums.SensitiveStrategy;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -33,17 +32,16 @@ public class TestSensitiveController extends BaseController {
|
||||
@ApiOperation("查询测试单表列表")
|
||||
@GetMapping("/test")
|
||||
public AjaxResult<TestSensitive> test() {
|
||||
TestSensitive testSensitive = new TestSensitive()
|
||||
.setIdCard("210397198608215431")
|
||||
.setPhone("17640125371")
|
||||
.setAddress("北京市朝阳区某某四合院1203室")
|
||||
.setEmail("17640125371@163.com")
|
||||
.setBankCard("6226456952351452853");
|
||||
TestSensitive testSensitive = new TestSensitive();
|
||||
testSensitive.setIdCard("210397198608215431");
|
||||
testSensitive.setPhone("17640125371");
|
||||
testSensitive.setAddress("北京市朝阳区某某四合院1203室");
|
||||
testSensitive.setEmail("17640125371@163.com");
|
||||
testSensitive.setBankCard("6226456952351452853");
|
||||
return AjaxResult.success(testSensitive);
|
||||
}
|
||||
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
static class TestSensitive {
|
||||
|
||||
/**
|
||||
|
@ -2,7 +2,6 @@ package com.ruoyi.demo.controller.queue;
|
||||
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 实体类 注意不允许使用内部类 否则会找不到类
|
||||
@ -11,7 +10,6 @@ import lombok.experimental.Accessors;
|
||||
* @version 3.6.0
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@NoArgsConstructor
|
||||
public class PriorityDemo {
|
||||
private String name;
|
||||
|
@ -46,7 +46,9 @@ public class PriorityQueueController {
|
||||
}
|
||||
for (int i = 0; i < 10; i++) {
|
||||
int randomNum = RandomUtil.randomInt(10);
|
||||
PriorityDemo data = new PriorityDemo().setName("data-" + i).setOrderNum(randomNum);
|
||||
PriorityDemo data = new PriorityDemo();
|
||||
data.setName("data-" + i);
|
||||
data.setOrderNum(randomNum);
|
||||
if (QueueUtils.addPriorityQueueObject(queueName, data)) {
|
||||
log.info("通道: {} , 发送数据: {}", queueName, data);
|
||||
} else {
|
||||
@ -61,7 +63,9 @@ public class PriorityQueueController {
|
||||
public AjaxResult<Void> remove(@ApiParam("队列名") String queueName,
|
||||
@ApiParam("对象名") String name,
|
||||
@ApiParam("排序号") Integer orderNum) {
|
||||
PriorityDemo data = new PriorityDemo().setName(name).setOrderNum(orderNum);
|
||||
PriorityDemo data = new PriorityDemo();
|
||||
data.setName(name);
|
||||
data.setOrderNum(orderNum);
|
||||
if (QueueUtils.removePriorityQueueObject(queueName, data)) {
|
||||
log.info("通道: {} , 删除数据: {}", queueName, data);
|
||||
} else {
|
||||
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.annotation.*;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 测试单表对象 test_demo
|
||||
@ -14,7 +13,6 @@ import lombok.experimental.Accessors;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("test_demo")
|
||||
public class TestDemo extends BaseEntity {
|
||||
|
||||
|
@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.annotation.Version;
|
||||
import com.ruoyi.common.core.domain.TreeEntity;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 测试树表对象 test_tree
|
||||
@ -17,7 +16,6 @@ import lombok.experimental.Accessors;
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Accessors(chain = true)
|
||||
@TableName("test_tree")
|
||||
public class TestTree extends TreeEntity {
|
||||
|
||||
|
Reference in New Issue
Block a user