diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileStationInfo.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileStationInfo.java index f34b3fdae..29b410490 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileStationInfo.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/PileStationInfo.java @@ -38,6 +38,11 @@ public class PileStationInfo extends BaseEntity { private String deptId; + /** + * 停车场配置表id + */ + private String parkingId; + /** * 二维码前缀 */ diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdpartyParkingConfig.java b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdpartyParkingConfig.java new file mode 100644 index 000000000..f4df68cd7 --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/domain/ThirdpartyParkingConfig.java @@ -0,0 +1,61 @@ +package com.jsowell.pile.domain; + +import java.util.Date; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * TODO + * + * @Date 2023/8/24 16:50 + * @author Lemon + */ +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class ThirdpartyParkingConfig { + private Integer id; + + /** + * 停车场库名称 + */ + private String parkingName; + + /** + * 停车场库appId + */ + private String appId; + + /** + * 停车场库secretKey + */ + private String secretKey; + + /** + * 停车场库商户id + */ + private String parkingMerchantId; + + /** + * 票券id + */ + private String couponId; + + private Date createTime; + + private String createBy; + + private Date updateTime; + + private String updateBy; + + /** + * 删除标识(0-正常;1-删除) + */ + private String delFlag; +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartyParkingConfigMapper.java b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartyParkingConfigMapper.java new file mode 100644 index 000000000..7cb4ddcac --- /dev/null +++ b/jsowell-pile/src/main/java/com/jsowell/pile/mapper/ThirdpartyParkingConfigMapper.java @@ -0,0 +1,53 @@ +package com.jsowell.pile.mapper; + +import com.jsowell.pile.domain.ThirdpartyParkingConfig; + +/** + * TODO + * + * @Date 2023/8/24 16:50 + * @author Lemon + */ +public interface ThirdpartyParkingConfigMapper { + /** + * delete by primary key + * @param id primaryKey + * @return deleteCount + */ + int deleteByPrimaryKey(Integer id); + + /** + * insert record to table + * @param record the record + * @return insert count + */ + int insert(ThirdpartyParkingConfig record); + + /** + * insert record to table selective + * @param record the record + * @return insert count + */ + int insertSelective(ThirdpartyParkingConfig record); + + /** + * select by primary key + * @param id primary key + * @return object by primary key + */ + ThirdpartyParkingConfig selectByPrimaryKey(Integer id); + + /** + * update record selective + * @param record the updated record + * @return update count + */ + int updateByPrimaryKeySelective(ThirdpartyParkingConfig record); + + /** + * update record + * @param record the updated record + * @return update count + */ + int updateByPrimaryKey(ThirdpartyParkingConfig record); +} \ No newline at end of file diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java index 8317a93b8..f7ef53ad2 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/OrderBasicInfoServiceImpl.java @@ -830,6 +830,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { // 从redis中取出实时记录保存到表中 realTimeMonitorDataRedis2DB(orderBasicInfo.getTransactionCode(), orderCode); + + // TODO 如果该站点的停车场优惠券信息配置不为空,则需绑定一张优惠券 } /** @@ -3043,7 +3045,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { // 查询站点信息 PileStationInfo pileStationInfo = pileStationInfoService.selectPileStationInfoById(Long.valueOf(stationId)); String merchantId = pileStationInfo != null ? String.valueOf(pileStationInfo.getMerchantId()) : ""; - + String plateNumber = dto.getPlateNumber() != null ? dto.getPlateNumber() : ""; // 订单基本信息 OrderBasicInfo orderBasicInfo = OrderBasicInfo.builder() .orderCode(orderCode) @@ -3059,6 +3061,7 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService { .payStatus(Constants.ZERO) .payAmount(dto.getChargeAmount()) .payMode(dto.getPayMode()) + .plateNumber(plateNumber) .orderAmount(BigDecimal.ZERO) .virtualAmount(BigDecimal.ZERO) .settleAmount(BigDecimal.ZERO) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java index 6f4258dae..b7b4667c4 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/PileConnectorInfoServiceImpl.java @@ -466,6 +466,9 @@ public class PileConnectorInfoServiceImpl implements IPileConnectorInfoService { if (StringUtils.isNotBlank(orderCode)) { OrderBasicInfo orderBasicInfo = orderBasicInfoService.getOrderInfoByOrderCode(orderCode); List chargingRealTimeDataList = orderBasicInfoService.getChargingRealTimeData(orderBasicInfo.getTransactionCode()); + if (CollectionUtils.isEmpty(chargingRealTimeDataList)) { + continue; + } RealTimeMonitorData realTimeMonitorData = chargingRealTimeDataList.get(0); BigDecimal outputVoltage = new BigDecimal(realTimeMonitorData.getOutputVoltage()); pileConnectorInfoVO.setVoltage(outputVoltage); diff --git a/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml index 1056a5730..62fb4872a 100644 --- a/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml +++ b/jsowell-pile/src/main/resources/mapper/pile/PileStationInfoMapper.xml @@ -9,6 +9,7 @@ + @@ -58,7 +59,7 @@ - select id,merchant_id, station_name, dept_id, qrcode_prefix, alone_apply, account_number, capacity, public_parking, parking_number, + select id,merchant_id, station_name, dept_id, parking_id, qrcode_prefix, alone_apply, account_number, capacity, public_parking, parking_number, country_code, area_code, address, station_tel, service_tel, station_type, station_status, station_admin_name, park_nums, station_lng, station_lat, site_guide, construction, pictures, match_cars, park_info, park_owner, park_manager, open_all_day, business_hours, park_free, payment, support_order, remark, public_flag, amap_flag, @@ -73,6 +74,7 @@ and merchant_id = #{merchantId} and station_name like concat('%', #{stationName}, '%') and dept_id = #{deptId} + and parking_id = #{parkingId} and qrcode_prefix = #{qrcodePrefix} and alone_apply = #{aloneApply} and account_number = #{accountNumber} @@ -129,6 +131,7 @@ merchant_id, station_name, dept_id, + parking_id, qrcode_prefix, alone_apply, account_number, @@ -181,6 +184,7 @@ #{merchantId}, #{stationName}, #{deptId}, + #{parkingId}, #{qrcodePrefix}, #{aloneApply}, #{accountNumber}, @@ -236,6 +240,7 @@ merchant_id = #{merchantId}, station_name = #{stationName}, dept_id = #{deptId}, + parking_id = #{parkingId}, qrcode_prefix = #{qrcodePrefix}, alone_apply = #{aloneApply}, account_number = #{accountNumber}, diff --git a/jsowell-pile/src/main/resources/mapper/pile/ThirdpartyParkingConfigMapper.xml b/jsowell-pile/src/main/resources/mapper/pile/ThirdpartyParkingConfigMapper.xml new file mode 100644 index 000000000..deaa46f66 --- /dev/null +++ b/jsowell-pile/src/main/resources/mapper/pile/ThirdpartyParkingConfigMapper.xml @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + id, parking_name, app_id, secret_key, parking_merchant_id, coupon_id, create_time, + create_by, update_time, update_by, del_flag + + + + + delete from thirdparty_parking_config + where id = #{id,jdbcType=INTEGER} + + + + insert into thirdparty_parking_config (id, parking_name, app_id, + secret_key, parking_merchant_id, coupon_id, + create_time, create_by, update_time, + update_by, del_flag) + values (#{id,jdbcType=INTEGER}, #{parkingName,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR}, + #{secretKey,jdbcType=VARCHAR}, #{parkingMerchantId,jdbcType=VARCHAR}, #{couponId,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR}) + + + + insert into thirdparty_parking_config + + + id, + + + parking_name, + + + app_id, + + + secret_key, + + + parking_merchant_id, + + + coupon_id, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + del_flag, + + + + + #{id,jdbcType=INTEGER}, + + + #{parkingName,jdbcType=VARCHAR}, + + + #{appId,jdbcType=VARCHAR}, + + + #{secretKey,jdbcType=VARCHAR}, + + + #{parkingMerchantId,jdbcType=VARCHAR}, + + + #{couponId,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{delFlag,jdbcType=VARCHAR}, + + + + + + update thirdparty_parking_config + + + parking_name = #{parkingName,jdbcType=VARCHAR}, + + + app_id = #{appId,jdbcType=VARCHAR}, + + + secret_key = #{secretKey,jdbcType=VARCHAR}, + + + parking_merchant_id = #{parkingMerchantId,jdbcType=VARCHAR}, + + + coupon_id = #{couponId,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + del_flag = #{delFlag,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=INTEGER} + + + + update thirdparty_parking_config + set parking_name = #{parkingName,jdbcType=VARCHAR}, + app_id = #{appId,jdbcType=VARCHAR}, + secret_key = #{secretKey,jdbcType=VARCHAR}, + parking_merchant_id = #{parkingMerchantId,jdbcType=VARCHAR}, + coupon_id = #{couponId,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + create_by = #{createBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + del_flag = #{delFlag,jdbcType=VARCHAR} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/jsowell-ui/src/views/pile/station/pileList.vue b/jsowell-ui/src/views/pile/station/pileList.vue index 38e5a69e7..df1db35dd 100644 --- a/jsowell-ui/src/views/pile/station/pileList.vue +++ b/jsowell-ui/src/views/pile/station/pileList.vue @@ -173,6 +173,7 @@ { - this.loading = false; - this.getModelList(); - }, 500); - }, + // remoteMethod(val) { + // console.log("输入了", val); + // this.loading = true; + // this.search.name = val; + // this.search.start = 1; + // this.list = []; + // setTimeout(() => { + // this.loading = false; + // this.getModelList(); + // }, 500); + // }, // 分页查询 getModelList() {