From 9a1173507d06c59a7c02e92ad083073e0036eadc Mon Sep 17 00:00:00 2001 From: 无关风月 <443237572@qq.com> Date: 星期四, 26 九月 2024 18:52:35 +0800 Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile --- ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/AppUserInfoDto.java | 2 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java | 137 + ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java | 2 ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/api/IotInterfaceUtil.java | 7 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java | 2 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/UserListQueryDto.java | 2 ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/WxPaymentFallbackFactory.java | 33 ruoyi-service/ruoyi-other/src/main/resources/template/充电桩申请记录.xlsx | 0 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java | 4 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserVipDetail.java | 8 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java | 6 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java | 4 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TInvoiceInformationController.java | 2 ruoyi-service/ruoyi-other/src/main/resources/bootstrap.yml | 41 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingGunServiceImpl.java | 30 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java | 21 ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/ChargingGunFallbackFactory.java | 10 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarNumDto.java | 3 ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyDetailFallbackFactory.java | 10 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/UserSiteFallbackFactory.java | 18 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/PartnerServiceImpl.java | 15 ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml | 2 ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/WeixinProperties.java | 8 ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java | 12 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/GiveVipUtil.java | 44 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java | 42 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/RuoYiChargingPileApplication.java | 1 ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxAbstractPay.java | 48 ruoyi-service/ruoyi-other/src/main/resources/template/集团用户数据.xlsx | 0 ruoyi-api/ruoyi-api-order/pom.xml | 5 ruoyi-api/ruoyi-api-account/pom.xml | 5 ruoyi-service/ruoyi-order/src/main/resources/bootstrap.yml | 43 ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java | 16 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TChargingGunMapper.java | 2 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUser.java | 11 ruoyi-service/ruoyi-account/src/main/resources/bootstrap.yml | 44 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/filter/AuthFilter.java | 3 ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/GunStatusStatisticsVO.java | 2 ruoyi-service/pom.xml | 2 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderAppealServiceImpl.java | 4 ruoyi-gateway/src/main/resources/bootstrap.yml | 25 ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/AliPaymentFallbackFactory.java | 34 ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/SignFilter.java | 21 ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java | 251 +- ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java | 13 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java | 2 ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml | 46 ruoyi-api/ruoyi-api-payment/pom.xml | 5 ruoyi-api/ruoyi-api-system/pom.xml | 4 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarUtil.java | 5108 +++++++++++++++++++++++------------------- ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java | 2 ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/AntiShakeProperties.java | 34 ruoyi-service/ruoyi-account/pom.xml | 15 ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java | 1 ruoyi-api/ruoyi-api-chargingPile/pom.xml | 5 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java | 20 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/filter/AuthFilter.java | 1 ruoyi-service/ruoyi-chargingPile/src/main/resources/bootstrap.yml | 43 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TExchangeOrderServiceImpl.java | 30 ruoyi-api/ruoyi-api-integration/src/main/java/com/ruoyi/integration/api/factory/SendMessageFallbackFactory.java | 18 ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/SysUserFallbackFactory.java | 20 ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/tools/MessageUtil.java | 44 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/filter/AuthFilter.java | 6 ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/produce/IotMessageProduce.java | 3 ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyFallbackFactory.java | 10 ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml | 6 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/CouponFallbackFactory.java | 10 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java | 6 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java | 22 ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/TChargingGunMapper.xml | 9 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java | 64 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/TEnterpriseExport.java | 35 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/GoodsFallbackFactory.java | 10 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java | 3 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/filter/AuthFilter.java | 1 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WxLoginController.java | 12 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/task/TaskUtil.java | 3 ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/AccountingStrategyOrder.java | 4 ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java | 4 ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java | 2 ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/SignProperties.java | 27 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/filter/AuthFilter.java | 1 ruoyi-api/ruoyi-api-other/pom.xml | 4 ruoyi-auth/src/main/resources/bootstrap.yml | 44 ruoyi-service/ruoyi-integration/src/main/resources/bootstrap.yml | 51 /dev/null | 80 ruoyi-service/ruoyi-payment/src/main/resources/bootstrap.yml | 44 ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java | 4 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserFallbackFactory.java | 10 ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserVipDetailFallbackFactory.java | 18 ruoyi-service/ruoyi-other/pom.xml | 7 ruoyi-gateway/pom.xml | 12 ruoyi-api/ruoyi-api-integration/pom.xml | 5 ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TVipOrderController.java | 64 ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/listener/IotMessageListener.java | 135 ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/InvoiceTypeFallbackFactory.java | 10 96 files changed, 4,197 insertions(+), 2,922 deletions(-) diff --git a/ruoyi-api/ruoyi-api-account/pom.xml b/ruoyi-api/ruoyi-api-account/pom.xml index 20ad28e..526cd85 100644 --- a/ruoyi-api/ruoyi-api-account/pom.xml +++ b/ruoyi-api/ruoyi-api-account/pom.xml @@ -28,7 +28,10 @@ </exclusion> </exclusions> </dependency> - + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-seata</artifactId> + </dependency> </dependencies> </project> \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/AppUserInfoDto.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/AppUserInfoDto.java index 24cacf9..f875a8c 100644 --- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/AppUserInfoDto.java +++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/AppUserInfoDto.java @@ -1,5 +1,6 @@ package com.ruoyi.account.api.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.account.api.model.TAppUserCar; import io.swagger.annotations.Api; import io.swagger.annotations.ApiModelProperty; @@ -16,6 +17,7 @@ @ApiModelProperty("最低会员价格") private BigDecimal minPrice; @ApiModelProperty("vip结束时间") + @JsonFormat(pattern = "yyyy-MM-dd") private LocalDateTime vipExpireTime; @ApiModelProperty("当天是否签到") private Integer isSign; diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/UserListQueryDto.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/UserListQueryDto.java index 54ad4db..960bcaf 100644 --- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/UserListQueryDto.java +++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/UserListQueryDto.java @@ -8,6 +8,8 @@ public class UserListQueryDto extends BasePage { @ApiModelProperty(value = "用户手机号") String userPhone; + @ApiModelProperty(value = "所在省code") + String provinceCode; @ApiModelProperty(value = "所在地code") String cityCode; @ApiModelProperty(value = "状态 1正常2冻结 3注销") diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserFallbackFactory.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserFallbackFactory.java index 5c3fc3f..e0b6d42 100644 --- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserFallbackFactory.java @@ -7,6 +7,8 @@ import com.ruoyi.account.api.model.TAppUserAddress; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.dto.PointChangeDto; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -36,7 +38,13 @@ @Override public R<TAppUser> getUserById(Long id) { - throw new RuntimeException("根据id查询用户失败:"+throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("根据id查询用户失败:"+throwable.getMessage()); } @Override diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserVipDetailFallbackFactory.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserVipDetailFallbackFactory.java index ebd90f7..21f6809 100644 --- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserVipDetailFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserVipDetailFallbackFactory.java @@ -4,6 +4,8 @@ import com.ruoyi.account.api.model.TAppUserVipDetail; import com.ruoyi.account.api.vo.GetAppUserVipDetail; import com.ruoyi.common.core.domain.R; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -26,12 +28,24 @@ @Override public R<TAppUserVipDetail> getAppUserVipDetail(GetAppUserVipDetail getAppUserVipDetail) { - throw new RuntimeException("获取用户当前有效的VIP明细调用失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("获取用户当前有效的VIP明细调用失败:" + throwable.getMessage()); } @Override public void updateAppUserVipDetail(TAppUserVipDetail appUserVipDetail) { - throw new RuntimeException(throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + R.fail(throwable.getMessage()); } }; } diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUser.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUser.java index 32db936..90375e1 100644 --- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUser.java +++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUser.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableLogic; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonFormat; import com.ruoyi.common.core.web.domain.BasePojo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -53,7 +54,9 @@ private Integer vipId; @ApiModelProperty(value = "会员到期时间") + @TableField("vip_end_time") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") private LocalDateTime vipEndTime; @ApiModelProperty(value = "单位id") @@ -123,6 +126,10 @@ @ApiModelProperty(value = "标签名称") @TableField(exist = false) private String tagName; + + @ApiModelProperty(value = "单位名称") + @TableField(exist = false) + private String companyName; @ApiModelProperty(value = "vip名称") @TableField(exist = false) private String vipName; @@ -136,9 +143,7 @@ @ApiModelProperty("剩余天数") @TableField(exist = false) private Long lastDays; - @ApiModelProperty(value = "单位名称") - @TableField(exist = false) - private String companyName; + } diff --git a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserVipDetail.java b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserVipDetail.java index ffc516b..046b4b8 100644 --- a/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserVipDetail.java +++ b/ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserVipDetail.java @@ -56,6 +56,10 @@ @TableField("vip_id") private Integer vipId; + @ApiModelProperty(value = "1月卡2季卡3年卡") + @TableField("vip_type") + private Integer vipType; + @ApiModelProperty(value = "会员开始时间") @TableField("start_time") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @@ -73,7 +77,9 @@ @TableField("send_month") private Integer sendMonth; - + @ApiModelProperty(value = "当时购买的vipJson") + @TableField("vip_json") + private String vipJson; @ApiModelProperty(value = "要赠送的优惠卷") @TableField("coupon_ids") private String couponIds; diff --git a/ruoyi-api/ruoyi-api-chargingPile/pom.xml b/ruoyi-api/ruoyi-api-chargingPile/pom.xml index f8da29f..c39d339 100644 --- a/ruoyi-api/ruoyi-api-chargingPile/pom.xml +++ b/ruoyi-api/ruoyi-api-chargingPile/pom.xml @@ -28,7 +28,10 @@ </exclusion> </exclusions> </dependency> - + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-seata</artifactId> + </dependency> </dependencies> </project> \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyDetailFallbackFactory.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyDetailFallbackFactory.java index 844dbb9..d8a1054 100644 --- a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyDetailFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyDetailFallbackFactory.java @@ -4,6 +4,8 @@ import com.ruoyi.chargingPile.api.feignClient.AccountingStrategyDetailClient; import com.ruoyi.chargingPile.api.model.TAccountingStrategyDetail; import com.ruoyi.common.core.domain.R; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -42,7 +44,13 @@ @Override public R<List<TAccountingStrategyDetail>> getListByAccountingStrategyId(Integer id) { - throw new RuntimeException("根据计费策略主表id策略明细失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("根据计费策略主表id策略明细失败:" + throwable.getMessage()); } @Override diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyFallbackFactory.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyFallbackFactory.java index 108ab7d..8d883c3 100644 --- a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/AccountingStrategyFallbackFactory.java @@ -3,6 +3,8 @@ import com.ruoyi.chargingPile.api.feignClient.AccountingStrategyClient; import com.ruoyi.chargingPile.api.model.TAccountingStrategy; import com.ruoyi.common.core.domain.R; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -25,7 +27,13 @@ @Override public R<TAccountingStrategy> getAccountingStrategyById(Integer id) { - throw new RuntimeException("根据id查询计费策略失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("根据id查询计费策略失败:" + throwable.getMessage()); } }; } diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/ChargingGunFallbackFactory.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/ChargingGunFallbackFactory.java index a070ffd..ad57df7 100644 --- a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/ChargingGunFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/ChargingGunFallbackFactory.java @@ -7,6 +7,8 @@ import com.ruoyi.chargingPile.api.model.TFaultMessage; import com.ruoyi.chargingPile.api.vo.SiteNameVO; import com.ruoyi.common.core.domain.R; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -36,7 +38,13 @@ @Override public R<TChargingGun> getChargingGunById(Integer id) { - throw new RuntimeException("根据id获取充电枪失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("根据id获取充电枪失败:" + throwable.getMessage()); } @Override diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/GunStatusStatisticsVO.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/GunStatusStatisticsVO.java index fe534cb..1fa2248 100644 --- a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/GunStatusStatisticsVO.java +++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/GunStatusStatisticsVO.java @@ -13,7 +13,7 @@ public class GunStatusStatisticsVO implements Serializable { @ApiModelProperty(value = "充电桩类型统计 key:充电模式(1=超级快充,2=快充,3=慢充)") - private Map<Integer,Integer> modeStatistics; + private List<Map<Integer,Integer>> modeStatistics; @ApiModelProperty(value = "状态统计 key:充电模式(1=离线,2=故障,3=充电中)") private Map<Integer,Integer> statusStatistics; @ApiModelProperty(value = "状态统计根据类型分组") diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java index c9ef789..f96faad 100644 --- a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java +++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/vo/SiteInfoVO.java @@ -12,6 +12,8 @@ public class SiteInfoVO { @ApiModelProperty(value = "电站名称") private String name; + @ApiModelProperty(value = "桩id") + private Integer chargingPileId; @ApiModelProperty(value = "桩编号") private String number; @ApiModelProperty(value = "充电枪id") diff --git a/ruoyi-api/ruoyi-api-integration/pom.xml b/ruoyi-api/ruoyi-api-integration/pom.xml index 36aa47d..ac96969 100644 --- a/ruoyi-api/ruoyi-api-integration/pom.xml +++ b/ruoyi-api/ruoyi-api-integration/pom.xml @@ -32,7 +32,10 @@ </exclusion> </exclusions> </dependency> - + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-seata</artifactId> + </dependency> </dependencies> </project> \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-integration/src/main/java/com/ruoyi/integration/api/factory/SendMessageFallbackFactory.java b/ruoyi-api/ruoyi-api-integration/src/main/java/com/ruoyi/integration/api/factory/SendMessageFallbackFactory.java index 9db561c..c88ddbe 100644 --- a/ruoyi-api/ruoyi-api-integration/src/main/java/com/ruoyi/integration/api/factory/SendMessageFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-integration/src/main/java/com/ruoyi/integration/api/factory/SendMessageFallbackFactory.java @@ -6,6 +6,8 @@ import com.ruoyi.integration.api.model.ChargingHandshake; import com.ruoyi.integration.api.model.PlatformStartCharging; import com.ruoyi.integration.api.model.PlatformStopCharging; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -29,12 +31,24 @@ @Override public String platformStartCharging(PlatformStartCharging platformStartCharging) { - throw new RuntimeException("远程启机失败" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return "远程启机失败"; } @Override public String platformStopCharging(PlatformStopCharging platformStopCharging) { - throw new RuntimeException("远程停机失败" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return "远程停机失败"; } }; } diff --git a/ruoyi-api/ruoyi-api-order/pom.xml b/ruoyi-api/ruoyi-api-order/pom.xml index 6bdc239..d3feb2c 100644 --- a/ruoyi-api/ruoyi-api-order/pom.xml +++ b/ruoyi-api/ruoyi-api-order/pom.xml @@ -32,7 +32,10 @@ <groupId>com.ruoyi</groupId> <artifactId>ruoyi-api-other</artifactId> </dependency> - + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-seata</artifactId> + </dependency> </dependencies> </project> \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/AccountingStrategyOrder.java b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/AccountingStrategyOrder.java index f8d1dcf..2736da3 100644 --- a/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/AccountingStrategyOrder.java +++ b/ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/AccountingStrategyOrder.java @@ -21,10 +21,6 @@ @TableName("t_accounting_strategy_order") public class AccountingStrategyOrder extends BasePojo { - @ApiModelProperty(value = "主键") - @TableField(value = "id") - private Integer id; - @ApiModelProperty(value = "站点id") @TableField("site_id") private Integer siteId; diff --git a/ruoyi-api/ruoyi-api-other/pom.xml b/ruoyi-api/ruoyi-api-other/pom.xml index df1d49e..3f6a651 100644 --- a/ruoyi-api/ruoyi-api-other/pom.xml +++ b/ruoyi-api/ruoyi-api-other/pom.xml @@ -32,6 +32,10 @@ <groupId>com.ruoyi</groupId> <artifactId>ruoyi-api-account</artifactId> </dependency> + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-seata</artifactId> + </dependency> </dependencies> </project> \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/CouponFallbackFactory.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/CouponFallbackFactory.java index ba006ed..e61f478 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/CouponFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/CouponFallbackFactory.java @@ -5,6 +5,8 @@ import com.ruoyi.other.api.domain.TGoods; import com.ruoyi.other.api.feignClient.CouponClient; import com.ruoyi.other.api.feignClient.GoodsClient; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -38,7 +40,13 @@ @Override public R updateCoupon(TCoupon coupon) { - throw new RuntimeException("修改优惠券失败"); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("修改优惠券失败"); } }; } diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/GoodsFallbackFactory.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/GoodsFallbackFactory.java index e9002f4..bb82c32 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/GoodsFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/GoodsFallbackFactory.java @@ -3,6 +3,8 @@ import com.ruoyi.common.core.domain.R; import com.ruoyi.other.api.domain.TGoods; import com.ruoyi.other.api.feignClient.GoodsClient; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -36,7 +38,13 @@ @Override public R updateGoods(TGoods goods) { - throw new RuntimeException("修改商品异常"); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("修改商品异常"); } }; } diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/InvoiceTypeFallbackFactory.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/InvoiceTypeFallbackFactory.java index d1a16c0..1a7c645 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/InvoiceTypeFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/InvoiceTypeFallbackFactory.java @@ -3,6 +3,8 @@ import com.ruoyi.common.core.domain.R; import com.ruoyi.other.api.domain.TInvoiceType; import com.ruoyi.other.api.feignClient.InvoiceTypeClient; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -27,7 +29,13 @@ @Override public R<TInvoiceType> getInvoiceType(Integer id) { - throw new RuntimeException(throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail(throwable.getMessage()); } }; } diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java index 45b8005..a1e3ea3 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/OtherFallbackFactory.java @@ -4,6 +4,7 @@ import com.ruoyi.common.core.domain.R; import com.ruoyi.other.api.domain.TCompany; import com.ruoyi.other.api.domain.TCoupon; +import com.ruoyi.other.api.domain.TEnterpriseUserApplication; import com.ruoyi.other.api.domain.TUserTag; import com.ruoyi.other.api.dto.TagListQueryDto; import com.ruoyi.other.api.dto.UnitListQueryDto; @@ -96,6 +97,11 @@ public R<TCoupon> getCouponById(Integer id) { return R.fail("查询优惠卷:"+throwable.getMessage()); } + + @Override + public R<List<TEnterpriseUserApplication>> getTnterPrise() { + return R.fail("查询:"+throwable.getMessage()); + } }; } } diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/UserSiteFallbackFactory.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/UserSiteFallbackFactory.java index f36972c..06e0917 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/UserSiteFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/factory/UserSiteFallbackFactory.java @@ -3,6 +3,8 @@ import com.ruoyi.common.core.domain.R; import com.ruoyi.other.api.domain.TUserSite; import com.ruoyi.other.api.feignClient.UserSiteClient; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -31,12 +33,24 @@ @Override public R addUserSite(List<TUserSite> userSite) { - throw new RuntimeException("添加用户站点失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("添加用户站点失败:" + throwable.getMessage()); } @Override public R delUserSite(Long userId) { - throw new RuntimeException("删除用户站点失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("删除用户站点失败:" + throwable.getMessage()); } }; } diff --git a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java index a496676..606bbc1 100644 --- a/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java +++ b/ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/OtherClient.java @@ -3,19 +3,13 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ruoyi.common.core.constant.ServiceNameConstants; import com.ruoyi.common.core.domain.R; -import com.ruoyi.other.api.domain.TCompany; -import com.ruoyi.other.api.domain.TCoupon; -import com.ruoyi.other.api.domain.TInvoiceType; -import com.ruoyi.other.api.domain.TUserTag; +import com.ruoyi.other.api.domain.*; import com.ruoyi.other.api.dto.TagListQueryDto; import com.ruoyi.other.api.dto.UnitListQueryDto; import com.ruoyi.other.api.factory.OtherFallbackFactory; import com.ruoyi.other.api.vo.CouponListVOVO; import org.springframework.cloud.openfeign.FeignClient; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.Map; @@ -76,12 +70,6 @@ @PostMapping(value = "/t-coupon/getCouponById") R<TCoupon> getCouponById(@RequestParam("id") Integer id); - - - - - - - - + @PutMapping(value = "/t-enterprise-user-application/export") + R<List<TEnterpriseUserApplication>> getTnterPrise(); } diff --git a/ruoyi-api/ruoyi-api-payment/pom.xml b/ruoyi-api/ruoyi-api-payment/pom.xml index dbbea4c..31bbeee 100644 --- a/ruoyi-api/ruoyi-api-payment/pom.xml +++ b/ruoyi-api/ruoyi-api-payment/pom.xml @@ -28,7 +28,10 @@ </exclusion> </exclusions> </dependency> - + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-seata</artifactId> + </dependency> </dependencies> </project> \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/AliPaymentFallbackFactory.java b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/AliPaymentFallbackFactory.java index 97ebf3e..3c7b402 100644 --- a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/AliPaymentFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/AliPaymentFallbackFactory.java @@ -7,6 +7,8 @@ import com.ruoyi.payment.api.vo.AliPaymentReq; import com.ruoyi.payment.api.vo.AliPaymentResp; import com.ruoyi.payment.api.vo.AliQueryOrder; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -30,22 +32,46 @@ @Override public R<AliPaymentResp> payment(AliPaymentReq req) { - throw new RuntimeException("调起支付宝小程序支付失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("调起支付宝小程序支付失败:" + throwable.getMessage()); } @Override public R<AliQueryOrder> query(String outTradeNo) { - throw new RuntimeException("查询支付订单失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("查询支付订单失败:" + throwable.getMessage()); } @Override public void close(String outTradeNo) { - throw new RuntimeException("关闭支付订单失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + R.fail("关闭支付订单失败:" + throwable.getMessage()); } @Override public R<RefundResp> refund(RefundReq dto) { - throw new RuntimeException("支付宝退款失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("支付宝退款失败:" + throwable.getMessage()); } }; } diff --git a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/WxPaymentFallbackFactory.java b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/WxPaymentFallbackFactory.java index 6ed2018..bab0b46 100644 --- a/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/WxPaymentFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-payment/src/main/java/com/ruoyi/payment/api/factory/WxPaymentFallbackFactory.java @@ -6,6 +6,8 @@ import com.ruoyi.payment.api.vo.NotifyV3PayDecodeRespBody; import com.ruoyi.payment.api.vo.PaymentOrder; import com.ruoyi.payment.api.vo.WxRefundNotifyResp; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.cloud.openfeign.FallbackFactory; @@ -31,12 +33,24 @@ @Override public R<NotifyV3PayDecodeRespBody> queryOrderInfo(String orderId) { - throw new RuntimeException("查询支付订单信息失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("查询支付订单信息失败:" + throwable.getMessage()); } @Override public R<Map<String, Object>> orderPay(PaymentOrder paymentOrder) { - throw new RuntimeException("调起微信支付失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("调起微信支付失败:" + throwable.getMessage()); } @Override @@ -51,13 +65,24 @@ @Override public void close(String outTradeNo) { - throw new RuntimeException("关闭支付订单失败:" + throwable.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + R.fail("关闭支付订单失败:" + throwable.getMessage()); } @Override public R<String> refundOrderR(WxPaymentRefundModel model) { + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } return R.fail("微信退款失败:" + throwable.getMessage()); - } @Override diff --git a/ruoyi-api/ruoyi-api-system/pom.xml b/ruoyi-api/ruoyi-api-system/pom.xml index 2670f57..b2f0bcd 100644 --- a/ruoyi-api/ruoyi-api-system/pom.xml +++ b/ruoyi-api/ruoyi-api-system/pom.xml @@ -28,6 +28,10 @@ </exclusion> </exclusions> </dependency> + <dependency> + <groupId>com.alibaba.cloud</groupId> + <artifactId>spring-cloud-starter-alibaba-seata</artifactId> + </dependency> </dependencies> </project> \ No newline at end of file diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java index 6ec6741..05bac54 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/domain/SysUser.java @@ -66,7 +66,6 @@ private String avatar; /** 密码 */ - @NotBlank(message = "密码不能为空") private String password; /** 帐号状态(0正常 1停用) */ diff --git a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/SysUserFallbackFactory.java b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/SysUserFallbackFactory.java index 9a8a1f6..44713a0 100644 --- a/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/SysUserFallbackFactory.java +++ b/ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/SysUserFallbackFactory.java @@ -5,6 +5,8 @@ import com.ruoyi.system.api.domain.SysUser; import com.ruoyi.system.api.feignClient.SysUserClient; import com.ruoyi.system.api.model.*; +import io.seata.core.exception.TransactionException; +import io.seata.tm.api.GlobalTransactionContext; import org.springframework.cloud.openfeign.FallbackFactory; import org.springframework.stereotype.Component; @@ -27,7 +29,13 @@ @Override public R<Boolean> updateSysUser(SysUser sysUser) { - throw new RuntimeException("更新用户失败:" + cause.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("更新用户失败:" + cause.getMessage()); } @Override @@ -92,12 +100,18 @@ @Override public R addSysUser(SysUser user) { - throw new RuntimeException("添加用户失败:" + cause.getMessage()); + return R.fail("添加用户失败:" + cause.getMessage()); } @Override public R resetPassword(SysUser user) { - throw new RuntimeException("重置用户密码失败:" + cause.getMessage()); + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return R.fail("重置用户密码失败:" + cause.getMessage()); } }; } diff --git a/ruoyi-auth/src/main/resources/bootstrap.yml b/ruoyi-auth/src/main/resources/bootstrap.yml index 0f74bbf..0122628 100644 --- a/ruoyi-auth/src/main/resources/bootstrap.yml +++ b/ruoyi-auth/src/main/resources/bootstrap.yml @@ -1,3 +1,7 @@ +server: + port: 9100 + tomcat: + basedir: /data/tomcat # Spring spring: profiles: @@ -8,6 +12,7 @@ name: ruoyi-auth main: allow-bean-definition-overriding: true + allow-circular-references: true --- spring: config: @@ -36,9 +41,7 @@ # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - --- - seata: enabled: true application-id: ${spring.application.name} @@ -51,36 +54,57 @@ config: type: nacos nacos: + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP data-id: seata-server.properties username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos registry: type: nacos nacos: application: seata-server + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# username: nacos +# password: nacos cloud: nacos: discovery: + # 开发环境 server-addr: 192.168.110.169:8848 # nacos注册中心地址 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# application: seata-server #Nacos 中 Seata 名称 +# username: nacos +# password: nacos sentinel: transport: dashboard: 127.0.0.1:8080 # Sentinel控制台地址 eager: true - - --- spring: config: @@ -90,14 +114,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java index 262a05f..d498093 100644 --- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java +++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/handler/GlobalExceptionHandler.java @@ -27,138 +27,127 @@ /** * 全局异常处理器 - * + * * @author ruoyi */ @RestControllerAdvice -public class GlobalExceptionHandler -{ - private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); - - @Value("${spring.servlet.multipart.max-file-size:4MB}") - private String maxFileSize; - @Value("${spring.servlet.multipart.max-request-size:100MB}") - private String maxRequestSize; - - - /** - * 权限码异常 - */ - @ExceptionHandler(NotPermissionException.class) - public AjaxResult handleNotPermissionException(NotPermissionException e, HttpServletRequest request) - { - String requestURI = request.getRequestURI(); - log.error("请求地址'{}',权限码校验失败'{}'", requestURI, e.getMessage()); - return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权"); - } - - /** - * 角色权限异常 - */ - @ExceptionHandler(NotRoleException.class) - public AjaxResult handleNotRoleException(NotRoleException e, HttpServletRequest request) - { - String requestURI = request.getRequestURI(); - log.error("请求地址'{}',角色权限校验失败'{}'", requestURI, e.getMessage()); - return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权"); - } - - /** - * 请求方式不支持 - */ - @ExceptionHandler(HttpRequestMethodNotSupportedException.class) - public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e, - HttpServletRequest request) - { - String requestURI = request.getRequestURI(); - log.error("请求地址'{}',不支持'{}'请求", requestURI, e.getMethod()); - return AjaxResult.error(e.getMessage()); - } - - /** - * 业务异常 - */ - @ExceptionHandler(ServiceException.class) - public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request) - { - log.error(e.getMessage(), e); - Integer code = e.getCode(); - return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage()); - } - - /** - * 拦截未知的运行时异常 - */ - @ExceptionHandler(RuntimeException.class) - public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request) - { - String requestURI = request.getRequestURI(); - log.error("请求地址'{}',发生未知异常.", requestURI, e); - return AjaxResult.error(e.getMessage()); - } - - /** - * 系统异常 - */ - @ExceptionHandler(Exception.class) - public AjaxResult handleException(Exception e, HttpServletRequest request) - { - String requestURI = request.getRequestURI(); - log.error("请求地址'{}',发生系统异常.", requestURI, e); - return AjaxResult.error(e.getMessage()); - } - - /** - * 自定义验证异常 - */ - @ExceptionHandler(BindException.class) - public AjaxResult handleBindException(BindException e) - { - log.error(e.getMessage(), e); - String message = e.getAllErrors().get(0).getDefaultMessage(); - return AjaxResult.error(message); - } - - /** - * 自定义验证异常 - */ - @ExceptionHandler(MethodArgumentNotValidException.class) - public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e) - { - log.error(e.getMessage(), e); - String message = e.getBindingResult().getFieldError().getDefaultMessage(); - return AjaxResult.error(message); - } - - /** - * 内部认证异常 - */ - @ExceptionHandler(InnerAuthException.class) - public AjaxResult handleInnerAuthException(InnerAuthException e) - { - return AjaxResult.error(e.getMessage()); - } - - /** - * 演示模式异常 - */ - @ExceptionHandler(DemoModeException.class) - public AjaxResult handleDemoModeException(DemoModeException e) - { - return AjaxResult.error("演示模式,不允许操作"); - } - - @ExceptionHandler(MaxUploadSizeExceededException.class) - public AjaxResult fileUpLoad(MaxUploadSizeExceededException e) { - log.error("上传文件异常 => : {}", e.getMessage()); - return AjaxResult.error("文件识别大小超出限制,允许的大小在" + maxFileSize); - } - - /** - * 学生端单点登录-异常信息 - */ - @ExceptionHandler(UserAppletException.class) - public AjaxResult<String> studyLoginExceptionHandler(UserAppletException e) { - return AjaxResult.error(e.getCode(), e.getMessage()); - } +public class GlobalExceptionHandler { + private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); + + @Value("${spring.servlet.multipart.max-file-size:50MB}") + private String maxFileSize; + @Value("${spring.servlet.multipart.max-request-size:100MB}") + private String maxRequestSize; + + + /** + * 权限码异常 + */ + @ExceptionHandler(NotPermissionException.class) + public AjaxResult handleNotPermissionException(NotPermissionException e, HttpServletRequest request) { + String requestURI = request.getRequestURI(); + log.error("请求地址'{}',权限码校验失败'{}'", requestURI, e.getMessage()); + return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权"); + } + + /** + * 角色权限异常 + */ + @ExceptionHandler(NotRoleException.class) + public AjaxResult handleNotRoleException(NotRoleException e, HttpServletRequest request) { + String requestURI = request.getRequestURI(); + log.error("请求地址'{}',角色权限校验失败'{}'", requestURI, e.getMessage()); + return AjaxResult.error(HttpStatus.FORBIDDEN, "没有访问权限,请联系管理员授权"); + } + + /** + * 请求方式不支持 + */ + @ExceptionHandler(HttpRequestMethodNotSupportedException.class) + public AjaxResult handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException e, + HttpServletRequest request) { + String requestURI = request.getRequestURI(); + log.error("请求地址'{}',不支持'{}'请求", requestURI, e.getMethod()); + return AjaxResult.error(e.getMessage()); + } + + /** + * 业务异常 + */ + @ExceptionHandler(ServiceException.class) + public AjaxResult handleServiceException(ServiceException e, HttpServletRequest request) { + log.error(e.getMessage(), e); + Integer code = e.getCode(); + return StringUtils.isNotNull(code) ? AjaxResult.error(code, e.getMessage()) : AjaxResult.error(e.getMessage()); + } + + /** + * 拦截未知的运行时异常 + */ + @ExceptionHandler(RuntimeException.class) + public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request) { + String requestURI = request.getRequestURI(); + log.error("请求地址'{}',发生未知异常.", requestURI, e); + throw new RuntimeException(e.getMessage()); + } + + /** + * 系统异常 + */ + @ExceptionHandler(Exception.class) + public AjaxResult handleException(Exception e, HttpServletRequest request) { + String requestURI = request.getRequestURI(); + log.error("请求地址'{}',发生系统异常.", requestURI, e); + return AjaxResult.error(e.getMessage()); + } + + /** + * 自定义验证异常 + */ + @ExceptionHandler(BindException.class) + public AjaxResult handleBindException(BindException e) { + log.error(e.getMessage(), e); + String message = e.getAllErrors().get(0).getDefaultMessage(); + return AjaxResult.error(message); + } + + /** + * 自定义验证异常 + */ + @ExceptionHandler(MethodArgumentNotValidException.class) + public Object handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { + log.error(e.getMessage(), e); + String message = e.getBindingResult().getFieldError().getDefaultMessage(); + return AjaxResult.error(message); + } + + /** + * 内部认证异常 + */ + @ExceptionHandler(InnerAuthException.class) + public AjaxResult handleInnerAuthException(InnerAuthException e) { + return AjaxResult.error(e.getMessage()); + } + + /** + * 演示模式异常 + */ + @ExceptionHandler(DemoModeException.class) + public AjaxResult handleDemoModeException(DemoModeException e) { + return AjaxResult.error("演示模式,不允许操作"); + } + + @ExceptionHandler(MaxUploadSizeExceededException.class) + public AjaxResult fileUpLoad(MaxUploadSizeExceededException e) { + log.error("上传文件异常 => : {}", e.getMessage()); + return AjaxResult.error("文件识别大小超出限制,允许的大小在" + maxFileSize); + } + + /** + * 学生端单点登录-异常信息 + */ + @ExceptionHandler(UserAppletException.class) + public AjaxResult<String> studyLoginExceptionHandler(UserAppletException e) { + return AjaxResult.error(e.getCode(), e.getMessage()); + } } diff --git a/ruoyi-gateway/pom.xml b/ruoyi-gateway/pom.xml index 35f7df5..f858a41 100644 --- a/ruoyi-gateway/pom.xml +++ b/ruoyi-gateway/pom.xml @@ -114,18 +114,6 @@ <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> - <dependency> - <groupId>com.ruoyi</groupId> - <artifactId>ruoyi-api-account</artifactId> - <version>3.6.2</version> - <scope>compile</scope> - </dependency> - <dependency> - <groupId>com.ruoyi</groupId> - <artifactId>ruoyi-api-system</artifactId> - <version>3.6.2</version> - <scope>compile</scope> - </dependency> </dependencies> diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/AntiShakeProperties.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/AntiShakeProperties.java new file mode 100644 index 0000000..4ae2c6f --- /dev/null +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/AntiShakeProperties.java @@ -0,0 +1,34 @@ +package com.ruoyi.gateway.config.properties; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.context.annotation.Configuration; + +/** + * @author ruoyi + */ +@Configuration +@RefreshScope +@ConfigurationProperties(prefix = "security.anti-shake") +public class AntiShakeProperties { + + private Boolean enable; + + private Long interval; + + public Boolean getEnable() { + return enable; + } + + public void setEnable(Boolean enable) { + this.enable = enable; + } + + public Long getInterval() { + return interval; + } + + public void setInterval(Long interval) { + this.interval = interval; + } +} diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/SignProperties.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/SignProperties.java new file mode 100644 index 0000000..bcb77e1 --- /dev/null +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/config/properties/SignProperties.java @@ -0,0 +1,27 @@ +package com.ruoyi.gateway.config.properties; + +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.context.annotation.Configuration; + +import java.util.ArrayList; +import java.util.List; + +/** + * @author ruoyi + */ +@Configuration +@RefreshScope +@ConfigurationProperties(prefix = "security.sign") +public class SignProperties { + + private Boolean enable; + + public Boolean getEnable() { + return enable; + } + + public void setEnable(Boolean enable) { + this.enable = enable; + } +} diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java index 6aa40ff..bf60f1c 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/AuthFilter.java @@ -1,5 +1,6 @@ package com.ruoyi.gateway.filter; +import com.ruoyi.gateway.config.properties.AntiShakeProperties; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -39,9 +40,12 @@ // 排除过滤的 uri 地址,nacos自行添加 @Autowired private IgnoreWhiteProperties ignoreWhite; + @Autowired + private AntiShakeProperties antiShakeProperties; @Autowired private RedisService redisService; + @@ -59,7 +63,7 @@ try { antiShake(request); }catch (Exception e){ - log.error("[重复提交]请求路径:{}", exchange.getRequest().getPath()); + log.error(e.getMessage()); return ServletUtils.webFluxResponseWriter(exchange.getResponse(), e.getMessage(), HttpStatus.SUCCESS); } @@ -129,7 +133,7 @@ */ public void antiShake(ServerHttpRequest request) throws Exception{ HttpMethod method = request.getMethod(); - if(HttpMethod.OPTIONS == method){ + if(HttpMethod.OPTIONS == method || !antiShakeProperties.getEnable()){ return; } HttpHeaders headers = request.getHeaders(); @@ -155,8 +159,8 @@ Long old_timestamp = Long.valueOf(o.toString()); Long new_timestamp = Long.valueOf(timestamp); //两个请求时间差小于1秒,判定为重复提交 - if((new_timestamp - old_timestamp) <= 500){ - throw new RuntimeException("重复提交"); + if((new_timestamp - old_timestamp) <= antiShakeProperties.getInterval()){ + throw new RuntimeException(url + "----->重复提交"); }else{ cacheMap.put(url, timestamp); } diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/SignFilter.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/SignFilter.java index 11816ce..5b865dc 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/SignFilter.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/SignFilter.java @@ -3,27 +3,21 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; -import com.ruoyi.common.core.constant.CacheConstants; import com.ruoyi.common.core.constant.HttpStatus; -import com.ruoyi.common.core.constant.SecurityConstants; import com.ruoyi.common.core.constant.TokenConstants; -import com.ruoyi.common.core.utils.JwtUtils; import com.ruoyi.common.core.utils.ServletUtils; import com.ruoyi.common.core.utils.StringUtils; -import com.ruoyi.common.redis.service.RedisService; import com.ruoyi.gateway.config.properties.IgnoreWhiteProperties; -import io.jsonwebtoken.Claims; +import com.ruoyi.gateway.config.properties.SignProperties; import org.apache.commons.codec.binary.Base64; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Value; import org.springframework.cloud.gateway.filter.GatewayFilterChain; import org.springframework.cloud.gateway.filter.GlobalFilter; import org.springframework.core.Ordered; import org.springframework.core.io.buffer.DataBuffer; import org.springframework.core.io.buffer.DataBufferUtils; -import org.springframework.http.HttpHeaders; import org.springframework.http.HttpMethod; import org.springframework.http.server.reactive.ServerHttpRequest; import org.springframework.http.server.reactive.ServerHttpRequestDecorator; @@ -37,7 +31,6 @@ import java.util.Collections; import java.util.Comparator; import java.util.List; -import java.util.concurrent.atomic.AtomicReference; /** * 网关鉴权 @@ -48,11 +41,11 @@ public class SignFilter implements GlobalFilter, Ordered { private static final Logger log = LoggerFactory.getLogger(SignFilter.class); - @Value("${security.sign}") - private boolean parameter_signature; - @Autowired private IgnoreWhiteProperties ignoreWhite; + + @Autowired + private SignProperties signProperties; @Override @@ -71,13 +64,13 @@ } String sign = request.getHeaders().getFirst(TokenConstants.SIGN); String nonce_str = request.getHeaders().getFirst(TokenConstants.NONCE_STR); - if (parameter_signature && StringUtils.isEmpty(sign)) { + if (signProperties.getEnable() && StringUtils.isEmpty(sign)) { return unauthorizedResponse(exchange, "签名不能为空!"); } - if (parameter_signature && StringUtils.isEmpty(nonce_str)) { + if (signProperties.getEnable() && StringUtils.isEmpty(nonce_str)) { return unauthorizedResponse(exchange, "签名不能为空!"); } - if(parameter_signature){ + if(signProperties.getEnable()){ return authSign(exchange, chain, sign, nonce_str); } return chain.filter(exchange.mutate().request(mutate.build()).build()); diff --git a/ruoyi-gateway/src/main/resources/bootstrap.yml b/ruoyi-gateway/src/main/resources/bootstrap.yml index 8fb6e4a..1beff53 100644 --- a/ruoyi-gateway/src/main/resources/bootstrap.yml +++ b/ruoyi-gateway/src/main/resources/bootstrap.yml @@ -1,3 +1,8 @@ +server: + port: 9000 + tomcat: + basedir: /data/tomcat + max-swallow-size: 100MB # Spring spring: application: @@ -49,6 +54,8 @@ server-addr: 192.168.110.169:8848 dataId: sentinel-ruoyi-gateway groupId: DEFAULT_GROUP + username: nacos + password: nacos data-type: json rule-type: gw-flow --- @@ -60,14 +67,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: c2f47d1c-6355-4a68-b357-7523d73b2d13 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: c2f47d1c-6355-4a68-b357-7523d73b2d13 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 @@ -80,14 +91,16 @@ eager: true transport: # 控制台地址 - dashboard: 122.9.150.46:8718 + dashboard: 192.168.0.137:8718 # nacos配置持久化 datasource: ds1: nacos: - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 dataId: sentinel-ruoyi-gateway groupId: DEFAULT_GROUP + username: nacos + password: nacos data-type: json rule-type: gw-flow --- diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java index 537141f..3fc922f 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java @@ -6,6 +6,7 @@ import com.ruoyi.common.security.annotation.EnableCustomConfig; import com.ruoyi.common.security.annotation.EnableRyFeignClients; import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.transaction.annotation.EnableTransactionManagement; /** @@ -21,8 +22,7 @@ @EnableTransactionManagement public class RuoYiSystemApplication { - public static void main(String[] args) - { + public static void main(String[] args) { SpringApplication.run(RuoYiSystemApplication.class, args); System.out.println("(♥◠‿◠)ノ゙ 系统模块启动成功 ლ(´ڡ`ლ)゙ \n" + " .-------. ____ __ \n" + diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java index 268fb6b..4780d71 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java @@ -19,6 +19,7 @@ import com.ruoyi.system.query.GetSysUserList; import com.ruoyi.system.query.ShopUserStart; import com.ruoyi.system.service.*; +import io.seata.core.context.RootContext; import io.seata.spring.annotation.GlobalTransactional; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -678,7 +679,8 @@ @ResponseBody @PostMapping("/addSysUser") @Transactional(rollbackFor = Exception.class) - public R addSysUser(@RequestBody SysUser user){ + public R addSysUser(@RequestBody SysUser user) { + System.err.println("事务ID:" + RootContext.getXID()); if(StringUtils.isEmpty(user.getUserName())){ user.setUserName(user.getPhonenumber()); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/filter/AuthFilter.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/filter/AuthFilter.java index 9b0c010..392bd32 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/filter/AuthFilter.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/filter/AuthFilter.java @@ -12,6 +12,7 @@ import org.apache.logging.log4j.core.config.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml index cb911b6..30c1036 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml @@ -1,3 +1,7 @@ +server: + port: 9800 + tomcat: + basedir: /data/tomcat # Spring spring: application: @@ -36,15 +40,12 @@ # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - - --- - seata: enabled: true application-id: ${spring.application.name} tx-service-group: seata_tx_group #此处配置自定义的seata事务分组名称 - enable-auto-data-source-proxy: false #关闭数据库代理 + enable-auto-data-source-proxy: false service: vgroup-mapping: seata_tx_group: default @@ -52,36 +53,57 @@ config: type: nacos nacos: + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP data-id: seata-server.properties username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos registry: type: nacos nacos: application: seata-server + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# username: nacos +# password: nacos cloud: nacos: discovery: + # 开发环境 server-addr: 192.168.110.169:8848 # nacos注册中心地址 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# application: seata-server #Nacos 中 Seata 名称 +# username: nacos +# password: nacos sentinel: transport: dashboard: 127.0.0.1:8080 # Sentinel控制台地址 eager: true - - --- spring: config: @@ -91,14 +113,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml index a714ab5..50315be 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml @@ -123,10 +123,10 @@ <select id="checkEmailUnique" parameterType="String" resultMap="SysUserResult"> select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1 </select> - <select id="getList" resultType="com.ruoyi.system.api.domain.SysUser"> - select *,nick_name nickName,login_date loginDate,create_time createTime,user_id userId from sys_user where 1=1 + <select id="getList" resultMap="SysUserResult"> + select * from sys_user where 1=1 <if test="req.search !=null and req.search !=''"> - and (phonenumber like concat("%", #{phonenumber},"%") or nick_name like concat("%", #{phonenumber},"%")) + and (phonenumber like concat("%", #{req.search},"%") or nick_name like concat("%", #{req.search},"%")) </if> <if test="null != req.siteId"> and user_id in (select user_id from t_user_site where site_id = #{req.siteId}) diff --git a/ruoyi-service/pom.xml b/ruoyi-service/pom.xml index 4988328..d1690fb 100644 --- a/ruoyi-service/pom.xml +++ b/ruoyi-service/pom.xml @@ -7,7 +7,7 @@ <version>3.6.2</version> </parent> <modelVersion>4.0.0</modelVersion> - + <modules> <module>ruoyi-account</module> <module>ruoyi-chargingPile</module> diff --git a/ruoyi-service/ruoyi-account/pom.xml b/ruoyi-service/ruoyi-account/pom.xml index 7cd42a7..a464162 100644 --- a/ruoyi-service/ruoyi-account/pom.xml +++ b/ruoyi-service/ruoyi-account/pom.xml @@ -150,7 +150,13 @@ <version>1.0.4</version> <scope>compile</scope> </dependency> - + <dependency> + <groupId>com.huaweicloud.apigateway</groupId> + <artifactId>apigateway</artifactId> + <version>3.2.5</version> + <scope>system</scope> + <systemPath>${project.basedir}/lib/java-sdk-core-3.2.5.jar</systemPath> + </dependency> </dependencies> <build> @@ -173,6 +179,13 @@ <directory>src/main/resources</directory> </resource> <resource> + <directory>lib</directory> + <targetPath>/BOOT-INF/lib/</targetPath> + <includes> + <include>**/*.jar</include> + </includes> + </resource> + <resource> <directory>src/main/java</directory> <includes> <include>**/*.xml</include> diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java index 5b8ce08..3b77098 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java @@ -219,6 +219,7 @@ Page<TAppUser> page = appUserService.lambdaQuery() .like(userListQueryDto.getUserPhone() != null && !"".equals(userListQueryDto.getUserPhone()), TAppUser::getPhone, userListQueryDto.getUserPhone()) .eq(userListQueryDto.getCompanyId() != null, TAppUser::getCompanyId, userListQueryDto.getCompanyId()) + .like(userListQueryDto.getProvinceCode() != null && !"".equals(userListQueryDto.getProvinceCode()), TAppUser::getProvinceCode, userListQueryDto.getProvinceCode()) .eq(userListQueryDto.getCityCode() != null && !"".equals(userListQueryDto.getCityCode()), TAppUser::getCityCode, userListQueryDto.getCityCode()) .eq(userListQueryDto.getStatus() != null, TAppUser::getStatus, userListQueryDto.getStatus()) .eq(userListQueryDto.getVipTypeId() != null, TAppUser::getVipId, userListQueryDto.getVipTypeId()) @@ -446,12 +447,21 @@ pointsQueryDto.setUserId(tokenService.getLoginUserApplet().getUserId()); } List<Integer> types = new ArrayList<>(); - if (pointsQueryDto.getType()!=null){ + if (pointsQueryDto.getType()==null){ types.add(1); types.add(2); types.add(3); types.add(4); types.add(5); + types.add(6); + }else if (pointsQueryDto.getType()==1){ + types.add(1); + types.add(2); + types.add(3); + types.add(4); + types.add(5); + }else if (pointsQueryDto.getType()==2){ + types.add(6); } Page<TAppUserIntegralChange> page = integralChangeService.lambdaQuery() .eq(TAppUserIntegralChange::getAppUserId, pointsQueryDto.getUserId()) @@ -639,7 +649,7 @@ plusDay = 12; } //增加vipDetail - giveVipUtil.sendVip(nowUser, giveVipDto.getVipId(),plusDay); + giveVipUtil.sendVip(nowUser, giveVipDto.getVipId(),plusDay,giveVipDto.getType()); appUserService.updateById(nowUser); } return R.ok(); @@ -775,6 +785,17 @@ if (signService.lambdaQuery().eq(TAppUserSign::getSignDay, LocalDate.now()).eq(TAppUserSign::getAppUserId, userId).count()>0){ return R.fail("今日已签到"); } + + //判断当前生效的vipDetail + TAppUserVipDetail one = tAppUserVipDetailService.lambdaQuery().le(TAppUserVipDetail::getStartTime, LocalDateTime.now()).ge(TAppUserVipDetail::getEndTime, LocalDateTime.now()).eq(TAppUserVipDetail::getAppUserId, userId).last("limit 1").one(); + boolean doubleVip = false; + if (one!=null){ + TVip tVip = JSONObject.parseObject(one.getVipJson(), TVip.class); + if (tVip.getDoubleIntegration()==1){ + doubleVip = true; + } + } + //签到业务 TAppUserSign appUserSign = new TAppUserSign(); appUserSign.setSignDay(LocalDate.now()); @@ -790,6 +811,9 @@ Integer points = 0; Integer point = jsonObject.getInteger("num1"); points= points+point; + if (doubleVip){ + points= points+point; + } JSONArray num2 = jsonObject.getJSONArray("num2"); if (num2!=null) { //获取连续签到的规则放入map @@ -804,6 +828,9 @@ Integer i = map.get(days); if (i!=null){ points= points+i; + if (doubleVip){ + points= points+i; + } appUserSign.setIsGift(1); signService.updateById(appUserSign); } @@ -813,6 +840,8 @@ appUserService.updateById(byId); return R.ok(); } + + //已签到日期 @ApiOperation(value = "本月已签到日期", tags = {"小程序-个人中心-签到"}) @GetMapping(value = "/user/has/sign") @@ -872,6 +901,16 @@ TAppUser byId = appUserService.getById(userId); appUserCar.setAppUserId(userId); + //判断当前生效的vipDetail + TAppUserVipDetail one = tAppUserVipDetailService.lambdaQuery().le(TAppUserVipDetail::getStartTime, LocalDateTime.now()).ge(TAppUserVipDetail::getEndTime, LocalDateTime.now()).eq(TAppUserVipDetail::getAppUserId, userId).last("limit 1").one(); + boolean doubleVip = false; + if (one!=null){ + TVip tVip = JSONObject.parseObject(one.getVipJson(), TVip.class); + if (tVip.getDoubleIntegration()==1){ + doubleVip = true; + } + } + //如果是第一次添加车辆,增加积分 Long count = appUserCarService.lambdaQuery().eq(TAppUserCar::getAppUserId, userId).count(); @@ -885,27 +924,46 @@ Integer point = 0; //增加车牌50分,必填 point = point+jsonObject.getInteger("num1"); + if (doubleVip){ + point = point+jsonObject.getInteger("num1"); + } //增加车型分 if (StringUtils.isNotEmpty(appUserCar.getVehicleModel())){ point = point+jsonObject.getInteger("num2"); + if (doubleVip){ + point = point+jsonObject.getInteger("num2"); + } } //增加车辆用途分 if (StringUtils.isNotEmpty(appUserCar.getVehicleUse())){ point = point+jsonObject.getInteger("num3"); + if (doubleVip){ + point = point+jsonObject.getInteger("num3"); + } } //增加续航分 if (StringUtils.isNotEmpty(appUserCar.getEndurance())){ point = point+jsonObject.getInteger("num4"); + if (doubleVip){ + point = point+jsonObject.getInteger("num4"); + } } //增加积分记录 pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+point,5,userId,appUserCar.getLicensePlate(),""); byId.setPoints(byId.getPoints()+point); byId.setFirstAdd(1); - appUserService.updateById(byId); } + CarNumDto carNumDto = CarUtil.carNum(appUserCar.getLicensePlate()); + if (carNumDto==null){ + return R.fail("请输入正确的车牌"); + } + + byId.setCityCode(carNumDto.getAreaCode()); + byId.setProvinceCode(carNumDto.getAreaCode().substring(0,2)+"0000"); + appUserService.updateById(byId); // appUserCarService.saveOrUpdate(appUserCar); diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TInvoiceInformationController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TInvoiceInformationController.java index 5eb18cf..3383c94 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TInvoiceInformationController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TInvoiceInformationController.java @@ -89,7 +89,7 @@ public AjaxResult editInvoiceInformation(@RequestBody TInvoiceInformation invoiceInformation){ Long userId = tokenService.getLoginUserApplet().getUserId(); //如果当前是默认抬头,则需要去除其他的默认配置 - if(1 == invoiceInformation.getIsDefault()){ + if(null != invoiceInformation.getIsDefault() && 1 == invoiceInformation.getIsDefault()){ TInvoiceInformation one = invoiceInformationService.getOne(new LambdaQueryWrapper<TInvoiceInformation>().eq(TInvoiceInformation::getDelFlag, 0) .eq(TInvoiceInformation::getIsDefault, 1).eq(TInvoiceInformation::getAppUserId, userId)); if(null != one && !one.getId().equals(invoiceInformation.getId())){ diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WxLoginController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WxLoginController.java index 12b3094..de9af48 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WxLoginController.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WxLoginController.java @@ -67,4 +67,16 @@ appletUserDecodeData.setOpenId(openid); return AjaxResult.success(appUserService.wxLogin(appletUserDecodeData,data.getInviteUserId())); } + + + /** + * 测试用 + * @param appletUserDecodeData + * @return + */ + @ApiOperation(value = "通过code获得openid,获取用户信息",tags = {"微信小程序登录"}) + @PostMapping("/openIdByJsCodeTest") + public AjaxResult<Map<String, Object>> openIdByJsCode(@RequestBody AppletUserDecodeData appletUserDecodeData) { + return AjaxResult.success(appUserService.wxLogin(appletUserDecodeData, null)); + } } diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/filter/AuthFilter.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/filter/AuthFilter.java index a529a5f..68fa2ca 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/filter/AuthFilter.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/filter/AuthFilter.java @@ -11,6 +11,7 @@ import org.apache.logging.log4j.core.config.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/task/TaskUtil.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/task/TaskUtil.java index 7e87177..122ca09 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/task/TaskUtil.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/task/TaskUtil.java @@ -12,6 +12,7 @@ import javax.annotation.Resource; import java.time.LocalDate; +import java.time.LocalDateTime; import java.util.List; @@ -61,7 +62,7 @@ @Scheduled(fixedRate = 1000 * 60) public void changeVipId(){ - LocalDate currentDate = LocalDate.now(); + LocalDateTime currentDate = LocalDateTime.now(); List<TAppUserVipDetail> recentDetails = tAppUserVipDetailService.lambdaQuery() .le(TAppUserVipDetail::getStartTime, currentDate) .ge(TAppUserVipDetail::getEndTime, currentDate) diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarNumDto.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarNumDto.java index ed30b43..1c41268 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarNumDto.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarNumDto.java @@ -8,5 +8,6 @@ private String pcode; private String province; private String city; - private String code; + private String Hp; + private String AreaCode; } \ No newline at end of file diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarUtil.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarUtil.java index 532cc5d..8087a9e 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarUtil.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/CarUtil.java @@ -9,2370 +9,2766 @@ public class CarUtil { public static CarNumDto carNum(String num) { - String jsonStr = "{\"date\":[\n" + - "{\n" + - "\"code\":\"冀A\",\n" + - "\"city\":\"石家庄\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀B\",\n" + - "\"city\":\"唐山\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀C\",\n" + - "\"city\":\"秦皇岛\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀D\",\n" + - "\"city\":\"邯郸\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀E\",\n" + - "\"city\":\"邢台\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀F\",\n" + - "\"city\":\"保定\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀G\",\n" + - "\"city\":\"张家口\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀H\",\n" + - "\"city\":\"承德\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀J\",\n" + - "\"city\":\"沧州\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀R\",\n" + - "\"city\":\"廊坊\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀S\",\n" + - "\"city\":\"沧州\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"冀T\",\n" + - "\"city\":\"衡水\",\n" + - "\"province\":\"河北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽A\",\n" + - "\"city\":\"沈阳\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽B\",\n" + - "\"city\":\"大连\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽C\",\n" + - "\"city\":\"鞍山\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽D\",\n" + - "\"city\":\"抚顺\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽E\",\n" + - "\"city\":\"本溪\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽F\",\n" + - "\"city\":\"丹东\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽G\",\n" + - "\"city\":\"锦州\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽H\",\n" + - "\"city\":\"营口\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽J\",\n" + - "\"city\":\"阜新\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽K\",\n" + - "\"city\":\"辽阳\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽L\",\n" + - "\"city\":\"盘锦\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽M\",\n" + - "\"city\":\"铁岭\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽N\",\n" + - "\"city\":\"朝阳\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"辽p\",\n" + - "\"city\":\"葫芦岛\",\n" + - "\"province\":\"辽宁\",\n" + - "\"pcode\":\"LN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖A\",\n" + - "\"city\":\"合肥\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖B\",\n" + - "\"city\":\"芜湖\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖C\",\n" + - "\"city\":\"蚌埠\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖D\",\n" + - "\"city\":\"淮南\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖E\",\n" + - "\"city\":\"马鞍山\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖F\",\n" + - "\"city\":\"淮北\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖G\",\n" + - "\"city\":\"铜陵\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖H\",\n" + - "\"city\":\"安庆\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖J\",\n" + - "\"city\":\"黄山\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖K\",\n" + - "\"city\":\"阜阳\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖L\",\n" + - "\"city\":\"宿州\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖M\",\n" + - "\"city\":\"滁州\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖N\",\n" + - "\"city\":\"六安\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖p\",\n" + - "\"city\":\"宣城\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖Q\",\n" + - "\"city\":\"巢湖\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖R\",\n" + - "\"city\":\"池州\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"皖S\",\n" + - "\"city\":\"亳州\",\n" + - "\"province\":\"安徽\",\n" + - "\"pcode\":\"AH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏A\",\n" + - "\"city\":\"南京\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏B\",\n" + - "\"city\":\"无锡\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏C\",\n" + - "\"city\":\"徐州\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏D\",\n" + - "\"city\":\"常州\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏E\",\n" + - "\"city\":\"苏州\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏F\",\n" + - "\"city\":\"南通\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏G\",\n" + - "\"city\":\"连云港\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏H\",\n" + - "\"city\":\"淮安\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏J\",\n" + - "\"city\":\"盐城\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏K\",\n" + - "\"city\":\"扬州\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏L\",\n" + - "\"city\":\"镇江\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏M\",\n" + - "\"city\":\"泰州\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"苏N\",\n" + - "\"city\":\"宿迁\",\n" + - "\"province\":\"江苏\",\n" + - "\"pcode\":\"JS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂A\",\n" + - "\"city\":\"武汉\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂B\",\n" + - "\"city\":\"黄石\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂C\",\n" + - "\"city\":\"十堰\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂D\",\n" + - "\"city\":\"荆州\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂E\",\n" + - "\"city\":\"宜昌\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂F\",\n" + - "\"city\":\"襄樊\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂G\",\n" + - "\"city\":\"鄂州\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂H\",\n" + - "\"city\":\"荆门 \",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂J\",\n" + - "\"city\":\"黄冈\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂K\",\n" + - "\"city\":\"孝感\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂L\",\n" + - "\"city\":\"咸宁\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂M\",\n" + - "\"city\":\"仙桃\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂N\",\n" + - "\"city\":\"潜江\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂p\",\n" + - "\"city\":\"神农架林区\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂Q\",\n" + - "\"city\":\"恩施土家族苗族自治州\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂R\",\n" + - "\"city\":\"天门\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鄂S\",\n" + - "\"city\":\"随州\",\n" + - "\"province\":\"湖北\",\n" + - "\"pcode\":\"HB\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋A\",\n" + - "\"city\":\"太原\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋B\",\n" + - "\"city\":\"大同\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋C\",\n" + - "\"city\":\"阳泉\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋D\",\n" + - "\"city\":\"长治\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋E\",\n" + - "\"city\":\"晋城\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋F\",\n" + - "\"city\":\"朔州\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋H\",\n" + - "\"city\":\"忻州\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋J\",\n" + - "\"city\":\"吕梁地区\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋K\",\n" + - "\"city\":\"晋中\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋L\",\n" + - "\"city\":\"临汾\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"晋M\",\n" + - "\"city\":\"运城\",\n" + - "\"province\":\"山西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉A\",\n" + - "\"city\":\"长春\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉B\",\n" + - "\"city\":\"吉林\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉C\",\n" + - "\"city\":\"四平\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉D\",\n" + - "\"city\":\"辽源\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉E\",\n" + - "\"city\":\"通化\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉F\",\n" + - "\"city\":\"白山\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉G\",\n" + - "\"city\":\"白城\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉H\",\n" + - "\"city\":\"延边朝鲜族自治州\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉J\",\n" + - "\"city\":\"松原\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"吉K\",\n" + - "\"city\":\"长白山\",\n" + - "\"province\":\"吉林\",\n" + - "\"pcode\":\"JL\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤A\",\n" + - "\"city\":\"广州\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤B\",\n" + - "\"city\":\"深圳\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤C\",\n" + - "\"city\":\"珠海\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤D\",\n" + - "\"city\":\"汕头\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤E\",\n" + - "\"city\":\"佛山\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤F\",\n" + - "\"city\":\"韶关\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤G\",\n" + - "\"city\":\"湛江\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤H\",\n" + - "\"city\":\"肇庆\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤J\",\n" + - "\"city\":\"江门\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤K\",\n" + - "\"city\":\"茂名\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤L\",\n" + - "\"city\":\"惠州\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤M\",\n" + - "\"city\":\"梅州\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤N\",\n" + - "\"city\":\"汕尾\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤p\",\n" + - "\"city\":\"河源\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤Q\",\n" + - "\"city\":\"阳江\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤R\",\n" + - "\"city\":\"清远\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤S\",\n" + - "\"city\":\"东莞\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤T\",\n" + - "\"city\":\"中山\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤U\",\n" + - "\"city\":\"潮州\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤V\",\n" + - "\"city\":\"揭阳\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤W\",\n" + - "\"city\":\"云浮\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤X\",\n" + - "\"city\":\"顺德区\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤Y\",\n" + - "\"city\":\"南海区\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"粤Z\",\n" + - "\"city\":\"港澳进入内地车辆\",\n" + - "\"province\":\"广东\",\n" + - "\"pcode\":\"GD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"宁A\",\n" + - "\"city\":\"银川\",\n" + - "\"province\":\"宁夏\",\n" + - "\"pcode\":\"NX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"宁B\",\n" + - "\"city\":\"石嘴山\",\n" + - "\"province\":\"宁夏\",\n" + - "\"pcode\":\"NX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"宁C\",\n" + - "\"city\":\"银南\",\n" + - "\"province\":\"宁夏\",\n" + - "\"pcode\":\"NX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"宁D\",\n" + - "\"city\":\"固原\",\n" + - "\"province\":\"宁夏\",\n" + - "\"pcode\":\"NX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"宁E\",\n" + - "\"city\":\"中卫\",\n" + - "\"province\":\"宁夏\",\n" + - "\"pcode\":\"NX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京A\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京B\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京C\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京D\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京E\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京F\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京G\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京H\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京J\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京K\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京L\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京M\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"京Y\",\n" + - "\"city\":\"北京\",\n" + - "\"province\":\"北京\",\n" + - "\"pcode\":\"BJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫A\",\n" + - "\"city\":\"郑州\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫B\",\n" + - "\"city\":\"开封\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫C\",\n" + - "\"city\":\"洛阳\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫D\",\n" + - "\"city\":\"平顶山\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫E\",\n" + - "\"city\":\"安阳\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫F\",\n" + - "\"city\":\"鹤壁\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫G\",\n" + - "\"city\":\"新乡\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫H\",\n" + - "\"city\":\"焦作\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫J\",\n" + - "\"city\":\"濮阳\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫K\",\n" + - "\"city\":\"许昌\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫L\",\n" + - "\"city\":\"漯河\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫M\",\n" + - "\"city\":\"三门峡\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫N\",\n" + - "\"city\":\"商丘\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫p\",\n" + - "\"city\":\"周口\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫Q\",\n" + - "\"city\":\"驻马店\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫R\",\n" + - "\"city\":\"南阳\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫S\",\n" + - "\"city\":\"信阳\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"豫U\",\n" + - "\"city\":\"济源\",\n" + - "\"province\":\"河南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑A\",\n" + - "\"city\":\"哈尔滨\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑B\",\n" + - "\"city\":\"齐齐哈尔\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑C\",\n" + - "\"city\":\"牡丹江\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑D\",\n" + - "\"city\":\"佳木斯\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑E\",\n" + - "\"city\":\"大庆\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑F\",\n" + - "\"city\":\"伊春\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑G\",\n" + - "\"city\":\"鸡西\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑H\",\n" + - "\"city\":\"鹤岗\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑J\",\n" + - "\"city\":\"双鸭山\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑K\",\n" + - "\"city\":\"七台河\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑L\",\n" + - "\"city\":\"松花江地区\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑M\",\n" + - "\"city\":\"绥化\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑N\",\n" + - "\"city\":\"黑河\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑p\",\n" + - "\"city\":\"大兴安岭地区\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"黑R\",\n" + - "\"city\":\"农垦系统\",\n" + - "\"province\":\"黑龙江\",\n" + - "\"pcode\":\"HLJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁A \",\n" + - "\"city\":\"济南\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁B\",\n" + - "\"city\":\"青岛\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁C\",\n" + - "\"city\":\"淄博\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁D\",\n" + - "\"city\":\"枣庄\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁E\",\n" + - "\"city\":\"东营\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁F\",\n" + - "\"city\":\"烟台\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁G\",\n" + - "\"city\":\"潍坊\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁H\",\n" + - "\"city\":\"济宁\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁J\",\n" + - "\"city\":\"泰安\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁K\",\n" + - "\"city\":\"威海\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁L\",\n" + - "\"city\":\"日照\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁M\",\n" + - "\"city\":\"滨州\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁N\",\n" + - "\"city\":\"德州\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁p\",\n" + - "\"city\":\"聊城\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁Q\",\n" + - "\"city\":\"临沂\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁R\",\n" + - "\"city\":\"菏泽\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁S\",\n" + - "\"city\":\"莱芜\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁U\",\n" + - "\"city\":\"青岛增补\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁V\",\n" + - "\"city\":\"潍坊增补\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"鲁Y\",\n" + - "\"city\":\"烟台\",\n" + - "\"province\":\"山东\",\n" + - "\"pcode\":\"SD\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙A\",\n" + - "\"city\":\"杭州\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙B\",\n" + - "\"city\":\"宁波\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙C\",\n" + - "\"city\":\"温州\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙D\",\n" + - "\"city\":\"绍兴\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙E\",\n" + - "\"city\":\"湖州\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙F\",\n" + - "\"city\":\"嘉兴\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙G\",\n" + - "\"city\":\"金华\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙H\",\n" + - "\"city\":\"衢州\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙J\",\n" + - "\"city\":\"台州\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙K\",\n" + - "\"city\":\"丽水\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"浙L\",\n" + - "\"city\":\"舟山\",\n" + - "\"province\":\"浙江\",\n" + - "\"pcode\":\"ZJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂A\",\n" + - "\"city\":\"南宁\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂B\",\n" + - "\"city\":\"柳州\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂C\",\n" + - "\"city\":\"桂林\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂D\",\n" + - "\"city\":\"梧州\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂E\",\n" + - "\"city\":\"北海\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂F\",\n" + - "\"city\":\"崇左\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂G\",\n" + - "\"city\":\"来宾\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂H\",\n" + - "\"city\":\"桂林地区\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂J\",\n" + - "\"city\":\"贺州\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂K\",\n" + - "\"city\":\"玉林\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂L\",\n" + - "\"city\":\"百色\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂M\",\n" + - "\"city\":\"河池\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂N\",\n" + - "\"city\":\"钦州\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂p\",\n" + - "\"city\":\"防城港\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"桂R\",\n" + - "\"city\":\"贵港\",\n" + - "\"province\":\"广西\",\n" + - "\"pcode\":\"GX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙A\",\n" + - "\"city\":\"呼和浩特\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙B\",\n" + - "\"city\":\"包头\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙C\",\n" + - "\"city\":\"乌海\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙D\",\n" + - "\"city\":\"赤峰\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙E\",\n" + - "\"city\":\"呼伦贝尔 \",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙F\",\n" + - "\"city\":\"兴安盟\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙G\",\n" + - "\"city\":\"通辽\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙H\",\n" + - "\"city\":\"锡林郭勒盟\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙J\",\n" + - "\"city\":\"乌兰察布盟\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙K\",\n" + - "\"city\":\"鄂尔多斯 \",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙L\",\n" + - "\"city\":\"巴彦淖尔盟\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"蒙M \",\n" + - "\"city\":\" 阿拉善盟\",\n" + - "\"province\":\"内蒙古\",\n" + - "\"pcode\":\"NMG\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽A\",\n" + - "\"city\":\"福州\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽B\",\n" + - "\"city\":\"莆田\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽C\",\n" + - "\"city\":\"泉州\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽D\",\n" + - "\"city\":\"厦门\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽E\",\n" + - "\"city\":\"漳州\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽F\",\n" + - "\"city\":\"龙岩\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽G\",\n" + - "\"city\":\"三明\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽H\",\n" + - "\"city\":\"南平\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽J\",\n" + - "\"city\":\"宁德\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"闽K\",\n" + - "\"city\":\"直系统\",\n" + - "\"province\":\"福建\",\n" + - "\"pcode\":\"FJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川A\",\n" + - "\"city\":\"成都\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川B\",\n" + - "\"city\":\"绵阳\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川C\",\n" + - "\"city\":\"自贡\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川D\",\n" + - "\"city\":\"攀枝花\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川E\",\n" + - "\"city\":\"泸州\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川F\",\n" + - "\"city\":\"德阳\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川H\",\n" + - "\"city\":\"广元\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川J\",\n" + - "\"city\":\"遂宁\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川K\",\n" + - "\"city\":\"内江\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川L\",\n" + - "\"city\":\"乐山\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川M\",\n" + - "\"city\":\"资阳\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川Q\",\n" + - "\"city\":\"宜宾\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川R\",\n" + - "\"city\":\"南充\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川S\",\n" + - "\"city\":\"达州\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川T\",\n" + - "\"city\":\"雅安\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川U\",\n" + - "\"city\":\"阿坝藏族羌族自治州\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川V\",\n" + - "\"city\":\"甘孜藏族自治州\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川W\",\n" + - "\"city\":\"凉山彝族自治州\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川X\",\n" + - "\"city\":\"广安\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川Y\",\n" + - "\"city\":\"巴中\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"川Z\",\n" + - "\"city\":\"眉山\",\n" + - "\"province\":\"四川\",\n" + - "\"pcode\":\"SC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"渝A\",\n" + - "\"city\":\"重庆区(江南)\",\n" + - "\"province\":\"重庆\",\n" + - "\"pcode\":\"ZQ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"渝B\",\n" + - "\"city\":\"重庆区(江北)\",\n" + - "\"province\":\"重庆\",\n" + - "\"pcode\":\"ZQ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"渝C\",\n" + - "\"city\":\"永川区\",\n" + - "\"province\":\"重庆\",\n" + - "\"pcode\":\"ZQ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"渝F\",\n" + - "\"city\":\"万州区\",\n" + - "\"province\":\"重庆\",\n" + - "\"pcode\":\"ZQ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"渝G\",\n" + - "\"city\":\"涪陵区\",\n" + - "\"province\":\"重庆\",\n" + - "\"pcode\":\"ZQ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"渝H\",\n" + - "\"city\":\"黔江区\",\n" + - "\"province\":\"重庆\",\n" + - "\"pcode\":\"ZQ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"津A\",\n" + - "\"city\":\"天津\",\n" + - "\"province\":\"天津\",\n" + - "\"pcode\":\"TJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"津B\",\n" + - "\"city\":\"天津\",\n" + - "\"province\":\"天津\",\n" + - "\"pcode\":\"TJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"津C\",\n" + - "\"city\":\"天津\",\n" + - "\"province\":\"天津\",\n" + - "\"pcode\":\"TJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"津D\",\n" + - "\"city\":\"天津\",\n" + - "\"province\":\"天津\",\n" + - "\"pcode\":\"TJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"津E\",\n" + - "\"city\":\"天津\",\n" + - "\"province\":\"天津\",\n" + - "\"pcode\":\"TJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"津F\",\n" + - "\"city\":\"天津\",\n" + - "\"province\":\"天津\",\n" + - "\"pcode\":\"TJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"津G\",\n" + - "\"city\":\"天津\",\n" + - "\"province\":\"天津\",\n" + - "\"pcode\":\"TJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"津H\",\n" + - "\"city\":\"天津\",\n" + - "\"province\":\"天津\",\n" + - "\"pcode\":\"TJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云A\",\n" + - "\"city\":\"昆明\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云A-V\",\n" + - "\"city\":\"东川\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云C\",\n" + - "\"city\":\"昭通\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云D\",\n" + - "\"city\":\"曲靖\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云E\",\n" + - "\"city\":\"楚雄彝族自治州\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云F\",\n" + - "\"city\":\"玉溪\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云G\",\n" + - "\"city\":\"红河哈尼族彝族自治州\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云H\",\n" + - "\"city\":\"文山壮族苗族自治州\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云J\",\n" + - "\"city\":\"思茅\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云K\",\n" + - "\"city\":\"西双版纳傣族自治州\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云L\",\n" + - "\"city\":\"大理白族自治州\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云M\",\n" + - "\"city\":\"保山\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云N\",\n" + - "\"city\":\"德宏傣族景颇族自治州\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云p\",\n" + - "\"city\":\"丽江\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云Q\",\n" + - "\"city\":\"怒江傈僳族自治州\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云R\",\n" + - "\"city\":\"迪庆藏族自治州\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"云S\",\n" + - "\"city\":\"临沧地区\",\n" + - "\"province\":\"云南\",\n" + - "\"pcode\":\"YN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘A \",\n" + - "\"city\":\"长沙\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘B\",\n" + - "\"city\":\"株洲\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘C\",\n" + - "\"city\":\"湘潭\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘D\",\n" + - "\"city\":\"衡阳\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘E\",\n" + - "\"city\":\"邵阳\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘F\",\n" + - "\"city\":\"岳阳\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘G\",\n" + - "\"city\":\"张家界\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘H\",\n" + - "\"city\":\"益阳\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘J\",\n" + - "\"city\":\"常德\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘K\",\n" + - "\"city\":\"娄底\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘L\",\n" + - "\"city\":\"郴州\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘M\",\n" + - "\"city\":\"永州\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘N\",\n" + - "\"city\":\"怀化\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"湘U\",\n" + - "\"city\":\"湘西土家族苗族自治州\",\n" + - "\"province\":\"湖南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新A\",\n" + - "\"city\":\"乌鲁木齐\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新B\",\n" + - "\"city\":\"昌吉回族自治州\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新C\",\n" + - "\"city\":\"石河子\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新D\",\n" + - "\"city\":\"奎屯\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新E\",\n" + - "\"city\":\"博尔塔拉蒙古自治州\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新F\",\n" + - "\"city\":\"伊犁哈萨克自治州直辖县\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新G\",\n" + - "\"city\":\"塔城\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新H\",\n" + - "\"city\":\"阿勒泰\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新J\",\n" + - "\"city\":\"克拉玛依\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新K\",\n" + - "\"city\":\"吐鲁番\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新L\",\n" + - "\"city\":\"哈密\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新M\",\n" + - "\"city\":\"巴音郭愣蒙古自治州\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新N\",\n" + - "\"city\":\"阿克苏\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新p\",\n" + - "\"city\":\"克孜勒苏柯尔克孜自治州\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新Q\",\n" + - "\"city\":\"喀什\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"新R\",\n" + - "\"city\":\"和田\",\n" + - "\"province\":\"新疆\",\n" + - "\"pcode\":\"XJ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣A\",\n" + - "\"city\":\"南昌\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣B\",\n" + - "\"city\":\"赣州\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣C\",\n" + - "\"city\":\"宜春\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣D\",\n" + - "\"city\":\"吉安\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣E\",\n" + - "\"city\":\"上饶\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣F\",\n" + - "\"city\":\"抚州\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣G\",\n" + - "\"city\":\"九江\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣H\",\n" + - "\"city\":\"景德镇\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣J\",\n" + - "\"city\":\"萍乡\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣K\",\n" + - "\"city\":\"新余\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣L\",\n" + - "\"city\":\"鹰潭\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"赣M\",\n" + - "\"city\":\"南昌,直系统\",\n" + - "\"province\":\"江西\",\n" + - "\"pcode\":\"JX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘A\",\n" + - "\"city\":\"兰州\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘B\",\n" + - "\"city\":\"嘉峪关\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘C\",\n" + - "\"city\":\"金昌\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘D\",\n" + - "\"city\":\"白银\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘E\",\n" + - "\"city\":\"天水\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘F\",\n" + - "\"city\":\"酒泉\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘G\",\n" + - "\"city\":\"张掖\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘H\",\n" + - "\"city\":\"武威\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘J\",\n" + - "\"city\":\"定西\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘K\",\n" + - "\"city\":\"陇南\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘L\",\n" + - "\"city\":\"平凉\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘M\",\n" + - "\"city\":\"庆阳\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘N\",\n" + - "\"city\":\"临夏回族自治州\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"甘p\",\n" + - "\"city\":\"甘南藏族自治州\",\n" + - "\"province\":\"甘肃\",\n" + - "\"pcode\":\"GS\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕A\",\n" + - "\"city\":\"西安\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕B\",\n" + - "\"city\":\"铜川\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕C\",\n" + - "\"city\":\"宝鸡\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕D\",\n" + - "\"city\":\"咸阳\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕E\",\n" + - "\"city\":\"渭南\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕F\",\n" + - "\"city\":\"汉中\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕G\",\n" + - "\"city\":\"安康\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕H\",\n" + - "\"city\":\"商洛\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕J\",\n" + - "\"city\":\"延安\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕K\",\n" + - "\"city\":\"榆林\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"陕V\",\n" + - "\"city\":\"杨凌高新农业示范区\",\n" + - "\"province\":\"陕西\",\n" + - "\"pcode\":\"SX\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵A\",\n" + - "\"city\":\"贵阳\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵B\",\n" + - "\"city\":\"六盘水\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵C\",\n" + - "\"city\":\"遵义\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵D\",\n" + - "\"city\":\"铜仁\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵E\",\n" + - "\"city\":\"黔西南布依族苗族自治州\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵F\",\n" + - "\"city\":\"毕节\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵G\",\n" + - "\"city\":\"安顺\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵H\",\n" + - "\"city\":\"黔东南苗族侗族自治州\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"贵J\",\n" + - "\"city\":\"黔南布依族苗族自治州\",\n" + - "\"province\":\"贵州\",\n" + - "\"pcode\":\"GZ\"\n" + - "},\n" + - "{\n" + - "\"code\":\"青A\",\n" + - "\"city\":\"西宁\",\n" + - "\"province\":\"青海\",\n" + - "\"pcode\":\"QH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"青B\",\n" + - "\"city\":\"海东\",\n" + - "\"province\":\"青海\",\n" + - "\"pcode\":\"QH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"青C\",\n" + - "\"city\":\"海北藏族自治州\",\n" + - "\"province\":\"青海\",\n" + - "\"pcode\":\"QH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"青D\",\n" + - "\"city\":\"黄南藏族自治州\",\n" + - "\"province\":\"青海\",\n" + - "\"pcode\":\"QH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"青E\",\n" + - "\"city\":\"藏族自治州\",\n" + - "\"province\":\"青海\",\n" + - "\"pcode\":\"QH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"青F\",\n" + - "\"city\":\"果洛藏族自治州\",\n" + - "\"province\":\"青海\",\n" + - "\"pcode\":\"QH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"青G\",\n" + - "\"city\":\"玉树藏族自治州\",\n" + - "\"province\":\"青海\",\n" + - "\"pcode\":\"QH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"青H\",\n" + - "\"city\":\"海西蒙古族藏族自治州\",\n" + - "\"province\":\"青海\",\n" + - "\"pcode\":\"QH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏A\",\n" + - "\"city\":\"拉萨\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏B\",\n" + - "\"city\":\"昌都地区\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏C\",\n" + - "\"city\":\"山南地区\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏D\",\n" + - "\"city\":\"日喀则地区\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏E\",\n" + - "\"city\":\"那曲地区\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏F\",\n" + - "\"city\":\"阿里地区\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏G\",\n" + - "\"city\":\"林芝地区\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏H\",\n" + - "\"city\":\"天全县车辆管理所\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"藏J\",\n" + - "\"city\":\"格尔木车辆管理所\",\n" + - "\"province\":\"西藏\",\n" + - "\"pcode\":\"XC\"\n" + - "},\n" + - "{\n" + - "\"code\":\"琼A\",\n" + - "\"city\":\"海口\",\n" + - "\"province\":\"海南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"琼B\",\n" + - "\"city\":\"三亚\",\n" + - "\"province\":\"海南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"琼C\",\n" + - "\"city\":\"琼海\",\n" + - "\"province\":\"海南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"琼D\",\n" + - "\"city\":\"五指山\",\n" + - "\"province\":\"海南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"琼E\",\n" + - "\"city\":\"洋浦开发区\",\n" + - "\"province\":\"海南\",\n" + - "\"pcode\":\"HN\"\n" + - "},\n" + - "{\n" + - "\"code\":\"沪A\",\n" + - "\"city\":\"上海\",\n" + - "\"province\":\"上海\",\n" + - "\"pcode\":\"SH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"沪B\",\n" + - "\"city\":\"上海\",\n" + - "\"province\":\"上海\",\n" + - "\"pcode\":\"SH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"沪C\",\n" + - "\"city\":\"上海\",\n" + - "\"province\":\"上海\",\n" + - "\"pcode\":\"SH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"沪D\",\n" + - "\"city\":\"上海\",\n" + - "\"province\":\"上海\",\n" + - "\"pcode\":\"SH\"\n" + - "},\n" + - "{\n" + - "\"code\":\"沪R\",\n" + - "\"city\":\"崇明、长兴、横沙\",\n" + - "\"province\":\"上海\",\n" + - "\"pcode\":\"SH\"\n" + + String jsonStr ="{\n" + + " \"codeInfo\": [\n" + + " {\n" + + " \"Hp\": \"冀A\",\n" + + " \"city\": \"石家庄\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀B\",\n" + + " \"city\": \"唐山\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀C\",\n" + + " \"city\": \"秦皇岛\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀D\",\n" + + " \"city\": \"邯郸\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130421\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀E\",\n" + + " \"city\": \"邢台\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130521\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀F\",\n" + + " \"city\": \"保定\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀G\",\n" + + " \"city\": \"张家口\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀H\",\n" + + " \"city\": \"承德\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130821\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀J\",\n" + + " \"city\": \"沧州\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀R\",\n" + + " \"city\": \"廊坊\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"131000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀S\",\n" + + " \"city\": \"沧州\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"130900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"冀T\",\n" + + " \"city\": \"衡水\",\n" + + " \"province\": \"河北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"131100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽A\",\n" + + " \"city\": \"沈阳\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"210100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽B\",\n" + + " \"city\": \"大连\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"231182\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽C\",\n" + + " \"city\": \"鞍山\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"340500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽D\",\n" + + " \"city\": \"抚顺\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"210421\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽E\",\n" + + " \"city\": \"本溪\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"210521\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽F\",\n" + + " \"city\": \"丹东\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"210600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽G\",\n" + + " \"city\": \"锦州\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"210700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽H\",\n" + + " \"city\": \"营口\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"210800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽J\",\n" + + " \"city\": \"阜新\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"210921\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽K\",\n" + + " \"city\": \"辽阳\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"211021\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽L\",\n" + + " \"city\": \"盘锦\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"211100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽M\",\n" + + " \"city\": \"铁岭\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"211221\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽N\",\n" + + " \"city\": \"朝阳\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"220104\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"辽P\",\n" + + " \"city\": \"葫芦岛\",\n" + + " \"province\": \"辽宁\",\n" + + " \"Pcode\": \"LN\",\n" + + " \"AreaCode\": \"211400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖A\",\n" + + " \"city\": \"合肥\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖B\",\n" + + " \"city\": \"芜湖\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340221\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖C\",\n" + + " \"city\": \"蚌埠\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖D\",\n" + + " \"city\": \"淮南\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖E\",\n" + + " \"city\": \"马鞍山\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖F\",\n" + + " \"city\": \"淮北\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖G\",\n" + + " \"city\": \"铜陵\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖H\",\n" + + " \"city\": \"安庆\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖J\",\n" + + " \"city\": \"黄山\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"341003\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖K\",\n" + + " \"city\": \"阜阳\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"341200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖L\",\n" + + " \"city\": \"宿州\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"341300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖M\",\n" + + " \"city\": \"滁州\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"341100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖N\",\n" + + " \"city\": \"六安\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"341500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖P\",\n" + + " \"city\": \"宣城\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"341800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖Q\",\n" + + " \"city\": \"巢湖\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"340181\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖R\",\n" + + " \"city\": \"池州\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"341700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"皖S\",\n" + + " \"city\": \"亳州\",\n" + + " \"province\": \"安徽\",\n" + + " \"Pcode\": \"AH\",\n" + + " \"AreaCode\": \"341600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏A\",\n" + + " \"city\": \"南京\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏B\",\n" + + " \"city\": \"无锡\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏C\",\n" + + " \"city\": \"徐州\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏D\",\n" + + " \"city\": \"常州\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏E\",\n" + + " \"city\": \"苏州\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏F\",\n" + + " \"city\": \"南通\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏G\",\n" + + " \"city\": \"连云港\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏H\",\n" + + " \"city\": \"淮安\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320803\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏J\",\n" + + " \"city\": \"盐城\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"320900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏K\",\n" + + " \"city\": \"扬州\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"321000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏L\",\n" + + " \"city\": \"镇江\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"321100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏M\",\n" + + " \"city\": \"泰州\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"321200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"苏N\",\n" + + " \"city\": \"宿迁\",\n" + + " \"province\": \"江苏\",\n" + + " \"Pcode\": \"JS\",\n" + + " \"AreaCode\": \"321300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂A\",\n" + + " \"city\": \"武汉\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"420100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂B\",\n" + + " \"city\": \"黄石\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"420202\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂C\",\n" + + " \"city\": \"十堰\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"420300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂D\",\n" + + " \"city\": \"荆州\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"421003\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂E\",\n" + + " \"city\": \"宜昌\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"420500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂F\",\n" + + " \"city\": \"襄阳\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"420600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂G\",\n" + + " \"city\": \"鄂州\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"420700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂H\",\n" + + " \"city\": \"荆门 \",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"420800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂J\",\n" + + " \"city\": \"黄冈\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"421100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂K\",\n" + + " \"city\": \"孝感\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"420900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂L\",\n" + + " \"city\": \"咸宁\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"421200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂M\",\n" + + " \"city\": \"仙桃\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"429004\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂N\",\n" + + " \"city\": \"潜江\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"429005\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂P\",\n" + + " \"city\": \"神农架林区\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"429021\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂Q\",\n" + + " \"city\": \"恩施土家族苗族自治州\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"422800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂R\",\n" + + " \"city\": \"天门\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"429006\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鄂S\",\n" + + " \"city\": \"随州\",\n" + + " \"province\": \"湖北\",\n" + + " \"Pcode\": \"HB\",\n" + + " \"AreaCode\": \"421300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋A\",\n" + + " \"city\": \"太原\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"140100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋B\",\n" + + " \"city\": \"大同\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"230606\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋C\",\n" + + " \"city\": \"阳泉\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"140300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋D\",\n" + + " \"city\": \"长治\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"140421\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋E\",\n" + + " \"city\": \"晋城\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"140500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋F\",\n" + + " \"city\": \"朔州\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"140600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋H\",\n" + + " \"city\": \"忻州\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"140900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋J\",\n" + + " \"city\": \"吕梁\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"141100 \"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋K\",\n" + + " \"city\": \"晋中\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"140700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋L\",\n" + + " \"city\": \"临汾\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"141000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"晋M\",\n" + + " \"city\": \"运城\",\n" + + " \"province\": \"山西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"140800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉A\",\n" + + " \"city\": \"长春\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"220100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉B\",\n" + + " \"city\": \"吉林\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"220200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉C\",\n" + + " \"city\": \"四平\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"220300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉D\",\n" + + " \"city\": \"辽源\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"220400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉E\",\n" + + " \"city\": \"通化\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"220521\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉F\",\n" + + " \"city\": \"白山\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"220600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉G\",\n" + + " \"city\": \"白城\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"220800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉H\",\n" + + " \"city\": \"延边朝鲜族自治州\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"222400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉J\",\n" + + " \"city\": \"松原\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": \"220700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"吉K\",\n" + + " \"city\": \"长白山\",\n" + + " \"province\": \"吉林\",\n" + + " \"Pcode\": \"JL\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤A\",\n" + + " \"city\": \"广州\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤B\",\n" + + " \"city\": \"深圳\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤C\",\n" + + " \"city\": \"珠海\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤D\",\n" + + " \"city\": \"汕头\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤E\",\n" + + " \"city\": \"佛山\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤F\",\n" + + " \"city\": \"韶关\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤G\",\n" + + " \"city\": \"湛江\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤H\",\n" + + " \"city\": \"肇庆\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"441200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤J\",\n" + + " \"city\": \"江门\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤K\",\n" + + " \"city\": \"茂名\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤L\",\n" + + " \"city\": \"惠州\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"441300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤M\",\n" + + " \"city\": \"梅州\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"441400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤N\",\n" + + " \"city\": \"汕尾\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"441500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤P\",\n" + + " \"city\": \"河源\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"441600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤Q\",\n" + + " \"city\": \"阳江\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"441700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤R\",\n" + + " \"city\": \"清远\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"441800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤S\",\n" + + " \"city\": \"东莞\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"441900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤T\",\n" + + " \"city\": \"中山\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"442000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤U\",\n" + + " \"city\": \"潮州\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"445100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤V\",\n" + + " \"city\": \"揭阳\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"445200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤W\",\n" + + " \"city\": \"云浮\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"445300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤X\",\n" + + " \"city\": \"顺德区\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440606\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤Y\",\n" + + " \"city\": \"南海区\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": \"440605\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"粤Z\",\n" + + " \"city\": \"港澳进入内地车辆\",\n" + + " \"province\": \"广东\",\n" + + " \"Pcode\": \"GD\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"宁A\",\n" + + " \"city\": \"银川\",\n" + + " \"province\": \"宁夏\",\n" + + " \"Pcode\": \"NX\",\n" + + " \"AreaCode\": \"640100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"宁B\",\n" + + " \"city\": \"石嘴山\",\n" + + " \"province\": \"宁夏\",\n" + + " \"Pcode\": \"NX\",\n" + + " \"AreaCode\": \"640200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"宁C\",\n" + + " \"city\": \"银南\",\n" + + " \"province\": \"宁夏\",\n" + + " \"Pcode\": \"NX\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"宁D\",\n" + + " \"city\": \"固原\",\n" + + " \"province\": \"宁夏\",\n" + + " \"Pcode\": \"NX\",\n" + + " \"AreaCode\": \"640400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"宁E\",\n" + + " \"city\": \"中卫\",\n" + + " \"province\": \"宁夏\",\n" + + " \"Pcode\": \"NX\",\n" + + " \"AreaCode\": \"640500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京A\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京B\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京C\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京D\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京E\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京F\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京G\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京H\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京J\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京K\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京L\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京M\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"京Y\",\n" + + " \"city\": \"北京\",\n" + + " \"province\": \"北京\",\n" + + " \"Pcode\": \"BJ\",\n" + + " \"AreaCode\": \"110000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫A\",\n" + + " \"city\": \"郑州\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫B\",\n" + + " \"city\": \"开封\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫C\",\n" + + " \"city\": \"洛阳\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫D\",\n" + + " \"city\": \"平顶山\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫E\",\n" + + " \"city\": \"安阳\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410522\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫F\",\n" + + " \"city\": \"鹤壁\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫G\",\n" + + " \"city\": \"新乡\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410721\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫H\",\n" + + " \"city\": \"焦作\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫J\",\n" + + " \"city\": \"濮阳\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"410928\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫K\",\n" + + " \"city\": \"许昌\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"411023\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫L\",\n" + + " \"city\": \"漯河\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"411100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫M\",\n" + + " \"city\": \"三门峡\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"411200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫N\",\n" + + " \"city\": \"商丘\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"411400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫P\",\n" + + " \"city\": \"周口\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"411600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫Q\",\n" + + " \"city\": \"驻马店\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"411700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫R\",\n" + + " \"city\": \"南阳\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"411300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫S\",\n" + + " \"city\": \"信阳\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"411500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"豫U\",\n" + + " \"city\": \"济源\",\n" + + " \"province\": \"河南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"419001\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑A\",\n" + + " \"city\": \"哈尔滨\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑B\",\n" + + " \"city\": \"齐齐哈尔\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑C\",\n" + + " \"city\": \"牡丹江\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"231000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑D\",\n" + + " \"city\": \"佳木斯\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑E\",\n" + + " \"city\": \"大庆\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑F\",\n" + + " \"city\": \"伊春\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230702\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑G\",\n" + + " \"city\": \"鸡西\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑H\",\n" + + " \"city\": \"鹤岗\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑J\",\n" + + " \"city\": \"双鸭山\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑K\",\n" + + " \"city\": \"七台河\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"230900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑L\",\n" + + " \"city\": \"松花江地区\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑M\",\n" + + " \"city\": \"绥化\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"231200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑N\",\n" + + " \"city\": \"黑河\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"231100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑P\",\n" + + " \"city\": \"大兴安岭地区\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": \"232700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"黑R\",\n" + + " \"city\": \"农垦系统\",\n" + + " \"province\": \"黑龙江\",\n" + + " \"Pcode\": \"HLJ\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁A\",\n" + + " \"city\": \"济南\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁B\",\n" + + " \"city\": \"青岛\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁C\",\n" + + " \"city\": \"淄博\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁D\",\n" + + " \"city\": \"枣庄\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁E\",\n" + + " \"city\": \"东营\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370502\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁F\",\n" + + " \"city\": \"烟台\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁G\",\n" + + " \"city\": \"潍坊\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁H\",\n" + + " \"city\": \"济宁\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁J\",\n" + + " \"city\": \"泰安\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁K\",\n" + + " \"city\": \"威海\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"371000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁L\",\n" + + " \"city\": \"日照\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"371100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁M\",\n" + + " \"city\": \"滨州\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"371600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁N\",\n" + + " \"city\": \"德州\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"371400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁P\",\n" + + " \"city\": \"聊城\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"371500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁Q\",\n" + + " \"city\": \"临沂\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"371300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁R\",\n" + + " \"city\": \"菏泽\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"371700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁S\",\n" + + " \"city\": \"莱芜\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"371200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁U\",\n" + + " \"city\": \"青岛\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁V\",\n" + + " \"city\": \"潍坊\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"鲁Y\",\n" + + " \"city\": \"烟台\",\n" + + " \"province\": \"山东\",\n" + + " \"Pcode\": \"SD\",\n" + + " \"AreaCode\": \"370600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙A\",\n" + + " \"city\": \"杭州\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙B\",\n" + + " \"city\": \"宁波\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙C\",\n" + + " \"city\": \"温州\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙D\",\n" + + " \"city\": \"绍兴\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙E\",\n" + + " \"city\": \"湖州\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙F\",\n" + + " \"city\": \"嘉兴\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙G\",\n" + + " \"city\": \"金华\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙H\",\n" + + " \"city\": \"衢州\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙J\",\n" + + " \"city\": \"台州\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"331000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙K\",\n" + + " \"city\": \"丽水\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"331100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"浙L\",\n" + + " \"city\": \"舟山\",\n" + + " \"province\": \"浙江\",\n" + + " \"Pcode\": \"ZJ\",\n" + + " \"AreaCode\": \"330900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂A\",\n" + + " \"city\": \"南宁\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂B\",\n" + + " \"city\": \"柳州\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂C\",\n" + + " \"city\": \"桂林\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂D\",\n" + + " \"city\": \"梧州\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂E\",\n" + + " \"city\": \"北海\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂F\",\n" + + " \"city\": \"崇左\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"451400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂G\",\n" + + " \"city\": \"来宾\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"451300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂H\",\n" + + " \"city\": \"桂林地区\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂J\",\n" + + " \"city\": \"贺州\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"451100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂K\",\n" + + " \"city\": \"玉林\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂L\",\n" + + " \"city\": \"百色\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"451000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂M\",\n" + + " \"city\": \"河池\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"451200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂N\",\n" + + " \"city\": \"钦州\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂P\",\n" + + " \"city\": \"防城港\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"桂R\",\n" + + " \"city\": \"贵港\",\n" + + " \"province\": \"广西\",\n" + + " \"Pcode\": \"GX\",\n" + + " \"AreaCode\": \"450800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙A\",\n" + + " \"city\": \"呼和浩特\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙B\",\n" + + " \"city\": \"包头\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙C\",\n" + + " \"city\": \"乌海\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙D\",\n" + + " \"city\": \"赤峰\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙E\",\n" + + " \"city\": \"呼伦贝尔 \",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙F\",\n" + + " \"city\": \"兴安盟\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"152200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙G\",\n" + + " \"city\": \"通辽\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙H\",\n" + + " \"city\": \"锡林郭勒盟\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"152500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙J\",\n" + + " \"city\": \"乌兰察布盟\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙K\",\n" + + " \"city\": \"鄂尔多斯 \",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙L\",\n" + + " \"city\": \"巴彦淖尔盟\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"150800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"蒙M \",\n" + + " \"city\": \" 阿拉善盟\",\n" + + " \"province\": \"内蒙古\",\n" + + " \"Pcode\": \"NMG\",\n" + + " \"AreaCode\": \"152900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽A\",\n" + + " \"city\": \"福州\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽B\",\n" + + " \"city\": \"莆田\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽C\",\n" + + " \"city\": \"泉州\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽D\",\n" + + " \"city\": \"厦门\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽E\",\n" + + " \"city\": \"漳州\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽F\",\n" + + " \"city\": \"龙岩\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽G\",\n" + + " \"city\": \"三明\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽H\",\n" + + " \"city\": \"南平\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽J\",\n" + + " \"city\": \"宁德\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": \"350900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"闽K\",\n" + + " \"city\": \"直系统\",\n" + + " \"province\": \"福建\",\n" + + " \"Pcode\": \"FJ\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川A\",\n" + + " \"city\": \"成都\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"510100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川B\",\n" + + " \"city\": \"绵阳\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"510700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川C\",\n" + + " \"city\": \"自贡\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"510300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川D\",\n" + + " \"city\": \"攀枝花\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"510400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川E\",\n" + + " \"city\": \"泸州\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"510500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川F\",\n" + + " \"city\": \"德阳\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"510600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川H\",\n" + + " \"city\": \"广元\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"510800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川J\",\n" + + " \"city\": \"遂宁\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"510900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川K\",\n" + + " \"city\": \"内江\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川L\",\n" + + " \"city\": \"乐山\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川M\",\n" + + " \"city\": \"资阳\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"512000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川Q\",\n" + + " \"city\": \"宜宾\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511521\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川R\",\n" + + " \"city\": \"南充\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川S\",\n" + + " \"city\": \"达州\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川T\",\n" + + " \"city\": \"雅安\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川U\",\n" + + " \"city\": \"阿坝藏族羌族自治州\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"513200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川V\",\n" + + " \"city\": \"甘孜藏族自治州\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"513300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川W\",\n" + + " \"city\": \"凉山彝族自治州\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"513400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川X\",\n" + + " \"city\": \"广安\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511602\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川Y\",\n" + + " \"city\": \"巴中\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"川Z\",\n" + + " \"city\": \"眉山\",\n" + + " \"province\": \"四川\",\n" + + " \"Pcode\": \"SC\",\n" + + " \"AreaCode\": \"511400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"渝A\",\n" + + " \"city\": \"重庆区(江南)\",\n" + + " \"province\": \"重庆\",\n" + + " \"Pcode\": \"ZQ\",\n" + + " \"AreaCode\": \"500100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"渝B\",\n" + + " \"city\": \"重庆区(江北)\",\n" + + " \"province\": \"重庆\",\n" + + " \"Pcode\": \"ZQ\",\n" + + " \"AreaCode\": \"500100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"渝C\",\n" + + " \"city\": \"永川区\",\n" + + " \"province\": \"重庆\",\n" + + " \"Pcode\": \"ZQ\",\n" + + " \"AreaCode\": \"500118\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"渝F\",\n" + + " \"city\": \"万州区\",\n" + + " \"province\": \"重庆\",\n" + + " \"Pcode\": \"ZQ\",\n" + + " \"AreaCode\": \"500101\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"渝G\",\n" + + " \"city\": \"涪陵区\",\n" + + " \"province\": \"重庆\",\n" + + " \"Pcode\": \"ZQ\",\n" + + " \"AreaCode\": \"500102\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"渝H\",\n" + + " \"city\": \"黔江区\",\n" + + " \"province\": \"重庆\",\n" + + " \"Pcode\": \"ZQ\",\n" + + " \"AreaCode\": \"500114\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"津A\",\n" + + " \"city\": \"天津\",\n" + + " \"province\": \"天津\",\n" + + " \"Pcode\": \"TJ\",\n" + + " \"AreaCode\": \"120000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"津B\",\n" + + " \"city\": \"天津\",\n" + + " \"province\": \"天津\",\n" + + " \"Pcode\": \"TJ\",\n" + + " \"AreaCode\": \"120000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"津C\",\n" + + " \"city\": \"天津\",\n" + + " \"province\": \"天津\",\n" + + " \"Pcode\": \"TJ\",\n" + + " \"AreaCode\": \"120000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"津D\",\n" + + " \"city\": \"天津\",\n" + + " \"province\": \"天津\",\n" + + " \"Pcode\": \"TJ\",\n" + + " \"AreaCode\": \"120000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"津E\",\n" + + " \"city\": \"天津\",\n" + + " \"province\": \"天津\",\n" + + " \"Pcode\": \"TJ\",\n" + + " \"AreaCode\": \"120000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"津F\",\n" + + " \"city\": \"天津\",\n" + + " \"province\": \"天津\",\n" + + " \"Pcode\": \"TJ\",\n" + + " \"AreaCode\": \"120000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"津G\",\n" + + " \"city\": \"天津\",\n" + + " \"province\": \"天津\",\n" + + " \"Pcode\": \"TJ\",\n" + + " \"AreaCode\": \"120000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"津H\",\n" + + " \"city\": \"天津\",\n" + + " \"province\": \"天津\",\n" + + " \"Pcode\": \"TJ\",\n" + + " \"AreaCode\": \"120000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云A\",\n" + + " \"city\": \"昆明\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云A-V\",\n" + + " \"city\": \"东川\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530113\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云C\",\n" + + " \"city\": \"昭通\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云D\",\n" + + " \"city\": \"曲靖\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云E\",\n" + + " \"city\": \"楚雄彝族自治州\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"532300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云F\",\n" + + " \"city\": \"玉溪\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云G\",\n" + + " \"city\": \"红河哈尼族彝族自治州\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"532500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云H\",\n" + + " \"city\": \"文山壮族苗族自治州\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"532600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云J\",\n" + + " \"city\": \"思茅\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530802\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云K\",\n" + + " \"city\": \"西双版纳傣族自治州\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"532800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云L\",\n" + + " \"city\": \"大理白族自治州\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"532900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云M\",\n" + + " \"city\": \"保山\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云N\",\n" + + " \"city\": \"德宏傣族景颇族自治州\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"533100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云P\",\n" + + " \"city\": \"丽江\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云Q\",\n" + + " \"city\": \"怒江傈僳族自治州\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"533300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云R\",\n" + + " \"city\": \"迪庆藏族自治州\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"533400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"云S\",\n" + + " \"city\": \"临沧地区\",\n" + + " \"province\": \"云南\",\n" + + " \"Pcode\": \"YN\",\n" + + " \"AreaCode\": \"530900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘A \",\n" + + " \"city\": \"长沙\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430121\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘B\",\n" + + " \"city\": \"株洲\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430221\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘C\",\n" + + " \"city\": \"湘潭\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430321\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘D\",\n" + + " \"city\": \"衡阳\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430421\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘E\",\n" + + " \"city\": \"邵阳\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430523\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘F\",\n" + + " \"city\": \"岳阳\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430621\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘G\",\n" + + " \"city\": \"张家界\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘H\",\n" + + " \"city\": \"益阳\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘J\",\n" + + " \"city\": \"常德\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"430700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘K\",\n" + + " \"city\": \"娄底\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"431300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘L\",\n" + + " \"city\": \"郴州\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"431000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘M\",\n" + + " \"city\": \"永州\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"431100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘N\",\n" + + " \"city\": \"怀化\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"431200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"湘U\",\n" + + " \"city\": \"湘西土家族苗族自治州\",\n" + + " \"province\": \"湖南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"433100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新A\",\n" + + " \"city\": \"乌鲁木齐\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"650121\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新B\",\n" + + " \"city\": \"昌吉回族自治州\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"652300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新C\",\n" + + " \"city\": \"石河子\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"659001\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新D\",\n" + + " \"city\": \"奎屯\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"654003\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新E\",\n" + + " \"city\": \"博尔塔拉蒙古自治州\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"652700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新F\",\n" + + " \"city\": \"伊犁哈萨克自治州直辖县\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"654000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新G\",\n" + + " \"city\": \"塔城\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"654201\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新H\",\n" + + " \"city\": \"阿勒泰\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"654301\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新J\",\n" + + " \"city\": \"克拉玛依\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"650203\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新K\",\n" + + " \"city\": \"吐鲁番\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"650400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新L\",\n" + + " \"city\": \"哈密\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"650500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新M\",\n" + + " \"city\": \"巴音郭愣蒙古自治州\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"652800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新N\",\n" + + " \"city\": \"阿克苏\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"652901\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新P\",\n" + + " \"city\": \"克孜勒苏柯尔克孜自治州\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"653000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新Q\",\n" + + " \"city\": \"喀什\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"653101\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"新R\",\n" + + " \"city\": \"和田\",\n" + + " \"province\": \"新疆\",\n" + + " \"Pcode\": \"XJ\",\n" + + " \"AreaCode\": \"653221\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣A\",\n" + + " \"city\": \"南昌\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360121\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣B\",\n" + + " \"city\": \"赣州\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣C\",\n" + + " \"city\": \"宜春\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣D\",\n" + + " \"city\": \"吉安\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360821\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣E\",\n" + + " \"city\": \"上饶\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"361121\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣F\",\n" + + " \"city\": \"抚州\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"361000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣G\",\n" + + " \"city\": \"九江\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360421\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣H\",\n" + + " \"city\": \"景德镇\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣J\",\n" + + " \"city\": \"萍乡\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣K\",\n" + + " \"city\": \"新余\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣L\",\n" + + " \"city\": \"鹰潭\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": \"360600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"赣M\",\n" + + " \"city\": \"南昌,直系统\",\n" + + " \"province\": \"江西\",\n" + + " \"Pcode\": \"JX\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘A\",\n" + + " \"city\": \"兰州\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘B\",\n" + + " \"city\": \"嘉峪关\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘C\",\n" + + " \"city\": \"金昌\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘D\",\n" + + " \"city\": \"白银\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620402\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘E\",\n" + + " \"city\": \"天水\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘F\",\n" + + " \"city\": \"酒泉\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘G\",\n" + + " \"city\": \"张掖\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘H\",\n" + + " \"city\": \"武威\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘J\",\n" + + " \"city\": \"定西\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"621100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘K\",\n" + + " \"city\": \"陇南\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"621200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘L\",\n" + + " \"city\": \"平凉\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"620800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘M\",\n" + + " \"city\": \"庆阳\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"621000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘N\",\n" + + " \"city\": \"临夏回族自治州\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"622900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"甘P\",\n" + + " \"city\": \"甘南藏族自治州\",\n" + + " \"province\": \"甘肃\",\n" + + " \"Pcode\": \"GS\",\n" + + " \"AreaCode\": \"623000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕A\",\n" + + " \"city\": \"西安\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕B\",\n" + + " \"city\": \"铜川\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕C\",\n" + + " \"city\": \"宝鸡\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕D\",\n" + + " \"city\": \"咸阳\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕E\",\n" + + " \"city\": \"渭南\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕F\",\n" + + " \"city\": \"汉中\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕G\",\n" + + " \"city\": \"安康\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610900\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕H\",\n" + + " \"city\": \"商洛\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"611000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕J\",\n" + + " \"city\": \"延安\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕K\",\n" + + " \"city\": \"榆林\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"陕V\",\n" + + " \"city\": \"杨凌高新农业示范区\",\n" + + " \"province\": \"陕西\",\n" + + " \"Pcode\": \"SX\",\n" + + " \"AreaCode\": \"610403\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵A\",\n" + + " \"city\": \"贵阳\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"520100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵B\",\n" + + " \"city\": \"六盘水\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"520200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵C\",\n" + + " \"city\": \"遵义\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"520300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵D\",\n" + + " \"city\": \"铜仁\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"520600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵E\",\n" + + " \"city\": \"黔西南布依族苗族自治州\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"522300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵F\",\n" + + " \"city\": \"毕节\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"520500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵G\",\n" + + " \"city\": \"安顺\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"520400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵H\",\n" + + " \"city\": \"黔东南苗族侗族自治州\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"522600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"贵J\",\n" + + " \"city\": \"黔南布依族苗族自治州\",\n" + + " \"province\": \"贵州\",\n" + + " \"Pcode\": \"GZ\",\n" + + " \"AreaCode\": \"522700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"青A\",\n" + + " \"city\": \"西宁\",\n" + + " \"province\": \"青海\",\n" + + " \"Pcode\": \"QH\",\n" + + " \"AreaCode\": \"630100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"青B\",\n" + + " \"city\": \"海东\",\n" + + " \"province\": \"青海\",\n" + + " \"Pcode\": \"QH\",\n" + + " \"AreaCode\": \"630200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"青C\",\n" + + " \"city\": \"海北藏族自治州\",\n" + + " \"province\": \"青海\",\n" + + " \"Pcode\": \"QH\",\n" + + " \"AreaCode\": \"632200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"青D\",\n" + + " \"city\": \"黄南藏族自治州\",\n" + + " \"province\": \"青海\",\n" + + " \"Pcode\": \"QH\",\n" + + " \"AreaCode\": \"632300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"青E\",\n" + + " \"city\": \"藏族自治州\",\n" + + " \"province\": \"青海\",\n" + + " \"Pcode\": \"QH\",\n" + + " \"AreaCode\": \"632800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"青F\",\n" + + " \"city\": \"果洛藏族自治州\",\n" + + " \"province\": \"青海\",\n" + + " \"Pcode\": \"QH\",\n" + + " \"AreaCode\": \"632600\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"青G\",\n" + + " \"city\": \"玉树藏族自治州\",\n" + + " \"province\": \"青海\",\n" + + " \"Pcode\": \"QH\",\n" + + " \"AreaCode\": \"632700\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"青H\",\n" + + " \"city\": \"海西蒙古族藏族自治州\",\n" + + " \"province\": \"青海\",\n" + + " \"Pcode\": \"QH\",\n" + + " \"AreaCode\": \"632800\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏A\",\n" + + " \"city\": \"拉萨\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": \"540100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏B\",\n" + + " \"city\": \"昌都地区\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": \"540300\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏C\",\n" + + " \"city\": \"山南地区\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": \"542200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏D\",\n" + + " \"city\": \"日喀则地区\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": \"540200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏E\",\n" + + " \"city\": \"那曲地区\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": \"542400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏F\",\n" + + " \"city\": \"阿里地区\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": \"542500\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏G\",\n" + + " \"city\": \"林芝地区\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": \"540400\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏H\",\n" + + " \"city\": \"天全县车辆管理所\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"藏J\",\n" + + " \"city\": \"格尔木车辆管理所\",\n" + + " \"province\": \"西藏\",\n" + + " \"Pcode\": \"XC\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"琼A\",\n" + + " \"city\": \"海口\",\n" + + " \"province\": \"海南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"460100\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"琼B\",\n" + + " \"city\": \"三亚\",\n" + + " \"province\": \"海南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"460200\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"琼C\",\n" + + " \"city\": \"琼海\",\n" + + " \"province\": \"海南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"469002\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"琼D\",\n" + + " \"city\": \"五指山\",\n" + + " \"province\": \"海南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": \"469001\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"琼E\",\n" + + " \"city\": \"洋浦开发区\",\n" + + " \"province\": \"海南\",\n" + + " \"Pcode\": \"HN\",\n" + + " \"AreaCode\": null\n" + + " },\n" + + " {\n" + + " \"Hp\": \"沪A\",\n" + + " \"city\": \"上海\",\n" + + " \"province\": \"上海\",\n" + + " \"Pcode\": \"SH\",\n" + + " \"AreaCode\": \"310000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"沪B\",\n" + + " \"city\": \"上海\",\n" + + " \"province\": \"上海\",\n" + + " \"Pcode\": \"SH\",\n" + + " \"AreaCode\": \"310000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"沪C\",\n" + + " \"city\": \"上海\",\n" + + " \"province\": \"上海\",\n" + + " \"Pcode\": \"SH\",\n" + + " \"AreaCode\": \"310000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"沪D\",\n" + + " \"city\": \"上海\",\n" + + " \"province\": \"上海\",\n" + + " \"Pcode\": \"SH\",\n" + + " \"AreaCode\": \"310000\"\n" + + " },\n" + + " {\n" + + " \"Hp\": \"沪R\",\n" + + " \"city\": \"崇明\",\n" + + " \"province\": \"上海\",\n" + + " \"Pcode\": \"SH\",\n" + + " \"AreaCode\": \"310151\"\n" + + " }\n" + + " ]\n" + "}\n" + - "]}"; + "\n"; String hp = num.substring(0, 2);// JSONObject jsonObject = JSONObject.parseObject(jsonStr); - JSONArray data = jsonObject.getJSONArray("date"); + JSONArray data = jsonObject.getJSONArray("codeInfo"); List<CarNumDto> carNumDtos = JSONObject.parseArray(data.toJSONString(), CarNumDto.class); CarNumDto carNumDto = new CarNumDto(); for (CarNumDto carNumDtoTemp : carNumDtos) { - if (carNumDtoTemp.getCode().equals(hp)) { + if (carNumDtoTemp.getHp().equals(hp)) { carNumDto.setCity(carNumDtoTemp.getCity()); - carNumDto.setCode(carNumDtoTemp.getCode()); + carNumDto.setHp(carNumDtoTemp.getHp()); carNumDto.setProvince(carNumDtoTemp.getProvince()); + carNumDto.setAreaCode(carNumDtoTemp.getAreaCode()); break; } } diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/GiveVipUtil.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/GiveVipUtil.java index ef92923..b33e709 100644 --- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/GiveVipUtil.java +++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/GiveVipUtil.java @@ -31,11 +31,11 @@ private OtherClient otherClient; @Resource private TAppCouponService appCouponService; - public void sendVip(TAppUser nowUser,Integer vipId,Integer plusDay){ + public void sendVip(TAppUser nowUser,Integer vipId,Integer plusDay,Integer type){ if (nowUser.getVipEndTime()==null||nowUser.getVipEndTime().isBefore(LocalDateTime.now())) { - nowUser.setVipEndTime(LocalDateTime.now().plusMonths(plusDay)); - + nowUser.setVipEndTime(LocalDateTime.now().plusMonths(plusDay).minusDays(1)); + nowUser.setVipId(vipId); //直接再detail里新增数据,因为不是续费 TAppUserVipDetail tAppUserVipDetail = new TAppUserVipDetail(); tAppUserVipDetail.setAppUserId(nowUser.getId()); @@ -55,6 +55,8 @@ tAppUserVipDetail.setChargeNum(vip.getDiscountTimes()); tAppUserVipDetail.setDiscountMoney(vip.getMaximumDeduction()); tAppUserVipDetail.setSendMonth(1); + tAppUserVipDetail.setVipJson(JSON.toJSONString(info.getData())); + tAppUserVipDetail.setVipType(type); tAppUserVipDetailService.save(tAppUserVipDetail); //直接赠送优惠卷 for (SendCouponDto sendCouponDto : javaList) { @@ -82,20 +84,21 @@ }else { - nowUser.setVipEndTime(nowUser.getVipEndTime().plusDays(plusDay).minusDays(1)); +// nowUser.setVipEndTime(nowUser.getVipEndTime().plusDays(plusDay).minusDays(1)); //获取detail里结束时间大于当前时间的数据,并将enttime延长 - TAppUserVipDetail tAppUserVipDetail = tAppUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getVipId,vipId).eq(TAppUserVipDetail::getAppUserId, nowUser.getId()).orderByDesc(TAppUserVipDetail::getEndTime).last("limit 1").one(); - if (tAppUserVipDetail!=null) { - List<TAppUserVipDetail> list = tAppUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, nowUser.getId()).ge(TAppUserVipDetail::getStartTime, tAppUserVipDetail.getEndTime()).list(); - for (TAppUserVipDetail appUserVipDetail : list) { - appUserVipDetail.setStartTime(appUserVipDetail.getStartTime().plusMonths(plusDay).minusDays(1)); - appUserVipDetail.setEndTime(appUserVipDetail.getEndTime().plusMonths(plusDay).minusDays(1)); - } - tAppUserVipDetailService.updateBatchById(list); - tAppUserVipDetail.setEndTime(tAppUserVipDetail.getEndTime().plusMonths(plusDay).minusDays(1)); - - tAppUserVipDetailService.updateById(tAppUserVipDetail); - }else { +// TAppUserVipDetail tAppUserVipDetail = tAppUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getVipId,vipId).eq(TAppUserVipDetail::getAppUserId, nowUser.getId()).orderByDesc(TAppUserVipDetail::getEndTime).last("limit 1").one(); +// if (tAppUserVipDetail!=null) { +// List<TAppUserVipDetail> list = tAppUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, nowUser.getId()).ge(TAppUserVipDetail::getStartTime, tAppUserVipDetail.getEndTime()).list(); +// for (TAppUserVipDetail appUserVipDetail : list) { +// appUserVipDetail.setStartTime(appUserVipDetail.getStartTime().plusMonths(plusDay).minusDays(1)); +// appUserVipDetail.setEndTime(appUserVipDetail.getEndTime().plusMonths(plusDay).minusDays(1)); +// } +// tAppUserVipDetailService.updateBatchById(list); +// tAppUserVipDetail.setEndTime(tAppUserVipDetail.getEndTime().plusMonths(plusDay).minusDays(1)); +// +// tAppUserVipDetailService.updateById(tAppUserVipDetail); +// }else +// { TAppUserVipDetail tAppUserVipDetail2 = tAppUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, nowUser.getId()).orderByDesc(TAppUserVipDetail::getEndTime).last("limit 1").one(); TAppUserVipDetail tAppUserVipDetail1 = new TAppUserVipDetail(); @@ -106,19 +109,18 @@ R<TVip> info = vipClient.getInfo1(vipId); TVip vip = info.getData(); - List<SendCouponDto> javaList = new ArrayList<>(); - if (vip.getCoupon()!=null) { - javaList = JSON.parseArray(vip.getCoupon()).toJavaList(SendCouponDto.class); - } + tAppUserVipDetail1.setCouponIds(vip.getCoupon()); tAppUserVipDetail1.setSendChargeNum(vip.getDiscountTimes()); tAppUserVipDetail1.setChargeNum(vip.getDiscountTimes()); tAppUserVipDetail1.setDiscountMoney(vip.getMaximumDeduction()); tAppUserVipDetail1.setSendMonth(1); + tAppUserVipDetail1.setVipType(type); + tAppUserVipDetail1.setVipJson(JSON.toJSONString(info.getData())); tAppUserVipDetailService.save(tAppUserVipDetail1); - } +// } } diff --git a/ruoyi-service/ruoyi-account/src/main/resources/bootstrap.yml b/ruoyi-service/ruoyi-account/src/main/resources/bootstrap.yml index 7895000..4631e31 100644 --- a/ruoyi-service/ruoyi-account/src/main/resources/bootstrap.yml +++ b/ruoyi-service/ruoyi-account/src/main/resources/bootstrap.yml @@ -1,3 +1,7 @@ +server: + port: 9200 + tomcat: + basedir: /data/tomcat # Spring spring: application: @@ -38,7 +42,6 @@ shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} --- - seata: enabled: true application-id: ${spring.application.name} @@ -51,36 +54,57 @@ config: type: nacos nacos: + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP data-id: seata-server.properties username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos registry: type: nacos nacos: application: seata-server + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# username: nacos +# password: nacos cloud: nacos: discovery: + # 开发环境 server-addr: 192.168.110.169:8848 # nacos注册中心地址 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# application: seata-server #Nacos 中 Seata 名称 +# username: nacos +# password: nacos sentinel: transport: - dashboard: 127.0.0.1:8080 # Sentinel控制台地址 + dashboard: 192.168.0.137:8080 # Sentinel控制台地址 eager: true - - --- spring: config: @@ -90,14 +114,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/RuoYiChargingPileApplication.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/RuoYiChargingPileApplication.java index cee17bf..2bd22f4 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/RuoYiChargingPileApplication.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/RuoYiChargingPileApplication.java @@ -6,6 +6,7 @@ import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.web.servlet.ServletComponentScan; import org.springframework.scheduling.annotation.EnableScheduling; import org.springframework.transaction.annotation.EnableTransactionManagement; diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java index 9f4183e..0efa30d 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java @@ -107,11 +107,11 @@ * @param number * @return */ - @PostMapping("/getSiteInfoByNumber") + @GetMapping("/getSiteInfoByNumber") @ApiOperation(value = "扫一扫后通过桩编号获取电站信息", tags = {"小程序-扫一扫"}) public R<SiteInfoVO> getSiteInfoByNumber(@RequestParam("number") String number){ SiteInfoVO siteInfoVO = new SiteInfoVO(); - TChargingPile one = chargingPileService.lambdaQuery().eq(TChargingPile::getNumber, number).one(); + TChargingPile one = chargingPileService.lambdaQuery().eq(TChargingPile::getCode, number).one(); Site byId = siteService.getById(one.getSiteId()); TAccountingStrategy byId1 = accountingStrategyService.getById(byId.getAccountingStrategyId()); List<TAccountingStrategyDetail> list = accountingStrategyDetailService.lambdaQuery().eq(TAccountingStrategyDetail::getAccountingStrategyId, byId1.getId()).list(); @@ -122,11 +122,13 @@ siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().multiply(byId1.getDiscount()).setScale(4, BigDecimal.ROUND_HALF_UP)); } } + siteInfoVO.setChargingPileId(one.getId()); siteInfoVO.setName(byId.getName()); siteInfoVO.setNumber(one.getNumber().toString()); siteInfoVO.setSpaceChargeExplain(byId.getSpaceChargeExplain()); return R.ok(siteInfoVO); } + @GetMapping("/getSiteList") @ApiOperation(value = "获取站点列表", tags = {"管理后台-站点管理"}) diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java index 48c30cf..fc961ec 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TAccountingStrategyController.java @@ -1,10 +1,7 @@ package com.ruoyi.chargingPile.controller; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.ruoyi.account.api.feignClient.AppUserClient; import com.ruoyi.chargingPile.api.dto.TAccountingStrategyDTO; import com.ruoyi.chargingPile.api.model.*; import com.ruoyi.chargingPile.api.query.TAccountingStrategyQuery; @@ -16,18 +13,13 @@ import com.ruoyi.chargingPile.service.TChargingPileService; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.dto.SteategyPassDto; -import com.ruoyi.common.core.enums.AuditStateEnum; import com.ruoyi.common.core.web.domain.AjaxResult; -import com.ruoyi.common.core.web.domain.BaseDelete; import com.ruoyi.common.core.web.page.PageInfo; -import com.ruoyi.common.security.service.TokenService; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.log.enums.OperatorType; import com.ruoyi.common.security.utils.SecurityUtils; -import com.ruoyi.system.api.domain.SysUser; import com.ruoyi.system.api.feignClient.SysUserClient; -import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -64,10 +56,8 @@ private TChargingPileService chargingPileService; @Autowired private ISiteService siteService; - @Autowired - private SysUserClient sysUserClient; @Resource - private TokenService tokenService; + private SysUserClient sysUserClient; @Autowired public TAccountingStrategyController(TAccountingStrategyService accountingStrategyService, TAccountingStrategyDetailService accountingStrategyDetailService) { @@ -142,7 +132,7 @@ return AjaxResult.error("同阶段费率值需一致"); } // 判断修改的计费策略是否为已通过 - if(dto.getAuditStatus() == 3 || dto.getAuditStatus() == 4){ + if(null != dto.getAuditStatus() && (dto.getAuditStatus() == 3 || dto.getAuditStatus() == 4)){ // 查询是否有下级审核中的策略 TAccountingStrategy children = accountingStrategyService.getOne(Wrappers.lambdaQuery(TAccountingStrategy.class) .eq(TAccountingStrategy::getParentId, dto.getId()) @@ -343,6 +333,14 @@ } }else { + if (byId.getAuditStatus()==1){ + + byId.setFirstRemark(steategyPassDto.getRemark()); + + }else if (byId.getAuditStatus()==2){ + byId.setTwoRemark(steategyPassDto.getRemark()); + } + byId.setAuditStatus(4); } accountingStrategyService.updateById(byId); diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java index 74e0baf..c7e799f 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java @@ -130,7 +130,7 @@ @ApiOperation(tags = {"后台-申请表单-申请建桩"},value = "列表") @PostMapping(value = "/page") - public AjaxResult<Page<TApplyChargingPile>> page(ApplyChargingQuery applyChargingQuery) { + public AjaxResult<Page<TApplyChargingPile>> page(@RequestBody ApplyChargingQuery applyChargingQuery) { Page<TApplyChargingPile> page = applyChargingPileService.lambdaQuery() .like(applyChargingQuery.getLandlordPhone() != null && !applyChargingQuery.getLandlordPhone().equals(""), TApplyChargingPile::getLandlordPhone, applyChargingQuery.getLandlordPhone()) .page(Page.of(applyChargingQuery.getPageCurr(), applyChargingQuery.getPageSize())); diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java index 787cdbb..11b93a1 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TChargingPileController.java @@ -1,6 +1,7 @@ package com.ruoyi.chargingPile.controller; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ruoyi.chargingPile.api.model.TChargingGun; import com.ruoyi.chargingPile.api.model.TChargingPile; @@ -10,8 +11,7 @@ import com.ruoyi.chargingPile.dto.ChargingGunCountMonitoring; import com.ruoyi.chargingPile.dto.ChargingGunMonitoring; import com.ruoyi.chargingPile.dto.GetChargingGunMonitoring; -import com.ruoyi.chargingPile.service.TChargingGunService; -import com.ruoyi.chargingPile.service.TChargingPileService; +import com.ruoyi.chargingPile.service.*; import com.ruoyi.common.core.domain.R; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.PageInfo; @@ -25,6 +25,7 @@ import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.common.log.enums.OperatorType; +import com.ruoyi.other.api.domain.TVip; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; @@ -36,6 +37,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.*; +import java.math.BigDecimal; import java.util.List; /** @@ -53,6 +55,12 @@ private final TChargingPileService chargingPileService; private final TChargingGunService chargingGunService; + + @Resource + private TAccountingStrategyService accountingStrategyService; + + @Resource + private TAccountingStrategyDetailService accountingStrategyDetailService; @Autowired @@ -197,5 +205,6 @@ TChargingPile chargingPile = chargingPileService.getById(id); return R.ok(chargingPile); } + } diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/filter/AuthFilter.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/filter/AuthFilter.java index 467e29a..e04e19d 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/filter/AuthFilter.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/filter/AuthFilter.java @@ -11,6 +11,7 @@ import org.apache.logging.log4j.core.config.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; @@ -80,7 +81,7 @@ return; } } - filterChain.doFilter(request, response); + filterChain.doFilter(servletRequest, servletResponse); } diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TChargingGunMapper.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TChargingGunMapper.java index 146e826..1dfd10a 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TChargingGunMapper.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TChargingGunMapper.java @@ -37,7 +37,7 @@ * @param siteIds * @return */ - Map<Integer, Integer> getModeStatistics(@Param("siteIds")List<Integer> siteIds); + List<Map<Integer, Integer>> getModeStatistics(@Param("siteIds")List<Integer> siteIds); /** * 统计充电枪状态 diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/PartnerServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/PartnerServiceImpl.java index 3e2ee4b..ae3830e 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/PartnerServiceImpl.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/PartnerServiceImpl.java @@ -25,7 +25,10 @@ import com.ruoyi.system.api.feignClient.SysUserRoleClient; import com.ruoyi.system.api.model.GetSysRoleByIds; import com.ruoyi.system.api.model.SysUserRoleVo; +import io.seata.core.context.RootContext; +import io.seata.core.exception.TransactionException; import io.seata.spring.annotation.GlobalTransactional; +import io.seata.tm.api.GlobalTransactionContext; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @@ -111,6 +114,7 @@ @Override @GlobalTransactional(rollbackFor = Exception.class)//分布式事务 public AjaxResult addPartner(Partner partner) { + System.err.println("事务ID:" + RootContext.getXID()); //校验参数和重复数据 AjaxResult ajaxResult = addPartnerParameterCheck(partner); if(ajaxResult.isError()){ @@ -144,7 +148,16 @@ user.setRoleId(partner.getRoleId().longValue()); user.setRoleType(2); user.setObjectId(partner.getId()); - sysUserClient.addSysUser(user); + R r = sysUserClient.addSysUser(user); + if(r.getCode() != 200){ + // 手动进行全局事务回滚 + try { + GlobalTransactionContext.getCurrent().rollback(); + } catch (TransactionException e) { + throw new RuntimeException(e); + } + return AjaxResult.error(r.getMsg()); + } return AjaxResult.success(); } diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java index 39a7152..472d616 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TAccountingStrategyServiceImpl.java @@ -40,7 +40,7 @@ List<TAccountingStrategyVO> list = this.baseMapper.pageList(query,pageInfo); List<Integer> parentIds = list.stream().map(TAccountingStrategyVO::getId).collect(Collectors.toList()); List<TAccountingStrategy> list1 = this.list(Wrappers.lambdaQuery(TAccountingStrategy.class) - .in(TAccountingStrategy::getParentId, parentIds) + .in(!parentIds.isEmpty(),TAccountingStrategy::getParentId, parentIds) .in(TAccountingStrategy::getAuditStatus, Arrays.asList(1,2))); for (TAccountingStrategyVO tAccountingStrategyVO : list) { SysUser data = sysUserClient.getSysUser(tAccountingStrategyVO.getUserId()).getData(); diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingGunServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingGunServiceImpl.java index 1918cc5..496022c 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingGunServiceImpl.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingGunServiceImpl.java @@ -186,10 +186,10 @@ GunStatusStatisticsVO gunStatusStatisticsVO = new GunStatusStatisticsVO(); if(CollectionUtils.isEmpty(siteIds)){ - Map<Integer, Integer> modeStatisticsNull = new HashMap<>(); - modeStatisticsNull.put(1, 0); - modeStatisticsNull.put(2, 0); - modeStatisticsNull.put(3, 0); + List<Map<Integer, Integer>> modeStatisticsNull = new ArrayList<>(); + modeStatisticsNull.add(new HashMap<>(1,0)); + modeStatisticsNull.add(new HashMap<>(2,0)); + modeStatisticsNull.add(new HashMap<>(3,0)); gunStatusStatisticsVO.setModeStatistics(modeStatisticsNull); Map<Integer, Integer> statusStatisticsNull = new HashMap<>(); statusStatisticsNull.put(1, 0); @@ -209,22 +209,34 @@ gunStatusStatisticsVO.setStatusModeStatistics(statusModeStatistics); } - Map<Integer, Integer> modeStatistics = this.baseMapper.getModeStatistics(siteIds); + List<Map<Integer, Integer>> modeStatistics = this.baseMapper.getModeStatistics(siteIds); + if(CollectionUtils.isEmpty(modeStatistics)){ + Map<Integer, Integer> modeStatistics1 = new HashMap<>(3,0); + modeStatistics1.put(1, 0); + modeStatistics1.put(2, 0); + modeStatistics1.put(3, 0); + modeStatistics.add(modeStatistics1); + } gunStatusStatisticsVO.setModeStatistics(modeStatistics); - Map<Integer, Integer> statusStatistics = new HashMap<>(); + List<Map<Integer, Integer>> statusStatistics = new ArrayList<>(); // 离线 Long count = this.baseMapper.selectCount(Wrappers.lambdaQuery(TChargingGun.class) .eq(TChargingGun::getStatus, 1)); - statusStatistics.put(1, count.intValue()); + statusStatistics.add(new HashMap<>(1,count.intValue())); +// statusStatistics.put(1, count.intValue()); // 故障 count = this.baseMapper.selectCount(Wrappers.lambdaQuery(TChargingGun.class) .eq(TChargingGun::getStatus, 7)); - statusStatistics.put(2, count.intValue()); + statusStatistics.add(new HashMap<>(2,count.intValue())); + +// statusStatistics.put(2, count.intValue()); // 充电中 count = this.baseMapper.selectCount(Wrappers.lambdaQuery(TChargingGun.class) .in(TChargingGun::getStatus, Arrays.asList(3,4,5,6))); - statusStatistics.put(3, count.intValue()); + statusStatistics.add(new HashMap<>(3,count.intValue())); + +// statusStatistics.put(3, count.intValue()); gunStatusStatisticsVO.setModeStatistics(statusStatistics); List<StatusModeStatisticsVO> statusModeStatisticsVOS = new ArrayList<>(); diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java index 6eae9d5..2fa9813 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java +++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TChargingPileNotificationServiceImpl.java @@ -83,7 +83,8 @@ } } }else{ - siteIds = new HashSet<>(siteId); + siteIds = new HashSet<>(); + siteIds.add(siteId); } PageInfo<TChargingPileNotification> pageInfo = new PageInfo<>(basePage.getPageCurr(), basePage.getPageSize()); List<TChargingPileNotification> list = this.baseMapper.chargingPileNotificationPageList(pageInfo, siteIds); diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/resources/bootstrap.yml b/ruoyi-service/ruoyi-chargingPile/src/main/resources/bootstrap.yml index 225c084..af5069b 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/resources/bootstrap.yml +++ b/ruoyi-service/ruoyi-chargingPile/src/main/resources/bootstrap.yml @@ -1,3 +1,7 @@ +server: + port: 9300 + tomcat: + basedir: /data/tomcat # Spring spring: application: @@ -37,14 +41,12 @@ # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - --- - seata: enabled: true application-id: ${spring.application.name} tx-service-group: seata_tx_group #此处配置自定义的seata事务分组名称 - enable-auto-data-source-proxy: false #关闭数据库代理 + enable-auto-data-source-proxy: false service: vgroup-mapping: seata_tx_group: default @@ -52,30 +54,53 @@ config: type: nacos nacos: + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP data-id: seata-server.properties username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos registry: type: nacos nacos: application: seata-server + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# username: nacos +# password: nacos cloud: nacos: discovery: + # 开发环境 server-addr: 192.168.110.169:8848 # nacos注册中心地址 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# application: seata-server #Nacos 中 Seata 名称 +# username: nacos +# password: nacos sentinel: transport: dashboard: 127.0.0.1:8080 # Sentinel控制台地址 @@ -89,14 +114,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/TChargingGunMapper.xml b/ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/TChargingGunMapper.xml index a3e2a10..900f562 100644 --- a/ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/TChargingGunMapper.xml +++ b/ruoyi-service/ruoyi-chargingPile/src/main/resources/mapper/chargingPile/TChargingGunMapper.xml @@ -85,10 +85,10 @@ <select id="getStatusModeStatistics" resultType="com.ruoyi.chargingPile.api.vo.StatusModeStatisticsVO"> SELECT charge_mode, - IFNULL((SELECT COUNT(*) FROM your_table WHERE status = 2),0) AS freeCount, - IFNULL((SELECT COUNT(*) FROM your_table WHERE status = 5),0) AS filledCount, - IFNULL((SELECT COUNT(*) FROM your_table WHERE status = 3),0) AS insertCount, - IFNULL((SELECT COUNT(*) FROM your_table WHERE status = 4),0) AS chargingCount + IFNULL((SELECT COUNT(*) FROM t_charging_gun WHERE status = 2),0) AS freeCount, + IFNULL((SELECT COUNT(*) FROM t_charging_gun WHERE status = 5),0) AS filledCount, + IFNULL((SELECT COUNT(*) FROM t_charging_gun WHERE status = 3),0) AS insertCount, + IFNULL((SELECT COUNT(*) FROM t_charging_gun WHERE status = 4),0) AS chargingCount FROM t_charging_gun WHERE del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} AND charge_mode = #{chargeMode} <if test="siteIds != null and siteIds.size()>0"> @@ -97,6 +97,7 @@ #{siteId} </foreach> </if> + GROUP BY charge_mode </select> </mapper> diff --git a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/api/IotInterfaceUtil.java b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/api/IotInterfaceUtil.java index 77aeab2..7582df9 100644 --- a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/api/IotInterfaceUtil.java +++ b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/api/IotInterfaceUtil.java @@ -113,16 +113,15 @@ /** * 创建设备 * @param productId 产品ID - * @param nodeId 设备标识码 通常使用IMEI、MAC地址或Serial No作为node_id - * @param deviceId 设备ID 使用设备标识码 + * @param nodeId 设备标识码 设备编号 * @param deviceName 设备名称 * @param description 设备描述 * @return AddDeviceResponse */ - public AddDeviceResponse addDeviceRequest(String productId,String nodeId,String deviceId,String deviceName,String description) { + public AddDeviceResponse addDeviceRequest(String productId,String nodeId,String deviceName,String description) { AddDeviceRequest request = new AddDeviceRequest(); AddDevice body = new AddDevice(); - body.withDeviceId(deviceId); + body.withDeviceId(nodeId); body.withNodeId(nodeId); body.withDeviceName(deviceName); body.withProductId(productId); diff --git a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/listener/IotMessageListener.java b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/listener/IotMessageListener.java index c29b1a2..e43d689 100644 --- a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/listener/IotMessageListener.java +++ b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/listener/IotMessageListener.java @@ -16,13 +16,12 @@ import com.ruoyi.integration.iotda.utils.tools.StrategyUtil; import com.ruoyi.integration.rocket.model.*; import com.ruoyi.integration.rocket.produce.EnhanceProduce; +import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.rocketmq.client.producer.SendResult; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RestController; +import org.springframework.web.bind.annotation.*; import java.io.IOException; import java.math.BigDecimal; @@ -36,6 +35,7 @@ */ @Slf4j @RestController +@RequestMapping("/iot") public class IotMessageListener { @Autowired @@ -266,60 +266,97 @@ return AjaxResult.success(); } - @PostMapping(value = "/message/sendMessage") - public R sendMessage() { + + @ApiOperation(value = "运营平台远程控制启机",tags = {"硬件接口"}) + @GetMapping(value = "/platformStartCharging") + public R platformStartCharging(String orderNum,String deviceId,Long orderId,BigDecimal money) { // 运营平台远程控制启机 -// PlatformStartCharging platformStartCharging = new PlatformStartCharging(); -// platformStartCharging.setTransaction_serial_number("4200002375202409185150427245"); -// platformStartCharging.setCharging_pile_code("3401231001200202"); -// platformStartCharging.setCharging_gun_code("1"); -// platformStartCharging.setCard_number("1833063878153543681"); -// platformStartCharging.setAccount_balance(new BigDecimal(50)); -// String message = iotMessageProduce.sendMessage(platformStartCharging.getCharging_pile_code(), ServiceIdMenu.PLATFORM_START_CHARGING.getKey(), messageUtil.platformStartCharging(platformStartCharging)); + PlatformStartCharging platformStartCharging = new PlatformStartCharging(); + platformStartCharging.setTransaction_serial_number(orderNum); + platformStartCharging.setCharging_pile_code(deviceId); + platformStartCharging.setCharging_gun_code("1"); + platformStartCharging.setCard_number(orderId.toString()); + platformStartCharging.setAccount_balance(money); + String message = iotMessageProduce.sendMessage(platformStartCharging.getCharging_pile_code(), ServiceIdMenu.PLATFORM_START_CHARGING.getKey(), messageUtil.platformStartCharging(platformStartCharging)); + return R.ok(message); + } + + @ApiOperation(value = "运营平台远程停机",tags = {"硬件接口"}) + @GetMapping(value = "/platformStopCharging") + public R platformStopCharging(String deviceId) { // 运营平台远程停机 -// PlatformStopCharging platformStopCharging = new PlatformStopCharging(); -// platformStopCharging.setCharging_pile_code("3401231001200202"); -// platformStopCharging.setCharging_gun_code("1"); -// String message = iotMessageProduce.sendMessage(platformStopCharging.getCharging_pile_code(), ServiceIdMenu.PLATFORM_STOP_CHARGING.getKey(),messageUtil.platformStopCharging(platformStopCharging)); + PlatformStopCharging platformStopCharging = new PlatformStopCharging(); + platformStopCharging.setCharging_pile_code(deviceId); + platformStopCharging.setCharging_gun_code("1"); + String message = iotMessageProduce.sendMessage(platformStopCharging.getCharging_pile_code(), ServiceIdMenu.PLATFORM_STOP_CHARGING.getKey(),messageUtil.platformStopCharging(platformStopCharging)); + return R.ok(message); + } + + @ApiOperation(value = "修改余额",tags = {"硬件接口"}) + @GetMapping(value = "/updateBalance") + public R updateBalance(String deviceId,Long orderId) { // 修改余额 -// UpdateBalance updateBalance = new UpdateBalance(); -// updateBalance.setCharging_pile_code("3401231001200202"); -// updateBalance.setCharging_gun_code("1"); -// updateBalance.setPhysical_card_number("1833063878153543681"); -// updateBalance.setAccount_balance(new BigDecimal(20)); -// String message = iotMessageProduce.sendMessage(updateBalance.getCharging_pile_code(), ServiceIdMenu.UPDATE_BALANCE.getKey(),messageUtil.updateBalance(updateBalance)); + UpdateBalance updateBalance = new UpdateBalance(); + updateBalance.setCharging_pile_code(deviceId); + updateBalance.setCharging_gun_code("1"); + updateBalance.setPhysical_card_number(orderId.toString()); + updateBalance.setAccount_balance(new BigDecimal(20)); + String message = iotMessageProduce.sendMessage(updateBalance.getCharging_pile_code(), ServiceIdMenu.UPDATE_BALANCE.getKey(),messageUtil.updateBalance(updateBalance)); + return R.ok(message); + } + + @ApiOperation(value = "充电桩工作参数设置",tags = {"硬件接口"}) + @GetMapping(value = "/workingParameterSetting") + public R workingParameterSetting(String deviceId) { // 充电桩工作参数设置 -// WorkingParameterSetting workingParameterSetting = new WorkingParameterSetting(); -// workingParameterSetting.setCharging_pile_code("3401231001200202"); -// workingParameterSetting.setAllow_work(0); -// workingParameterSetting.setMaximum_output_power(220); -// String message = iotMessageProduce.sendMessage(workingParameterSetting.getCharging_pile_code(), ServiceIdMenu.WORKING_PARAMETER_SETTING.getKey(),messageUtil.workingParameterSetting(workingParameterSetting)); + WorkingParameterSetting workingParameterSetting = new WorkingParameterSetting(); + workingParameterSetting.setCharging_pile_code(deviceId); + workingParameterSetting.setAllow_work(0); + workingParameterSetting.setMaximum_output_power(220); + String message = iotMessageProduce.sendMessage(workingParameterSetting.getCharging_pile_code(), ServiceIdMenu.WORKING_PARAMETER_SETTING.getKey(),messageUtil.workingParameterSetting(workingParameterSetting)); + return R.ok(message); + } + + @ApiOperation(value = "对时设置",tags = {"硬件接口"}) + @GetMapping(value = "/timingSetting") + public R timingSetting(String deviceId) { // 对时设置 -// TimingSetting timingSetting = new TimingSetting(); -// timingSetting.setCharging_pile_code("3401231001200202"); -// System.err.println(CP56Time2aConverter.convertToCP56Time2a(new Date())); -// timingSetting.setCurrent_time(CP56Time2aConverter.convertToCP56Time2a(new Date())); -// String message = iotMessageProduce.sendMessage(timingSetting.getCharging_pile_code(), ServiceIdMenu.TIMING_SETTING.getKey(),messageUtil.timingSetting(timingSetting)); + TimingSetting timingSetting = new TimingSetting(); + timingSetting.setCharging_pile_code(deviceId); + timingSetting.setCurrent_time(CP56Time2aConverter.convertToCP56Time2a(new Date())); + String message = iotMessageProduce.sendMessage(timingSetting.getCharging_pile_code(), ServiceIdMenu.TIMING_SETTING.getKey(),messageUtil.timingSetting(timingSetting)); + return R.ok(message); + } + + @ApiOperation(value = "计费模型设置",tags = {"硬件接口"}) + @GetMapping(value = "/setupBillingModel") + public R setupBillingModel(String deviceId) { // TODO 罗 计费模型设置 -// SetupBillingModel setupBillingModel = new SetupBillingModel(); -// // 计费模型 -// List<TAccountingStrategyDetail> accountingStrategyDetails = accountingStrategyDetailClient.getDetailListByCode("3401231001200202").getData(); -// Map<Integer, TAccountingStrategyDetail> strategyPrice = StrategyUtil.getStrategyPrice(accountingStrategyDetails); -// // 价格设置 -// AcquisitionBillingModeReply acquisitionBillingModeReply = new AcquisitionBillingModeReply(); -// StrategyUtil.setStrategyPrice(strategyPrice,acquisitionBillingModeReply); -// // 时段设置 -// StrategyUtil.setTime(accountingStrategyDetails,acquisitionBillingModeReply); -// TAccountingStrategyDetail accountingStrategyDetail = accountingStrategyDetailClient.getDetailByCode("3401231001200202").getData(); -// acquisitionBillingModeReply.setBilling_model_code(accountingStrategyDetail.getId().toString()); -// acquisitionBillingModeReply.setCharging_pile_code("3401231001200202"); -// acquisitionBillingModeReply.setLoss_ratio(BigDecimal.ZERO); -// BeanUtils.copyProperties(acquisitionBillingModeReply,setupBillingModel); -// System.err.println(setupBillingModel); -// String message = iotMessageProduce.sendMessage(setupBillingModel.getCharging_pile_code(), ServiceIdMenu.SETUP_BILLING_MODEL.getKey(),messageUtil.setupBillingModel(setupBillingModel)); + SetupBillingModel setupBillingModel = new SetupBillingModel(); + // 计费模型 + List<TAccountingStrategyDetail> accountingStrategyDetails = accountingStrategyDetailClient.getDetailListByCode(deviceId).getData(); + Map<Integer, TAccountingStrategyDetail> strategyPrice = StrategyUtil.getStrategyPrice(accountingStrategyDetails); + // 价格设置 + AcquisitionBillingModeReply acquisitionBillingModeReply = new AcquisitionBillingModeReply(); + StrategyUtil.setStrategyPrice(strategyPrice,acquisitionBillingModeReply); + // 时段设置 + StrategyUtil.setTime(accountingStrategyDetails,acquisitionBillingModeReply); + TAccountingStrategyDetail accountingStrategyDetail = accountingStrategyDetailClient.getDetailByCode(deviceId).getData(); + acquisitionBillingModeReply.setBilling_model_code(accountingStrategyDetail.getId().toString()); + acquisitionBillingModeReply.setCharging_pile_code(deviceId); + acquisitionBillingModeReply.setLoss_ratio(BigDecimal.ZERO); + BeanUtils.copyProperties(acquisitionBillingModeReply,setupBillingModel); + System.err.println(setupBillingModel); + String message = iotMessageProduce.sendMessage(setupBillingModel.getCharging_pile_code(), ServiceIdMenu.SETUP_BILLING_MODEL.getKey(),messageUtil.setupBillingModel(setupBillingModel)); + return R.ok(message); + } + + @ApiOperation(value = "远程重启",tags = {"硬件接口"}) + @PostMapping(value = "/platformRestart") + public R platformRestart(String deviceId) { // 远程重启 PlatformRestart platformRestart = new PlatformRestart(); - platformRestart.setCharging_pile_code("3401231001200202"); + platformRestart.setCharging_pile_code(deviceId); platformRestart.setOperate(2); String message = iotMessageProduce.sendMessage(platformRestart.getCharging_pile_code(), ServiceIdMenu.PLATFORM_RESTART.getKey(),messageUtil.platformRestart(platformRestart)); return R.ok(message); diff --git a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/produce/IotMessageProduce.java b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/produce/IotMessageProduce.java index 0269d52..ace5a25 100644 --- a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/produce/IotMessageProduce.java +++ b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/produce/IotMessageProduce.java @@ -1,5 +1,6 @@ package com.ruoyi.integration.iotda.utils.produce; +import com.alibaba.fastjson2.JSONObject; import com.huaweicloud.sdk.core.exception.ConnectionException; import com.huaweicloud.sdk.core.exception.RequestTimeoutException; import com.huaweicloud.sdk.core.exception.ServiceResponseException; @@ -34,7 +35,7 @@ * @return */ @PostMapping("/sendMessage") - public String sendMessage(String deviceId,String name,String message){ + public String sendMessage(String deviceId, String name, JSONObject message){ CreateMessageRequest request = new CreateMessageRequest(); request.withDeviceId(deviceId); DeviceMessageRequest body = new DeviceMessageRequest(); diff --git a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/tools/MessageUtil.java b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/tools/MessageUtil.java index 5fdcac0..89e9fc1 100644 --- a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/tools/MessageUtil.java +++ b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/iotda/utils/tools/MessageUtil.java @@ -61,7 +61,7 @@ * @param onlineReply 实体对象 * @return */ - public String onlineReply(OnlineReply onlineReply){ + public JSONObject onlineReply(OnlineReply onlineReply){ onlineReplyService.create(onlineReply); return getMessageJsonString(onlineReply, ServiceIdMenu.ONLINE_REPLY.getValue()); } @@ -71,7 +71,7 @@ * @param pong 实体对象 * @return */ - public String pong(Pong pong){ + public JSONObject pong(Pong pong){ pongService.create(pong); return getMessageJsonString(pong, ServiceIdMenu.PONG.getValue()); } @@ -81,7 +81,7 @@ * @param billingModeVerifyReply 实体对象 * @return */ - public String billingModeVerifyReply(BillingModeVerifyReply billingModeVerifyReply){ + public JSONObject billingModeVerifyReply(BillingModeVerifyReply billingModeVerifyReply){ billingModeVerifyReplyService.create(billingModeVerifyReply); return getMessageJsonString(billingModeVerifyReply, ServiceIdMenu.BILLING_MODE_VERIFY_REPLY.getValue()); } @@ -91,7 +91,7 @@ * @param acquisitionBillingModeReply 实体对象 * @return */ - public String acquisitionBillingModeReply(AcquisitionBillingModeReply acquisitionBillingModeReply){ + public JSONObject acquisitionBillingModeReply(AcquisitionBillingModeReply acquisitionBillingModeReply){ acquisitionBillingModeReplyService.create(acquisitionBillingModeReply); return getMessageJsonString(acquisitionBillingModeReply, ServiceIdMenu.ACQUISITION_BILLING_MODE_REPLY.getValue()); } @@ -101,7 +101,7 @@ * @param readRealTimeMonitoringData 实体对象 * @return */ - public String readRealTimeMonitoringData(ReadRealTimeMonitoringData readRealTimeMonitoringData){ + public JSONObject readRealTimeMonitoringData(ReadRealTimeMonitoringData readRealTimeMonitoringData){ readRealTimeMonitoringDataService.create(readRealTimeMonitoringData); return getMessageJsonString(readRealTimeMonitoringData, ServiceIdMenu.READ_REAL_TIME_MONITORING_DATA.getValue()); } @@ -121,7 +121,7 @@ * @param platformConfirmationCharging 实体对象 * @return */ - public String platformConfirmationCharging(PlatformConfirmationCharging platformConfirmationCharging){ + public JSONObject platformConfirmationCharging(PlatformConfirmationCharging platformConfirmationCharging){ platformConfirmationChargingService.create(platformConfirmationCharging); return getMessageJsonString(platformConfirmationCharging, ServiceIdMenu.PLATFORM_CONFIRMATION_CHARGING.getValue()); } @@ -131,7 +131,7 @@ * @param platformStartCharging 实体对象 * @return */ - public String platformStartCharging(PlatformStartCharging platformStartCharging){ + public JSONObject platformStartCharging(PlatformStartCharging platformStartCharging){ platformStartChargingService.create(platformStartCharging); return getMessageJsonString(platformStartCharging, ServiceIdMenu.PLATFORM_START_CHARGING.getValue()); } @@ -141,7 +141,7 @@ * @param platformStopCharging 实体对象 * @return */ - public String platformStopCharging(PlatformStopCharging platformStopCharging){ + public JSONObject platformStopCharging(PlatformStopCharging platformStopCharging){ platformStopChargingService.create(platformStopCharging); return getMessageJsonString(platformStopCharging, ServiceIdMenu.PLATFORM_STOP_CHARGING.getValue()); } @@ -151,7 +151,7 @@ * @param confirmTransactionRecord 实体对象 * @return */ - public String confirmTransactionRecord(ConfirmTransactionRecord confirmTransactionRecord){ + public JSONObject confirmTransactionRecord(ConfirmTransactionRecord confirmTransactionRecord){ confirmTransactionRecordService.create(confirmTransactionRecord); return getMessageJsonString(confirmTransactionRecord, ServiceIdMenu.CONFIRM_TRANSACTION_RECORD.getValue()); } @@ -161,7 +161,7 @@ * @param updateBalance 实体对象 * @return */ - public String updateBalance(UpdateBalance updateBalance){ + public JSONObject updateBalance(UpdateBalance updateBalance){ updateBalanceService.create(updateBalance); return getMessageJsonString(updateBalance, ServiceIdMenu.UPDATE_BALANCE.getValue()); } @@ -171,7 +171,7 @@ * @param synchronizeOfflineCard 实体对象 * @return */ - public String synchronizeOfflineCard(SynchronizeOfflineCard synchronizeOfflineCard){ + public JSONObject synchronizeOfflineCard(SynchronizeOfflineCard synchronizeOfflineCard){ synchronizeOfflineCardService.create(synchronizeOfflineCard); return getMessageJsonString(synchronizeOfflineCard, ServiceIdMenu.SYNCHRONIZE_OFFLINE_CARD.getValue()); } @@ -181,7 +181,7 @@ * @param clearOfflineCard 实体对象 * @return */ - public String clearOfflineCard(ClearOfflineCard clearOfflineCard){ + public JSONObject clearOfflineCard(ClearOfflineCard clearOfflineCard){ clearOfflineCardService.create(clearOfflineCard); return getMessageJsonString(clearOfflineCard, ServiceIdMenu.CLEAR_OFFLINE_CARD.getValue()); } @@ -191,7 +191,7 @@ * @param queryOfflineCard 实体对象 * @return */ - public String queryOfflineCard(QueryOfflineCard queryOfflineCard){ + public JSONObject queryOfflineCard(QueryOfflineCard queryOfflineCard){ queryOfflineCardService.create(queryOfflineCard); return getMessageJsonString(queryOfflineCard, ServiceIdMenu.QUERY_OFFLINE_CARD.getValue()); } @@ -201,7 +201,7 @@ * @param workingParameterSetting 实体对象 * @return */ - public String workingParameterSetting(WorkingParameterSetting workingParameterSetting){ + public JSONObject workingParameterSetting(WorkingParameterSetting workingParameterSetting){ workingParameterSettingService.create(workingParameterSetting); return getMessageJsonString(workingParameterSetting, ServiceIdMenu.WORKING_PARAMETER_SETTING.getValue()); } @@ -211,7 +211,7 @@ * @param timingSetting 实体对象 * @return */ - public String timingSetting(TimingSetting timingSetting){ + public JSONObject timingSetting(TimingSetting timingSetting){ timingSettingService.create(timingSetting); return getMessageJsonString(timingSetting, ServiceIdMenu.TIMING_SETTING.getValue()); } @@ -220,7 +220,7 @@ * @param timingSettingReply 实体对象 * @return */ - public String timingSettingReply(TimingSettingReply timingSettingReply){ + public JSONObject timingSettingReply(TimingSettingReply timingSettingReply){ timingSettingReplyService.create(timingSettingReply); return getMessageJsonString(timingSettingReply, ServiceIdMenu.TIMING_SETTING_REPLY.getValue()); } @@ -230,7 +230,7 @@ * @param setupBillingModel 实体对象 * @return */ - public String setupBillingModel(SetupBillingModel setupBillingModel){ + public JSONObject setupBillingModel(SetupBillingModel setupBillingModel){ setupBillingModelService.create(setupBillingModel); return getMessageJsonString(setupBillingModel, ServiceIdMenu.SETUP_BILLING_MODEL.getValue()); } @@ -240,7 +240,7 @@ * @param openOrCloseGroundLock 实体对象 * @return */ - public String openOrCloseGroundLock(OpenOrCloseGroundLock openOrCloseGroundLock){ + public JSONObject openOrCloseGroundLock(OpenOrCloseGroundLock openOrCloseGroundLock){ openOrCloseGroundLockService.create(openOrCloseGroundLock); return getMessageJsonString(openOrCloseGroundLock, ServiceIdMenu.OPEN_OR_CLOSE_GROUND_LOCK.getValue()); } @@ -249,7 +249,7 @@ * @param platformRestart 实体对象 * @return */ - public String platformRestart(PlatformRestart platformRestart){ + public JSONObject platformRestart(PlatformRestart platformRestart){ platformRestartService.create(platformRestart); return getMessageJsonString(platformRestart, ServiceIdMenu.PLATFORM_RESTART.getValue()); } @@ -258,7 +258,7 @@ * @param platformRemoteUpdate 实体对象 * @return */ - public String platformRemoteUpdate(PlatformRemoteUpdate platformRemoteUpdate){ + public JSONObject platformRemoteUpdate(PlatformRemoteUpdate platformRemoteUpdate){ platformRemoteUpdateService.create(platformRemoteUpdate); return getMessageJsonString(platformRemoteUpdate, ServiceIdMenu.PLATFORM_REMOTE_UPDATE.getValue()); } @@ -269,9 +269,9 @@ * @param serviceId 服务ID * @return */ - public String getMessageJsonString(Object object, String serviceId){ + public JSONObject getMessageJsonString(Object object, String serviceId){ JSONObject jsonObject = JSONObject.parseObject(JSONObject.toJSONString(object)); jsonObject.put("service_id", serviceId); - return jsonObject.toJSONString(); + return jsonObject; } } diff --git a/ruoyi-service/ruoyi-integration/src/main/resources/bootstrap.yml b/ruoyi-service/ruoyi-integration/src/main/resources/bootstrap.yml index f8c49a6..20bdc83 100644 --- a/ruoyi-service/ruoyi-integration/src/main/resources/bootstrap.yml +++ b/ruoyi-service/ruoyi-integration/src/main/resources/bootstrap.yml @@ -1,3 +1,7 @@ +server: + port: 9700 + tomcat: + basedir: /data/tomcat # Spring spring: application: @@ -9,6 +13,14 @@ profiles: # 环境配置 active: dev + +--- +spring: + cloud: + stream: + rocketmq: + binder: + name-server: 127.0.0.1:9876 --- spring: config: @@ -37,9 +49,7 @@ # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - --- - seata: enabled: true application-id: ${spring.application.name} @@ -52,36 +62,57 @@ config: type: nacos nacos: + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP data-id: seata-server.properties username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos registry: type: nacos nacos: application: seata-server + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# username: nacos +# password: nacos cloud: nacos: discovery: + # 开发环境 server-addr: 192.168.110.169:8848 # nacos注册中心地址 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# application: seata-server #Nacos 中 Seata 名称 +# username: nacos +# password: nacos sentinel: transport: dashboard: 127.0.0.1:8080 # Sentinel控制台地址 eager: true - - --- spring: config: @@ -91,14 +122,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TVipOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TVipOrderController.java index 74c4dfc..909cf73 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TVipOrderController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TVipOrderController.java @@ -1,24 +1,40 @@ package com.ruoyi.order.controller; +import cn.afterturn.easypoi.excel.ExcelExportUtil; +import cn.afterturn.easypoi.excel.entity.ExportParams; import com.ruoyi.account.api.dto.GiveVipDto; import com.ruoyi.account.api.feignClient.AppUserClient; import com.ruoyi.common.core.domain.R; +import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.common.core.utils.WebUtils; import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.core.web.page.PageInfo; +import com.ruoyi.common.log.annotation.Log; +import com.ruoyi.common.log.enums.BusinessType; import com.ruoyi.order.api.model.TExchangeOrder; import com.ruoyi.order.api.model.TShoppingOrder; import com.ruoyi.order.api.model.TVipOrder; import com.ruoyi.order.api.query.ShoppingOrderQuery; import com.ruoyi.order.api.query.VipShoppingOrderQuery; +import com.ruoyi.order.dto.TEnterpriseExport; import com.ruoyi.order.service.TVipOrderService; +import com.ruoyi.other.api.domain.TEnterpriseUserApplication; +import com.ruoyi.other.api.feignClient.OtherClient; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.apache.poi.ss.usermodel.Workbook; import org.omg.CORBA.PRIVATE_MEMBER; +import org.springframework.beans.BeanUtils; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import javax.servlet.ServletOutputStream; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.net.URLEncoder; +import java.util.ArrayList; import java.util.Arrays; import java.util.List; @@ -85,5 +101,51 @@ } -} + @Resource + private OtherClient otherClient; + + @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "导出") + @PutMapping(value = "/export") + @Log(title = "【申请建桩】导出建桩申请列表", businessType = BusinessType.EXPORT) + public void export(String landlordPhone) { + + R<List<TEnterpriseUserApplication>> tnterPrise = otherClient.getTnterPrise(); + List<TEnterpriseUserApplication> list = tnterPrise.getData(); + List<TEnterpriseExport> orderInvoiceExports = new ArrayList<>(); + for (TEnterpriseUserApplication orderInvoiceVO : list) { + TEnterpriseExport orderInvoiceExport = new TEnterpriseExport(); + BeanUtils.copyProperties(orderInvoiceVO,orderInvoiceExport); + orderInvoiceExport.setCreateTime(DateUtils.localDateTimeToString(orderInvoiceVO.getCreateTime())); + orderInvoiceExports.add(orderInvoiceExport); + } + Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TEnterpriseExport.class, orderInvoiceExports); + HttpServletResponse response = WebUtils.response(); + response.setCharacterEncoding("utf-8"); + ServletOutputStream outputStream = null; + try { + String fileName = URLEncoder.encode("集团用户导出.xls", "utf-8"); + response.setHeader("Content-Disposition", "attachment;filename=" + fileName); + response.setContentType("application/vnd.ms-excel;charset=UTF-8"); + response.setHeader("Pragma", "no-cache"); + response.setHeader("Cache-Control", "no-cache"); + outputStream = response.getOutputStream(); + workbook.write(outputStream); + } catch (IOException e) { + e.printStackTrace(); + } finally { + try { + workbook.close(); + outputStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + + + } + + + + + } diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/TEnterpriseExport.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/TEnterpriseExport.java new file mode 100644 index 0000000..b9767f0 --- /dev/null +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/dto/TEnterpriseExport.java @@ -0,0 +1,35 @@ +package com.ruoyi.order.dto; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Data +@ApiModel(value = "导出公司") +public class TEnterpriseExport implements Serializable { + + @Excel(name = "公司名称",width = 30) + private String companyName; + @Excel(name = "新能源电动汽车保有量",width = 30) + private Integer vehiclesNumber; + @Excel(name = "联系人",width = 30) + private String contactName; + @Excel(name = "联系电话",width = 30) + private String phone; + @Excel(name = "备注",width = 30) + private String remark; + @Excel(name = "申请时间",width = 30) + private String createTime; + + + +} diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/filter/AuthFilter.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/filter/AuthFilter.java index bebbace..6b55938 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/filter/AuthFilter.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/filter/AuthFilter.java @@ -11,6 +11,7 @@ import org.apache.logging.log4j.core.config.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java index 3d0b7e4..7fabc18 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderServiceImpl.java @@ -51,10 +51,8 @@ import com.ruoyi.other.api.domain.TGoods; import com.ruoyi.order.vo.ChargingOrderListInfoVO; import com.ruoyi.other.api.domain.TIntegralRule; -import com.ruoyi.other.api.feignClient.IntegralRuleClient; -import com.ruoyi.other.api.feignClient.OtherClient; -import com.ruoyi.other.api.feignClient.RoleSiteClient; -import com.ruoyi.other.api.feignClient.UserSiteClient; +import com.ruoyi.other.api.domain.TVip; +import com.ruoyi.other.api.feignClient.*; import com.ruoyi.payment.api.feignClient.AliPaymentClient; import com.ruoyi.payment.api.feignClient.WxPaymentClient; import com.ruoyi.payment.api.model.RefundReq; @@ -70,6 +68,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import org.springframework.util.StringUtils; import javax.annotation.Resource; @@ -181,6 +180,9 @@ @Resource private IntegralRuleClient integralRuleClient; + + @Resource + private VipClient vipClient; //计数器 private Map<String, Integer> counter_map = new HashMap<>(); @@ -650,7 +652,7 @@ model.setOut_trade_no(chargingOrder.getCode()); model.setOut_refund_no(chargingOrderRefund.getRefundCode()); model.setReason("充电失败,取消充电订单"); - model.setNotify_url("http://221.182.45.100:9000/order/t-charging-order/chargingOrderStartupFailureWxRefund"); + model.setNotify_url("/order/t-charging-order/chargingOrderStartupFailureWxRefund"); WxPaymentRefundModel.RefundAmount amount = new WxPaymentRefundModel.RefundAmount(); amount.setRefund(rechargeAmount.multiply(new BigDecimal(100)).intValue()); amount.setTotal(rechargeAmount.multiply(new BigDecimal(100)).intValue()); @@ -827,13 +829,24 @@ String inviteUsersToEarnPoints = integralRule.getInviteUsersToEarnPoints(); JSONObject jsonObject = JSON.parseObject(inviteUsersToEarnPoints); Integer num1 = jsonObject.getInteger("num1"); + + TAppUser appUser1 = appUserClient.getUserById(appUser.getInviteUserId()).getData(); + if(null != appUser1.getVipId()){ + TVip vip = vipClient.getInfo(appUser1.getVipId()).getData(); + Integer doubleIntegration = vip.getDoubleIntegration(); + //双倍积分 + if(1 == doubleIntegration){ + num1 *= 2; + } + } + GetInviteUser query = new GetInviteUser(); - query.setAppUserId(appUser.getInviteUserId()); + query.setAppUserId(appUser1.getId()); query.setBeInvitedAppUserId(chargingOrder.getAppUserId()); TInviteUser inviteUser = inviteUserClient.getInviteUser(query).getData(); if(null == inviteUser){ inviteUser = new TInviteUser(); - inviteUser.setAppUserId(appUser.getInviteUserId()); + inviteUser.setAppUserId(appUser1.getId()); inviteUser.setBeInvitedAppUserId(chargingOrder.getAppUserId()); inviteUser.setAward(num1); inviteUser.setCreateTime(LocalDateTime.now()); @@ -842,11 +855,10 @@ inviteUser.setAward(num1); inviteUserClient.updateInviteUser(inviteUser); } - TAppUser appUser1 = appUserClient.getUserById(appUser.getInviteUserId()).getData(); TAppUserIntegralChange appUserIntegralChange = new TAppUserIntegralChange(); String code = Double.valueOf(Math.random() * 1000).intValue() + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS")); appUserIntegralChange.setCode(code); - appUserIntegralChange.setAppUserId(appUser.getInviteUserId()); + appUserIntegralChange.setAppUserId(appUser1.getId()); appUserIntegralChange.setChangeType(5); appUserIntegralChange.setHistoricalIntegral(appUser1.getPoints()); appUserIntegralChange.setCurrentIntegral(appUser1.getPoints() + num1); @@ -894,7 +906,33 @@ chargingOrder.setStatus(5); chargingOrder.setPaymentAmount(payAmount); this.updateById(chargingOrder); - + + //添加积分 + TIntegralRule integralRule = integralRuleClient.getSet().getData(); + if(null != integralRule){ + TAppUser appUser = appUserClient.getUserById(chargingOrder.getAppUserId()).getData(); + Integer num1 = JSON.parseObject(integralRule.getChargeCredit()).getInteger("num1"); + Integer integral = payAmount.multiply(new BigDecimal(num1)).intValue(); + if(null != appUser.getVipId()){ + TVip vip = vipClient.getInfo(appUser.getVipId()).getData(); + Integer doubleIntegration = vip.getDoubleIntegration(); + //双倍积分 + if(1 == doubleIntegration){ + integral *= 2; + } + } + + TAppUserIntegralChange appUserIntegralChange = new TAppUserIntegralChange(); + appUserIntegralChange.setAppUserId(appUser.getId()); + appUserIntegralChange.setChangeType(2); + appUserIntegralChange.setHistoricalIntegral(appUser.getPoints()); + appUser.setPoints(appUser.getPoints() + integral); + appUserIntegralChange.setCurrentIntegral(appUser.getPoints()); + appUserIntegralChange.setCreateTime(LocalDateTime.now()); + appUserClient.updateAppUser(appUser); + appUserIntegralChangeClient.addAppUserIntegralChange(appUserIntegralChange); + } + //计算优惠券 if(null != chargingOrder.getAppCouponId()){ //判断实际充电金额是否满足优惠券使用条件,如果不满足则不适用优惠券。 @@ -989,6 +1027,7 @@ } + } @@ -1584,7 +1623,7 @@ //计算费用,处理退款 endCharge(chargingOrder); - + //处理推荐奖励(被推荐首单奖励) TAppUser appUser = appUserClient.getUserById(chargingOrder.getAppUserId()).getData(); long count = this.count(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getAppUserId, chargingOrder.getAppUserId()) @@ -1594,13 +1633,24 @@ String inviteUsersToEarnPoints = integralRule.getInviteUsersToEarnPoints(); JSONObject jsonObject = JSON.parseObject(inviteUsersToEarnPoints); Integer num1 = jsonObject.getInteger("num1"); + + TAppUser appUser1 = appUserClient.getUserById(appUser.getInviteUserId()).getData(); + if(null != appUser1.getVipId()){ + TVip vip = vipClient.getInfo(appUser1.getVipId()).getData(); + Integer doubleIntegration = vip.getDoubleIntegration(); + //双倍积分 + if(1 == doubleIntegration){ + num1 *= 2; + } + } + GetInviteUser query = new GetInviteUser(); - query.setAppUserId(appUser.getInviteUserId()); + query.setAppUserId(appUser1.getId()); query.setBeInvitedAppUserId(chargingOrder.getAppUserId()); TInviteUser inviteUser = inviteUserClient.getInviteUser(query).getData(); if(null == inviteUser){ inviteUser = new TInviteUser(); - inviteUser.setAppUserId(appUser.getInviteUserId()); + inviteUser.setAppUserId(appUser1.getId()); inviteUser.setBeInvitedAppUserId(chargingOrder.getAppUserId()); inviteUser.setAward(num1); inviteUser.setCreateTime(LocalDateTime.now()); @@ -1609,20 +1659,20 @@ inviteUser.setAward(num1); inviteUserClient.updateInviteUser(inviteUser); } - TAppUser appUser1 = appUserClient.getUserById(appUser.getInviteUserId()).getData(); TAppUserIntegralChange appUserIntegralChange = new TAppUserIntegralChange(); String code = Double.valueOf(Math.random() * 1000).intValue() + LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmssSSS")); appUserIntegralChange.setCode(code); - appUserIntegralChange.setAppUserId(appUser.getInviteUserId()); + appUserIntegralChange.setAppUserId(appUser1.getId()); appUserIntegralChange.setChangeType(5); appUserIntegralChange.setHistoricalIntegral(appUser1.getPoints()); appUserIntegralChange.setCurrentIntegral(appUser1.getPoints() + num1); appUserIntegralChange.setCreateTime(LocalDateTime.now()); appUserIntegralChangeClient.addAppUserIntegralChange(appUserIntegralChange); - + appUser1.setPoints(appUser1.getPoints() + num1); appUserClient.updateAppUser(appUser1); } + } /** @@ -1705,6 +1755,8 @@ } + @Resource + private TShoppingOrderService shoppingOrderService; @Override public R payRefund(PayOrderRefundDto payOrderQueryDto) { if (payOrderQueryDto.getType()==1){ @@ -1762,10 +1814,61 @@ } + if (payOrderQueryDto.getType()==2){ + TShoppingOrder tChargingOrder = shoppingOrderService.getById(payOrderQueryDto.getOrderId()); + TChargingOrderRefund chargingOrderRefund = new TChargingOrderRefund(); + chargingOrderRefund.setChargingOrderId(tChargingOrder.getId()); + chargingOrderRefund.setRefundAmount(payOrderQueryDto.getRefundAmount()); + chargingOrderRefund.setRefundStatus(1); + chargingOrderRefund.setPayType(tChargingOrder.getPaymentType()); + chargingOrderRefund.setRefundTime(LocalDateTime.now()); + chargingOrderRefund.setCode(tChargingOrder.getCode()); + SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); + chargingOrderRefund.setRefundCode("GDF" + sdf.format(new Date()) + (Double.valueOf(Math.random() * 1000).intValue())); + chargingOrderRefund.setRefundTitle("后台退款"); + chargingOrderRefund.setRefundContent("后台退款"); + chargingOrderRefund.setRefundReason("后台退款"); + chargingOrderRefund.setRefundRemark("后台退款"); + chargingOrderRefund.setRefundTotalAmount(tChargingOrder.getRefundAmount().add(payOrderQueryDto.getRefundAmount())); + chargingOrderRefund.setPayAmount(tChargingOrder.getPaymentAmount()); + + if(1 == tChargingOrder.getPaymentType()){ + WxPaymentRefundModel model = new WxPaymentRefundModel(); + model.setOut_trade_no(tChargingOrder.getCode()); + model.setOut_refund_no(chargingOrderRefund.getRefundCode()); + model.setTransaction_id(tChargingOrder.getSerialNumber()); + model.setReason("取消订单"); + model.setNotify_url("http://221.182.45.100:9000/order/t-shopping-order/cancelShoppingOrderWxRefund"); + WxPaymentRefundModel.RefundAmount amount = new WxPaymentRefundModel.RefundAmount(); + amount.setRefund(payOrderQueryDto.getRefundAmount().multiply(new BigDecimal(100)).intValue()); + amount.setTotal(tChargingOrder.getPaymentAmount().multiply(new BigDecimal(100)).intValue()); + amount.setCurrency("CNY"); + model.setAmount(amount); + R<String> orderR = wxPaymentClient.refundOrderR(model); + if(200 == orderR.getCode()){ + chargingOrderRefundService.save(chargingOrderRefund); + } + } + + if(2 == tChargingOrder.getPaymentType()){ + RefundReq dto = new RefundReq(); + dto.setOutTradeNo(tChargingOrder.getCode()); + dto.setOutRequestNo(tChargingOrder.getCode()); + dto.setRefundAmount(payOrderQueryDto.getRefundAmount().toString()); + dto.setRefundReason("取消订单"); + RefundResp resp = aliPaymentClient.refund(dto).getData(); + if(null != resp){ + SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-DDTHH:mm:ss+TIMEZONE"); + chargingOrderRefundService.save(chargingOrderRefund); + + } + } + + } - return null; + return R.ok(); } diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TExchangeOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TExchangeOrderServiceImpl.java index 243c47e..9a29276 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TExchangeOrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TExchangeOrderServiceImpl.java @@ -90,12 +90,16 @@ String imgUrl = ""; if(tExchangeOrder.getOrderType() == 1){ TGoods goods = goodsClient.getGoodsById(tExchangeOrder.getGoodsId()).getData(); - name = goods.getName(); - imgUrl = goods.getCoverPicture(); + if(null != goods){ + name = goods.getName(); + imgUrl = goods.getCoverPicture(); + } }else{ TCoupon coupon = couponClient.getCouponById1(tExchangeOrder.getCouponId()).getData(); - name = coupon.getName(); - imgUrl = coupon.getCoverPicture(); + if(null != coupon){ + name = coupon.getName(); + imgUrl = coupon.getCoverPicture(); + } } exchangeOrderList.setName(name); exchangeOrderList.setImgUrl(imgUrl); @@ -131,15 +135,19 @@ String imgUrl = ""; if(exchangeOrder.getOrderType() == 1){ TGoods goods = goodsClient.getGoodsById(exchangeOrder.getGoodsId()).getData(); - name = goods.getName(); - imgUrl = goods.getCoverPicture(); + if(null != goods){ + name = goods.getName(); + imgUrl = goods.getCoverPicture(); + } }else{ TCoupon coupon = couponClient.getCouponById1(exchangeOrder.getCouponId()).getData(); - info.setCouponType(coupon.getType()); - info.setDays(coupon.getDays()); - info.setEndTime(coupon.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); - name = coupon.getName(); - imgUrl = coupon.getCoverPicture(); + if(null != coupon){ + info.setCouponType(coupon.getType()); + info.setDays(coupon.getDays()); + info.setEndTime(coupon.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"))); + name = coupon.getName(); + imgUrl = coupon.getCoverPicture(); + } } info.setName(name); info.setImgUrl(imgUrl); diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderAppealServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderAppealServiceImpl.java index b48a88e..5273411 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderAppealServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderAppealServiceImpl.java @@ -18,6 +18,7 @@ import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import java.util.List; import java.util.Objects; @@ -48,6 +49,9 @@ PageInfo<TOrderAppealVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); List<TOrderAppealVO> list = this.baseMapper.pageList(query,pageInfo); List<Long> orderIds = list.stream().map(TOrderAppealVO::getOrderId).collect(Collectors.toList()); + if(CollectionUtils.isEmpty(orderIds)){ + return new PageInfo<>(); + } // 查询当前页的订单 List<TChargingOrder> chargingOrders = chargingOrderMapper.selectList(Wrappers.lambdaQuery(TChargingOrder.class) .in(TChargingOrder::getId, orderIds)); diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java index 2f05e87..7c04428 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderEvaluateServiceImpl.java @@ -37,8 +37,10 @@ import com.ruoyi.order.service.TOrderEvaluateService; import com.ruoyi.other.api.domain.TEvaluationTag; import com.ruoyi.other.api.domain.TIntegralRule; +import com.ruoyi.other.api.domain.TVip; import com.ruoyi.other.api.feignClient.IntegralRuleClient; import com.ruoyi.other.api.feignClient.TEvaluationTagClient; +import com.ruoyi.other.api.feignClient.VipClient; import com.ruoyi.other.api.vo.TEvaluationTagVO; import io.seata.spring.annotation.GlobalTransactional; import org.springframework.beans.BeanUtils; @@ -92,6 +94,9 @@ @Resource private AppUserIntegralChangeClient appUserIntegralChangeClient; + + @Resource + private VipClient vipClient; @@ -223,9 +228,11 @@ dto.setSiteName(site.getName()); List<TOrderEvaluateTag> tOrderEvaluateTags = orderEvaluateTagMapper.selectList(new LambdaQueryWrapper<TOrderEvaluateTag>().eq(TOrderEvaluateTag::getOrderEvaluateId, dto.getId())); List<Integer> tagIds = tOrderEvaluateTags.stream().map(TOrderEvaluateTag::getEvaluationTagId).collect(Collectors.toList()); - List<TEvaluationTag> data = evaluationTagClient.getListByIds(tagIds).getData(); - List<String> collect = data.stream().map(TEvaluationTag::getName).collect(Collectors.toList()); - dto.setTags(collect); + if(tagIds.size() > 0){ + List<TEvaluationTag> data = evaluationTagClient.getListByIds(tagIds).getData(); + List<String> collect = data.stream().map(TEvaluationTag::getName).collect(Collectors.toList()); + dto.setTags(collect); + } } return pageInfo.setRecords(list); } @@ -270,6 +277,14 @@ Integer num1 = JSON.parseObject(credit).getInteger("num1"); if(null != num1 && 0 < num1){ TAppUser appUser = appUserClient.getUserById(userid).getData(); + if(null != appUser.getVipId()){ + TVip vip = vipClient.getInfo(appUser.getVipId()).getData(); + Integer doubleIntegration = vip.getDoubleIntegration(); + //双倍积分 + if(1 == doubleIntegration){ + num1 *= 2; + } + } Integer points = appUser.getPoints(); appUser.setPoints(appUser.getPoints() + num1); appUserClient.updateAppUser(appUser); diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java index 843efa2..75e28c4 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java @@ -461,7 +461,7 @@ name = goods.getName(); imgUrl = goods.getCoverPicture(); }else{ - TCoupon coupon = couponClient.getCouponById1(tShoppingOrder.getGoodsId()).getData(); + TCoupon coupon = couponClient.getCouponById1(tShoppingOrder.getCouponId()).getData(); name = coupon.getName(); imgUrl = coupon.getCoverPicture(); } diff --git a/ruoyi-service/ruoyi-order/src/main/resources/bootstrap.yml b/ruoyi-service/ruoyi-order/src/main/resources/bootstrap.yml index 9a41659..a49dc2a 100644 --- a/ruoyi-service/ruoyi-order/src/main/resources/bootstrap.yml +++ b/ruoyi-service/ruoyi-order/src/main/resources/bootstrap.yml @@ -1,3 +1,7 @@ +server: + port: 9400 + tomcat: + basedir: /data/tomcat # Spring spring: application: @@ -37,9 +41,7 @@ # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - --- - seata: enabled: true application-id: ${spring.application.name} @@ -52,36 +54,57 @@ config: type: nacos nacos: + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP data-id: seata-server.properties username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos registry: type: nacos nacos: application: seata-server + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# username: nacos +# password: nacos cloud: nacos: discovery: + # 开发环境 server-addr: 192.168.110.169:8848 # nacos注册中心地址 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# application: seata-server #Nacos 中 Seata 名称 +# username: nacos +# password: nacos sentinel: transport: dashboard: 127.0.0.1:8080 # Sentinel控制台地址 eager: true - - --- spring: config: @@ -91,14 +114,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 diff --git a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml index 3d2dba7..d5d5760 100644 --- a/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml +++ b/ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml @@ -1385,7 +1385,7 @@ </select> <select id="getchargingCapacity" resultType="java.util.Map"> SELECT - DATE_FORMAT( create_time, '%Y-%m-%d %H' ) as time, + DATE_FORMAT( create_time, '%Y-%m-%d' ) as time, SUM(charging_capacity) as chargingCapacity FROM t_charging_order diff --git a/ruoyi-service/ruoyi-other/pom.xml b/ruoyi-service/ruoyi-other/pom.xml index 0944dbe..dff5ae9 100644 --- a/ruoyi-service/ruoyi-other/pom.xml +++ b/ruoyi-service/ruoyi-other/pom.xml @@ -15,7 +15,6 @@ </description> <dependencies> - <!-- SpringCloud Alibaba Nacos --> <dependency> <groupId>com.alibaba.cloud</groupId> @@ -135,6 +134,12 @@ <groupId>com.ruoyi</groupId> <artifactId>ruoyi-api-payment</artifactId> </dependency> + <dependency> + <groupId>com.alibaba</groupId> + <artifactId>easyexcel-core</artifactId> + <version>RELEASE</version> + <scope>compile</scope> + </dependency> </dependencies> <build> diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java index 8be32f5..f050fa6 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TEnterpriseUserApplicationController.java @@ -8,17 +8,18 @@ import com.ruoyi.common.core.web.domain.AjaxResult; import com.ruoyi.common.log.annotation.Log; import com.ruoyi.common.log.enums.BusinessType; -import com.ruoyi.common.log.enums.OperatorType; import com.ruoyi.common.security.service.TokenService; import com.ruoyi.other.api.domain.TEnterpriseUserApplication; import com.ruoyi.other.query.PassDto; import com.ruoyi.other.service.TEnterpriseUserApplicationService; import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.ArrayList; import java.util.List; /** @@ -81,8 +82,43 @@ return R.ok(page); // } } - - + + + @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "导出") + @PutMapping(value = "/export") + @Log(title = "【申请建桩】导出建桩申请列表", businessType = BusinessType.EXPORT) + public R<List<TEnterpriseUserApplication>> export() { + + + List<TEnterpriseUserApplication> list = enterpriseUserApplicationService.lambdaQuery().list(); + + return R.ok(list); +// Workbook workbook = ExcelExportUtil.exportExcel(new ExportParams(), TEnterpriseExport.class, orderInvoiceExports); +// HttpServletResponse response = WebUtils.response(); +// response.setCharacterEncoding("utf-8"); +// ServletOutputStream outputStream = null; +// try { +// String fileName = URLEncoder.encode("公司导出.xls", "utf-8"); +// response.setHeader("Content-Disposition", "attachment;filename=" + fileName); +// response.setContentType("application/vnd.ms-excel;charset=UTF-8"); +// response.setHeader("Pragma", "no-cache"); +// response.setHeader("Cache-Control", "no-cache"); +// outputStream = response.getOutputStream(); +// workbook.write(outputStream); +// } catch (IOException e) { +// e.printStackTrace(); +// } finally { +// try { +// workbook.close(); +// outputStream.close(); +// } catch (IOException e) { +// e.printStackTrace(); +// } +// } + } + + + @Log(title = "【集团用户申请】填写备注", businessType = BusinessType.INSERT) @ApiOperation(tags = {"后台-申请表单-集团用户"},value = "备注") @PostMapping(value = "/remark") diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java index 5bb53f0..797da3c 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TVipController.java @@ -2,6 +2,7 @@ import com.alibaba.fastjson2.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.ruoyi.account.api.dto.SendCouponDto; import com.ruoyi.common.core.domain.R; @@ -136,6 +137,7 @@ return R.ok(vipService.getOne(Wrappers.lambdaQuery(TVip.class) .eq(TVip::getReveal,1) .orderByDesc(TVip::getMaximumDeduction) + .orderByDesc(TVip::getCreateTime) .last("LIMIT 1"))); case 2: return R.ok(vipService.getOne(Wrappers.lambdaQuery(TVip.class) @@ -146,6 +148,7 @@ return R.ok(vipService.getOne(Wrappers.lambdaQuery(TVip.class) .eq(TVip::getReveal,1) .orderByDesc(TVip::getMonthlyCardDiscount) + .orderByDesc(TVip::getCreateTime) .last("LIMIT 1"))); } } @@ -259,6 +262,5 @@ return R.ok(vipService.vipInfoPay(byId,payMoney,payType,discountMoney,discount,buyType,userId)); } - } diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/filter/AuthFilter.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/filter/AuthFilter.java index d1e25ba..cc56da3 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/filter/AuthFilter.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/filter/AuthFilter.java @@ -11,8 +11,10 @@ import org.apache.logging.log4j.core.config.Order; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.MediaType; import org.springframework.stereotype.Component; @@ -48,7 +50,7 @@ HttpServletResponse response = (HttpServletResponse) servletResponse; String userid = request.getHeader("user_id"); if(StringUtils.isEmpty(userid)){ - filterChain.doFilter(request, response); + filterChain.doFilter(servletRequest, servletResponse); return; } String userType = request.getHeader("user_type"); @@ -80,7 +82,7 @@ return; } } - filterChain.doFilter(request, response); + filterChain.doFilter(servletRequest, servletResponse); } diff --git a/ruoyi-service/ruoyi-other/src/main/resources/bootstrap.yml b/ruoyi-service/ruoyi-other/src/main/resources/bootstrap.yml index 887402d..2c4088c 100644 --- a/ruoyi-service/ruoyi-other/src/main/resources/bootstrap.yml +++ b/ruoyi-service/ruoyi-other/src/main/resources/bootstrap.yml @@ -1,3 +1,7 @@ +server: + port: 9600 + tomcat: + basedir: /data/tomcat # Spring spring: application: @@ -50,36 +54,57 @@ config: type: nacos nacos: + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP data-id: seata-server.properties username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos registry: type: nacos nacos: application: seata-server + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# username: nacos +# password: nacos cloud: nacos: discovery: + # 开发环境 server-addr: 192.168.110.169:8848 # nacos注册中心地址 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# application: seata-server #Nacos 中 Seata 名称 +# username: nacos +# password: nacos sentinel: transport: dashboard: 127.0.0.1:8080 # Sentinel控制台地址 eager: true - - --- spring: config: @@ -89,14 +114,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 diff --git "a/ruoyi-service/ruoyi-other/src/main/resources/template/\345\205\205\347\224\265\346\241\251\347\224\263\350\257\267\350\256\260\345\275\225.xlsx" "b/ruoyi-service/ruoyi-other/src/main/resources/template/\345\205\205\347\224\265\346\241\251\347\224\263\350\257\267\350\256\260\345\275\225.xlsx" new file mode 100644 index 0000000..fc621e2 --- /dev/null +++ "b/ruoyi-service/ruoyi-other/src/main/resources/template/\345\205\205\347\224\265\346\241\251\347\224\263\350\257\267\350\256\260\345\275\225.xlsx" Binary files differ diff --git "a/ruoyi-service/ruoyi-other/src/main/resources/template/\351\233\206\345\233\242\347\224\250\346\210\267\346\225\260\346\215\256.xlsx" "b/ruoyi-service/ruoyi-other/src/main/resources/template/\351\233\206\345\233\242\347\224\250\346\210\267\346\225\260\346\215\256.xlsx" new file mode 100644 index 0000000..b1b4bf0 --- /dev/null +++ "b/ruoyi-service/ruoyi-other/src/main/resources/template/\351\233\206\345\233\242\347\224\250\346\210\267\346\225\260\346\215\256.xlsx" Binary files differ diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java index 5fcab95..f589d48 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java @@ -207,12 +207,12 @@ alipayConfig.setSignType(SignType.RSA2.getType()); //判断加签方式 String signType = aliProperties.getSignType(); - if(SignType.CERT.getType().equals(signType)){ + if(SignType.SECRET_KEY.getType().equals(signType)){ alipayConfig.setPrivateKey(aliProperties.getPrivateKey()); alipayConfig.setAlipayPublicKey(aliProperties.getAlipayPublicKey()); return alipayConfig; } - if(SignType.SECRET_KEY.getType().equals(signType)){ + if(SignType.CERT.getType().equals(signType)){ alipayConfig.setAppCertPath(aliProperties.getAppCertPath()); alipayConfig.setAlipayPublicCertPath(aliProperties.getAlipayPublicCertPath()); alipayConfig.setRootCertPath(aliProperties.getRootCertPath()); diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java index 71eb21c..68aa7ec 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/V3.java @@ -5,6 +5,7 @@ import org.apache.poi.util.IOUtils; import java.io.ByteArrayInputStream; +import java.io.FileInputStream; import java.io.IOException; import java.io.InputStream; @@ -54,16 +55,21 @@ public InputStream getPrivateKeyStream() { // 需要证书释放 byte[] certData; - InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(this.privateKeyPath); +// InputStream certStream = Thread.currentThread().getContextClassLoader().getResourceAsStream(this.privateKeyPath); + InputStream certStream = null; try { + certStream = new FileInputStream(this.privateKeyPath); certData = IOUtils.toByteArray(certStream); } catch (IOException e) { + e.printStackTrace(); throw new RuntimeException("私钥文件未找到"); }finally { - try { - certStream.close(); - } catch (IOException e) { - log.error("私钥流关闭异常"); + if(null != certStream){ + try { + certStream.close(); + } catch (IOException e) { + log.error("私钥流关闭异常"); + } } } return new ByteArrayInputStream(certData); diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/WeixinProperties.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/WeixinProperties.java index 6bf8113..782690b 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/WeixinProperties.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/model/WeixinProperties.java @@ -103,4 +103,12 @@ public void setMchId(String mchId) { this.mchId = mchId; } + + public String getCallBackUrl() { + return callBackUrl; + } + + public void setCallBackUrl(String callBackUrl) { + this.callBackUrl = callBackUrl; + } } diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxAbstractPay.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxAbstractPay.java index 3a3d081..629c51f 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxAbstractPay.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxAbstractPay.java @@ -1,5 +1,7 @@ package com.ruoyi.payment.wx.utils; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.fasterxml.jackson.core.type.TypeReference; import com.ruoyi.common.core.utils.WebUtils; import com.ruoyi.payment.wx.model.WxCloseOrderModel; @@ -69,7 +71,7 @@ */ protected String buildBaseParam(WxPaymentInfoModel requestBody, String notifyUrl) { // 封装基础数据 -// requestBody.setNotify_url(notifyUrl); + requestBody.setNotify_url(notifyUrl + requestBody.getNotify_url()); String reqBody = WxJsonUtils.toJsonString(requestBody); return reqBody; } @@ -199,9 +201,46 @@ url , socketTimeout , connectTimeout); - String repBody = result(httpClient, httpGet); - NotifyV3PayDecodeRespBody body = WxJsonUtils.parseObject(repBody, NotifyV3PayDecodeRespBody.class); - return body; + CloseableHttpResponse response = null; + try { + response = httpClient.execute(httpGet); + int statusCode = response.getStatusLine().getStatusCode(); + String respBodyStr = EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8); + if (WxUtils.getLogger().isDebugEnabled()) { + WxUtils.debug("请求成功:{}", respBodyStr); + } + if(404 == statusCode){ + return null; + } + // 成功相应 + if (STATUS_CODE == statusCode || OTHER_STATUS_CODE == statusCode ) { + NotifyV3PayDecodeRespBody body = WxJsonUtils.parseObject(respBodyStr, NotifyV3PayDecodeRespBody.class); + return body; + } else { + WxUtils.error("failed,resp code = {},return body = {}", statusCode, respBodyStr); + throw new RuntimeException(respBodyStr); + } + } catch (ConnectTimeoutException e) { + e.printStackTrace(); + throw new RuntimeException("接口超时"); + } catch (SocketTimeoutException e) { + e.printStackTrace(); + throw new RuntimeException("读取接口数据超时"); + } catch (IOException e) { + e.printStackTrace(); + throw new RuntimeException("接口请求失败,请尝试检查网络环境或请求接口是否能正常访问"); + } finally { + // 关闭响应 + try { + if (response != null) { + //关闭结果集 + response.getEntity().getContent().close(); + response.close(); + } + } catch (IOException e) { + throw new RuntimeException("关闭流异常"); + } + } } /** @@ -251,7 +290,6 @@ Map<String, Object> body = WxJsonUtils.parseObject(repBody, Map.class); return body; } - /** * 请求结果 diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java index 2371c32..e322861 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/utils/WxV3Pay.java @@ -191,7 +191,7 @@ */ @Override public Map<String, Object> refund(WxPaymentRefundModel refundModel) { -// refundModel.setNotify_url(this.config.getV3().getNotifyRefundUrl()); + refundModel.setNotify_url(this.config.getV3().getNotifyRefundUrl() + refundModel.getNotify_url()); return refund(this.httpClient, "/v3/refund/domestic/refunds", this.config.getHttpReadTimeoutMs(), this.config.getHttpConnectTimeoutMs(), refundModel); } diff --git a/ruoyi-service/ruoyi-payment/src/main/resources/bootstrap.yml b/ruoyi-service/ruoyi-payment/src/main/resources/bootstrap.yml index fe9bde5..c1e6944 100644 --- a/ruoyi-service/ruoyi-payment/src/main/resources/bootstrap.yml +++ b/ruoyi-service/ruoyi-payment/src/main/resources/bootstrap.yml @@ -1,3 +1,7 @@ +server: + port: 9500 + tomcat: + basedir: /data/tomcat # Spring spring: application: @@ -37,10 +41,7 @@ # 共享配置 shared-configs: - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} - - --- - seata: enabled: true application-id: ${spring.application.name} @@ -53,36 +54,57 @@ config: type: nacos nacos: + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP data-id: seata-server.properties username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# data-id: seata-server.properties +# username: nacos +# password: nacos registry: type: nacos nacos: application: seata-server + # 开发环境 server-addr: 192.168.110.169:8848 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb group: DEFAULT_GROUP username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# username: nacos +# password: nacos cloud: nacos: discovery: + # 开发环境 server-addr: 192.168.110.169:8848 # nacos注册中心地址 namespace: b5290bc2-e3aa-4988-8a7d-9c07e4e073cb # 命名空间 group: DEFAULT_GROUP application: seata-server #Nacos 中 Seata 名称 username: nacos password: nacos + # 生产环境 +# server-addr: 192.168.0.137:8848,192.168.0.123:8848 +# namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a +# group: DEFAULT_GROUP +# application: seata-server #Nacos 中 Seata 名称 +# username: nacos +# password: nacos sentinel: transport: dashboard: 127.0.0.1:8080 # Sentinel控制台地址 eager: true - - --- spring: config: @@ -92,14 +114,18 @@ nacos: discovery: # 服务注册地址 - server-addr: 127.0.0.1:8848 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 service: ${spring.application.name} group: DEFAULT_GROUP - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos config: # 配置中心地址 - server-addr: 127.0.0.1:8848 - namespace: 3452d750-b08d-4485-a1e9-4fb0548f1fc2 + server-addr: 192.168.0.137:8848,192.168.0.123:8848 + namespace: c6cf40b5-44e8-43f9-be61-8d10fa830e2a + username: nacos + password: nacos group: DEFAULT_GROUP name: ${spring.application.name} # 配置文件格式 diff --git a/sql/quartz.sql b/sql/quartz.sql deleted file mode 100644 index cee613b..0000000 --- a/sql/quartz.sql +++ /dev/null @@ -1,174 +0,0 @@ -DROP TABLE IF EXISTS QRTZ_FIRED_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_PAUSED_TRIGGER_GRPS; -DROP TABLE IF EXISTS QRTZ_SCHEDULER_STATE; -DROP TABLE IF EXISTS QRTZ_LOCKS; -DROP TABLE IF EXISTS QRTZ_SIMPLE_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_SIMPROP_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_CRON_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_BLOB_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_TRIGGERS; -DROP TABLE IF EXISTS QRTZ_JOB_DETAILS; -DROP TABLE IF EXISTS QRTZ_CALENDARS; - --- ---------------------------- --- 1、存储每一个已配置的 jobDetail 的详细信息 --- ---------------------------- -create table QRTZ_JOB_DETAILS ( - sched_name varchar(120) not null comment '调度名称', - job_name varchar(200) not null comment '任务名称', - job_group varchar(200) not null comment '任务组名', - description varchar(250) null comment '相关介绍', - job_class_name varchar(250) not null comment '执行任务类名称', - is_durable varchar(1) not null comment '是否持久化', - is_nonconcurrent varchar(1) not null comment '是否并发', - is_update_data varchar(1) not null comment '是否更新数据', - requests_recovery varchar(1) not null comment '是否接受恢复执行', - job_data blob null comment '存放持久化job对象', - primary key (sched_name, job_name, job_group) -) engine=innodb comment = '任务详细信息表'; - --- ---------------------------- --- 2、 存储已配置的 Trigger 的信息 --- ---------------------------- -create table QRTZ_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment '触发器的名字', - trigger_group varchar(200) not null comment '触发器所属组的名字', - job_name varchar(200) not null comment 'qrtz_job_details表job_name的外键', - job_group varchar(200) not null comment 'qrtz_job_details表job_group的外键', - description varchar(250) null comment '相关介绍', - next_fire_time bigint(13) null comment '上一次触发时间(毫秒)', - prev_fire_time bigint(13) null comment '下一次触发时间(默认为-1表示不触发)', - priority integer null comment '优先级', - trigger_state varchar(16) not null comment '触发器状态', - trigger_type varchar(8) not null comment '触发器的类型', - start_time bigint(13) not null comment '开始时间', - end_time bigint(13) null comment '结束时间', - calendar_name varchar(200) null comment '日程表名称', - misfire_instr smallint(2) null comment '补偿执行的策略', - job_data blob null comment '存放持久化job对象', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, job_name, job_group) references QRTZ_JOB_DETAILS(sched_name, job_name, job_group) -) engine=innodb comment = '触发器详细信息表'; - --- ---------------------------- --- 3、 存储简单的 Trigger,包括重复次数,间隔,以及已触发的次数 --- ---------------------------- -create table QRTZ_SIMPLE_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - repeat_count bigint(7) not null comment '重复的次数统计', - repeat_interval bigint(12) not null comment '重复的间隔时间', - times_triggered bigint(10) not null comment '已经触发的次数', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) engine=innodb comment = '简单触发器的信息表'; - --- ---------------------------- --- 4、 存储 Cron Trigger,包括 Cron 表达式和时区信息 --- ---------------------------- -create table QRTZ_CRON_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - cron_expression varchar(200) not null comment 'cron表达式', - time_zone_id varchar(80) comment '时区', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) engine=innodb comment = 'Cron类型的触发器表'; - --- ---------------------------- --- 5、 Trigger 作为 Blob 类型存储(用于 Quartz 用户用 JDBC 创建他们自己定制的 Trigger 类型,JobStore 并不知道如何存储实例的时候) --- ---------------------------- -create table QRTZ_BLOB_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - blob_data blob null comment '存放持久化Trigger对象', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) engine=innodb comment = 'Blob类型的触发器表'; - --- ---------------------------- --- 6、 以 Blob 类型存储存放日历信息, quartz可配置一个日历来指定一个时间范围 --- ---------------------------- -create table QRTZ_CALENDARS ( - sched_name varchar(120) not null comment '调度名称', - calendar_name varchar(200) not null comment '日历名称', - calendar blob not null comment '存放持久化calendar对象', - primary key (sched_name, calendar_name) -) engine=innodb comment = '日历信息表'; - --- ---------------------------- --- 7、 存储已暂停的 Trigger 组的信息 --- ---------------------------- -create table QRTZ_PAUSED_TRIGGER_GRPS ( - sched_name varchar(120) not null comment '调度名称', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - primary key (sched_name, trigger_group) -) engine=innodb comment = '暂停的触发器表'; - --- ---------------------------- --- 8、 存储与已触发的 Trigger 相关的状态信息,以及相联 Job 的执行信息 --- ---------------------------- -create table QRTZ_FIRED_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - entry_id varchar(95) not null comment '调度器实例id', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - instance_name varchar(200) not null comment '调度器实例名', - fired_time bigint(13) not null comment '触发的时间', - sched_time bigint(13) not null comment '定时器制定的时间', - priority integer not null comment '优先级', - state varchar(16) not null comment '状态', - job_name varchar(200) null comment '任务名称', - job_group varchar(200) null comment '任务组名', - is_nonconcurrent varchar(1) null comment '是否并发', - requests_recovery varchar(1) null comment '是否接受恢复执行', - primary key (sched_name, entry_id) -) engine=innodb comment = '已触发的触发器表'; - --- ---------------------------- --- 9、 存储少量的有关 Scheduler 的状态信息,假如是用于集群中,可以看到其他的 Scheduler 实例 --- ---------------------------- -create table QRTZ_SCHEDULER_STATE ( - sched_name varchar(120) not null comment '调度名称', - instance_name varchar(200) not null comment '实例名称', - last_checkin_time bigint(13) not null comment '上次检查时间', - checkin_interval bigint(13) not null comment '检查间隔时间', - primary key (sched_name, instance_name) -) engine=innodb comment = '调度器状态表'; - --- ---------------------------- --- 10、 存储程序的悲观锁的信息(假如使用了悲观锁) --- ---------------------------- -create table QRTZ_LOCKS ( - sched_name varchar(120) not null comment '调度名称', - lock_name varchar(40) not null comment '悲观锁名称', - primary key (sched_name, lock_name) -) engine=innodb comment = '存储的悲观锁信息表'; - --- ---------------------------- --- 11、 Quartz集群实现同步机制的行锁表 --- ---------------------------- -create table QRTZ_SIMPROP_TRIGGERS ( - sched_name varchar(120) not null comment '调度名称', - trigger_name varchar(200) not null comment 'qrtz_triggers表trigger_name的外键', - trigger_group varchar(200) not null comment 'qrtz_triggers表trigger_group的外键', - str_prop_1 varchar(512) null comment 'String类型的trigger的第一个参数', - str_prop_2 varchar(512) null comment 'String类型的trigger的第二个参数', - str_prop_3 varchar(512) null comment 'String类型的trigger的第三个参数', - int_prop_1 int null comment 'int类型的trigger的第一个参数', - int_prop_2 int null comment 'int类型的trigger的第二个参数', - long_prop_1 bigint null comment 'long类型的trigger的第一个参数', - long_prop_2 bigint null comment 'long类型的trigger的第二个参数', - dec_prop_1 numeric(13,4) null comment 'decimal类型的trigger的第一个参数', - dec_prop_2 numeric(13,4) null comment 'decimal类型的trigger的第二个参数', - bool_prop_1 varchar(1) null comment 'Boolean类型的trigger的第一个参数', - bool_prop_2 varchar(1) null comment 'Boolean类型的trigger的第二个参数', - primary key (sched_name, trigger_name, trigger_group), - foreign key (sched_name, trigger_name, trigger_group) references QRTZ_TRIGGERS(sched_name, trigger_name, trigger_group) -) engine=innodb comment = '同步机制的行锁表'; - -commit; \ No newline at end of file diff --git a/sql/ry_20230223.sql b/sql/ry_20230223.sql deleted file mode 100644 index 0006989..0000000 --- a/sql/ry_20230223.sql +++ /dev/null @@ -1,695 +0,0 @@ -SET NAMES utf8mb4; - --- ---------------------------- --- 1、部门表 --- ---------------------------- -drop table if exists sys_dept; -create table sys_dept ( - dept_id bigint(20) not null auto_increment comment '部门id', - parent_id bigint(20) default 0 comment '父部门id', - ancestors varchar(50) default '' comment '祖级列表', - dept_name varchar(30) default '' comment '部门名称', - order_num int(4) default 0 comment '显示顺序', - leader varchar(20) default null comment '负责人', - phone varchar(11) default null comment '联系电话', - email varchar(50) default null comment '邮箱', - status char(1) default '0' comment '部门状态(0正常 1停用)', - del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - primary key (dept_id) -) engine=innodb auto_increment=200 comment = '部门表'; - --- ---------------------------- --- 初始化-部门表数据 --- ---------------------------- -insert into sys_dept values(100, 0, '0', '若依科技', 0, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(101, 100, '0,100', '深圳总公司', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(102, 100, '0,100', '长沙分公司', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(103, 101, '0,100,101', '研发部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(104, 101, '0,100,101', '市场部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(105, 101, '0,100,101', '测试部门', 3, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(106, 101, '0,100,101', '财务部门', 4, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(107, 101, '0,100,101', '运维部门', 5, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(108, 102, '0,100,102', '市场部门', 1, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); -insert into sys_dept values(109, 102, '0,100,102', '财务部门', 2, '若依', '15888888888', 'ry@qq.com', '0', '0', 'admin', sysdate(), '', null); - - --- ---------------------------- --- 2、用户信息表 --- ---------------------------- -drop table if exists sys_user; -create table sys_user ( - user_id bigint(20) not null auto_increment comment '用户ID', - dept_id bigint(20) default null comment '部门ID', - user_name varchar(30) not null comment '用户账号', - nick_name varchar(30) not null comment '用户昵称', - user_type varchar(2) default '00' comment '用户类型(00系统用户)', - email varchar(50) default '' comment '用户邮箱', - phonenumber varchar(11) default '' comment '手机号码', - sex char(1) default '0' comment '用户性别(0男 1女 2未知)', - avatar varchar(100) default '' comment '头像地址', - password varchar(100) default '' comment '密码', - status char(1) default '0' comment '帐号状态(0正常 1停用)', - del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', - login_ip varchar(128) default '' comment '最后登录IP', - login_date datetime comment '最后登录时间', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default null comment '备注', - primary key (user_id) -) engine=innodb auto_increment=100 comment = '用户信息表'; - --- ---------------------------- --- 初始化-用户信息表数据 --- ---------------------------- -insert into sys_user values(1, 103, 'admin', '若依', '00', 'ry@163.com', '15888888888', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 'admin', sysdate(), '', null, '管理员'); -insert into sys_user values(2, 105, 'ry', '若依', '00', 'ry@qq.com', '15666666666', '1', '', '$2a$10$7JB720yubVSZvUI0rEqK/.VqGOZTH.ulu33dHOiBE8ByOhJIrdAu2', '0', '0', '127.0.0.1', sysdate(), 'admin', sysdate(), '', null, '测试员'); - - --- ---------------------------- --- 3、岗位信息表 --- ---------------------------- -drop table if exists sys_post; -create table sys_post -( - post_id bigint(20) not null auto_increment comment '岗位ID', - post_code varchar(64) not null comment '岗位编码', - post_name varchar(50) not null comment '岗位名称', - post_sort int(4) not null comment '显示顺序', - status char(1) not null comment '状态(0正常 1停用)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default null comment '备注', - primary key (post_id) -) engine=innodb comment = '岗位信息表'; - --- ---------------------------- --- 初始化-岗位信息表数据 --- ---------------------------- -insert into sys_post values(1, 'ceo', '董事长', 1, '0', 'admin', sysdate(), '', null, ''); -insert into sys_post values(2, 'se', '项目经理', 2, '0', 'admin', sysdate(), '', null, ''); -insert into sys_post values(3, 'hr', '人力资源', 3, '0', 'admin', sysdate(), '', null, ''); -insert into sys_post values(4, 'user', '普通员工', 4, '0', 'admin', sysdate(), '', null, ''); - - --- ---------------------------- --- 4、角色信息表 --- ---------------------------- -drop table if exists sys_role; -create table sys_role ( - role_id bigint(20) not null auto_increment comment '角色ID', - role_name varchar(30) not null comment '角色名称', - role_key varchar(100) not null comment '角色权限字符串', - role_sort int(4) not null comment '显示顺序', - data_scope char(1) default '1' comment '数据范围(1:全部数据权限 2:自定数据权限 3:本部门数据权限 4:本部门及以下数据权限)', - menu_check_strictly tinyint(1) default 1 comment '菜单树选择项是否关联显示', - dept_check_strictly tinyint(1) default 1 comment '部门树选择项是否关联显示', - status char(1) not null comment '角色状态(0正常 1停用)', - del_flag char(1) default '0' comment '删除标志(0代表存在 2代表删除)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default null comment '备注', - primary key (role_id) -) engine=innodb auto_increment=100 comment = '角色信息表'; - --- ---------------------------- --- 初始化-角色信息表数据 --- ---------------------------- -insert into sys_role values('1', '超级管理员', 'admin', 1, 1, 1, 1, '0', '0', 'admin', sysdate(), '', null, '超级管理员'); -insert into sys_role values('2', '普通角色', 'common', 2, 2, 1, 1, '0', '0', 'admin', sysdate(), '', null, '普通角色'); - - --- ---------------------------- --- 5、菜单权限表 --- ---------------------------- -drop table if exists sys_menu; -create table sys_menu ( - menu_id bigint(20) not null auto_increment comment '菜单ID', - menu_name varchar(50) not null comment '菜单名称', - parent_id bigint(20) default 0 comment '父菜单ID', - order_num int(4) default 0 comment '显示顺序', - path varchar(200) default '' comment '路由地址', - component varchar(255) default null comment '组件路径', - query varchar(255) default null comment '路由参数', - is_frame int(1) default 1 comment '是否为外链(0是 1否)', - is_cache int(1) default 0 comment '是否缓存(0缓存 1不缓存)', - menu_type char(1) default '' comment '菜单类型(M目录 C菜单 F按钮)', - visible char(1) default 0 comment '菜单状态(0显示 1隐藏)', - status char(1) default 0 comment '菜单状态(0正常 1停用)', - perms varchar(100) default null comment '权限标识', - icon varchar(100) default '#' comment '菜单图标', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注', - primary key (menu_id) -) engine=innodb auto_increment=2000 comment = '菜单权限表'; - --- ---------------------------- --- 初始化-菜单信息表数据 --- ---------------------------- --- 一级菜单 -insert into sys_menu values('1', '系统管理', '0', '1', 'system', null, '', 1, 0, 'M', '0', '0', '', 'system', 'admin', sysdate(), '', null, '系统管理目录'); -insert into sys_menu values('2', '系统监控', '0', '2', 'monitor', null, '', 1, 0, 'M', '0', '0', '', 'monitor', 'admin', sysdate(), '', null, '系统监控目录'); -insert into sys_menu values('3', '系统工具', '0', '3', 'tool', null, '', 1, 0, 'M', '0', '0', '', 'tool', 'admin', sysdate(), '', null, '系统工具目录'); -insert into sys_menu values('4', '若依官网', '0', '4', 'http://ruoyi.vip', null, '', 0, 0, 'M', '0', '0', '', 'guide', 'admin', sysdate(), '', null, '若依官网地址'); --- 二级菜单 -insert into sys_menu values('100', '用户管理', '1', '1', 'user', 'system/user/index', '', 1, 0, 'C', '0', '0', 'system:user:list', 'user', 'admin', sysdate(), '', null, '用户管理菜单'); -insert into sys_menu values('101', '角色管理', '1', '2', 'role', 'system/role/index', '', 1, 0, 'C', '0', '0', 'system:role:list', 'peoples', 'admin', sysdate(), '', null, '角色管理菜单'); -insert into sys_menu values('102', '菜单管理', '1', '3', 'menu', 'system/menu/index', '', 1, 0, 'C', '0', '0', 'system:menu:list', 'tree-table', 'admin', sysdate(), '', null, '菜单管理菜单'); -insert into sys_menu values('103', '部门管理', '1', '4', 'dept', 'system/dept/index', '', 1, 0, 'C', '0', '0', 'system:dept:list', 'tree', 'admin', sysdate(), '', null, '部门管理菜单'); -insert into sys_menu values('104', '岗位管理', '1', '5', 'post', 'system/post/index', '', 1, 0, 'C', '0', '0', 'system:post:list', 'post', 'admin', sysdate(), '', null, '岗位管理菜单'); -insert into sys_menu values('105', '字典管理', '1', '6', 'dict', 'system/dict/index', '', 1, 0, 'C', '0', '0', 'system:dict:list', 'dict', 'admin', sysdate(), '', null, '字典管理菜单'); -insert into sys_menu values('106', '参数设置', '1', '7', 'config', 'system/config/index', '', 1, 0, 'C', '0', '0', 'system:config:list', 'edit', 'admin', sysdate(), '', null, '参数设置菜单'); -insert into sys_menu values('107', '通知公告', '1', '8', 'notice', 'system/notice/index', '', 1, 0, 'C', '0', '0', 'system:notice:list', 'message', 'admin', sysdate(), '', null, '通知公告菜单'); -insert into sys_menu values('108', '日志管理', '1', '9', 'log', '', '', 1, 0, 'M', '0', '0', '', 'log', 'admin', sysdate(), '', null, '日志管理菜单'); -insert into sys_menu values('109', '在线用户', '2', '1', 'online', 'monitor/online/index', '', 1, 0, 'C', '0', '0', 'monitor:online:list', 'online', 'admin', sysdate(), '', null, '在线用户菜单'); -insert into sys_menu values('110', '定时任务', '2', '2', 'job', 'monitor/job/index', '', 1, 0, 'C', '0', '0', 'monitor:job:list', 'job', 'admin', sysdate(), '', null, '定时任务菜单'); -insert into sys_menu values('111', 'Sentinel控制台', '2', '3', 'http://localhost:8718', '', '', 0, 0, 'C', '0', '0', 'monitor:sentinel:list', 'sentinel', 'admin', sysdate(), '', null, '流量控制菜单'); -insert into sys_menu values('112', 'Nacos控制台', '2', '4', 'http://localhost:8848/nacos', '', '', 0, 0, 'C', '0', '0', 'monitor:nacos:list', 'nacos', 'admin', sysdate(), '', null, '服务治理菜单'); -insert into sys_menu values('113', 'Admin控制台', '2', '5', 'http://localhost:9100/login', '', '', 0, 0, 'C', '0', '0', 'monitor:server:list', 'server', 'admin', sysdate(), '', null, '服务监控菜单'); -insert into sys_menu values('114', '表单构建', '3', '1', 'build', 'tool/build/index', '', 1, 0, 'C', '0', '0', 'tool:build:list', 'build', 'admin', sysdate(), '', null, '表单构建菜单'); -insert into sys_menu values('115', '代码生成', '3', '2', 'gen', 'tool/gen/index', '', 1, 0, 'C', '0', '0', 'tool:gen:list', 'code', 'admin', sysdate(), '', null, '代码生成菜单'); -insert into sys_menu values('116', '系统接口', '3', '3', 'http://localhost:8080/swagger-ui/index.html', '', '', 0, 0, 'C', '0', '0', 'tool:swagger:list', 'swagger', 'admin', sysdate(), '', null, '系统接口菜单'); --- 三级菜单 -insert into sys_menu values('500', '操作日志', '108', '1', 'operlog', 'system/operlog/index', '', 1, 0, 'C', '0', '0', 'system:operlog:list', 'form', 'admin', sysdate(), '', null, '操作日志菜单'); -insert into sys_menu values('501', '登录日志', '108', '2', 'logininfor', 'system/logininfor/index', '', 1, 0, 'C', '0', '0', 'system:logininfor:list', 'logininfor', 'admin', sysdate(), '', null, '登录日志菜单'); --- 用户管理按钮 -insert into sys_menu values('1000', '用户查询', '100', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:user:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1001', '用户新增', '100', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:user:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1002', '用户修改', '100', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:user:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1003', '用户删除', '100', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:user:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1004', '用户导出', '100', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:user:export', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1005', '用户导入', '100', '6', '', '', '', 1, 0, 'F', '0', '0', 'system:user:import', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1006', '重置密码', '100', '7', '', '', '', 1, 0, 'F', '0', '0', 'system:user:resetPwd', '#', 'admin', sysdate(), '', null, ''); --- 角色管理按钮 -insert into sys_menu values('1007', '角色查询', '101', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:role:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1008', '角色新增', '101', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:role:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1009', '角色修改', '101', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:role:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1010', '角色删除', '101', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:role:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1011', '角色导出', '101', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:role:export', '#', 'admin', sysdate(), '', null, ''); --- 菜单管理按钮 -insert into sys_menu values('1012', '菜单查询', '102', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1013', '菜单新增', '102', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1014', '菜单修改', '102', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1015', '菜单删除', '102', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:menu:remove', '#', 'admin', sysdate(), '', null, ''); --- 部门管理按钮 -insert into sys_menu values('1016', '部门查询', '103', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1017', '部门新增', '103', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1018', '部门修改', '103', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1019', '部门删除', '103', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:dept:remove', '#', 'admin', sysdate(), '', null, ''); --- 岗位管理按钮 -insert into sys_menu values('1020', '岗位查询', '104', '1', '', '', '', 1, 0, 'F', '0', '0', 'system:post:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1021', '岗位新增', '104', '2', '', '', '', 1, 0, 'F', '0', '0', 'system:post:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1022', '岗位修改', '104', '3', '', '', '', 1, 0, 'F', '0', '0', 'system:post:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1023', '岗位删除', '104', '4', '', '', '', 1, 0, 'F', '0', '0', 'system:post:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1024', '岗位导出', '104', '5', '', '', '', 1, 0, 'F', '0', '0', 'system:post:export', '#', 'admin', sysdate(), '', null, ''); --- 字典管理按钮 -insert into sys_menu values('1025', '字典查询', '105', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1026', '字典新增', '105', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1027', '字典修改', '105', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1028', '字典删除', '105', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1029', '字典导出', '105', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:dict:export', '#', 'admin', sysdate(), '', null, ''); --- 参数设置按钮 -insert into sys_menu values('1030', '参数查询', '106', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1031', '参数新增', '106', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1032', '参数修改', '106', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1033', '参数删除', '106', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1034', '参数导出', '106', '5', '#', '', '', 1, 0, 'F', '0', '0', 'system:config:export', '#', 'admin', sysdate(), '', null, ''); --- 通知公告按钮 -insert into sys_menu values('1035', '公告查询', '107', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1036', '公告新增', '107', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1037', '公告修改', '107', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1038', '公告删除', '107', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:notice:remove', '#', 'admin', sysdate(), '', null, ''); --- 操作日志按钮 -insert into sys_menu values('1039', '操作查询', '500', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:operlog:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1040', '操作删除', '500', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:operlog:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1041', '日志导出', '500', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:operlog:export', '#', 'admin', sysdate(), '', null, ''); --- 登录日志按钮 -insert into sys_menu values('1042', '登录查询', '501', '1', '#', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1043', '登录删除', '501', '2', '#', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1044', '日志导出', '501', '3', '#', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:export', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1045', '账户解锁', '501', '4', '#', '', '', 1, 0, 'F', '0', '0', 'system:logininfor:unlock', '#', 'admin', sysdate(), '', null, ''); --- 在线用户按钮 -insert into sys_menu values('1046', '在线查询', '109', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1047', '批量强退', '109', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:batchLogout', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1048', '单条强退', '109', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:online:forceLogout', '#', 'admin', sysdate(), '', null, ''); --- 定时任务按钮 -insert into sys_menu values('1049', '任务查询', '110', '1', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1050', '任务新增', '110', '2', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:add', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1051', '任务修改', '110', '3', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1052', '任务删除', '110', '4', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1053', '状态修改', '110', '5', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:changeStatus', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1054', '任务导出', '110', '6', '#', '', '', 1, 0, 'F', '0', '0', 'monitor:job:export', '#', 'admin', sysdate(), '', null, ''); --- 代码生成按钮 -insert into sys_menu values('1055', '生成查询', '115', '1', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:query', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1056', '生成修改', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:edit', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1057', '生成删除', '115', '3', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:remove', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1058', '导入代码', '115', '2', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:import', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1059', '预览代码', '115', '4', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:preview', '#', 'admin', sysdate(), '', null, ''); -insert into sys_menu values('1060', '生成代码', '115', '5', '#', '', '', 1, 0, 'F', '0', '0', 'tool:gen:code', '#', 'admin', sysdate(), '', null, ''); - - --- ---------------------------- --- 6、用户和角色关联表 用户N-1角色 --- ---------------------------- -drop table if exists sys_user_role; -create table sys_user_role ( - user_id bigint(20) not null comment '用户ID', - role_id bigint(20) not null comment '角色ID', - primary key(user_id, role_id) -) engine=innodb comment = '用户和角色关联表'; - --- ---------------------------- --- 初始化-用户和角色关联表数据 --- ---------------------------- -insert into sys_user_role values ('1', '1'); -insert into sys_user_role values ('2', '2'); - - --- ---------------------------- --- 7、角色和菜单关联表 角色1-N菜单 --- ---------------------------- -drop table if exists sys_role_menu; -create table sys_role_menu ( - role_id bigint(20) not null comment '角色ID', - menu_id bigint(20) not null comment '菜单ID', - primary key(role_id, menu_id) -) engine=innodb comment = '角色和菜单关联表'; - --- ---------------------------- --- 初始化-角色和菜单关联表数据 --- ---------------------------- -insert into sys_role_menu values ('2', '1'); -insert into sys_role_menu values ('2', '2'); -insert into sys_role_menu values ('2', '3'); -insert into sys_role_menu values ('2', '4'); -insert into sys_role_menu values ('2', '100'); -insert into sys_role_menu values ('2', '101'); -insert into sys_role_menu values ('2', '102'); -insert into sys_role_menu values ('2', '103'); -insert into sys_role_menu values ('2', '104'); -insert into sys_role_menu values ('2', '105'); -insert into sys_role_menu values ('2', '106'); -insert into sys_role_menu values ('2', '107'); -insert into sys_role_menu values ('2', '108'); -insert into sys_role_menu values ('2', '109'); -insert into sys_role_menu values ('2', '110'); -insert into sys_role_menu values ('2', '111'); -insert into sys_role_menu values ('2', '112'); -insert into sys_role_menu values ('2', '113'); -insert into sys_role_menu values ('2', '114'); -insert into sys_role_menu values ('2', '115'); -insert into sys_role_menu values ('2', '116'); -insert into sys_role_menu values ('2', '500'); -insert into sys_role_menu values ('2', '501'); -insert into sys_role_menu values ('2', '1000'); -insert into sys_role_menu values ('2', '1001'); -insert into sys_role_menu values ('2', '1002'); -insert into sys_role_menu values ('2', '1003'); -insert into sys_role_menu values ('2', '1004'); -insert into sys_role_menu values ('2', '1005'); -insert into sys_role_menu values ('2', '1006'); -insert into sys_role_menu values ('2', '1007'); -insert into sys_role_menu values ('2', '1008'); -insert into sys_role_menu values ('2', '1009'); -insert into sys_role_menu values ('2', '1010'); -insert into sys_role_menu values ('2', '1011'); -insert into sys_role_menu values ('2', '1012'); -insert into sys_role_menu values ('2', '1013'); -insert into sys_role_menu values ('2', '1014'); -insert into sys_role_menu values ('2', '1015'); -insert into sys_role_menu values ('2', '1016'); -insert into sys_role_menu values ('2', '1017'); -insert into sys_role_menu values ('2', '1018'); -insert into sys_role_menu values ('2', '1019'); -insert into sys_role_menu values ('2', '1020'); -insert into sys_role_menu values ('2', '1021'); -insert into sys_role_menu values ('2', '1022'); -insert into sys_role_menu values ('2', '1023'); -insert into sys_role_menu values ('2', '1024'); -insert into sys_role_menu values ('2', '1025'); -insert into sys_role_menu values ('2', '1026'); -insert into sys_role_menu values ('2', '1027'); -insert into sys_role_menu values ('2', '1028'); -insert into sys_role_menu values ('2', '1029'); -insert into sys_role_menu values ('2', '1030'); -insert into sys_role_menu values ('2', '1031'); -insert into sys_role_menu values ('2', '1032'); -insert into sys_role_menu values ('2', '1033'); -insert into sys_role_menu values ('2', '1034'); -insert into sys_role_menu values ('2', '1035'); -insert into sys_role_menu values ('2', '1036'); -insert into sys_role_menu values ('2', '1037'); -insert into sys_role_menu values ('2', '1038'); -insert into sys_role_menu values ('2', '1039'); -insert into sys_role_menu values ('2', '1040'); -insert into sys_role_menu values ('2', '1041'); -insert into sys_role_menu values ('2', '1042'); -insert into sys_role_menu values ('2', '1043'); -insert into sys_role_menu values ('2', '1044'); -insert into sys_role_menu values ('2', '1045'); -insert into sys_role_menu values ('2', '1046'); -insert into sys_role_menu values ('2', '1047'); -insert into sys_role_menu values ('2', '1048'); -insert into sys_role_menu values ('2', '1049'); -insert into sys_role_menu values ('2', '1050'); -insert into sys_role_menu values ('2', '1051'); -insert into sys_role_menu values ('2', '1052'); -insert into sys_role_menu values ('2', '1053'); -insert into sys_role_menu values ('2', '1054'); -insert into sys_role_menu values ('2', '1055'); -insert into sys_role_menu values ('2', '1056'); -insert into sys_role_menu values ('2', '1057'); -insert into sys_role_menu values ('2', '1058'); -insert into sys_role_menu values ('2', '1059'); -insert into sys_role_menu values ('2', '1060'); - --- ---------------------------- --- 8、角色和部门关联表 角色1-N部门 --- ---------------------------- -drop table if exists sys_role_dept; -create table sys_role_dept ( - role_id bigint(20) not null comment '角色ID', - dept_id bigint(20) not null comment '部门ID', - primary key(role_id, dept_id) -) engine=innodb comment = '角色和部门关联表'; - --- ---------------------------- --- 初始化-角色和部门关联表数据 --- ---------------------------- -insert into sys_role_dept values ('2', '100'); -insert into sys_role_dept values ('2', '101'); -insert into sys_role_dept values ('2', '105'); - - --- ---------------------------- --- 9、用户与岗位关联表 用户1-N岗位 --- ---------------------------- -drop table if exists sys_user_post; -create table sys_user_post -( - user_id bigint(20) not null comment '用户ID', - post_id bigint(20) not null comment '岗位ID', - primary key (user_id, post_id) -) engine=innodb comment = '用户与岗位关联表'; - --- ---------------------------- --- 初始化-用户与岗位关联表数据 --- ---------------------------- -insert into sys_user_post values ('1', '1'); -insert into sys_user_post values ('2', '2'); - - --- ---------------------------- --- 10、操作日志记录 --- ---------------------------- -drop table if exists sys_oper_log; -create table sys_oper_log ( - oper_id bigint(20) not null auto_increment comment '日志主键', - title varchar(50) default '' comment '模块标题', - business_type int(2) default 0 comment '业务类型(0其它 1新增 2修改 3删除)', - method varchar(100) default '' comment '方法名称', - request_method varchar(10) default '' comment '请求方式', - operator_type int(1) default 0 comment '操作类别(0其它 1后台用户 2手机端用户)', - oper_name varchar(50) default '' comment '操作人员', - dept_name varchar(50) default '' comment '部门名称', - oper_url varchar(255) default '' comment '请求URL', - oper_ip varchar(128) default '' comment '主机地址', - oper_location varchar(255) default '' comment '操作地点', - oper_param varchar(2000) default '' comment '请求参数', - json_result varchar(2000) default '' comment '返回参数', - status int(1) default 0 comment '操作状态(0正常 1异常)', - error_msg varchar(2000) default '' comment '错误消息', - oper_time datetime comment '操作时间', - cost_time bigint(20) default 0 comment '消耗时间', - primary key (oper_id), - key idx_sys_oper_log_bt (business_type), - key idx_sys_oper_log_s (status), - key idx_sys_oper_log_ot (oper_time) -) engine=innodb auto_increment=100 comment = '操作日志记录'; - - --- ---------------------------- --- 11、字典类型表 --- ---------------------------- -drop table if exists sys_dict_type; -create table sys_dict_type -( - dict_id bigint(20) not null auto_increment comment '字典主键', - dict_name varchar(100) default '' comment '字典名称', - dict_type varchar(100) default '' comment '字典类型', - status char(1) default '0' comment '状态(0正常 1停用)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default null comment '备注', - primary key (dict_id), - unique (dict_type) -) engine=innodb auto_increment=100 comment = '字典类型表'; - -insert into sys_dict_type values(1, '用户性别', 'sys_user_sex', '0', 'admin', sysdate(), '', null, '用户性别列表'); -insert into sys_dict_type values(2, '菜单状态', 'sys_show_hide', '0', 'admin', sysdate(), '', null, '菜单状态列表'); -insert into sys_dict_type values(3, '系统开关', 'sys_normal_disable', '0', 'admin', sysdate(), '', null, '系统开关列表'); -insert into sys_dict_type values(4, '任务状态', 'sys_job_status', '0', 'admin', sysdate(), '', null, '任务状态列表'); -insert into sys_dict_type values(5, '任务分组', 'sys_job_group', '0', 'admin', sysdate(), '', null, '任务分组列表'); -insert into sys_dict_type values(6, '系统是否', 'sys_yes_no', '0', 'admin', sysdate(), '', null, '系统是否列表'); -insert into sys_dict_type values(7, '通知类型', 'sys_notice_type', '0', 'admin', sysdate(), '', null, '通知类型列表'); -insert into sys_dict_type values(8, '通知状态', 'sys_notice_status', '0', 'admin', sysdate(), '', null, '通知状态列表'); -insert into sys_dict_type values(9, '操作类型', 'sys_oper_type', '0', 'admin', sysdate(), '', null, '操作类型列表'); -insert into sys_dict_type values(10, '系统状态', 'sys_common_status', '0', 'admin', sysdate(), '', null, '登录状态列表'); - - --- ---------------------------- --- 12、字典数据表 --- ---------------------------- -drop table if exists sys_dict_data; -create table sys_dict_data -( - dict_code bigint(20) not null auto_increment comment '字典编码', - dict_sort int(4) default 0 comment '字典排序', - dict_label varchar(100) default '' comment '字典标签', - dict_value varchar(100) default '' comment '字典键值', - dict_type varchar(100) default '' comment '字典类型', - css_class varchar(100) default null comment '样式属性(其他样式扩展)', - list_class varchar(100) default null comment '表格回显样式', - is_default char(1) default 'N' comment '是否默认(Y是 N否)', - status char(1) default '0' comment '状态(0正常 1停用)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default null comment '备注', - primary key (dict_code) -) engine=innodb auto_increment=100 comment = '字典数据表'; - -insert into sys_dict_data values(1, 1, '男', '0', 'sys_user_sex', '', '', 'Y', '0', 'admin', sysdate(), '', null, '性别男'); -insert into sys_dict_data values(2, 2, '女', '1', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别女'); -insert into sys_dict_data values(3, 3, '未知', '2', 'sys_user_sex', '', '', 'N', '0', 'admin', sysdate(), '', null, '性别未知'); -insert into sys_dict_data values(4, 1, '显示', '0', 'sys_show_hide', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '显示菜单'); -insert into sys_dict_data values(5, 2, '隐藏', '1', 'sys_show_hide', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '隐藏菜单'); -insert into sys_dict_data values(6, 1, '正常', '0', 'sys_normal_disable', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态'); -insert into sys_dict_data values(7, 2, '停用', '1', 'sys_normal_disable', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态'); -insert into sys_dict_data values(8, 1, '正常', '0', 'sys_job_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态'); -insert into sys_dict_data values(9, 2, '暂停', '1', 'sys_job_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态'); -insert into sys_dict_data values(10, 1, '默认', 'DEFAULT', 'sys_job_group', '', '', 'Y', '0', 'admin', sysdate(), '', null, '默认分组'); -insert into sys_dict_data values(11, 2, '系统', 'SYSTEM', 'sys_job_group', '', '', 'N', '0', 'admin', sysdate(), '', null, '系统分组'); -insert into sys_dict_data values(12, 1, '是', 'Y', 'sys_yes_no', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '系统默认是'); -insert into sys_dict_data values(13, 2, '否', 'N', 'sys_yes_no', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '系统默认否'); -insert into sys_dict_data values(14, 1, '通知', '1', 'sys_notice_type', '', 'warning', 'Y', '0', 'admin', sysdate(), '', null, '通知'); -insert into sys_dict_data values(15, 2, '公告', '2', 'sys_notice_type', '', 'success', 'N', '0', 'admin', sysdate(), '', null, '公告'); -insert into sys_dict_data values(16, 1, '正常', '0', 'sys_notice_status', '', 'primary', 'Y', '0', 'admin', sysdate(), '', null, '正常状态'); -insert into sys_dict_data values(17, 2, '关闭', '1', 'sys_notice_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '关闭状态'); -insert into sys_dict_data values(18, 99, '其他', '0', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '其他操作'); -insert into sys_dict_data values(19, 1, '新增', '1', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '新增操作'); -insert into sys_dict_data values(20, 2, '修改', '2', 'sys_oper_type', '', 'info', 'N', '0', 'admin', sysdate(), '', null, '修改操作'); -insert into sys_dict_data values(21, 3, '删除', '3', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '删除操作'); -insert into sys_dict_data values(22, 4, '授权', '4', 'sys_oper_type', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '授权操作'); -insert into sys_dict_data values(23, 5, '导出', '5', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导出操作'); -insert into sys_dict_data values(24, 6, '导入', '6', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '导入操作'); -insert into sys_dict_data values(25, 7, '强退', '7', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '强退操作'); -insert into sys_dict_data values(26, 8, '生成代码', '8', 'sys_oper_type', '', 'warning', 'N', '0', 'admin', sysdate(), '', null, '生成操作'); -insert into sys_dict_data values(27, 9, '清空数据', '9', 'sys_oper_type', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '清空操作'); -insert into sys_dict_data values(28, 1, '成功', '0', 'sys_common_status', '', 'primary', 'N', '0', 'admin', sysdate(), '', null, '正常状态'); -insert into sys_dict_data values(29, 2, '失败', '1', 'sys_common_status', '', 'danger', 'N', '0', 'admin', sysdate(), '', null, '停用状态'); - - --- ---------------------------- --- 13、参数配置表 --- ---------------------------- -drop table if exists sys_config; -create table sys_config ( - config_id int(5) not null auto_increment comment '参数主键', - config_name varchar(100) default '' comment '参数名称', - config_key varchar(100) default '' comment '参数键名', - config_value varchar(500) default '' comment '参数键值', - config_type char(1) default 'N' comment '系统内置(Y是 N否)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default null comment '备注', - primary key (config_id) -) engine=innodb auto_increment=100 comment = '参数配置表'; - -insert into sys_config values(1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', 'skin-blue', 'Y', 'admin', sysdate(), '', null, '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow' ); -insert into sys_config values(2, '用户管理-账号初始密码', 'sys.user.initPassword', '123456', 'Y', 'admin', sysdate(), '', null, '初始化密码 123456' ); -insert into sys_config values(3, '主框架页-侧边栏主题', 'sys.index.sideTheme', 'theme-dark', 'Y', 'admin', sysdate(), '', null, '深色主题theme-dark,浅色主题theme-light' ); -insert into sys_config values(4, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', 'false', 'Y', 'admin', sysdate(), '', null, '是否开启注册用户功能(true开启,false关闭)'); -insert into sys_config values(5, '用户登录-黑名单列表', 'sys.login.blackIPList', '', 'Y', 'admin', sysdate(), '', null, '设置登录IP黑名单限制,多个匹配项以;分隔,支持匹配(*通配、网段)'); - - --- ---------------------------- --- 14、系统访问记录 --- ---------------------------- -drop table if exists sys_logininfor; -create table sys_logininfor ( - info_id bigint(20) not null auto_increment comment '访问ID', - user_name varchar(50) default '' comment '用户账号', - ipaddr varchar(128) default '' comment '登录IP地址', - status char(1) default '0' comment '登录状态(0成功 1失败)', - msg varchar(255) default '' comment '提示信息', - access_time datetime comment '访问时间', - primary key (info_id), - key idx_sys_logininfor_s (status), - key idx_sys_logininfor_lt (access_time) -) engine=innodb auto_increment=100 comment = '系统访问记录'; - - --- ---------------------------- --- 15、定时任务调度表 --- ---------------------------- -drop table if exists sys_job; -create table sys_job ( - job_id bigint(20) not null auto_increment comment '任务ID', - job_name varchar(64) default '' comment '任务名称', - job_group varchar(64) default 'DEFAULT' comment '任务组名', - invoke_target varchar(500) not null comment '调用目标字符串', - cron_expression varchar(255) default '' comment 'cron执行表达式', - misfire_policy varchar(20) default '3' comment '计划执行错误策略(1立即执行 2执行一次 3放弃执行)', - concurrent char(1) default '1' comment '是否并发执行(0允许 1禁止)', - status char(1) default '0' comment '状态(0正常 1暂停)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default '' comment '备注信息', - primary key (job_id, job_name, job_group) -) engine=innodb auto_increment=100 comment = '定时任务调度表'; - -insert into sys_job values(1, '系统默认(无参)', 'DEFAULT', 'ryTask.ryNoParams', '0/10 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); -insert into sys_job values(2, '系统默认(有参)', 'DEFAULT', 'ryTask.ryParams(\'ry\')', '0/15 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); -insert into sys_job values(3, '系统默认(多参)', 'DEFAULT', 'ryTask.ryMultipleParams(\'ry\', true, 2000L, 316.50D, 100)', '0/20 * * * * ?', '3', '1', '1', 'admin', sysdate(), '', null, ''); - - --- ---------------------------- --- 16、定时任务调度日志表 --- ---------------------------- -drop table if exists sys_job_log; -create table sys_job_log ( - job_log_id bigint(20) not null auto_increment comment '任务日志ID', - job_name varchar(64) not null comment '任务名称', - job_group varchar(64) not null comment '任务组名', - invoke_target varchar(500) not null comment '调用目标字符串', - job_message varchar(500) comment '日志信息', - status char(1) default '0' comment '执行状态(0正常 1失败)', - exception_info varchar(2000) default '' comment '异常信息', - create_time datetime comment '创建时间', - primary key (job_log_id) -) engine=innodb comment = '定时任务调度日志表'; - - --- ---------------------------- --- 17、通知公告表 --- ---------------------------- -drop table if exists sys_notice; -create table sys_notice ( - notice_id int(4) not null auto_increment comment '公告ID', - notice_title varchar(50) not null comment '公告标题', - notice_type char(1) not null comment '公告类型(1通知 2公告)', - notice_content longblob default null comment '公告内容', - status char(1) default '0' comment '公告状态(0正常 1关闭)', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(255) default null comment '备注', - primary key (notice_id) -) engine=innodb auto_increment=10 comment = '通知公告表'; - --- ---------------------------- --- 初始化-公告信息表数据 --- ---------------------------- -insert into sys_notice values('1', '温馨提醒:2018-07-01 若依新版本发布啦', '2', '新版本内容', '0', 'admin', sysdate(), '', null, '管理员'); -insert into sys_notice values('2', '维护通知:2018-07-01 若依系统凌晨维护', '1', '维护内容', '0', 'admin', sysdate(), '', null, '管理员'); - - --- ---------------------------- --- 18、代码生成业务表 --- ---------------------------- -drop table if exists gen_table; -create table gen_table ( - table_id bigint(20) not null auto_increment comment '编号', - table_name varchar(200) default '' comment '表名称', - table_comment varchar(500) default '' comment '表描述', - sub_table_name varchar(64) default null comment '关联子表的表名', - sub_table_fk_name varchar(64) default null comment '子表关联的外键名', - class_name varchar(100) default '' comment '实体类名称', - tpl_category varchar(200) default 'crud' comment '使用的模板(crud单表操作 tree树表操作)', - package_name varchar(100) comment '生成包路径', - module_name varchar(30) comment '生成模块名', - business_name varchar(30) comment '生成业务名', - function_name varchar(50) comment '生成功能名', - function_author varchar(50) comment '生成功能作者', - gen_type char(1) default '0' comment '生成代码方式(0zip压缩包 1自定义路径)', - gen_path varchar(200) default '/' comment '生成路径(不填默认项目路径)', - options varchar(1000) comment '其它生成选项', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - remark varchar(500) default null comment '备注', - primary key (table_id) -) engine=innodb auto_increment=1 comment = '代码生成业务表'; - - --- ---------------------------- --- 19、代码生成业务表字段 --- ---------------------------- -drop table if exists gen_table_column; -create table gen_table_column ( - column_id bigint(20) not null auto_increment comment '编号', - table_id varchar(64) comment '归属表编号', - column_name varchar(200) comment '列名称', - column_comment varchar(500) comment '列描述', - column_type varchar(100) comment '列类型', - java_type varchar(500) comment 'JAVA类型', - java_field varchar(200) comment 'JAVA字段名', - is_pk char(1) comment '是否主键(1是)', - is_increment char(1) comment '是否自增(1是)', - is_required char(1) comment '是否必填(1是)', - is_insert char(1) comment '是否为插入字段(1是)', - is_edit char(1) comment '是否编辑字段(1是)', - is_list char(1) comment '是否列表字段(1是)', - is_query char(1) comment '是否查询字段(1是)', - query_type varchar(200) default 'EQ' comment '查询方式(等于、不等于、大于、小于、范围)', - html_type varchar(200) comment '显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)', - dict_type varchar(200) default '' comment '字典类型', - sort int comment '排序', - create_by varchar(64) default '' comment '创建者', - create_time datetime comment '创建时间', - update_by varchar(64) default '' comment '更新者', - update_time datetime comment '更新时间', - primary key (column_id) -) engine=innodb auto_increment=1 comment = '代码生成业务表字段'; diff --git a/sql/ry_config_20220929.sql b/sql/ry_config_20220929.sql deleted file mode 100644 index b1834f5..0000000 --- a/sql/ry_config_20220929.sql +++ /dev/null @@ -1,219 +0,0 @@ -DROP DATABASE IF EXISTS `ry-config`; - -CREATE DATABASE `ry-config` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - -USE `ry-config`; - -/******************************************/ -/* 表名称 = config_info */ -/******************************************/ -CREATE TABLE `config_info` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(255) DEFAULT NULL, - `content` longtext NOT NULL COMMENT 'content', - `md5` varchar(32) DEFAULT NULL COMMENT 'md5', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - `src_user` text COMMENT 'source user', - `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', - `app_name` varchar(128) DEFAULT NULL, - `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - `c_desc` varchar(256) DEFAULT NULL, - `c_use` varchar(64) DEFAULT NULL, - `effect` varchar(64) DEFAULT NULL, - `type` varchar(64) DEFAULT NULL, - `c_schema` text, - `encrypted_data_key` text COMMENT '秘钥', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_configinfo_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info'; - -insert into config_info(id, data_id, group_id, content, md5, gmt_create, gmt_modified, src_user, src_ip, app_name, tenant_id, c_desc, c_use, effect, type, c_schema, encrypted_data_key) values -(1,'application-dev.yml','DEFAULT_GROUP','spring:\n autoconfigure:\n exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure\n mvc:\n pathmatch:\n matching-strategy: ant_path_matcher\n\n# feign 配置\nfeign:\n sentinel:\n enabled: true\n okhttp:\n enabled: true\n httpclient:\n enabled: false\n client:\n config:\n default:\n connectTimeout: 10000\n readTimeout: 10000\n compression:\n request:\n enabled: true\n response:\n enabled: true\n\n# 暴露监控端点\nmanagement:\n endpoints:\n web:\n exposure:\n include: \'*\'\n','aaa73b809cfd4d0058893aa13da57806','2020-05-20 12:00:00','2022-04-24 10:26:34','nacos','0:0:0:0:0:0:0:1','','','通用配置','null','null','yaml',NULL,''), -(2,'ruoyi-gateway-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password:\n cloud:\n gateway:\n discovery:\n locator:\n lowerCaseServiceId: true\n enabled: true\n routes:\n # 认证中心\n - id: ruoyi-auth\n uri: lb://ruoyi-auth\n predicates:\n - Path=/auth/**\n filters:\n # 验证码处理\n - CacheRequestFilter\n - ValidateCodeFilter\n - StripPrefix=1\n # 代码生成\n - id: ruoyi-gen\n uri: lb://ruoyi-gen\n predicates:\n - Path=/code/**\n filters:\n - StripPrefix=1\n # 定时任务\n - id: ruoyi-job\n uri: lb://ruoyi-job\n predicates:\n - Path=/schedule/**\n filters:\n - StripPrefix=1\n # 系统模块\n - id: ruoyi-system\n uri: lb://ruoyi-system\n predicates:\n - Path=/system/**\n filters:\n - StripPrefix=1\n # 文件服务\n - id: ruoyi-file\n uri: lb://ruoyi-file\n predicates:\n - Path=/file/**\n filters:\n - StripPrefix=1\n\n# 安全配置\nsecurity:\n # 验证码\n captcha:\n enabled: true\n type: math\n # 防止XSS攻击\n xss:\n enabled: true\n excludeUrls:\n - /system/notice\n # 不校验白名单\n ignore:\n whites:\n - /auth/logout\n - /auth/login\n - /auth/register\n - /*/v2/api-docs\n - /csrf\n','57cec5abd0e0a6b77d853750344a9dc0','2020-05-14 14:17:55','2022-09-29 02:48:32','nacos','0:0:0:0:0:0:0:1','','','网关模块','null','null','yaml','',''), -(3,'ruoyi-auth-dev.yml','DEFAULT_GROUP','spring:\n redis:\n host: localhost\n port: 6379\n password:\n','8bd9dada9a94822feeab40de55efced6','2020-11-20 00:00:00','2022-09-29 02:48:42','nacos','0:0:0:0:0:0:0:1','','','认证中心','null','null','yaml','',''), -(4,'ruoyi-monitor-dev.yml','DEFAULT_GROUP','# spring\nspring:\n security:\n user:\n name: ruoyi\n password: 123456\n boot:\n admin:\n ui:\n title: 若依服务状态监控\n','6f122fd2bfb8d45f858e7d6529a9cd44','2020-11-20 00:00:00','2022-09-29 02:48:54','nacos','0:0:0:0:0:0:0:1','','','监控中心','null','null','yaml','',''), -(5,'ruoyi-system-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n druid:\n stat-view-servlet:\n enabled: true\n loginUsername: admin\n loginPassword: 123456\n dynamic:\n druid:\n initial-size: 5\n min-idle: 5\n maxActive: 20\n maxWait: 60000\n timeBetweenEvictionRunsMillis: 60000\n minEvictableIdleTimeMillis: 300000\n validationQuery: SELECT 1 FROM DUAL\n testWhileIdle: true\n testOnBorrow: false\n testOnReturn: false\n poolPreparedStatements: true\n maxPoolPreparedStatementPerConnectionSize: 20\n filters: stat,slf4j\n connectionProperties: druid.stat.mergeSql\\=true;druid.stat.slowSqlMillis\\=5000\n datasource:\n # 主库数据源\n master:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n # 从库数据源\n # slave:\n # username: \n # password: \n # url: \n # driver-class-name: \n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.car\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 系统模块接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip','48e0ed4a040c402bdc2444213a82c910','2020-11-20 00:00:00','2022-09-29 02:49:09','nacos','0:0:0:0:0:0:0:1','','','系统模块','null','null','yaml','',''), -(6,'ruoyi-gen-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password:\n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.gen.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 代码生成接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip\n\n# 代码生成\ngen:\n # 作者\n author: ruoyi\n # 默认生成包路径 system 需改成自己的模块名称 如 system monitor tool\n packageName: com.ruoyi.car\n # 自动去除表前缀,默认是false\n autoRemovePre: false\n # 表前缀(生成类名不会包含表前缀,多个用逗号分隔)\n tablePrefix: sys_\n','eb592420b3fceae1402881887b8a6a0d','2020-11-20 00:00:00','2022-09-29 02:49:42','nacos','0:0:0:0:0:0:0:1','','','代码生成','null','null','yaml','',''), -(7,'ruoyi-job-dev.yml','DEFAULT_GROUP','# spring配置\nspring:\n redis:\n host: localhost\n port: 6379\n password: \n datasource:\n driver-class-name: com.mysql.cj.jdbc.Driver\n url: jdbc:mysql://localhost:3306/ry-cloud?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8\n username: root\n password: password\n\n# mybatis配置\nmybatis:\n # 搜索指定包别名\n typeAliasesPackage: com.ruoyi.job.domain\n # 配置mapper的扫描,找到所有的mapper.xml映射文件\n mapperLocations: classpath:mapper/**/*.xml\n\n# swagger配置\nswagger:\n title: 定时任务接口文档\n license: Powered By ruoyi\n licenseUrl: https://ruoyi.vip\n','edcf0e3fe13fea07b4ec08b1088f30b3','2020-11-20 00:00:00','2022-09-29 02:50:50','nacos','0:0:0:0:0:0:0:1','','','定时任务','null','null','yaml','',''), -(8,'ruoyi-file-dev.yml','DEFAULT_GROUP','# 本地文件上传 \r\nfile:\r\n domain: http://127.0.0.1:9300\r\n path: D:/ruoyi/uploadPath\r\n prefix: /statics\r\n\r\n# FastDFS配置\r\nfdfs:\r\n domain: http://8.129.231.12\r\n soTimeout: 3000\r\n connectTimeout: 2000\r\n trackerList: 8.129.231.12:22122\r\n\r\n# Minio配置\r\nminio:\r\n url: http://8.129.231.12:9000\r\n accessKey: minioadmin\r\n secretKey: minioadmin\r\n bucketName: test','5382b93f3d8059d6068c0501fdd41195','2020-11-20 00:00:00','2020-12-21 21:01:59',NULL,'0:0:0:0:0:0:0:1','','','文件服务','null','null','yaml',NULL,''), -(9,'sentinel-ruoyi-gateway','DEFAULT_GROUP','[\r\n {\r\n \"resource\": \"ruoyi-auth\",\r\n \"count\": 500,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-system\",\r\n \"count\": 1000,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-gen\",\r\n \"count\": 200,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n },\r\n {\r\n \"resource\": \"ruoyi-job\",\r\n \"count\": 300,\r\n \"grade\": 1,\r\n \"limitApp\": \"default\",\r\n \"strategy\": 0,\r\n \"controlBehavior\": 0\r\n }\r\n]','9f3a3069261598f74220bc47958ec252','2020-11-20 00:00:00','2020-11-20 00:00:00',NULL,'0:0:0:0:0:0:0:1','','','限流策略','null','null','json',NULL,''); - - -/******************************************/ -/* 表名称 = config_info_aggr */ -/******************************************/ -CREATE TABLE `config_info_aggr` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(255) NOT NULL COMMENT 'group_id', - `datum_id` varchar(255) NOT NULL COMMENT 'datum_id', - `content` longtext NOT NULL COMMENT '内容', - `gmt_modified` datetime NOT NULL COMMENT '修改时间', - `app_name` varchar(128) DEFAULT NULL, - `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_configinfoaggr_datagrouptenantdatum` (`data_id`,`group_id`,`tenant_id`,`datum_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='增加租户字段'; - - -/******************************************/ -/* 表名称 = config_info_beta */ -/******************************************/ -CREATE TABLE `config_info_beta` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(128) NOT NULL COMMENT 'group_id', - `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name', - `content` longtext NOT NULL COMMENT 'content', - `beta_ips` varchar(1024) DEFAULT NULL COMMENT 'betaIps', - `md5` varchar(32) DEFAULT NULL COMMENT 'md5', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - `src_user` text COMMENT 'source user', - `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', - `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - `encrypted_data_key` text COMMENT '秘钥', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_configinfobeta_datagrouptenant` (`data_id`,`group_id`,`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_beta'; - -/******************************************/ -/* 表名称 = config_info_tag */ -/******************************************/ -CREATE TABLE `config_info_tag` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(128) NOT NULL COMMENT 'group_id', - `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id', - `tag_id` varchar(128) NOT NULL COMMENT 'tag_id', - `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name', - `content` longtext NOT NULL COMMENT 'content', - `md5` varchar(32) DEFAULT NULL COMMENT 'md5', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - `src_user` text COMMENT 'source user', - `src_ip` varchar(50) DEFAULT NULL COMMENT 'source ip', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_configinfotag_datagrouptenanttag` (`data_id`,`group_id`,`tenant_id`,`tag_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_info_tag'; - -/******************************************/ -/* 表名称 = config_tags_relation */ -/******************************************/ -CREATE TABLE `config_tags_relation` ( - `id` bigint(20) NOT NULL COMMENT 'id', - `tag_name` varchar(128) NOT NULL COMMENT 'tag_name', - `tag_type` varchar(64) DEFAULT NULL COMMENT 'tag_type', - `data_id` varchar(255) NOT NULL COMMENT 'data_id', - `group_id` varchar(128) NOT NULL COMMENT 'group_id', - `tenant_id` varchar(128) DEFAULT '' COMMENT 'tenant_id', - `nid` bigint(20) NOT NULL AUTO_INCREMENT, - PRIMARY KEY (`nid`), - UNIQUE KEY `uk_configtagrelation_configidtag` (`id`,`tag_name`,`tag_type`), - KEY `idx_tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='config_tag_relation'; - -/******************************************/ -/* 表名称 = group_capacity */ -/******************************************/ -CREATE TABLE `group_capacity` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', - `group_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Group ID,空字符表示整个集群', - `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值', - `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量', - `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值', - `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数,,0表示使用默认值', - `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值', - `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_group_id` (`group_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='集群、各Group容量信息表'; - -/******************************************/ -/* 表名称 = his_config_info */ -/******************************************/ -CREATE TABLE `his_config_info` ( - `id` bigint(64) unsigned NOT NULL, - `nid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, - `data_id` varchar(255) NOT NULL, - `group_id` varchar(128) NOT NULL, - `app_name` varchar(128) DEFAULT NULL COMMENT 'app_name', - `content` longtext NOT NULL, - `md5` varchar(32) DEFAULT NULL, - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP, - `src_user` text, - `src_ip` varchar(50) DEFAULT NULL, - `op_type` char(10) DEFAULT NULL, - `tenant_id` varchar(128) DEFAULT '' COMMENT '租户字段', - `encrypted_data_key` text COMMENT '秘钥', - PRIMARY KEY (`nid`), - KEY `idx_gmt_create` (`gmt_create`), - KEY `idx_gmt_modified` (`gmt_modified`), - KEY `idx_did` (`data_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='多租户改造'; - - -/******************************************/ -/* 数据库全名 = nacos_config */ -/* 表名称 = tenant_capacity */ -/******************************************/ -CREATE TABLE `tenant_capacity` ( - `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', - `tenant_id` varchar(128) NOT NULL DEFAULT '' COMMENT 'Tenant ID', - `quota` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '配额,0表示使用默认值', - `usage` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '使用量', - `max_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个配置大小上限,单位为字节,0表示使用默认值', - `max_aggr_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '聚合子配置最大个数', - `max_aggr_size` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值', - `max_history_count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大变更历史数量', - `gmt_create` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='租户容量信息表'; - - -CREATE TABLE `tenant_info` ( - `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', - `kp` varchar(128) NOT NULL COMMENT 'kp', - `tenant_id` varchar(128) default '' COMMENT 'tenant_id', - `tenant_name` varchar(128) default '' COMMENT 'tenant_name', - `tenant_desc` varchar(256) DEFAULT NULL COMMENT 'tenant_desc', - `create_source` varchar(32) DEFAULT NULL COMMENT 'create_source', - `gmt_create` bigint(20) NOT NULL COMMENT '创建时间', - `gmt_modified` bigint(20) NOT NULL COMMENT '修改时间', - PRIMARY KEY (`id`), - UNIQUE KEY `uk_tenant_info_kptenantid` (`kp`,`tenant_id`), - KEY `idx_tenant_id` (`tenant_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='tenant_info'; - -CREATE TABLE `users` ( - `username` varchar(50) NOT NULL PRIMARY KEY, - `password` varchar(500) NOT NULL, - `enabled` boolean NOT NULL -); - -CREATE TABLE `roles` ( - `username` varchar(50) NOT NULL, - `role` varchar(50) NOT NULL, - UNIQUE INDEX `idx_user_role` (`username` ASC, `role` ASC) USING BTREE -); - -CREATE TABLE `permissions` ( - `role` varchar(50) NOT NULL, - `resource` varchar(255) NOT NULL, - `action` varchar(8) NOT NULL, - UNIQUE INDEX `uk_role_permission` (`role`,`resource`,`action`) USING BTREE -); - -INSERT INTO users (username, password, enabled) VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE); - -INSERT INTO roles (username, role) VALUES ('nacos', 'ROLE_ADMIN'); diff --git a/sql/ry_seata_20210128.sql b/sql/ry_seata_20210128.sql deleted file mode 100644 index 41163c1..0000000 --- a/sql/ry_seata_20210128.sql +++ /dev/null @@ -1,80 +0,0 @@ -DROP DATABASE IF EXISTS `ry-seata`; - -CREATE DATABASE `ry-seata` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci; - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - -USE `ry-seata`; - --- -------------------------------- The script used when storeMode is 'db' -------------------------------- --- the table to store GlobalSession data -CREATE TABLE IF NOT EXISTS `global_table` -( - `xid` VARCHAR(128) NOT NULL, - `transaction_id` BIGINT, - `status` TINYINT NOT NULL, - `application_id` VARCHAR(32), - `transaction_service_group` VARCHAR(32), - `transaction_name` VARCHAR(128), - `timeout` INT, - `begin_time` BIGINT, - `application_data` VARCHAR(2000), - `gmt_create` DATETIME, - `gmt_modified` DATETIME, - PRIMARY KEY (`xid`), - KEY `idx_gmt_modified_status` (`gmt_modified`, `status`), - KEY `idx_transaction_id` (`transaction_id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; - --- the table to store BranchSession data -CREATE TABLE IF NOT EXISTS `branch_table` -( - `branch_id` BIGINT NOT NULL, - `xid` VARCHAR(128) NOT NULL, - `transaction_id` BIGINT, - `resource_group_id` VARCHAR(32), - `resource_id` VARCHAR(256), - `branch_type` VARCHAR(8), - `status` TINYINT, - `client_id` VARCHAR(64), - `application_data` VARCHAR(2000), - `gmt_create` DATETIME(6), - `gmt_modified` DATETIME(6), - PRIMARY KEY (`branch_id`), - KEY `idx_xid` (`xid`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; - --- the table to store lock data -CREATE TABLE IF NOT EXISTS `lock_table` -( - `row_key` VARCHAR(128) NOT NULL, - `xid` VARCHAR(96), - `transaction_id` BIGINT, - `branch_id` BIGINT NOT NULL, - `resource_id` VARCHAR(256), - `table_name` VARCHAR(32), - `pk` VARCHAR(36), - `gmt_create` DATETIME, - `gmt_modified` DATETIME, - PRIMARY KEY (`row_key`), - KEY `idx_branch_id` (`branch_id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4; - --- for AT mode you must to init this sql for you business database. the seata server not need it. -CREATE TABLE IF NOT EXISTS `undo_log` -( - `branch_id` BIGINT(20) NOT NULL COMMENT 'branch transaction id', - `xid` VARCHAR(100) NOT NULL COMMENT 'global transaction id', - `context` VARCHAR(128) NOT NULL COMMENT 'undo_log context,such as serialization', - `rollback_info` LONGBLOB NOT NULL COMMENT 'rollback info', - `log_status` INT(11) NOT NULL COMMENT '0:normal status,1:defense status', - `log_created` DATETIME(6) NOT NULL COMMENT 'create datetime', - `log_modified` DATETIME(6) NOT NULL COMMENT 'modify datetime', - UNIQUE KEY `ux_undo_log` (`xid`, `branch_id`) -) ENGINE = InnoDB - AUTO_INCREMENT = 1 - DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table'; \ No newline at end of file -- Gitblit v1.7.1