修改场站、桩、终端费率模型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);
|
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);
|
cacheRateModel.setTfPricesSeq(tfPricesSeq);
|
||||||
|
|
||||||
R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel);
|
R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel);
|
||||||
System.out.println(r.getCode());
|
//修改桩和终端的模板id
|
||||||
System.out.println(r.getMsg());
|
xhpcChargingStationMapper.updateXhpcChargingPile(chargingStationId,rateModelId);
|
||||||
|
xhpcChargingStationMapper.updateXhpcTerminal(chargingStationId,rateModelId);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -901,9 +902,9 @@ public class XhpcChargingStationServiceImpl implements IXhpcChargingStationServi
|
|||||||
}
|
}
|
||||||
cacheRateModel.setTfPricesSeq(tfPricesSeq);
|
cacheRateModel.setTfPricesSeq(tfPricesSeq);
|
||||||
R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel);
|
R r = powerPileService.setStationRateModel(chargingStationId, rateModelId, cacheRateModel);
|
||||||
System.out.println(r.getCode());
|
//修改桩和终端的模板id
|
||||||
System.out.println(r.getMsg());
|
xhpcChargingStationMapper.updateXhpcChargingPile(chargingStationId,rateModelId);
|
||||||
|
xhpcChargingStationMapper.updateXhpcTerminal(chargingStationId,rateModelId);
|
||||||
return AjaxResult.success();
|
return AjaxResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -852,4 +852,12 @@
|
|||||||
where charging_station_id = #{chargingStationId}
|
where charging_station_id = #{chargingStationId}
|
||||||
order by sort
|
order by sort
|
||||||
</select>
|
</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>
|
</mapper>
|
||||||
|
|||||||
@ -116,7 +116,6 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
if (StringUtils.isEmpty(phone)) {
|
if (StringUtils.isEmpty(phone)) {
|
||||||
return R.fail(HttpStatus.NOT_NULL, "请重新获取手机号");
|
return R.fail(HttpStatus.NOT_NULL, "请重新获取手机号");
|
||||||
}
|
}
|
||||||
if("2".equals(type)){
|
|
||||||
if (StringUtils.isEmpty(code)) {
|
if (StringUtils.isEmpty(code)) {
|
||||||
return R.fail(HttpStatus.NOT_NULL, "验证码不能为空");
|
return R.fail(HttpStatus.NOT_NULL, "验证码不能为空");
|
||||||
}
|
}
|
||||||
@ -124,8 +123,6 @@ public class XhpcAppUserServiceImpl implements IXhpcAppUserUserService {
|
|||||||
if (!code.equalsIgnoreCase(captcha)) {
|
if (!code.equalsIgnoreCase(captcha)) {
|
||||||
R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
R.fail(HttpStatus.ERROR_STATUS, "验证码错误");
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
XhpcAppUser info = xhpcAppUserMapper.getAppUserByPhone(phone);
|
XhpcAppUser info = xhpcAppUserMapper.getAppUserByPhone(phone);
|
||||||
if (StringUtils.isNotNull(info)) {
|
if (StringUtils.isNotNull(info)) {
|
||||||
return R.fail(HttpStatus.ALREADY_EXISTING, "账号已存在");
|
return R.fail(HttpStatus.ALREADY_EXISTING, "账号已存在");
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user