mirror of
https://gitee.com/san-bing/JChargePointProtocol
synced 2026-05-06 02:49:57 +08:00
npe
This commit is contained in:
@@ -12,9 +12,9 @@ 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.GunRunStatusEnum;
|
||||||
import sanbing.jcpp.app.dal.config.ibatis.enums.OwnerTypeEnum;
|
import sanbing.jcpp.app.dal.config.ibatis.enums.OwnerTypeEnum;
|
||||||
import sanbing.jcpp.app.dal.entity.Gun;
|
import sanbing.jcpp.app.dal.entity.Gun;
|
||||||
import sanbing.jcpp.app.dal.entity.Pile;
|
|
||||||
import sanbing.jcpp.infrastructure.util.jackson.JacksonUtil;
|
import sanbing.jcpp.infrastructure.util.jackson.JacksonUtil;
|
||||||
|
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@@ -42,9 +42,6 @@ class GunMapperIT extends AbstractTestBase {
|
|||||||
@Resource
|
@Resource
|
||||||
GunMapper gunMapper;
|
GunMapper gunMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
PileMapper pileMapper;
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void curdTest() {
|
void curdTest() {
|
||||||
gunMapper.delete(Wrappers.lambdaQuery());
|
gunMapper.delete(Wrappers.lambdaQuery());
|
||||||
@@ -53,15 +50,13 @@ class GunMapperIT extends AbstractTestBase {
|
|||||||
UUID pileId = NORMAL_PILE_ID[i];
|
UUID pileId = NORMAL_PILE_ID[i];
|
||||||
UUID gunId = NORMAL_GUN_ID[i];
|
UUID gunId = NORMAL_GUN_ID[i];
|
||||||
|
|
||||||
Pile pile = pileMapper.selectById(pileId);
|
|
||||||
|
|
||||||
Gun gun = Gun.builder()
|
Gun gun = Gun.builder()
|
||||||
.id(gunId)
|
.id(gunId)
|
||||||
.createdTime(LocalDateTime.now())
|
.createdTime(LocalDateTime.now())
|
||||||
.additionalInfo(JacksonUtil.newObjectNode())
|
.additionalInfo(JacksonUtil.newObjectNode())
|
||||||
.gunNo("02")
|
.gunNo("02")
|
||||||
.gunName(pile.getPileName() + "的2号枪")
|
.gunName(String.format("三丙家的%d号充电桩", i + 1) + "的2号枪")
|
||||||
.gunCode(pile.getPileCode() + "-02")
|
.gunCode("202312120000" + new DecimalFormat("00").format(i + 1) + "-02")
|
||||||
.stationId(NORMAL_STATION_ID)
|
.stationId(NORMAL_STATION_ID)
|
||||||
.pileId(pileId)
|
.pileId(pileId)
|
||||||
.ownerId(NORMAL_USER_ID)
|
.ownerId(NORMAL_USER_ID)
|
||||||
|
|||||||
Reference in New Issue
Block a user