Merge branch 'dev' into feature-integrated_with_JCPP

This commit is contained in:
Guoqs
2026-01-09 17:17:53 +08:00
15 changed files with 152 additions and 30 deletions

View File

@@ -1053,4 +1053,26 @@ public class TempController extends BaseController {
return response;
}
/**
* 单个会员批量绑定车牌号
*/
@PostMapping("/batchBindCarNumber")
public RestApiResponse<?> batchBindCarNumber(@RequestBody CarNumberBindDTO dto) {
logger.info("单个会员批量绑定车牌号, param:{}", JSON.toJSONString(dto));
RestApiResponse<?> response;
try {
tempService.batchBindCarNumber(dto);
response = new RestApiResponse<>();
} catch (BusinessException e) {
logger.warn("单个会员批量绑定车牌号 warn", e);
response = new RestApiResponse<>(e.getCode(), e.getMessage());
} catch (Exception e) {
logger.error("单个会员批量绑定车牌号 error", e);
response = new RestApiResponse<>("00300002", "单个会员批量绑定车牌号异常");
}
logger.info("单个会员批量绑定车牌号, result:{}", JSON.toJSONString(response));
return response;
}
}

View File

@@ -142,6 +142,9 @@ public class TempService {
@Autowired
private OrderService orderService;
@Autowired
private MemberService memberService;
/**
* 计算订单耗电量
* 内蒙古站点
@@ -1528,5 +1531,32 @@ public class TempService {
}
}
public void batchBindCarNumber(CarNumberBindDTO dto) {
if (dto == null || dto.getCarNumberList() == null || dto.getCarNumberList().isEmpty()) {
throw new RuntimeException("请添加要绑定的车牌号");
}
if (dto.getVinList() == null || dto.getVinList().isEmpty()) {
throw new RuntimeException("请添加要绑定的vin码");
}
if (StringUtils.isBlank(dto.getMemberId())) {
throw new RuntimeException("请添加要绑定的用户ID");
}
if (StringUtils.isBlank(dto.getPhoneNumber())) {
throw new RuntimeException("请添加要绑定的手机号");
}
if (dto.getCarNumberList().size() != dto.getVinList().size()){
throw new RuntimeException("车牌号应与车架号对应");
}
for (int i = 0 ; i < dto.getCarNumberList().size() ; i++) {
BindingCarNoDTO build = BindingCarNoDTO.builder()
.phoneNumber(dto.getPhoneNumber())
.carNo(dto.getCarNumberList().get(i))
.vinCode(dto.getVinList().get(i))
.memberId(dto.getMemberId())
.build();
memberService.memberBindingCarNo(build);
}
}
}

View File

@@ -263,6 +263,7 @@ batteryChargeReport:
getTaskIdApi: /api/docking/api/evaluate
apiPrefix: /api/docking/report/
token: MTc0NzcyMjgwMzg0NC1xNmFucG96cHR4aQ==
mfrID: mfr8944567890598756
# dubbo配置
dubbo:

View File

@@ -258,6 +258,7 @@ batteryChargeReport:
getTaskIdApi: /api/docking/api/evaluate
apiPrefix: /api/docking/report/
token: MTc0NzcyMjgwMzg0NC1xNmFucG96cHR4aQ==
mfrID: mfr8944567890598756
# dubbo配置
dubbo:

View File

@@ -281,6 +281,7 @@ batteryChargeReport:
getTaskIdApi: /api/docking/api/evaluate
apiPrefix: /api/docking/report/
token: MTc0NzcyMjgwMzg0NC1xNmFucG96cHR4aQ==
mfrID: mfr8944567890598756
# dubbo配置
dubbo:
@@ -292,7 +293,7 @@ dubbo:
parameters:
namespace: c95d1cb4-8d46-48b5-9982-a6942c28e953
username: nacos
password: nacos
password: CbhuW7pG
protocol:
name: dubbo
port: -1

View File

@@ -290,6 +290,7 @@ batteryChargeReport:
getTaskIdApi: /api/docking/api/evaluate
apiPrefix: /api/docking/report/
token: MTc0NzcyMjgwMzg0NC1xNmFucG96cHR4aQ==
mfrID: mfr8944567890598756
# dubbo配置
dubbo:

View File

@@ -157,6 +157,7 @@ batteryChargeReport:
getTaskIdApi: /api/docking/api/evaluate
apiPrefix: /api/docking/report/
token: MTc0NzcyMjgwMzg0NC1xNmFucG96cHR4aQ==
mfrID: mfr8944567890598756
# sms4j
sms: