修改场站、桩、终端费率模型id
This commit is contained in:
parent
976ffc7f1f
commit
791326a721
@ -234,4 +234,16 @@ public interface XhpcChargingStationMapper {
|
||||
*/
|
||||
List<Map<String, Object>> getXhpcRateTimeNumber(@Param("chargingStationId") Long chargingStationId);
|
||||
|
||||
/**
|
||||
* 修改桩的计费模型id
|
||||
* @param chargingStationId
|
||||
*/
|
||||
void updateXhpcChargingPile(@Param("chargingStationId") Long chargingStationId,@Param("rateModelId") Long rateModelId);
|
||||
|
||||
/**
|
||||
* 修改终端的计费模型id
|
||||
* @param chargingStationId
|
||||
*/
|
||||
void updateXhpcTerminal(@Param("chargingStationId") Long chargingStationId,@Param("rateModelId") Long rateModelId);
|
||||
|
||||
}
|
||||
|
||||
@ -482,8 +482,9 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
cacheRateModel.setTfPricesSeq(tfPricesSeq);
|
||||
|
||||
R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel);
|
||||
System.out.println(r.getCode());
|
||||
System.out.println(r.getMsg());
|
||||
//修改桩和终端的模板id
|
||||
xhpcChargingStationMapper.updateXhpcChargingPile(chargingStationId,rateModelId);
|
||||
xhpcChargingStationMapper.updateXhpcTerminal(chargingStationId,rateModelId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
@ -901,9 +902,9 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
||||
}
|
||||
cacheRateModel.setTfPricesSeq(tfPricesSeq);
|
||||
R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel);
|
||||
System.out.println(r.getCode());
|
||||
System.out.println(r.getMsg());
|
||||
|
||||
//修改桩和终端的模板id
|
||||
xhpcChargingStationMapper.updateXhpcChargingPile(chargingStationId,rateModelId);
|
||||
xhpcChargingStationMapper.updateXhpcTerminal(chargingStationId,rateModelId);
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
@ -852,4 +852,12 @@
|
||||
where charging_station_id = #{chargingStationId}
|
||||
order by sort
|
||||
</select>
|
||||
|
||||
<update id="updateXhpcChargingPile">
|
||||
update xhpc_charging_pile set rate_model_id=#{rateModelId} WHERE charging_station_id=#{chargingStationId}
|
||||
</update>
|
||||
|
||||
<update id="updateXhpcTerminal">
|
||||
update xhpc_terminal set rate_model_id=#{rateModelId} WHERE charging_station_id=#{chargingStationId}
|
||||
</update>
|
||||
</mapper>
|
||||
|
||||
@ -116,16 +116,13 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
||||
if (StringUtils.isEmpty(phone)) {
|
||||
return R.fail(HttpStatus.NOT_NULL, "请重新获取手机号");
|
||||
}
|
||||
if("2".equals(type)){
|
||||
if (StringUtils.isEmpty(code)) {
|
||||
return R.fail(HttpStatus.NOT_NULL, "验证码不能为空");
|
||||
}
|
||||
String captcha = redisService.getCacheObject("pvToken:" + phone);
|
||||
if (!code.equalsIgnoreCase(captcha)) {
|
||||
R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
}
|
||||
if (StringUtils.isEmpty(code)) {
|
||||
return R.fail(HttpStatus.NOT_NULL, "验证码不能为空");
|
||||
}
|
||||
String captcha = redisService.getCacheObject("pvToken:" + phone);
|
||||
if (!code.equalsIgnoreCase(captcha)) {
|
||||
R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||
}
|
||||
|
||||
XhpcAppUser info = xhpcAppUserMapper.getAppUserByPhone(phone);
|
||||
if (StringUtils.isNotNull(info)) {
|
||||
return R.fail(HttpStatus.ALREADY_EXISTING, "账号已存在");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user