update 电单车协议

This commit is contained in:
Guoqs
2024-09-04 14:03:28 +08:00
parent efe869d79b
commit 6ee161de0a
7 changed files with 14 additions and 7 deletions

View File

@@ -58,6 +58,7 @@ public class GenerateOrderDTO extends BasicPileDTO{
/**
* 计费模板相关信息
* 电动汽车桩专用
*/
private BillingTemplateVO billingTemplate;

View File

@@ -166,10 +166,12 @@ public interface PileBillingTemplateMapper {
/**
* 根据站点id修改状态
*
* @param stationId
* @param status
* @param deviceType
*/
void updateStatusByStationId(@Param("stationId") String stationId, @Param("status") String status);
void updateStatusByStationId(@Param("stationId") String stationId, @Param("status") String status, @Param("deviceType")String deviceType);
void updateStatusByTemplateId(@Param("templateId") String templateId, @Param("status") String status);

View File

@@ -177,9 +177,12 @@ public interface PileBillingTemplateService {
/**
* 修改站点计费模板状态并下发最新模板
* @param stationId 充电站id
* @param templateId 模板id
* @param deviceType 设备类型
* @return
*/
int changeStationTemplate(String stationId, String templateId);
int changeStationTemplate(String stationId, String templateId, String deviceType);
/**
* 创建优惠计费模板

View File

@@ -211,7 +211,7 @@ public class PileRemoteService {
// }
// 修改计费模板状态
pileBillingTemplateService.changeStationTemplate(dto.getStationId(), dto.getTemplateId());
pileBillingTemplateService.changeStationTemplate(dto.getStationId(), dto.getTemplateId(), billingTemplateVO.getDeviceType());
return true;
}

View File

@@ -450,9 +450,9 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
*/
@Override
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
public int changeStationTemplate(String stationId, String templateId) {
// 根据stationId把站点下所有的计费模板设置为 未启用
pileBillingTemplateMapper.updateStatusByStationId(stationId, Constants.ZERO);
public int changeStationTemplate(String stationId, String templateId, String deviceType) {
// 根据stationId把站点下所有的计费模板设置为 未启用, 区分deviceType
pileBillingTemplateMapper.updateStatusByStationId(stationId, Constants.ZERO, deviceType);
// 根据templateId 修改状态为启用
pileBillingTemplateMapper.updateStatusByTemplateId(templateId, Constants.ONE);
// 清缓存

View File

@@ -104,7 +104,7 @@ public class DelayMerchantProgramLogic extends AbstractProgramLogic {
* 生成电单车订单
*/
private OrderBasicInfo generateOrderForEBike(GenerateOrderDTO dto) {
logger.info("【{}】-生成电单车订单start, param:{}", this.getClass().getSimpleName(), JSON.toJSONString(dto));
return null;
}

View File

@@ -606,6 +606,7 @@
update pile_billing_template
set status = #{status,jdbcType=VARCHAR}
where station_id = #{stationId,jdbcType=VARCHAR}
and type = #{deviceType,jdbcType=VARCHAR}
</update>
<update id="updateStatusByTemplateId">