新增 修改站点运营商时,将订单列表中的运营商id也进行修改

This commit is contained in:
Lemon
2023-09-06 14:55:14 +08:00
parent e1fa596818
commit cae981e390
5 changed files with 41 additions and 0 deletions

View File

@@ -239,4 +239,11 @@ public interface OrderBasicInfoMapper {
* @return * @return
*/ */
IndexOrderInfoVO getIndexOrderDetail(@Param("list") List<String> orderCodeList); IndexOrderInfoVO getIndexOrderDetail(@Param("list") List<String> orderCodeList);
/**
* 通过站点id修改运营商id
* @param stationId
* @return
*/
int updateMerchantByStationId(@Param("stationId")Long stationId, @Param("newMerchantId")String newMerchantId);
} }

View File

@@ -345,4 +345,11 @@ public interface IOrderBasicInfoService {
void returnUpdateOrderBasicInfo(OrderBasicInfo orderBasicInfo, TransactionRecordsData data); void returnUpdateOrderBasicInfo(OrderBasicInfo orderBasicInfo, TransactionRecordsData data);
OrderDetail returnUpdateOrderDetail(OrderBasicInfo orderBasicInfo, TransactionRecordsData data); OrderDetail returnUpdateOrderDetail(OrderBasicInfo orderBasicInfo, TransactionRecordsData data);
/**
* 通过站点id修改运营商id
* @param stationId
* @return
*/
int updateMerchantByStationId(Long stationId, String newMerchantId);
} }

View File

@@ -1019,6 +1019,16 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
return orderDetail; return orderDetail;
} }
/**
* 通过站点id修改运营商id
* @param stationId
* @return
*/
@Override
public int updateMerchantByStationId(Long stationId, String newMerchantId) {
return orderBasicInfoMapper.updateMerchantByStationId(stationId, newMerchantId);
}
/** /**
* 卡状态解锁 * 卡状态解锁
*/ */

View File

@@ -81,6 +81,9 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
@Autowired @Autowired
private IThirdPartyParkingConfigService parkingConfigService; private IThirdPartyParkingConfigService parkingConfigService;
@Autowired
private IOrderBasicInfoService orderBasicInfoService;
/** /**
* 查询充电站信息 * 查询充电站信息
@@ -345,6 +348,11 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
pileStationInfo.setDeptId(String.valueOf(newDeptId)); pileStationInfo.setDeptId(String.valueOf(newDeptId));
} }
/**
* 修改订单中的 merchantId
*/
orderBasicInfoService.updateMerchantByStationId(pileStationInfo.getId(), newMerchantId);
} }
/** /**

View File

@@ -1156,4 +1156,13 @@
</foreach> </foreach>
</if> </if>
</select> </select>
<update id="updateMerchantByStationId">
update
order_basic_info
set
merchant_id = #{newMerchantId,jdbcType=VARCHAR}
where
station_id = #{stationId,jdbcType=BIGINT}
</update>
</mapper> </mapper>