update the type of operator_id from xhpc_terminal, and add a test module of unit.

This commit is contained in:
little-cat-sweet 2021-09-14 17:47:46 +08:00
parent 38b04df6a5
commit a219a6181b
4 changed files with 54 additions and 4 deletions

View File

@ -45,18 +45,19 @@ public class XhpcTerminal extends BaseEntity {
/** 费率模型id */ /** 费率模型id */
private Long rateModelId; private Long rateModelId;
private Long operatorId; private String operatorId;
/** /**
* 电桩统计数量 * 电桩统计数量
*/ */
private Integer number; private Integer number;
public Long getOperatorId() { public String getOperatorId() {
return operatorId; return operatorId;
} }
public void setOperatorId(Long operatorId) { public void setOperatorId(String operatorId) {
this.operatorId = operatorId; this.operatorId = operatorId;
} }

View File

@ -17,6 +17,12 @@
<dependencies> <dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- SpringCloud Alibaba Nacos --> <!-- SpringCloud Alibaba Nacos -->
<dependency> <dependency>
<groupId>com.alibaba.cloud</groupId> <groupId>com.alibaba.cloud</groupId>
@ -93,6 +99,11 @@
<artifactId>hutool-all</artifactId> <artifactId>hutool-all</artifactId>
<version>5.7.5</version> <version>5.7.5</version>
</dependency> </dependency>
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common-core</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

View File

@ -12,5 +12,5 @@ import org.apache.ibatis.annotations.Mapper;
@Mapper @Mapper
public interface XhpcMessageMapper { public interface XhpcMessageMapper {
void insertItemsBy(XhpcMessage xhpcMessage); int insertItemsBy(XhpcMessage xhpcMessage);
} }

View File

@ -0,0 +1,38 @@
package com.xhpc.pp.mapper;
import com.xhpc.pp.domain.XhpcMessage;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
/**
* program: ruoyi
* User: HongYun
* Date:2021-09-14 17
*/
@SpringBootTest
public class NormalTest {
@Autowired
XhpcMessageMapper xhpcMessageMapper;
@Test
public void test02(){
System.out.println("hello world!!");
}
@Test
public void test03(){
XhpcMessage xhpcMessage = new XhpcMessage();
xhpcMessage.setContent("hello world");
int result = xhpcMessageMapper.insertItemsBy(xhpcMessage);
if(result != 0){
System.out.println("insert successfully!!");
}else {
System.out.println("insert failed!!");
}
System.out.println("latch successfully!!");
}
}