mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 02:55:04 +08:00
update 修改站点计费模板状态并下发最新模板, 区分普通计费模板和会员计费模板
This commit is contained in:
@@ -171,7 +171,7 @@ public interface PileBillingTemplateMapper {
|
||||
* @param status
|
||||
* @param deviceType
|
||||
*/
|
||||
void updateStatusByStationId(@Param("stationId") String stationId, @Param("status") String status, @Param("deviceType")String deviceType);
|
||||
void updateStatusByStationId(@Param("stationId") String stationId, @Param("status") String status, @Param("deviceType")String deviceType, @Param("memberFlag") String memberFlag);
|
||||
|
||||
void updateStatusByTemplateId(@Param("templateId") String templateId, @Param("status") String status);
|
||||
|
||||
|
||||
@@ -187,9 +187,10 @@ public interface PileBillingTemplateService {
|
||||
* @param stationId 充电站id
|
||||
* @param templateId 模板id
|
||||
* @param deviceType 设备类型
|
||||
* @param memberFlag 会员模板标识
|
||||
* @return
|
||||
*/
|
||||
int changeStationTemplate(String stationId, String templateId, String deviceType);
|
||||
int changeStationTemplate(String stationId, String templateId, String deviceType, String memberFlag);
|
||||
|
||||
/**
|
||||
* 创建优惠计费模板
|
||||
|
||||
@@ -305,7 +305,7 @@ public class PileRemoteService {
|
||||
}
|
||||
}
|
||||
// 修改计费模板状态
|
||||
pileBillingTemplateService.changeStationTemplate(dto.getStationId(), dto.getTemplateId(), billingTemplateVO.getDeviceType());
|
||||
pileBillingTemplateService.changeStationTemplate(dto.getStationId(), dto.getTemplateId(), billingTemplateVO.getDeviceType(), billingTemplateVO.getMemberFlag());
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -448,9 +448,9 @@ public class PileBillingTemplateServiceImpl implements PileBillingTemplateServic
|
||||
*/
|
||||
@Override
|
||||
@Transactional(readOnly = false, propagation = Propagation.REQUIRED)
|
||||
public int changeStationTemplate(String stationId, String templateId, String deviceType) {
|
||||
public int changeStationTemplate(String stationId, String templateId, String deviceType, String memberFlag) {
|
||||
// 根据stationId把站点下所有的计费模板设置为 未启用, 区分deviceType
|
||||
pileBillingTemplateMapper.updateStatusByStationId(stationId, Constants.ZERO, deviceType);
|
||||
pileBillingTemplateMapper.updateStatusByStationId(stationId, Constants.ZERO, deviceType, memberFlag);
|
||||
// 根据templateId 修改状态为启用
|
||||
pileBillingTemplateMapper.updateStatusByTemplateId(templateId, Constants.ONE);
|
||||
// 清缓存
|
||||
|
||||
@@ -609,6 +609,7 @@
|
||||
update pile_billing_template
|
||||
set status = #{status,jdbcType=VARCHAR}
|
||||
where station_id = #{stationId,jdbcType=VARCHAR}
|
||||
and member_flag = #{memberFlag,jdbcType=VARCHAR}
|
||||
and type = #{deviceType,jdbcType=VARCHAR}
|
||||
</update>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user