Merge remote-tracking branch 'refs/remotes/public/master' into feature/YunKuaiChongV160

# Conflicts:
#	jcpp-app-bootstrap/src/test/resources/app-service-test.properties
This commit is contained in:
三丙
2024-10-15 09:50:01 +08:00
10 changed files with 80 additions and 27 deletions

View File

@@ -22,7 +22,7 @@ spring:
name: "${SPRING_APPLICATION_NAME:java-charge-point-server}"
datasource:
driver-class-name: "${SPRING_DRIVER_CLASS_NAME:org.postgresql.Driver}"
url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://10.102.12.102:30135/jcpp}"
url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://postgres:5432/jcpp}"
username: "${SPRING_DATASOURCE_USERNAME:postgres}"
password: "${SPRING_DATASOURCE_PASSWORD:postgres}"
hikari:
@@ -196,7 +196,7 @@ service:
topic: "${PROTOCOLS_YUNKUAICHONGV150_FORWARD_KAFKA_TOPIC:protocol_uplink}"
jcpp-partition: "${PROTOCOLS_YUNKUAICHONGV150_FORWARD_KAFKA_JCPP_PARTITION:true}" # 是否利用JCPP的分片框架
# 以下配置只有在service.type为protocol时且jcpp-partition为false时才生效
bootstrap-servers: "${PROTOCOLS_YUNKUAICHONGV150_FORWARD_KAFKA_SERVERS:10.102.12.102:9092}"
bootstrap-servers: "${PROTOCOLS_YUNKUAICHONGV150_FORWARD_KAFKA_SERVERS:kafka:9092}"
acks: "${PROTOCOLS_YUNKUAICHONGV150_FORWARD_KAFKA_ACKS:1}"
# # 可选 protobuf推荐、json
encoder: "${PROTOCOLS_YUNKUAICHONGV150_FORWARD_KAFKA_ENCODER:protobuf}"

View File

@@ -12,6 +12,7 @@ import sanbing.jcpp.app.dal.config.ibatis.enums.GunOptStatusEnum;
import sanbing.jcpp.app.dal.config.ibatis.enums.GunRunStatusEnum;
import sanbing.jcpp.app.dal.config.ibatis.enums.OwnerTypeEnum;
import sanbing.jcpp.app.dal.entity.Gun;
import sanbing.jcpp.app.dal.entity.Pile;
import sanbing.jcpp.infrastructure.util.jackson.JacksonUtil;
import java.time.LocalDateTime;
@@ -37,9 +38,13 @@ class GunMapperIT extends AbstractTestBase {
UUID.fromString("3f3a61e9-de55-4177-9b4e-3a1d8c529890"),
UUID.fromString("cf1a8970-5aa9-4636-a76e-d6bcf98b4a07")
};
@Resource
GunMapper gunMapper;
@Resource
PileMapper pileMapper;
@Test
void curdTest() {
gunMapper.delete(Wrappers.lambdaQuery());
@@ -47,13 +52,16 @@ class GunMapperIT extends AbstractTestBase {
for (int i = 0; i < NORMAL_PILE_ID.length; i++) {
UUID pileId = NORMAL_PILE_ID[i];
UUID gunId = NORMAL_GUN_ID[i];
Pile pile = pileMapper.selectById(pileId);
Gun gun = Gun.builder()
.id(gunId)
.createdTime(LocalDateTime.now())
.additionalInfo(JacksonUtil.newObjectNode())
.gunNo("01")
.gunName("三丙的1号枪")
.gunCode("20231212000001-" + (i + 1))
.gunNo("02")
.gunName(pile.getPileName() + "的2号枪")
.gunCode(pile.getPileCode() + "-02")
.stationId(NORMAL_STATION_ID)
.pileId(pileId)
.ownerId(NORMAL_USER_ID)

View File

@@ -1,4 +1,3 @@
redis.connection.type=cluster
redis.cluster.nodes=10.102.12.101:30700,10.102.12.101:32027,10.102.12.101:30767,10.102.12.101:30250,10.102.12.101:30612,10.102.12.101:32303
spring.datasource.url=jdbc:postgresql://127.0.0.1:5432/jcpp
service.protocols.yunkuaichongV150.listener.tcp.bind-port=0
service.protocols.yunkuaichongV160.listener.tcp.bind-port=0