Merge remote-tracking branch 'origin/master'
# Conflicts:
# ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TOrderAppealServiceImpl.java
# ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TAdvertisingController.java
1 文件已重命名
16个文件已添加
131个文件已修改
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-alibaba-seata</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | public class UserListQueryDto extends BasePage { |
| | | @ApiModelProperty(value = "用户手机号") |
| | | String userPhone; |
| | | @ApiModelProperty(value = "所在省code") |
| | | String provinceCode; |
| | | @ApiModelProperty(value = "所在地code") |
| | | String cityCode; |
| | | @ApiModelProperty(value = "状态 1正常2冻结 3注销") |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R<TAppUser> getUserById(Long id) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("根据id查询用户失败:"+throwable.getMessage()); |
| | | } |
| | | |
| | |
| | | return R.fail("修改用户失败:"+throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R change(PointChangeDto points) { |
| | | return null; |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R changeDown(PointChangeDto points) { |
New file |
| | |
| | | package com.ruoyi.account.api.factory; |
| | | |
| | | import com.ruoyi.account.api.feignClient.AppUserTagClient; |
| | | import com.ruoyi.account.api.feignClient.InviteUserClient; |
| | | import com.ruoyi.account.api.model.TAppUserTag; |
| | | import com.ruoyi.account.api.model.TInviteUser; |
| | | import com.ruoyi.account.api.vo.GetInviteUser; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class AppUserTagFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory<AppUserTagClient> |
| | | { |
| | | private static final Logger log = LoggerFactory.getLogger(AppUserTagFallbackFactory.class); |
| | | |
| | | @Override |
| | | public AppUserTagClient create(Throwable throwable) { |
| | | log.error("调用失败:{}", throwable.getMessage()); |
| | | return new AppUserTagClient() { |
| | | |
| | | |
| | | @Override |
| | | public R<TAppUserTag> getUserTag(TAppUserTag appUserTag) { |
| | | return R.fail("获取用户标签关系失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void addUserTag(TAppUserTag appUserTag) { |
| | | |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R<TAppUserVipDetail> getAppUserVipDetail(GetAppUserVipDetail getAppUserVipDetail) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("获取用户当前有效的VIP明细调用失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void updateAppUserVipDetail(TAppUserVipDetail appUserVipDetail) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | R.fail(throwable.getMessage()); |
| | | } |
| | | }; |
| | |
| | | * @param carIds 车辆id集合 |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/t-app-user-car/getCarByIds") |
| | | @PostMapping(value = "/t-app-user-car/t-app-user-car/getCarByIds") |
| | | public R<List<TAppUserCar>> getCarByIds(@RequestBody List<Long> carIds); |
| | | |
| | | |
| | |
| | | @PostMapping("/t-app-user/user/updateAppUser") |
| | | R updateAppUser(@RequestBody TAppUser appUser); |
| | | |
| | | @PostMapping("/t-app-user/user/points/change") |
| | | R change(@RequestBody PointChangeDto points); |
| | | // @PostMapping("/t-app-user/user/points/change") |
| | | // R change(@RequestBody PointChangeDto points); |
| | | @PostMapping("/t-app-user/user/points/change/down") |
| | | R changeDown(@RequestBody PointChangeDto points); |
| | | |
New file |
| | |
| | | package com.ruoyi.account.api.feignClient; |
| | | |
| | | import com.ruoyi.account.api.factory.AppUserTagFallbackFactory; |
| | | import com.ruoyi.account.api.model.TAppUserTag; |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/9/25 16:17 |
| | | */ |
| | | @FeignClient(contextId = "AppUserTagClient", value = ServiceNameConstants.ACCOUNT_SERVICE, fallbackFactory = AppUserTagFallbackFactory.class) |
| | | public interface AppUserTagClient { |
| | | |
| | | /** |
| | | * 获取用户标签关系 |
| | | * @param appUserTag |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/t-app-user-tag/tags/getUserTag") |
| | | R<TAppUserTag> getUserTag(@RequestBody TAppUserTag appUserTag); |
| | | |
| | | /** |
| | | * 添加用户标签关系数据 |
| | | * @param appUserTag |
| | | */ |
| | | @PostMapping(value = "/t-app-user-tag/tags/addUserTag") |
| | | void addUserTag(@RequestBody TAppUserTag appUserTag); |
| | | } |
| | |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "对应跳转订单号") |
| | | @TableField("order_code") |
| | | private String orderCode; |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("app_user_id") |
| | | private Long appUserId; |
| | |
| | | @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") |
| | |
| | | com.ruoyi.account.api.factory.AppUserAddressFallbackFactory |
| | | com.ruoyi.account.api.factory.AppUserVipDetailFallbackFactory |
| | | com.ruoyi.account.api.factory.InviteUserFallbackFactory |
| | | com.ruoyi.account.api.factory.AppUserTagFallbackFactory |
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-alibaba-seata</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R<List<TAccountingStrategyDetail>> getListByAccountingStrategyId(Integer id) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("根据计费策略主表id策略明细失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R<TAccountingStrategy> getAccountingStrategyById(Integer id) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("根据id查询计费策略失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R<TChargingGun> getChargingGunById(Integer id) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("根据id获取充电枪失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R<SiteInfoVO> getSiteInfoByNumber1(String number) { |
| | | return R.fail("通过桩编号获取电站信息失败:"+throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<TChargingPile> getChargingPileById(Integer id) { |
| | | return R.fail(throwable.getMessage()); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.factory; |
| | | |
| | | import com.ruoyi.chargingPile.api.feignClient.PartnerClient; |
| | | import com.ruoyi.chargingPile.api.model.Partner; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * 充电桩服务降级处理 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class PartnerFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory<PartnerClient> { |
| | | private static final Logger log = LoggerFactory.getLogger(PartnerFallbackFactory.class); |
| | | |
| | | @Override |
| | | public PartnerClient create(Throwable throwable) { |
| | | log.error("调用失败:{}", throwable.getMessage()); |
| | | return new PartnerClient() { |
| | | |
| | | |
| | | @Override |
| | | public R<Partner> getPartnerById(Integer id) { |
| | | return R.fail("根据id获取合作商信息失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | |
| | | @PostMapping(value = "/t-accounting-strategy/getServiceMoney") |
| | | R<BigDecimal> getServiceMoney(@RequestParam("param") String param); |
| | | |
| | | @PostMapping("/site/getSiteInfoByNumber") |
| | | @ApiOperation(value = "扫一扫后通过桩编号获取电站信息", tags = {"小程序-扫一扫"}) |
| | | @GetMapping("/site/getSiteInfoByNumber") |
| | | R<SiteInfoVO> getSiteInfoByNumber(@RequestParam("number") String number); |
| | | |
| | | @PostMapping("/site/getSiteInfoByNumber1") |
| | | R<SiteInfoVO> getSiteInfoByNumber1(@RequestParam("number") String number); |
| | | |
| | | |
| | | @PostMapping("/t-charging-pile/getChargingPileById/{id}") |
| | | R<TChargingPile> getChargingPileById(@PathVariable("id") Integer id); |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.feignClient; |
| | | |
| | | import com.ruoyi.chargingPile.api.factory.PartnerFallbackFactory; |
| | | import com.ruoyi.chargingPile.api.model.Partner; |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/9/30 9:36 |
| | | */ |
| | | @FeignClient(contextId = "PartnerClient", value = ServiceNameConstants.CHARGINGPILE_SERVICE, fallbackFactory = PartnerFallbackFactory.class) |
| | | public interface PartnerClient { |
| | | |
| | | |
| | | /** |
| | | * 根据id获取合作商信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/partner/getPartnerById/{id}") |
| | | R<Partner> getPartnerById(@PathVariable("id") Integer id); |
| | | } |
| | |
| | | |
| | | @Data |
| | | @ApiModel(value = "设备状态统计VO") |
| | | public class GunStatusStatisticsVO implements Serializable { |
| | | public class GunStatusStatisticsVO { |
| | | |
| | | @ApiModelProperty(value = "充电桩类型统计 key:充电模式(1=超级快充,2=快充,3=慢充)") |
| | | private List<Map<Integer,Integer>> modeStatistics; |
| | | private List<Map<String,Object>> modeStatistics; |
| | | @ApiModelProperty(value = "状态统计 key:充电模式(1=离线,2=故障,3=充电中)") |
| | | private Map<Integer,Integer> statusStatistics; |
| | | private List<Map<String,Integer>> statusStatistics; |
| | | @ApiModelProperty(value = "状态统计根据类型分组") |
| | | private List<StatusModeStatisticsVO> statusModeStatistics; |
| | | } |
| | |
| | | public class SiteInfoVO { |
| | | @ApiModelProperty(value = "电站名称") |
| | | private String name; |
| | | @ApiModelProperty(value = "桩id") |
| | | private Integer chargingPileId; |
| | | @ApiModelProperty(value = "桩编号") |
| | | private String number; |
| | | @ApiModelProperty(value = "充电枪id") |
| | |
| | | private Integer couponCount; |
| | | @ApiModelProperty(value = "超时占位费说明") |
| | | private String spaceChargeExplain; |
| | | @ApiModelProperty(value = "添加车辆最高可得积分 车辆信息为空 展示提示语") |
| | | private Integer integral; |
| | | @ApiModelProperty(value = "充电模式(1=超级快充,2=快充,3=慢充") |
| | | private Integer chargeMode; |
| | | |
| | | @ApiModelProperty(value = "上次选择车辆logo") |
| | | private String carLogo; |
| | |
| | | com.ruoyi.chargingPile.api.factory.AccountingStrategyFallbackFactory |
| | | com.ruoyi.chargingPile.api.factory.ParkingRecordFallbackFactory |
| | | com.ruoyi.chargingPile.api.factory.FaultMessageFallbackFactory |
| | | com.ruoyi.chargingPile.api.factory.PartnerFallbackFactory |
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-alibaba-seata</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | public R<String> platformRemoteUpdate(PlatformRemoteUpdate platformRemoteUpdate) { |
| | | return R.fail("远程更新调用失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<String> setupBillingModel1(String deviceId) { |
| | | return R.fail("远程更新硬件:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public String platformStartCharging(PlatformStartCharging platformStartCharging) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return "远程启机失败"; |
| | | } |
| | | |
| | | @Override |
| | | public String platformStopCharging(PlatformStopCharging platformStopCharging) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return "远程停机失败"; |
| | | } |
| | | }; |
| | |
| | | <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> |
| | |
| | | public R<AccountingStrategyDetailOrder> getNowAccountingStrategyDetailOrder(Long orderId) { |
| | | return R.fail("根据订单id获取当前有效的策略失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<List<AccountingStrategyDetailOrder>> getAllAccountingStrategyDetailOrder(Long orderId) { |
| | | return R.fail("获取订单对应的计费策略数据失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.api.factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.api.feignClient.AccountingStrategyDetailOrderClient; |
| | | import com.ruoyi.order.api.feignClient.AccountingStrategyOrderClient; |
| | | import com.ruoyi.order.api.model.AccountingStrategyDetailOrder; |
| | | import com.ruoyi.order.api.model.AccountingStrategyOrder; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 充电订单服务降级处理 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class AccountingStrategyOrderFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory<AccountingStrategyOrderClient> |
| | | { |
| | | private static final Logger log = LoggerFactory.getLogger(AccountingStrategyOrderFallbackFactory.class); |
| | | |
| | | @Override |
| | | public AccountingStrategyOrderClient create(Throwable throwable) { |
| | | log.error("调用失败:{}", throwable.getMessage()); |
| | | return new AccountingStrategyOrderClient() { |
| | | |
| | | |
| | | @Override |
| | | public R<AccountingStrategyOrder> getAccountingStrategyOrderById(Integer id) { |
| | | return R.fail("根据id获取计费策略失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | public R<String> stopCharging(String id) { |
| | | return R.fail("手动停止充电失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void chargingOrderWXCallback(String out_trade_no, String transaction_id, String attach) { |
| | | log.error("充电支付成功回调通知失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void chargingOrderStartupFailureWxRefund(String out_refund_no, String refund_id, String tradeState, String success_time) { |
| | | log.error("远程启动失败后退款通知失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void shoppingOrderWxRefund(String out_refund_no, String refund_id, String tradeState, String success_time) { |
| | | log.error("购物订单退款回调通知失败:" + throwable.getMessage()); |
| | | |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.order.api.factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.dto.ExchangeBackDto; |
| | | import com.ruoyi.common.core.dto.ExchangeDto; |
| | | import com.ruoyi.order.api.feignClient.OrderClient; |
| | | import com.ruoyi.order.api.model.ChargingListQuery; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R<Long> exchangeCreate(ExchangeDto exchangeDto) { |
| | | public R<ExchangeBackDto> exchangeCreate(ExchangeDto exchangeDto) { |
| | | return R.fail("创建订单" + cause.getMessage()); |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.order.api.factory; |
| | | |
| | | import com.ruoyi.order.api.feignClient.ShoppingOrderClient; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | | * 充电订单服务降级处理 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class ShoppingOrderFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory<ShoppingOrderClient> { |
| | | private static final Logger log = LoggerFactory.getLogger(ShoppingOrderFallbackFactory.class); |
| | | |
| | | |
| | | @Override |
| | | public ShoppingOrderClient create(Throwable cause) { |
| | | log.error("调用失败:{}", cause.getMessage()); |
| | | return new ShoppingOrderClient() { |
| | | |
| | | |
| | | @Override |
| | | public void cancelShoppingOrderWxRefund(String out_refund_no, String refund_id, String tradeState, String success_time) { |
| | | log.error("商城订单去掉退款回调通知失败:" + cause.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/9/4 16:11 |
| | |
| | | */ |
| | | @PostMapping("/accountingStrategyDetailOrder/getNowAccountingStrategyDetailOrder") |
| | | R<AccountingStrategyDetailOrder> getNowAccountingStrategyDetailOrder(@RequestParam("orderId") Long orderId); |
| | | |
| | | /** |
| | | * 获取订单对应的计费策略数据 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @PostMapping("/accountingStrategyDetailOrder/getAllAccountingStrategyDetailOrder") |
| | | R<List<AccountingStrategyDetailOrder>> getAllAccountingStrategyDetailOrder(@RequestParam("orderId") Long orderId); |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.api.feignClient; |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.api.factory.AccountingStrategyOrderFallbackFactory; |
| | | import com.ruoyi.order.api.model.AccountingStrategyOrder; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/9/26 9:09 |
| | | */ |
| | | @FeignClient(contextId = "AccountingStrategyOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = AccountingStrategyOrderFallbackFactory.class) |
| | | public interface AccountingStrategyOrderClient { |
| | | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/accountingStrategyOrder/getAccountingStrategyOrderById") |
| | | R<AccountingStrategyOrder> getAccountingStrategyOrderById(@RequestParam("id") Integer id); |
| | | } |
| | |
| | | */ |
| | | @PutMapping(value = "/t-charging-order/stopCharging/{id}") |
| | | R<String> stopCharging(@PathVariable("id") String id); |
| | | |
| | | |
| | | /** |
| | | * 充电支付成功回调通知 |
| | | * @param out_trade_no |
| | | * @param transaction_id |
| | | * @param attach |
| | | */ |
| | | @PostMapping("/t-charging-order/chargingOrderWXCallback") |
| | | void chargingOrderWXCallback(@RequestParam("out_trade_no") String out_trade_no, |
| | | @RequestParam("transaction_id") String transaction_id, |
| | | @RequestParam("attach") String attach); |
| | | |
| | | |
| | | /** |
| | | * 远程启动失败后退款回调 |
| | | * @param out_refund_no |
| | | * @param refund_id |
| | | * @param tradeState |
| | | * @param success_time |
| | | */ |
| | | @PostMapping("/t-charging-order/chargingOrderStartupFailureWxRefund") |
| | | void chargingOrderStartupFailureWxRefund(@RequestParam("out_trade_no") String out_refund_no, |
| | | @RequestParam("out_trade_no") String refund_id, |
| | | @RequestParam("out_trade_no") String tradeState, |
| | | @RequestParam("out_trade_no") String success_time); |
| | | /** |
| | | * 管理后台取消购物订单后退款回调 |
| | | * @param out_refund_no |
| | | * @param refund_id |
| | | * @param tradeState |
| | | * @param success_time |
| | | */ |
| | | @PostMapping("/t-shopping-order/shoppingOrderWxRefund") |
| | | void shoppingOrderWxRefund(@RequestParam("out_trade_no") String out_refund_no, |
| | | @RequestParam("out_trade_no") String refund_id, |
| | | @RequestParam("out_trade_no") String tradeState, |
| | | @RequestParam("out_trade_no") String success_time); |
| | | } |
| | |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.dto.ExchangeBackDto; |
| | | import com.ruoyi.common.core.dto.ExchangeDto; |
| | | import com.ruoyi.order.api.factory.OrderFallbackFactory; |
| | | import com.ruoyi.order.api.model.ChargingListQuery; |
| | |
| | | public R<Long> getExchangeById(@RequestParam("goodId") Integer goodId,@RequestParam("userId") Long userId,@RequestParam("goodType") Integer goodType); |
| | | |
| | | @PostMapping("/t-exchange-order/create") |
| | | public R<Long> exchangeCreate(@RequestBody ExchangeDto exchangeDto); |
| | | public R<ExchangeBackDto> exchangeCreate(@RequestBody ExchangeDto exchangeDto); |
| | | @PostMapping("/t-vip-order//addVipOrder") |
| | | public R<Long> addVipOrder(@RequestBody TVipOrder vipOrder); |
| | | @PostMapping("/t-shopping-order/create") |
New file |
| | |
| | | package com.ruoyi.order.api.feignClient; |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.order.api.factory.ShoppingOrderFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/9/29 16:23 |
| | | */ |
| | | @FeignClient(contextId = "ShoppingOrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = ShoppingOrderFallbackFactory.class) |
| | | public interface ShoppingOrderClient { |
| | | |
| | | |
| | | /** |
| | | * 商城订单去掉退款回调通知 |
| | | * @param out_refund_no |
| | | * @param refund_id |
| | | * @param tradeState |
| | | * @param success_time |
| | | */ |
| | | @PostMapping("/t-shopping-order/cancelShoppingOrderWxRefund") |
| | | void cancelShoppingOrderWxRefund(@RequestParam("out_refund_no") String out_refund_no, |
| | | @RequestParam("refund_id") String refund_id, |
| | | @RequestParam("tradeState") String tradeState, |
| | | @RequestParam("success_time") String success_time); |
| | | } |
| | |
| | | package com.ruoyi.order.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableField(value = "id") |
| | | @TableId(type = IdType.INPUT, value = "id") |
| | | private Integer id; |
| | | @ApiModelProperty(value = "策略id") |
| | | @TableField("accounting_strategy_id") |
| | | private Integer accountingStrategyId; |
| | | @TableField("accounting_strategy_order_id") |
| | | private Integer accountingStrategyOrderId; |
| | | |
| | | @ApiModelProperty(value = "阶段(1=尖阶段,2=峰阶段,3=平阶段,4=谷阶段)") |
| | | @TableField("type") |
| | |
| | | @TableName("t_accounting_strategy_order") |
| | | public class AccountingStrategyOrder extends BasePojo { |
| | | |
| | | @ApiModelProperty(value = "策略id") |
| | | @TableId(type = IdType.INPUT, value = "id") |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | |
| | | import java.time.LocalDateTime; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import java.io.Serializable; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | |
| | | @ApiModelProperty(value = "退款成功时间") |
| | | @TableField("refund_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime refundTime; |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | |
| | | private BigDecimal paymentAmount; |
| | | @ApiModelProperty(value = "支付时间") |
| | | @TableField(exist = false) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime payTime; |
| | | |
| | | |
| | | @ApiModelProperty(value = "订单id") |
| | | @TableField(exist = false) |
| | | private String orderId; |
| | | @TableField(exist = false) |
| | | private String userId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "开票时间") |
| | |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "状态(1=待发货,2=待收货,3=已完成,4=已取消)") |
| | | @ApiModelProperty(value = "状态(1=待发货,2=待收货,3=已完成,4=已取消 5=交易关闭)") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | |
| | | @ApiModelProperty(value = "userUid") |
| | | @TableField(exist = false) |
| | | private String userUid; |
| | | @ApiModelProperty(value = "购买用户") |
| | | @TableField(exist = false) |
| | | private String userPhone; |
| | | |
| | | } |
| | |
| | | com.ruoyi.order.api.factory.ExchangeOrderFallbackFactory |
| | | com.ruoyi.order.api.factory.ChargingOrderAccountingStrategyFallbackFactory |
| | | com.ruoyi.order.api.factory.AccountingStrategyDetailOrderFallbackFactory |
| | | com.ruoyi.order.api.factory.AccountingStrategyOrderFallbackFactory |
| | | com.ruoyi.order.api.factory.ShoppingOrderFallbackFactory |
| | |
| | | <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> |
| | |
| | | private String name; |
| | | @ApiModelProperty(value = "1现金购买 2积分兑换 ") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "1全部 2已售罄 ") |
| | | @ApiModelProperty(value = "1全部 2已售罄 3已下架") |
| | | private Integer otherState; |
| | | } |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.other.api.domain.TCoupon; |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R updateCoupon(TCoupon coupon) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("修改优惠券失败"); |
| | | } |
| | | }; |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R updateGoods(TGoods goods) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("修改商品异常"); |
| | | } |
| | | }; |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R<TInvoiceType> getInvoiceType(Integer id) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail(throwable.getMessage()); |
| | | } |
| | | }; |
| | |
| | | return new OtherClient() { |
| | | |
| | | @Override |
| | | public R<Integer> getAddCarIntegral() { |
| | | return R.fail("查询首次添加车辆可获积分:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Page<TCompany>> queryUnitPage(UnitListQueryDto unitListQueryDto) { |
| | | return R.fail("查询单位列表失败:" + throwable.getMessage()); |
| | | } |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R addUserSite(List<TUserSite> userSite) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("添加用户站点失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R delUserSite(Long userId) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("删除用户站点失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
New file |
| | |
| | | package com.ruoyi.other.api.factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.other.api.domain.TUserTag; |
| | | import com.ruoyi.other.api.feignClient.UserTagClient; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * 商品服务降级处理 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class UserTagFallbackFactory implements org.springframework.cloud.openfeign.FallbackFactory<UserTagClient> { |
| | | private static final Logger log = LoggerFactory.getLogger(UserTagFallbackFactory.class); |
| | | |
| | | @Override |
| | | public UserTagClient create(Throwable throwable) { |
| | | log.error("调用失败:{}", throwable.getMessage()); |
| | | return new UserTagClient() { |
| | | |
| | | @Override |
| | | public R<List<TUserTag>> getAllUserTag() { |
| | | return R.fail("获取所有用户标签数据失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | */ |
| | | @FeignClient(contextId = "UnitClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = OtherFallbackFactory.class) |
| | | public interface OtherClient { |
| | | |
| | | /** |
| | | * 远程调用 获取首次添加车辆可获得积分 |
| | | * @return |
| | | */ |
| | | @PostMapping("/integral/getAddCarIntegral") |
| | | public R<Integer> getAddCarIntegral(); |
| | | //单位分页 |
| | | @PostMapping(value = "/t-company/unit/page") |
| | | R<Page<TCompany>> queryUnitPage(@RequestBody UnitListQueryDto unitListQueryDto); |
New file |
| | |
| | | package com.ruoyi.other.api.feignClient; |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.other.api.domain.TUserTag; |
| | | import com.ruoyi.other.api.factory.UserTagFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/9/25 15:53 |
| | | */ |
| | | @FeignClient(contextId = "UserTagClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = UserTagFallbackFactory.class) |
| | | public interface UserTagClient { |
| | | |
| | | /** |
| | | * 获取所有用户标签数据 |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/t-user-tag/getAllUserTag") |
| | | R<List<TUserTag>> getAllUserTag(); |
| | | } |
| | |
| | | com.ruoyi.other.api.factory.CouponFallbackFactory |
| | | com.ruoyi.other.api.factory.InvoiceTypeFallbackFactory |
| | | com.ruoyi.other.api.factory.WebSocketFallbackFactory |
| | | com.ruoyi.other.api.factory.UserTagFallbackFactory |
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-alibaba-seata</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R<AliPaymentResp> payment(AliPaymentReq req) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("调起支付宝小程序支付失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<AliQueryOrder> query(String outTradeNo) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("查询支付订单失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void close(String outTradeNo) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | R.fail("关闭支付订单失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<RefundResp> refund(RefundReq dto) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("支付宝退款失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | |
| | | 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; |
| | |
| | | |
| | | @Override |
| | | public R<NotifyV3PayDecodeRespBody> queryOrderInfo(String orderId) { |
| | | // 手动进行全局事务回滚 |
| | | 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) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("调起微信支付失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Map<String, Object>> payNotify(HttpServletRequest request) { |
| | | return R.fail("微信支付回调失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public void ack() { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void close(String outTradeNo) { |
| | | // 手动进行全局事务回滚 |
| | | 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 |
| | | public R<WxRefundNotifyResp> refundNotify(HttpServletRequest request) { |
| | | return R.fail("微信退款回调失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | |
| | | R<Map<String, Object>> orderPay(@RequestBody PaymentOrder paymentOrder); |
| | | |
| | | |
| | | /** |
| | | * 支付回调 |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @PostMapping("/wx/pay/notify") |
| | | R<Map<String, Object>> payNotify(HttpServletRequest request); |
| | | |
| | | /** |
| | | * 支付回调成功后的成功应答 |
| | | */ |
| | | @PostMapping("/wx/pay/ack") |
| | | void ack(); |
| | | |
| | | |
| | | /** |
| | | * 关闭订单 |
| | |
| | | @ApiOperation("订单退款") |
| | | @PostMapping(value = "/wx/refundOrderR") |
| | | public R<String> refundOrderR(@RequestBody WxPaymentRefundModel model); |
| | | |
| | | |
| | | |
| | | @ApiOperation("订单退款回调") |
| | | @PostMapping(value = "/wx/refund/notify") |
| | | R<WxRefundNotifyResp> refundNotify(HttpServletRequest request); |
| | | } |
| | |
| | | /** |
| | | * 回调地址 |
| | | */ |
| | | private String notifyUrl ="http://221.182.45.100:9000/payment/wx/pay/notify"; |
| | | private String notifyUrl ="/payment/wx/pay/notify"; |
| | | } |
| | |
| | | </exclusion> |
| | | </exclusions> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.alibaba.cloud</groupId> |
| | | <artifactId>spring-cloud-starter-alibaba-seata</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | |
| | | @TableField("login_time") |
| | | @ApiModelProperty(value = "登录时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime loginTime; |
| | | /** |
| | | * 登录状态(1=成功,2=失败) |
| | |
| | | private String avatar; |
| | | |
| | | /** 密码 */ |
| | | @NotBlank(message = "密码不能为空") |
| | | private String password; |
| | | |
| | | /** 帐号状态(0正常 1停用) */ |
| | |
| | | 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; |
| | | |
| | |
| | | |
| | | @Override |
| | | public R<Boolean> updateSysUser(SysUser sysUser) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("更新用户失败:" + cause.getMessage()); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public R resetPassword(SysUser user) { |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | return R.fail("重置用户密码失败:" + cause.getMessage()); |
| | | } |
| | | }; |
| | |
| | | * @param loginLog |
| | | * @return |
| | | */ |
| | | @PostMapping("/saveLoginLog") |
| | | @PostMapping("/sysLoginLog/saveLoginLog") |
| | | R saveLoginLog(@RequestBody SysLoginLog loginLog); |
| | | } |
| | |
| | | <artifactId>hutool-crypto</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-api-chargingPile</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | |
| | | import com.ruoyi.chargingPile.api.feignClient.PartnerClient; |
| | | import com.ruoyi.chargingPile.api.model.Partner; |
| | | import com.ruoyi.system.api.domain.SysRole; |
| | | import com.ruoyi.system.api.domain.SysUser; |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | |
| | | @Resource |
| | | private SysUserClient userClient; |
| | | |
| | | @Resource |
| | | private PartnerClient partnerClient; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @PostMapping("login") |
| | | @GlobalTransactional(rollbackFor = Exception.class)//分布式事务 |
| | |
| | | |
| | | map.put("roleName",roles.get(0).getRoleName()); |
| | | map.put("info", userInfo); |
| | | if(userInfo.getSysUser().getRoleType() == 2){ |
| | | Partner partner = partnerClient.getPartnerById(userInfo.getSysUser().getObjectId()).getData(); |
| | | map.put("partnerName", partner.getName()); |
| | | } |
| | | // 修改用户最后登录时间 |
| | | SysUser sysUser = new SysUser(); |
| | | sysUser.setUserId(userInfo.getSysUser().getUserId()); |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class SysLoginService |
| | | { |
| | | public class SysLoginService { |
| | | @Autowired |
| | | private RemoteUserService remoteUserService; |
| | | |
| | |
| | | * 登录 |
| | | */ |
| | | public LoginUser login(String username, String password, HttpServletRequest request) { |
| | | username = username.trim(); |
| | | // 查询用户信息 |
| | | R<LoginUser> userResult = remoteUserService.getUserInfo(username, SecurityConstants.INNER); |
| | | |
| | | if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData())) |
| | | { |
| | | if (StringUtils.isNull(userResult) || StringUtils.isNull(userResult.getData())) { |
| | | recordLogService.recordLogininfor(request, null, username, Constants.LOGIN_FAIL_STATUS, "登录用户不存在"); |
| | | throw new ServiceException("登录用户:" + username + " 不存在"); |
| | | } |
| | |
| | | SysUser user = userResult.getData().getSysUser(); |
| | | |
| | | // 用户名或密码为空 错误 |
| | | if (StringUtils.isAnyBlank(username, password)) |
| | | { |
| | | if (StringUtils.isAnyBlank(username, password)) { |
| | | recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, "用户/密码必须填写"); |
| | | throw new ServiceException("用户/密码必须填写"); |
| | | } |
| | | // 密码如果不在指定范围内 错误 |
| | | if (password.length() < UserConstants.PASSWORD_MIN_LENGTH |
| | | || password.length() > UserConstants.PASSWORD_MAX_LENGTH) |
| | | { |
| | | || password.length() > UserConstants.PASSWORD_MAX_LENGTH) { |
| | | recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, "用户密码不在指定范围"); |
| | | throw new ServiceException("用户密码不在指定范围"); |
| | | } |
| | | // 用户名不在指定范围内 错误 |
| | | if (username.length() < UserConstants.USERNAME_MIN_LENGTH |
| | | || username.length() > UserConstants.USERNAME_MAX_LENGTH) |
| | | { |
| | | || username.length() > UserConstants.USERNAME_MAX_LENGTH) { |
| | | recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, "用户名不在指定范围"); |
| | | throw new ServiceException("用户名不在指定范围"); |
| | | } |
| | | // IP黑名单校验 |
| | | String blackStr = Convert.toStr(redisService.getCacheObject(CacheConstants.SYS_LOGIN_BLACKIPLIST)); |
| | | if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr())) |
| | | { |
| | | if (IpUtils.isMatchedIp(blackStr, IpUtils.getIpAddr())) { |
| | | recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, "很遗憾,访问IP已被列入系统黑名单"); |
| | | throw new ServiceException("很遗憾,访问IP已被列入系统黑名单"); |
| | | } |
| | | |
| | | if (R.FAIL == userResult.getCode()) |
| | | { |
| | | if (R.FAIL == userResult.getCode()) { |
| | | throw new ServiceException(userResult.getMsg()); |
| | | } |
| | | |
| | | |
| | | if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) |
| | | { |
| | | if (UserStatus.DELETED.getCode().equals(user.getDelFlag())) { |
| | | recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, "对不起,您的账号已被删除"); |
| | | throw new ServiceException("对不起,您的账号:" + username + " 已被删除"); |
| | | } |
| | | if (UserStatus.DISABLE.getCode().equals(user.getStatus())) |
| | | { |
| | | if (UserStatus.DISABLE.getCode().equals(user.getStatus())) { |
| | | recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, "用户已停用,请联系管理员"); |
| | | throw new ServiceException("对不起,您的账号:" + username + " 已停用"); |
| | | } |
| | |
| | | return userInfo; |
| | | } |
| | | |
| | | public void logout(String loginName, HttpServletRequest request) |
| | | { |
| | | public void logout(String loginName, HttpServletRequest request) { |
| | | recordLogService.recordLogininfor(request, null, loginName, Constants.LOGIN_SUCCESS_STATUS, "退出成功"); |
| | | } |
| | | |
| | | /** |
| | | * 注册 |
| | | */ |
| | | public void register(String username, String password, HttpServletRequest request) |
| | | { |
| | | public void register(String username, String password, HttpServletRequest request) { |
| | | // 用户名或密码为空 错误 |
| | | if (StringUtils.isAnyBlank(username, password)) |
| | | { |
| | | if (StringUtils.isAnyBlank(username, password)) { |
| | | throw new ServiceException("用户/密码必须填写"); |
| | | } |
| | | if (username.length() < UserConstants.USERNAME_MIN_LENGTH |
| | | || username.length() > UserConstants.USERNAME_MAX_LENGTH) |
| | | { |
| | | || username.length() > UserConstants.USERNAME_MAX_LENGTH) { |
| | | throw new ServiceException("账户长度必须在2到20个字符之间"); |
| | | } |
| | | if (password.length() < UserConstants.PASSWORD_MIN_LENGTH |
| | | || password.length() > UserConstants.PASSWORD_MAX_LENGTH) |
| | | { |
| | | || password.length() > UserConstants.PASSWORD_MAX_LENGTH) { |
| | | throw new ServiceException("密码长度必须在5到20个字符之间"); |
| | | } |
| | | |
| | |
| | | sysUser.setPassword(SecurityUtils.encryptPassword(password)); |
| | | R<?> registerResult = remoteUserService.registerUserInfo(sysUser, SecurityConstants.INNER); |
| | | |
| | | if (R.FAIL == registerResult.getCode()) |
| | | { |
| | | if (R.FAIL == registerResult.getCode()) { |
| | | throw new ServiceException(registerResult.getMsg()); |
| | | } |
| | | recordLogService.recordLogininfor(request, sysUser.getUserId().intValue(), username, Constants.LOGIN_SUCCESS_STATUS, "注册成功"); |
| | |
| | | /** |
| | | * 登录成功状态 |
| | | */ |
| | | public static final String LOGIN_SUCCESS_STATUS = "0"; |
| | | public static final String LOGIN_SUCCESS_STATUS = "1"; |
| | | |
| | | /** |
| | | * 登录失败状态 |
| | | */ |
| | | public static final String LOGIN_FAIL_STATUS = "1"; |
| | | public static final String LOGIN_FAIL_STATUS = "2"; |
| | | |
| | | /** |
| | | * 登录成功 |
New file |
| | |
| | | package com.ruoyi.common.core.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class ExchangeBackDto { |
| | | private Long id; |
| | | private String code; |
| | | } |
| | |
| | | private Integer points; |
| | | private String remark; |
| | | private Integer type; |
| | | private String code; |
| | | } |
File was renamed from ruoyi-modules/ruoyi-file/src/main/java/com/ruoyi/file/utils/FileUploadUtils.java |
| | |
| | | package com.ruoyi.file.utils; |
| | | package com.ruoyi.common.core.utils; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | |
| | | import com.ruoyi.common.core.exception.file.FileNameLengthLimitExceededException; |
| | | import com.ruoyi.common.core.exception.file.FileSizeLimitExceededException; |
| | | import com.ruoyi.common.core.exception.file.InvalidExtensionException; |
| | | import com.ruoyi.common.core.utils.DateUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.file.FileTypeUtils; |
| | | import com.ruoyi.common.core.utils.file.MimeTypeUtils; |
| | | import com.ruoyi.common.core.utils.uuid.Seq; |
| | |
| | | */ |
| | | @Aspect |
| | | @Component |
| | | public class LogAspect |
| | | { |
| | | public class LogAspect { |
| | | private static final Logger log = LoggerFactory.getLogger(LogAspect.class); |
| | | |
| | | /** 排除敏感属性字段 */ |
| | | /** |
| | | * 排除敏感属性字段 |
| | | */ |
| | | public static final String[] EXCLUDE_PROPERTIES = { "password", "oldPassword", "newPassword", "confirmPassword" }; |
| | | |
| | | /** 计算操作消耗时间 */ |
| | | /** |
| | | * 计算操作消耗时间 |
| | | */ |
| | | private static final ThreadLocal<Long> TIME_THREADLOCAL = new NamedThreadLocal<Long>("Cost Time"); |
| | | |
| | | @Autowired |
| | |
| | | * 处理请求前执行 |
| | | */ |
| | | @Before(value = "@annotation(controllerLog)") |
| | | public void boBefore(JoinPoint joinPoint, Log controllerLog) |
| | | { |
| | | public void boBefore(JoinPoint joinPoint, Log controllerLog) { |
| | | TIME_THREADLOCAL.set(System.currentTimeMillis()); |
| | | } |
| | | |
| | |
| | | * @param joinPoint 切点 |
| | | */ |
| | | @AfterReturning(pointcut = "@annotation(controllerLog)", returning = "jsonResult") |
| | | public void doAfterReturning(JoinPoint joinPoint, Log controllerLog, Object jsonResult) |
| | | { |
| | | public void doAfterReturning(JoinPoint joinPoint, Log controllerLog, Object jsonResult) { |
| | | handleLog(joinPoint, controllerLog, null, jsonResult); |
| | | } |
| | | |
| | |
| | | * @param e 异常 |
| | | */ |
| | | @AfterThrowing(value = "@annotation(controllerLog)", throwing = "e") |
| | | public void doAfterThrowing(JoinPoint joinPoint, Log controllerLog, Exception e) |
| | | { |
| | | public void doAfterThrowing(JoinPoint joinPoint, Log controllerLog, Exception e) { |
| | | handleLog(joinPoint, controllerLog, e, null); |
| | | } |
| | | |
| | | protected void handleLog(final JoinPoint joinPoint, Log controllerLog, final Exception e, Object jsonResult) |
| | | { |
| | | try |
| | | { |
| | | protected void handleLog(final JoinPoint joinPoint, Log controllerLog, final Exception e, Object jsonResult) { |
| | | try { |
| | | // *========数据库日志=========*// |
| | | SysOperLog operLog = new SysOperLog(); |
| | | operLog.setStatus(BusinessStatus.SUCCESS.ordinal()); |
| | |
| | | operLog.setOperIp(ip); |
| | | operLog.setOperUrl(StringUtils.substring(ServletUtils.getRequest().getRequestURI(), 0, 255)); |
| | | String username = SecurityUtils.getUsername(); |
| | | if (StringUtils.isNotBlank(username)) |
| | | { |
| | | if (StringUtils.isNotBlank(username)) { |
| | | operLog.setOperName(username); |
| | | } |
| | | |
| | | if (e != null) |
| | | { |
| | | if (e != null) { |
| | | operLog.setStatus(BusinessStatus.FAIL.ordinal()); |
| | | operLog.setErrorMsg(StringUtils.substring(e.getMessage(), 0, 2000)); |
| | | } |
| | |
| | | operLog.setCostTime(System.currentTimeMillis() - TIME_THREADLOCAL.get()); |
| | | // 保存数据库 |
| | | asyncLogService.saveSysLog(operLog); |
| | | } |
| | | catch (Exception exp) |
| | | { |
| | | } catch (Exception exp) { |
| | | // 记录本地异常日志 |
| | | log.error("异常信息:{}", exp.getMessage()); |
| | | exp.printStackTrace(); |
| | | } |
| | | finally |
| | | { |
| | | } finally { |
| | | TIME_THREADLOCAL.remove(); |
| | | } |
| | | } |
| | |
| | | * @param operLog 操作日志 |
| | | * @throws Exception |
| | | */ |
| | | public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperLog operLog, Object jsonResult) throws Exception |
| | | { |
| | | public void getControllerMethodDescription(JoinPoint joinPoint, Log log, SysOperLog operLog, Object jsonResult) throws Exception { |
| | | // 设置action动作 |
| | | operLog.setBusinessType(log.businessType().ordinal()); |
| | | // 设置标题 |
| | |
| | | // 设置操作人类别 |
| | | operLog.setOperatorType(log.operatorType().ordinal()); |
| | | // 是否需要保存request,参数和值 |
| | | if (log.isSaveRequestData()) |
| | | { |
| | | if (log.isSaveRequestData()) { |
| | | // 获取参数的信息,传入到数据库中。 |
| | | setRequestValue(joinPoint, operLog, log.excludeParamNames()); |
| | | } |
| | | // 是否需要保存response,参数和值 |
| | | if (log.isSaveResponseData() && StringUtils.isNotNull(jsonResult)) |
| | | { |
| | | if (log.isSaveResponseData() && StringUtils.isNotNull(jsonResult)) { |
| | | operLog.setJsonResult(StringUtils.substring(JSON.toJSONString(jsonResult), 0, 2000)); |
| | | } |
| | | } |
| | |
| | | * @param operLog 操作日志 |
| | | * @throws Exception 异常 |
| | | */ |
| | | private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog, String[] excludeParamNames) throws Exception |
| | | { |
| | | private void setRequestValue(JoinPoint joinPoint, SysOperLog operLog, String[] excludeParamNames) throws Exception { |
| | | String requestMethod = operLog.getRequestMethod(); |
| | | Map<?, ?> paramsMap = ServletUtils.getParamMap(ServletUtils.getRequest()); |
| | | if (StringUtils.isEmpty(paramsMap) |
| | | && (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))) |
| | | { |
| | | && (HttpMethod.PUT.name().equals(requestMethod) || HttpMethod.POST.name().equals(requestMethod))) { |
| | | String params = argsArrayToString(joinPoint.getArgs(), excludeParamNames); |
| | | operLog.setOperParam(StringUtils.substring(params, 0, 2000)); |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | operLog.setOperParam(StringUtils.substring(JSON.toJSONString(paramsMap, excludePropertyPreFilter(excludeParamNames)), 0, 2000)); |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 参数拼装 |
| | | */ |
| | | private String argsArrayToString(Object[] paramsArray, String[] excludeParamNames) |
| | | { |
| | | private String argsArrayToString(Object[] paramsArray, String[] excludeParamNames) { |
| | | String params = ""; |
| | | if (paramsArray != null && paramsArray.length > 0) |
| | | { |
| | | for (Object o : paramsArray) |
| | | { |
| | | if (StringUtils.isNotNull(o) && !isFilterObject(o)) |
| | | { |
| | | try |
| | | { |
| | | if (paramsArray != null && paramsArray.length > 0) { |
| | | for (Object o : paramsArray) { |
| | | if (StringUtils.isNotNull(o) && !isFilterObject(o)) { |
| | | try { |
| | | String jsonObj = JSON.toJSONString(o, excludePropertyPreFilter(excludeParamNames)); |
| | | params += jsonObj.toString() + " "; |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | } catch (Exception e) { |
| | | } |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 忽略敏感属性 |
| | | */ |
| | | public PropertyPreExcludeFilter excludePropertyPreFilter(String[] excludeParamNames) |
| | | { |
| | | public PropertyPreExcludeFilter excludePropertyPreFilter(String[] excludeParamNames) { |
| | | return new PropertyPreExcludeFilter().addExcludes(ArrayUtils.addAll(EXCLUDE_PROPERTIES, excludeParamNames)); |
| | | } |
| | | |
| | |
| | | * @return 如果是需要过滤的对象,则返回true;否则返回false。 |
| | | */ |
| | | @SuppressWarnings("rawtypes") |
| | | public boolean isFilterObject(final Object o) |
| | | { |
| | | public boolean isFilterObject(final Object o) { |
| | | Class<?> clazz = o.getClass(); |
| | | if (clazz.isArray()) |
| | | { |
| | | if (clazz.isArray()) { |
| | | return clazz.getComponentType().isAssignableFrom(MultipartFile.class); |
| | | } |
| | | else if (Collection.class.isAssignableFrom(clazz)) |
| | | { |
| | | } else if (Collection.class.isAssignableFrom(clazz)) { |
| | | Collection collection = (Collection) o; |
| | | for (Object value : collection) |
| | | { |
| | | for (Object value : collection) { |
| | | return value instanceof MultipartFile; |
| | | } |
| | | } |
| | | else if (Map.class.isAssignableFrom(clazz)) |
| | | { |
| | | } else if (Map.class.isAssignableFrom(clazz)) { |
| | | Map map = (Map) o; |
| | | for (Object value : map.entrySet()) |
| | | { |
| | | for (Object value : map.entrySet()) { |
| | | Map.Entry entry = (Map.Entry) value; |
| | | return entry.getValue() instanceof MultipartFile; |
| | | } |
| | |
| | | public class GlobalExceptionHandler { |
| | | private static final Logger log = LoggerFactory.getLogger(GlobalExceptionHandler.class); |
| | | |
| | | @Value("${spring.servlet.multipart.max-file-size:10MB}") |
| | | @Value("${spring.servlet.multipart.max-file-size:50MB}") |
| | | private String maxFileSize; |
| | | @Value("${spring.servlet.multipart.max-request-size:100MB}") |
| | | private String maxRequestSize; |
| | |
| | | public AjaxResult handleRuntimeException(RuntimeException e, HttpServletRequest request) { |
| | | String requestURI = request.getRequestURI(); |
| | | log.error("请求地址'{}',发生未知异常.", requestURI, e); |
| | | throw new RuntimeException(e.getMessage()); |
| | | return AjaxResult.error(e.getMessage()); |
| | | } |
| | | |
| | | /** |
| | |
| | | import org.springframework.context.annotation.Primary; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.ruoyi.file.utils.FileUploadUtils; |
| | | import com.ruoyi.common.core.utils.FileUploadUtils; |
| | | |
| | | /** |
| | | * 本地文件存储 |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import com.alibaba.nacos.common.utils.IoUtils; |
| | | import com.ruoyi.file.config.MinioConfig; |
| | | import com.ruoyi.file.utils.FileUploadUtils; |
| | | import com.ruoyi.common.core.utils.FileUploadUtils; |
| | | import io.minio.MinioClient; |
| | | import io.minio.PutObjectArgs; |
| | | |
| | |
| | | @PostMapping("/addSysUser") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addSysUser(@RequestBody SysUser user) { |
| | | System.err.println("事务ID:" + RootContext.getXID()); |
| | | if(StringUtils.isEmpty(user.getUserName())){ |
| | | user.setUserName(user.getPhonenumber()); |
| | | } |
| | |
| | | return; |
| | | } |
| | | } |
| | | filterChain.doFilter(request, response); |
| | | filterChain.doFilter(servletRequest, servletResponse); |
| | | } |
| | | |
| | | |
| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | |
| | | private String title; |
| | | @ApiModelProperty(value = "状态(0=正常,1=异常)") |
| | | private Integer status; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "操作开始时间", notes = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime startTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @ApiModelProperty(value = "操作结束时间", notes = "yyyy-MM-dd HH:mm:ss") |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDateTime endTime; |
| | | |
| | | } |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Service |
| | | public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService |
| | | { |
| | | public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> implements ISysRoleService { |
| | | @Autowired |
| | | private SysRoleMapper roleMapper; |
| | | |
| | |
| | | */ |
| | | @Override |
| | | @DataScope(deptAlias = "d") |
| | | public List<SysRole> selectRoleList(SysRole role) |
| | | { |
| | | public List<SysRole> selectRoleList(SysRole role) { |
| | | return roleMapper.selectRoleList(role); |
| | | } |
| | | |
| | |
| | | * @return 角色列表 |
| | | */ |
| | | @Override |
| | | public List<SysRole> selectRolesByUserId(Long userId) |
| | | { |
| | | public List<SysRole> selectRolesByUserId(Long userId) { |
| | | List<SysRole> userRoles = roleMapper.selectRolePermissionByUserId(userId); |
| | | List<SysRole> roles = selectRoleAll(); |
| | | for (SysRole role : roles) |
| | | { |
| | | for (SysRole userRole : userRoles) |
| | | { |
| | | if (role.getRoleId().longValue() == userRole.getRoleId().longValue()) |
| | | { |
| | | for (SysRole role : roles) { |
| | | for (SysRole userRole : userRoles) { |
| | | if (role.getRoleId().longValue() == userRole.getRoleId().longValue()) { |
| | | role.setFlag(true); |
| | | break; |
| | | } |
| | |
| | | * @return 权限列表 |
| | | */ |
| | | @Override |
| | | public Set<String> selectRolePermissionByUserId(Long userId) |
| | | { |
| | | public Set<String> selectRolePermissionByUserId(Long userId) { |
| | | List<SysRole> perms = roleMapper.selectRolePermissionByUserId(userId); |
| | | Set<String> permsSet = new HashSet<>(); |
| | | for (SysRole perm : perms) |
| | | { |
| | | if (StringUtils.isNotNull(perm)) |
| | | { |
| | | for (SysRole perm : perms) { |
| | | if (StringUtils.isNotNull(perm)) { |
| | | permsSet.addAll(Arrays.asList(perm.getRoleKey().trim().split(","))); |
| | | } |
| | | } |
| | |
| | | * @return 角色列表 |
| | | */ |
| | | @Override |
| | | public List<SysRole> selectRoleAll() |
| | | { |
| | | public List<SysRole> selectRoleAll() { |
| | | return SpringUtils.getAopProxy(this).selectRoleList(new SysRole()); |
| | | } |
| | | |
| | |
| | | * @return 选中角色ID列表 |
| | | */ |
| | | @Override |
| | | public List<Long> selectRoleListByUserId(Long userId) |
| | | { |
| | | public List<Long> selectRoleListByUserId(Long userId) { |
| | | return roleMapper.selectRoleListByUserId(userId); |
| | | } |
| | | |
| | |
| | | * @return 角色对象信息 |
| | | */ |
| | | @Override |
| | | public SysRole selectRoleById(Long roleId) |
| | | { |
| | | public SysRole selectRoleById(Long roleId) { |
| | | return roleMapper.selectRoleById(roleId); |
| | | } |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public boolean checkRoleNameUnique(SysRole role) |
| | | { |
| | | public boolean checkRoleNameUnique(SysRole role) { |
| | | Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId(); |
| | | SysRole info = roleMapper.checkRoleNameUnique(role.getRoleName()); |
| | | if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) |
| | | { |
| | | if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) { |
| | | return UserConstants.NOT_UNIQUE; |
| | | } |
| | | return UserConstants.UNIQUE; |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public boolean checkRoleKeyUnique(SysRole role) |
| | | { |
| | | public boolean checkRoleKeyUnique(SysRole role) { |
| | | Long roleId = StringUtils.isNull(role.getRoleId()) ? -1L : role.getRoleId(); |
| | | SysRole info = roleMapper.checkRoleKeyUnique(role.getRoleKey()); |
| | | if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) |
| | | { |
| | | if (StringUtils.isNotNull(info) && info.getRoleId().longValue() != roleId.longValue()) { |
| | | return UserConstants.NOT_UNIQUE; |
| | | } |
| | | return UserConstants.UNIQUE; |
| | |
| | | * @param role 角色信息 |
| | | */ |
| | | @Override |
| | | public void checkRoleAllowed(SysRole role) |
| | | { |
| | | if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin()) |
| | | { |
| | | public void checkRoleAllowed(SysRole role) { |
| | | if (StringUtils.isNotNull(role.getRoleId()) && role.isAdmin()) { |
| | | throw new ServiceException("不允许操作超级管理员角色"); |
| | | } |
| | | } |
| | |
| | | * @param roleId 角色id |
| | | */ |
| | | @Override |
| | | public void checkRoleDataScope(Long roleId) |
| | | { |
| | | if (!SysUser.isAdmin(SecurityUtils.getUserId())) |
| | | { |
| | | public void checkRoleDataScope(Long roleId) { |
| | | if (!SysUser.isAdmin(SecurityUtils.getUserId())) { |
| | | SysRole role = new SysRole(); |
| | | role.setRoleId(roleId); |
| | | List<SysRole> roles = SpringUtils.getAopProxy(this).selectRoleList(role); |
| | | if (StringUtils.isEmpty(roles)) |
| | | { |
| | | if (StringUtils.isEmpty(roles)) { |
| | | throw new ServiceException("没有权限访问角色数据!"); |
| | | } |
| | | } |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int countUserRoleByRoleId(Long roleId) |
| | | { |
| | | public int countUserRoleByRoleId(Long roleId) { |
| | | return userRoleMapper.countUserRoleByRoleId(roleId); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int insertRole(SysRole role) |
| | | { |
| | | public int insertRole(SysRole role) { |
| | | // 新增角色信息 |
| | | roleMapper.insertRole(role); |
| | | return insertRoleMenu(role); |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int updateRole(SysRole role) |
| | | { |
| | | public int updateRole(SysRole role) { |
| | | // 修改角色信息 |
| | | // roleMapper.updateRole(role); |
| | | // 删除角色与菜单关联 |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateRoleStatus(SysRole role) |
| | | { |
| | | public int updateRoleStatus(SysRole role) { |
| | | return roleMapper.updateRole(role); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int authDataScope(SysRole role) |
| | | { |
| | | public int authDataScope(SysRole role) { |
| | | // 修改角色信息 |
| | | roleMapper.updateRole(role); |
| | | // 删除角色与部门关联 |
| | |
| | | * |
| | | * @param role 角色对象 |
| | | */ |
| | | public int insertRoleMenu(SysRole role) |
| | | { |
| | | public int insertRoleMenu(SysRole role) { |
| | | int rows = 1; |
| | | // 新增用户与角色管理 |
| | | List<SysRoleMenu> list = new ArrayList<SysRoleMenu>(); |
| | |
| | | longs.add(1203L); |
| | | } |
| | | |
| | | for (Long menuId : longs) |
| | | { |
| | | for (Long menuId : longs) { |
| | | SysRoleMenu rm = new SysRoleMenu(); |
| | | rm.setRoleId(role.getRoleId()); |
| | | rm.setMenuId(menuId); |
| | | list.add(rm); |
| | | } |
| | | if (list.size() > 0) |
| | | { |
| | | if (list.size() > 0) { |
| | | rows = roleMenuMapper.batchRoleMenu(list); |
| | | } |
| | | return rows; |
| | |
| | | * |
| | | * @param role 角色对象 |
| | | */ |
| | | public int insertRoleDept(SysRole role) |
| | | { |
| | | public int insertRoleDept(SysRole role) { |
| | | int rows = 1; |
| | | // 新增角色与部门(数据权限)管理 |
| | | List<SysRoleDept> list = new ArrayList<SysRoleDept>(); |
| | | for (Long deptId : role.getDeptIds()) |
| | | { |
| | | for (Long deptId : role.getDeptIds()) { |
| | | SysRoleDept rd = new SysRoleDept(); |
| | | rd.setRoleId(role.getRoleId()); |
| | | rd.setDeptId(deptId); |
| | | list.add(rd); |
| | | } |
| | | if (list.size() > 0) |
| | | { |
| | | if (list.size() > 0) { |
| | | rows = roleDeptMapper.batchRoleDept(list); |
| | | } |
| | | return rows; |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int deleteRoleById(Long roleId) |
| | | { |
| | | public int deleteRoleById(Long roleId) { |
| | | // 删除角色与菜单关联 |
| | | roleMenuMapper.deleteRoleMenuByRoleId(roleId); |
| | | // 删除角色与部门关联 |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int deleteRoleByIds(Long[] roleIds) { |
| | | for (Long roleId : roleIds) |
| | | { |
| | | for (Long roleId : roleIds) { |
| | | checkRoleAllowed(new SysRole(roleId)); |
| | | checkRoleDataScope(roleId); |
| | | SysRole role = selectRoleById(roleId); |
| | | if (countUserRoleByRoleId(roleId) > 0) |
| | | { |
| | | if (countUserRoleByRoleId(roleId) > 0) { |
| | | throw new ServiceException(String.format("%1$s已分配,不能删除", role.getRoleName())); |
| | | } |
| | | } |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteAuthUser(SysUserRole userRole) |
| | | { |
| | | public int deleteAuthUser(SysUserRole userRole) { |
| | | return userRoleMapper.deleteUserRoleInfo(userRole); |
| | | } |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int deleteAuthUsers(Long roleId, Long[] userIds) |
| | | { |
| | | public int deleteAuthUsers(Long roleId, Long[] userIds) { |
| | | return userRoleMapper.deleteUserRoleInfos(roleId, userIds); |
| | | } |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int insertAuthUsers(Long roleId, Long[] userIds) |
| | | { |
| | | public int insertAuthUsers(Long roleId, Long[] userIds) { |
| | | // 新增用户与角色管理 |
| | | List<SysUserRole> list = new ArrayList<SysUserRole>(); |
| | | for (Long userId : userIds) |
| | | { |
| | | for (Long userId : userIds) { |
| | | SysUserRole ur = new SysUserRole(); |
| | | ur.setUserId(userId); |
| | | ur.setRoleId(roleId); |
| | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * |
| | | * @param ids 数据id集合 |
| | | * @return |
| | | */ |
| | |
| | | * @author ruoyi |
| | | */ |
| | | @Service |
| | | public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService |
| | | { |
| | | public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> implements ISysUserService { |
| | | private static final Logger log = LoggerFactory.getLogger(SysUserServiceImpl.class); |
| | | |
| | | @Resource |
| | |
| | | private ISysRoleService sysRoleService; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据条件分页查询用户列表 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<SysUser> selectUserList(SysUser user) |
| | | { |
| | | public List<SysUser> selectUserList(SysUser user) { |
| | | return userMapper.selectUserList(user); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<SysUser> selectAllocatedList(SysUser user) |
| | | { |
| | | public List<SysUser> selectAllocatedList(SysUser user) { |
| | | return userMapper.selectAllocatedList(user); |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public List<SysUser> selectUnallocatedList(SysUser user) |
| | | { |
| | | public List<SysUser> selectUnallocatedList(SysUser user) { |
| | | return userMapper.selectUnallocatedList(user); |
| | | } |
| | | |
| | |
| | | * @return 用户对象信息 |
| | | */ |
| | | @Override |
| | | public SysUser selectUserByUserName(String userName) |
| | | { |
| | | public SysUser selectUserByUserName(String userName) { |
| | | return userMapper.selectUserByUserName(userName); |
| | | } |
| | | |
| | |
| | | * @return 用户对象信息 |
| | | */ |
| | | @Override |
| | | public SysUser selectUserById(Long userId) |
| | | { |
| | | public SysUser selectUserById(Long userId) { |
| | | return userMapper.selectUserById(userId); |
| | | } |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public String selectUserRoleGroup(String userName) |
| | | { |
| | | public String selectUserRoleGroup(String userName) { |
| | | List<SysRole> list = roleMapper.selectRolesByUserName(userName); |
| | | if (CollectionUtils.isEmpty(list)) |
| | | { |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return StringUtils.EMPTY; |
| | | } |
| | | return list.stream().map(SysRole::getRoleName).collect(Collectors.joining(",")); |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public String selectUserPostGroup(String userName) |
| | | { |
| | | public String selectUserPostGroup(String userName) { |
| | | List<SysPost> list = postMapper.selectPostsByUserName(userName); |
| | | if (CollectionUtils.isEmpty(list)) |
| | | { |
| | | if (CollectionUtils.isEmpty(list)) { |
| | | return StringUtils.EMPTY; |
| | | } |
| | | return list.stream().map(SysPost::getPostName).collect(Collectors.joining(",")); |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public boolean checkUserNameUnique(SysUser user) |
| | | { |
| | | public boolean checkUserNameUnique(SysUser user) { |
| | | Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); |
| | | SysUser info = userMapper.checkUserNameUnique(user.getUserName()); |
| | | if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) |
| | | { |
| | | if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { |
| | | return UserConstants.NOT_UNIQUE; |
| | | } |
| | | return UserConstants.UNIQUE; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean checkPhoneUnique(SysUser user) |
| | | { |
| | | public boolean checkPhoneUnique(SysUser user) { |
| | | Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); |
| | | SysUser info = userMapper.checkPhoneUnique(user.getPhonenumber()); |
| | | if (StringUtils.isNotNull(info) ) |
| | | { |
| | | if (StringUtils.isNotNull(info)) { |
| | | return UserConstants.NOT_UNIQUE; |
| | | } |
| | | return UserConstants.UNIQUE; |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean checkEmailUnique(SysUser user) |
| | | { |
| | | public boolean checkEmailUnique(SysUser user) { |
| | | Long userId = StringUtils.isNull(user.getUserId()) ? -1L : user.getUserId(); |
| | | SysUser info = userMapper.checkEmailUnique(user.getEmail()); |
| | | if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) |
| | | { |
| | | if (StringUtils.isNotNull(info) && info.getUserId().longValue() != userId.longValue()) { |
| | | return UserConstants.NOT_UNIQUE; |
| | | } |
| | | return UserConstants.UNIQUE; |
| | |
| | | * @param user 用户信息 |
| | | */ |
| | | @Override |
| | | public void checkUserAllowed(SysUser user) |
| | | { |
| | | if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) |
| | | { |
| | | public void checkUserAllowed(SysUser user) { |
| | | if (StringUtils.isNotNull(user.getUserId()) && user.isAdmin()) { |
| | | throw new ServiceException("不允许操作超级管理员用户"); |
| | | } |
| | | } |
| | |
| | | * @param userId 用户id |
| | | */ |
| | | @Override |
| | | public void checkUserDataScope(Long userId) |
| | | { |
| | | if (!SysUser.isAdmin(SecurityUtils.getUserId())) |
| | | { |
| | | public void checkUserDataScope(Long userId) { |
| | | if (!SysUser.isAdmin(SecurityUtils.getUserId())) { |
| | | SysUser user = new SysUser(); |
| | | user.setUserId(userId); |
| | | List<SysUser> users = SpringUtils.getAopProxy(this).selectUserList(user); |
| | | if (StringUtils.isEmpty(users)) |
| | | { |
| | | if (StringUtils.isEmpty(users)) { |
| | | throw new ServiceException("没有权限访问用户数据!"); |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int insertUser(SysUser user) |
| | | { |
| | | public int insertUser(SysUser user) { |
| | | // 新增用户信息 |
| | | int rows = userMapper.insertUser(user); |
| | | // // 新增用户岗位关联 |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public boolean registerUser(SysUser user) |
| | | { |
| | | public boolean registerUser(SysUser user) { |
| | | return userMapper.insertUser(user) > 0; |
| | | } |
| | | |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int updateUser(SysUser user) |
| | | { |
| | | public int updateUser(SysUser user) { |
| | | // Long userId = user.getUserId(); |
| | | // // 删除用户与角色关联 |
| | | // userRoleMapper.deleteUserRoleByUserId(userId); |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void insertUserAuth(Long userId, Long[] roleIds) |
| | | { |
| | | public void insertUserAuth(Long userId, Long[] roleIds) { |
| | | userRoleMapper.deleteUserRoleByUserId(userId); |
| | | insertUserRole(userId, roleIds); |
| | | } |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateUserStatus(SysUser user) |
| | | { |
| | | public int updateUserStatus(SysUser user) { |
| | | return userMapper.updateUser(user); |
| | | } |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int updateUserProfile(SysUser user) |
| | | { |
| | | public int updateUserProfile(SysUser user) { |
| | | return userMapper.updateUser(user); |
| | | } |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public boolean updateUserAvatar(String userName, String avatar) |
| | | { |
| | | public boolean updateUserAvatar(String userName, String avatar) { |
| | | return userMapper.updateUserAvatar(userName, avatar) > 0; |
| | | } |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int resetPwd(SysUser user) |
| | | { |
| | | public int resetPwd(SysUser user) { |
| | | return userMapper.updateUser(user); |
| | | } |
| | | |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public int resetUserPwd(String userName, String password) |
| | | { |
| | | public int resetUserPwd(String userName, String password) { |
| | | return userMapper.resetUserPwd(userName, password); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param user 用户对象 |
| | | */ |
| | | public void insertUserRole(SysUser user) |
| | | { |
| | | public void insertUserRole(SysUser user) { |
| | | this.insertUserRole(user.getUserId(), user.getRoleIds()); |
| | | } |
| | | |
| | |
| | | * |
| | | * @param user 用户对象 |
| | | */ |
| | | public void insertUserPost(SysUser user) |
| | | { |
| | | public void insertUserPost(SysUser user) { |
| | | Long[] posts = user.getPostIds(); |
| | | if (StringUtils.isNotEmpty(posts)) |
| | | { |
| | | if (StringUtils.isNotEmpty(posts)) { |
| | | // 新增用户与岗位管理 |
| | | List<SysUserPost> list = new ArrayList<SysUserPost>(); |
| | | for (Long postId : posts) |
| | | { |
| | | for (Long postId : posts) { |
| | | SysUserPost up = new SysUserPost(); |
| | | up.setUserId(user.getUserId()); |
| | | up.setPostId(postId); |
| | |
| | | * @param userId 用户ID |
| | | * @param roleIds 角色组 |
| | | */ |
| | | public void insertUserRole(Long userId, Long[] roleIds) |
| | | { |
| | | if (StringUtils.isNotEmpty(roleIds)) |
| | | { |
| | | public void insertUserRole(Long userId, Long[] roleIds) { |
| | | if (StringUtils.isNotEmpty(roleIds)) { |
| | | // 新增用户与角色管理 |
| | | List<SysUserRole> list = new ArrayList<SysUserRole>(); |
| | | for (Long roleId : roleIds) |
| | | { |
| | | for (Long roleId : roleIds) { |
| | | SysUserRole ur = new SysUserRole(); |
| | | ur.setUserId(userId); |
| | | ur.setRoleId(roleId); |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int deleteUserById(Long userId) |
| | | { |
| | | public int deleteUserById(Long userId) { |
| | | // 删除用户与角色关联 |
| | | userRoleMapper.deleteUserRoleByUserId(userId); |
| | | // 删除用户与岗位表 |
| | |
| | | */ |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public int deleteUserByIds(Long[] userIds) |
| | | { |
| | | for (Long userId : userIds) |
| | | { |
| | | public int deleteUserByIds(Long[] userIds) { |
| | | for (Long userId : userIds) { |
| | | checkUserAllowed(new SysUser(userId)); |
| | | // checkUserDataScope(userId); |
| | | } |
| | |
| | | * @return 结果 |
| | | */ |
| | | @Override |
| | | public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName) |
| | | { |
| | | if (StringUtils.isNull(userList) || userList.size() == 0) |
| | | { |
| | | public String importUser(List<SysUser> userList, Boolean isUpdateSupport, String operName) { |
| | | if (StringUtils.isNull(userList) || userList.size() == 0) { |
| | | throw new ServiceException("导入用户数据不能为空!"); |
| | | } |
| | | int successNum = 0; |
| | |
| | | StringBuilder successMsg = new StringBuilder(); |
| | | StringBuilder failureMsg = new StringBuilder(); |
| | | String password = configService.selectConfigByKey("sys.user.initPassword"); |
| | | for (SysUser user : userList) |
| | | { |
| | | try |
| | | { |
| | | for (SysUser user : userList) { |
| | | try { |
| | | // 验证是否存在这个用户 |
| | | SysUser u = userMapper.selectUserByUserName(user.getUserName()); |
| | | if (StringUtils.isNull(u)) |
| | | { |
| | | if (StringUtils.isNull(u)) { |
| | | BeanValidators.validateWithException(validator, user); |
| | | user.setPassword(SecurityUtils.encryptPassword(password)); |
| | | user.setCreateBy(operName); |
| | | userMapper.insertUser(user); |
| | | successNum++; |
| | | successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 导入成功"); |
| | | } |
| | | else if (isUpdateSupport) |
| | | { |
| | | } else if (isUpdateSupport) { |
| | | BeanValidators.validateWithException(validator, user); |
| | | checkUserAllowed(u); |
| | | checkUserDataScope(u.getUserId()); |
| | |
| | | userMapper.updateUser(user); |
| | | successNum++; |
| | | successMsg.append("<br/>" + successNum + "、账号 " + user.getUserName() + " 更新成功"); |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | failureNum++; |
| | | failureMsg.append("<br/>" + failureNum + "、账号 " + user.getUserName() + " 已存在"); |
| | | } |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | } catch (Exception e) { |
| | | failureNum++; |
| | | String msg = "<br/>" + failureNum + "、账号 " + user.getUserName() + " 导入失败:"; |
| | | failureMsg.append(msg + e.getMessage()); |
| | | log.error(msg, e); |
| | | } |
| | | } |
| | | if (failureNum > 0) |
| | | { |
| | | if (failureNum > 0) { |
| | | failureMsg.insert(0, "很抱歉,导入失败!共 " + failureNum + " 条数据格式不正确,错误如下:"); |
| | | throw new ServiceException(failureMsg.toString()); |
| | | } |
| | | else |
| | | { |
| | | } else { |
| | | successMsg.insert(0, "恭喜您,数据已全部导入成功!共 " + successNum + " 条,数据如下:"); |
| | | } |
| | | return successMsg.toString(); |
| | |
| | | <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}) |
| | |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>org.springframework</groupId> |
| | | <artifactId>spring-mock</artifactId> |
| | | <version>2.0.8</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-api-order</artifactId> |
| | | </dependency> |
New file |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.AlipayApiException; |
| | | import com.alipay.api.AlipayClient; |
| | | import com.alipay.api.DefaultAlipayClient; |
| | | import com.alipay.api.AlipayConfig; |
| | | import com.alipay.api.response.AlipayOpenAppQrcodeCreateResponse; |
| | | import com.alipay.api.request.AlipayOpenAppQrcodeCreateRequest; |
| | | import com.alipay.api.domain.AlipayOpenAppQrcodeCreateModel; |
| | | |
| | | import com.alipay.api.FileItem; |
| | | import java.util.Base64; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 生成支付宝小程序二维码 |
| | | */ |
| | | public class AlipayOpenAppQrcodeCreate { |
| | | |
| | | public static void main(String[] args) throws AlipayApiException { |
| | | // 初始化SDK |
| | | AlipayClient alipayClient = new DefaultAlipayClient(getAlipayConfig()); |
| | | // 构造请求参数以调用接口 |
| | | AlipayOpenAppQrcodeCreateRequest request = new AlipayOpenAppQrcodeCreateRequest(); |
| | | AlipayOpenAppQrcodeCreateModel model = new AlipayOpenAppQrcodeCreateModel(); |
| | | // 设置跳转小程序的页面路径 |
| | | model.setUrlParam("pages/index/index"); |
| | | // 设置小程序的启动参数 |
| | | model.setQueryParam("x=1"); |
| | | // 设置码描述 |
| | | model.setDescribe("二维码描述"); |
| | | request.setBizModel(model); |
| | | AlipayOpenAppQrcodeCreateResponse response = alipayClient.execute(request); |
| | | System.out.println(response.getBody()); |
| | | String qrCodeUrl = response.getQrCodeUrl(); |
| | | System.err.println(qrCodeUrl); |
| | | if (response.isSuccess()) { |
| | | System.out.println("调用成功"); |
| | | } else { |
| | | System.out.println("调用失败"); |
| | | } |
| | | } |
| | | |
| | | private static AlipayConfig getAlipayConfig() { |
| | | String privateKey = "MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCxWgLykkSXsj6zz5kVohKb6yAaOK8d4wnbWLrabBQSHZg+UZj9HknzQvgrSdfiMd6Dlv70OYQBRynWb2OSGaIKpWLbDKQDT+hDBcbZQ3nVTKExC7w8t/5mUc0CH4DkMsMMDcDW2synh9Lv4fmw7eNnRgd6g6csGIZyOUgt34eMcmCUBP58bEkYhuPm9rLBMw7fCRl9zZbKNAiE5j9FNL1/oAWhET6BCHRqKpiDHvKLQDZdXUwI+sA/JSolNlU+x052YBPGxjH9zqD8mpRLZRTPCb5pV5wCG+EqQkiCauyhAJSCVo2Dx3uXe4nP/6UDlQmgxyiZ+uuMtPsDFjKd7EIXAgMBAAECggEBAKXBfufAFSPCkB/2cxlo9QOM6eAYAnNocxnzABCM2uVji5sTIG3SFUOq3891oLPj8BgE1BzmdJ3NKSklymYOVwikMpSQZ+pAkM+zYnpFOmVEzZLNaQ1G2ho/cd/+GbUuTGXDpOwqawRZSaiyB3B5pgQry2mSCniII4A2UWOuez2jR7R6kXh2UL4DGDPYjDj2Gx3WfYEeuarjdbaeKU6ngdArkYqNtsbpmaR9aOUhNyo6ltOWh7pKjdjApAEtoEqqYjr1uQ4E0wfF4noiU1hR7gTG8FjvWHy1/piPWM4CihUbhJemC5xKuVKltI0zMtR+uAx609sz6gOYlZkrYAXL0uECgYEA8Gqq/Jc1w6I5FTGImnoadKr1VWXBFKdU00p6EMX6FaY9uD41+YtaOtfBeNyAUZ20UlP+t9EsUbHunaMVb64N2wYMbSwy9ibNAse/KxT3XCT659lsyFyVPtbGxALXLu6sNH7VIljJv7KRm6slBqLKSdac2qZX/LwVvjIGjNz7p8MCgYEAvNjhFEn9KE8eOCK+qGEITVoR8k26lFGG0XsjRoinkgAUeUL2R6HFscOqUT31DvvQ7lNfopM+Sksmi/c64wXjcT49iHZwqCs6FNYHvY9HS0StVckLGliUg0U7FNWX0dwZyehpYamV4Eh9O/yZN+p07zAmDohTYmdsMWyqoieJqx0CgYEA6iiKZ0CDbgrXnCvFh+e7Uryb/NQBjbM4rB6S6zlYTbO/025MNcQjWsJ/vs7M8DEwyyriIXjKuLsb1E9d9otJFXU7ry1oaVT7QmT4beaa0hV2h1C+YhvChRS9PXYizaRK90o9HpnpzhsHNN4pTuBJNEeiOFfhxNgQOVISDSrCtO8CgYBMCnRPLB/A3GLJrcvhlvi11N/HFl9bm5xSu2eP3jTDSD72OO1cGJq3IpdxESac+u69GFs45ls9pRcHYuyWP2e+0JYMXcytGoLPowMI5CmL+EJneYV7/VEHrpfEouD4As1rjKbqSVPtNKMgxWyYpFKjgVrBnUkeJZDeMehfVNZNTQKBgAfhnhQgDk61C3KmgzKJ0hCogjTUL6AdjgC5bfV1AsV9yesh0q1bgHDrlMkS2aKYSF9wNeKYCYl2/ZYhilom4Mst/uxAl/8aLwDM9Cg29KfmMakst521IXv2Jrk2MiXXJMV5wowE8kbdb4Hkzsn1km2tBnng7Jyyek2HH737Jd1R"; |
| | | String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAh+tCVKqUmlHDL8Ki1TUJtzE5IKV1irJuoHWZTvndJCKJJ8bdWxL9mu5xsy8KkfrnS6wJIKBMLTxMoYQHG7l2Gt07YyUCYHS5+yvbHtTkyFFy2KRPeUEWXz1Tm4juvInDvvr+n7v9ETepToGhC+UDlQcBvuSppw8N+463E+1GRrC4APwXYGLzaIvYvDHcQAULkWhXsjzxJSmeSi12kqWKlgnVJC1y0FT8xQtvhwShfaIqKwzErn9S2z7JjdXboJMUYQHoqF1A4SmWY8c0qawqvx2hGP36W3RDQ4cczzFwUHS1Cylhsbgh1COc4OdANCX4Np2NUzaRDCNzN0WVFKtK+QIDAQAB"; |
| | | AlipayConfig alipayConfig = new AlipayConfig(); |
| | | alipayConfig.setServerUrl("https://openapi.alipay.com/gateway.do"); |
| | | alipayConfig.setAppId("2021004173610331"); |
| | | alipayConfig.setPrivateKey(privateKey); |
| | | alipayConfig.setFormat("json"); |
| | | alipayConfig.setAlipayPublicKey(alipayPublicKey); |
| | | alipayConfig.setCharset("UTF-8"); |
| | | alipayConfig.setSignType("RSA2"); |
| | | return alipayConfig; |
| | | } |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "通过充电枪id和预付金额获取电站详情", tags = {"小程序-扫一扫"}) |
| | | @GetMapping(value = "/scan/siteInfo") |
| | | @PostMapping(value = "/scan/siteInfo") |
| | | public AjaxResult<SiteInfoVO> siteInfo(Integer id, BigDecimal money) { |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(id).getData(); |
| | | TChargingPile chargingPile = chargingPileClient.getChargingPileById(chargingGun.getChargingPileId()).getData(); |
| | | SiteInfoVO data = chargingPileClient.getSiteInfoByNumber(chargingPile.getNumber().toString()).getData(); |
| | | SiteInfoVO data = chargingPileClient.getSiteInfoByNumber1(chargingPile.getCode().toString()).getData(); |
| | | data.setChargingGunId(id); |
| | | data.setChargeMode(chargingGun.getChargeMode()); |
| | | List<TAppUserCar> cars = appUserCarService.list(new QueryWrapper<TAppUserCar>() |
| | | .eq("app_user_id",tokenService.getLoginUserApplet().getUserId()) |
| | | .orderByDesc("create_time")); |
| | | Long data1 = chargingOrderClient.getCar().getData(); |
| | | Integer data2 = otherClient.getAddCarIntegral().getData(); |
| | | data.setIntegral(data2); |
| | | if (!cars.isEmpty()){ |
| | | if (data1 == -1){ |
| | | // 没有充电订单 展示最新添加的车辆 |
| | |
| | | */ |
| | | @PostMapping("/grantCoupon") |
| | | public R grantCoupon(@RequestBody GrantCouponDto dto){ |
| | | dto.setWaysToObtain(3); |
| | | List<TAppCoupon> res = new ArrayList<>(); |
| | | TCoupon coupon = otherClient.getCouponById(dto.getCouponId()).getData(); |
| | | |
| | |
| | | break; |
| | | case 2: |
| | | // 根据市codes 查询用户ids |
| | | List<Long> collect1 = appUserService.list(new QueryWrapper<TAppUser>() |
| | | List<Long> collect1 = new ArrayList<>(); |
| | | // 根据市codes 查询用户ids |
| | | if (StringUtils.hasLength(dto.getProvinceCode())){ |
| | | List<Long> collect2 = appUserService.list(new QueryWrapper<TAppUser>() |
| | | .in("province_code", Arrays.asList(dto.getProvinceCode().split(",")))) |
| | | .stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | collect1.addAll(collect2); |
| | | } |
| | | if (StringUtils.hasLength(dto.getCityCode())){ |
| | | List<Long> collect2 = appUserService.list(new QueryWrapper<TAppUser>() |
| | | .in("city_code", Arrays.asList(dto.getCityCode().split(",")))) |
| | | .stream().map(TAppUser::getId).collect(Collectors.toList()); |
| | | collect1.addAll(collect2); |
| | | } |
| | | for (Long l : collect1) { |
| | | TAppCoupon tAppCoupon = new TAppCoupon(); |
| | | tAppCoupon.setAppUserId(l); |
| | |
| | | @DeleteMapping(value = "/unit/delete") |
| | | @Log(title = "【单位管理】删除单位", businessType = BusinessType.DELETE,operatorType = OperatorType.MANAGE) |
| | | public R add(@RequestParam String ids) { |
| | | List<TAppUser> list = appUserService.lambdaQuery().in(TAppUser::getCompanyId, Arrays.asList(ids.split(","))).list(); |
| | | if (!list.isEmpty()){ |
| | | return R.fail("当前单位已存在用户,无法删除!"); |
| | | } |
| | | String[] split = ids.split(","); |
| | | for (String s : split) { |
| | | otherClient.unitDelete(Integer.valueOf(s)); |
| | |
| | | Page<TAppUser> page = appUserService.lambdaQuery() |
| | | .like(userListQueryDto.getUserPhone() != null && !"".equals(userListQueryDto.getUserPhone()), TAppUser::getPhone, userListQueryDto.getUserPhone()) |
| | | .eq(userListQueryDto.getCompanyId() != null, TAppUser::getCompanyId, userListQueryDto.getCompanyId()) |
| | | .eq(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()) |
| | |
| | | if (userListQueryDto.getUserTagId() != null){ |
| | | userIds = appUserTagService.lambdaQuery().eq(TAppUserTag::getUserTagId, userListQueryDto.getUserTagId()).list().stream().map(TAppUserTag::getAppUserId).collect(Collectors.toList()); |
| | | } |
| | | LocalDateTime end1 = null; |
| | | LocalDateTime end2 = null ; |
| | | if (userListQueryDto.getVipEndTime1()!=null) { |
| | | end1 = LocalDateTime.now().plusDays(userListQueryDto.getVipEndTime1()); |
| | | } |
| | | if (userListQueryDto.getVipEndTime2()!=null){ |
| | | end2 = LocalDateTime.now().plusDays(userListQueryDto.getVipEndTime2()); |
| | | } |
| | | //列表查询 |
| | | Page<TAppUser> page = appUserService.lambdaQuery() |
| | | .ge(TAppUser::getVipEndTime, LocalDateTime.now()) |
| | | .like(userListQueryDto.getUserPhone() != null && !"".equals(userListQueryDto.getUserPhone()), TAppUser::getPhone, userListQueryDto.getUserPhone()) |
| | | .eq(userListQueryDto.getCompanyId() != null, TAppUser::getCompanyId, userListQueryDto.getCompanyId()) |
| | | .eq(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()) |
| | | .ge(userListQueryDto.getVipEndTime1() != null, TAppUser::getVipEndTime, userListQueryDto.getVipEndTime1() == null ? null : LocalDateTime.now().plusDays(userListQueryDto.getVipEndTime1())) |
| | | .le(userListQueryDto.getVipEndTime2() != null, TAppUser::getVipEndTime, userListQueryDto.getVipEndTime2() == null ? null : LocalDateTime.now().plusDays(userListQueryDto.getVipEndTime2())) |
| | | .ge(userListQueryDto.getVipEndTime1() != null, TAppUser::getVipEndTime, end1 ) |
| | | .le(userListQueryDto.getVipEndTime2() != null, TAppUser::getVipEndTime, end2) |
| | | .in(!userIds.isEmpty(), TAppUser::getId, userIds) |
| | | .page(Page.of(userListQueryDto.getPageCurr(), userListQueryDto.getPageSize())); |
| | | if (page.getRecords().isEmpty()){ |
| | |
| | | Page<TAppUser> page = appUserService.lambdaQuery() |
| | | .like(userListQueryDto.getUserPhone() != null && !"".equals(userListQueryDto.getUserPhone()), TAppUser::getPhone, userListQueryDto.getUserPhone()) |
| | | .eq(userListQueryDto.getCityCode() != null && !"".equals(userListQueryDto.getCityCode()), TAppUser::getCityCode, userListQueryDto.getCityCode()) |
| | | .eq(userListQueryDto.getProvinceCode() != null && !"".equals(userListQueryDto.getProvinceCode()), TAppUser::getProvinceCode, userListQueryDto.getProvinceCode()) |
| | | .in(!userIds.isEmpty(),TAppUser::getId,userIds) |
| | | .eq(TAppUser::getStatus,1) |
| | | .page(Page.of(userListQueryDto.getPageCurr(), userListQueryDto.getPageSize())); |
| | |
| | | } |
| | | } |
| | | |
| | | }else { |
| | | List<TAppUser> list = appUserService.lambdaQuery().eq(TAppUser::getPhone, tAppUser.getPhone()).list(); |
| | | if (!list.isEmpty()){ |
| | | return R.fail("该手机号已注册"); |
| | | } |
| | | } |
| | | appUserService.saveOrUpdate(tAppUser); |
| | | return R.ok(); |
| | |
| | | @GetMapping(value = "/user/detail/{id}") |
| | | public R<UserDetailDto> userDetail(@PathVariable Long id) { |
| | | TAppUser user = appUserService.getById(id); |
| | | UserDetailDto userDetailDto = new UserDetailDto(); |
| | | BeanUtils.copyProperties(user,userDetailDto); |
| | | if (user.getVipId()!=null) { |
| | | R<Map<Integer, String>> vipMap = otherClient.getVipMap(Arrays.asList(user.getVipId())); |
| | | R<Map<Integer, String>> vipMap = otherClient.getVipMap(Collections.singletonList(user.getVipId())); |
| | | if (user.getVipEndTime()!=null&&user.getVipEndTime().isAfter(LocalDateTime.now())) { |
| | | //匹配vipMap的值 |
| | | user.setVipName(vipMap.getData().get(user.getVipId())); |
| | | } |
| | | |
| | | |
| | | UserDetailDto userDetailDto = new UserDetailDto(); |
| | | BeanUtils.copyProperties(user,userDetailDto); |
| | | |
| | | //获取累计充电数量 |
| | | R<Long> useOrderCount = chargingOrderClient.useOrderCount(user.getId()); |
| | | userDetailDto.setOrderCount(useOrderCount.getData()); |
| | |
| | | userDetailDto.setTagName(tagMap.getData().values() |
| | | .stream() |
| | | .collect(Collectors.joining(","))); |
| | | |
| | | |
| | | |
| | | return R.ok(userDetailDto); |
| | | } |
| | | |
| | |
| | | Long count = signService.lambdaQuery().eq(TAppUserSign::getAppUserId,userId).eq(TAppUserSign::getSignDay, LocalDate.now()).count(); |
| | | appUserInfoDto.setIsSign(count>0?1:0); |
| | | //获取当前拥有的优惠卷数量 |
| | | Long coupons = appCouponService.lambdaQuery().eq(TAppCoupon::getAppUserId, userId).eq(TAppCoupon::getStatus, 1).count(); |
| | | Long coupons = appCouponService.lambdaQuery().eq(TAppCoupon::getAppUserId, userId).ge(TAppCoupon::getEndTime, LocalDateTime.now()).eq(TAppCoupon::getStatus, 1).count(); |
| | | appUserInfoDto.setCouponNum(Math.toIntExact(coupons)); |
| | | //当前绑定的车辆 |
| | | List<TAppUserCar> list = carService.lambdaQuery().eq(TAppUserCar::getAppUserId, userId).list(); |
| | |
| | | plusDay = 12; |
| | | } |
| | | //增加vipDetail |
| | | giveVipUtil.sendVip(nowUser, giveVipDto.getVipId(),plusDay); |
| | | giveVipUtil.sendVip(nowUser, giveVipDto.getVipId(),plusDay,giveVipDto.getType()); |
| | | appUserService.updateById(nowUser); |
| | | } |
| | | return R.ok(); |
| | |
| | | signService.updateById(appUserSign); |
| | | } |
| | | } |
| | | pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+points,1,userId,"每日签到","JF"); |
| | | pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+points,1,userId,"每日签到","JF",""); |
| | | byId.setPoints(byId.getPoints()+points); |
| | | appUserService.updateById(byId); |
| | | return R.ok(); |
| | |
| | | |
| | | |
| | | //积分变化记录用 |
| | | @PostMapping(value = "/user/points/change") |
| | | public R change(@RequestBody PointChangeDto points) { |
| | | TAppUser byId = appUserService.getById(points.getUserId()); |
| | | pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+points.getPoints(),points.getType(),points.getUserId(),points.getRemark(),"JF"); |
| | | byId.setPoints(byId.getPoints()+points.getPoints()); |
| | | appUserService.updateById(byId); |
| | | return R.ok(); |
| | | } |
| | | // @PostMapping(value = "/user/points/change") |
| | | // public R change(@RequestBody PointChangeDto points) { |
| | | // TAppUser byId = appUserService.getById(points.getUserId()); |
| | | // pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+points.getPoints(),points.getType(),points.getUserId(),points.getRemark(),"JF"); |
| | | // byId.setPoints(byId.getPoints()+points.getPoints()); |
| | | // appUserService.updateById(byId); |
| | | // return R.ok(); |
| | | // } |
| | | |
| | | @PostMapping(value = "/user/points/change/down") |
| | | public R changeDown(@RequestBody PointChangeDto points) { |
| | | TAppUser byId = appUserService.getById(points.getUserId()); |
| | | pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()-points.getPoints(),points.getType(),points.getUserId(),points.getRemark(),"JF"); |
| | | pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()-points.getPoints(),points.getType(),points.getUserId(),points.getRemark(),"JF",points.getCode()); |
| | | byId.setPoints(byId.getPoints()-points.getPoints()); |
| | | appUserService.updateById(byId); |
| | | return R.ok(); |
| | |
| | | } |
| | | |
| | | //增加积分记录 |
| | | pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+point,5,userId,appUserCar.getLicensePlate(),""); |
| | | 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); |
| | |
| | | |
| | | return R.ok(jsonObject.getJSONObject("data")); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @PostMapping(value = "/user/editAppUserInfo") |
| | | @ApiOperation(value = "修改个人信息", tags = {"小程序-个人中心"}) |
| | | public AjaxResult editAppUserInfo(@RequestBody TAppUser appUser){ |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | appUser.setId(userId); |
| | | appUserService.updateById(appUser); |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.log.annotation.Log; |
| | | import com.ruoyi.common.log.enums.BusinessType; |
| | |
| | | public R delete(String ids) { |
| | | //拿到单位列表 |
| | | String[] split = ids.split(","); |
| | | |
| | | List<TAppUserTag> list = appUserTagService.lambdaQuery().in(TAppUserTag::getUserTagId).list(); |
| | | if (!list.isEmpty()){ |
| | | return R.fail("当前标签已有用户获取,无法删除"); |
| | | } |
| | | for (String id : split) { |
| | | otherClient.deleteTag(Integer.valueOf(id)); |
| | | } |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取用户标签关系 |
| | | * @param appUserTag |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/tags/getUserTag") |
| | | public R<TAppUserTag> getUserTag(@RequestBody TAppUserTag appUserTag){ |
| | | TAppUserTag one = appUserTagService.getOne(new LambdaQueryWrapper<TAppUserTag>().eq(TAppUserTag::getAppUserId, appUserTag.getAppUserId()) |
| | | .eq(TAppUserTag::getUserTagId, appUserTag.getUserTagId())); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 保存用户标签关系数据 |
| | | * @param appUserTag |
| | | */ |
| | | @PostMapping(value = "/tags/addUserTag") |
| | | public void addUserTag(@RequestBody TAppUserTag appUserTag){ |
| | | appUserTagService.save(appUserTag); |
| | | } |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "生效会员列表", tags = {"小程序-个人中心"}) |
| | | public R<List<TAppUserVipDetail>> getVipUseDetail(){ |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | List<TAppUserVipDetail> list = appUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, userId).last(" and now() between start_time and end_time order by start_time desc").list(); |
| | | List<TAppUserVipDetail> list = appUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, userId).last(" and now() between start_time and end_time order by start_time asc").list(); |
| | | |
| | | for (TAppUserVipDetail tAppUserVipDetail : list) { |
| | | if(null != tAppUserVipDetail.getVipId()){ |
| | |
| | | @ApiOperation(value = "获取开票抬头数据列表", tags = {"小程序-充电发票"}) |
| | | public AjaxResult<List<InvoiceInformationVo>> getInvoiceInformationList(){ |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | List<TInvoiceInformation> list = invoiceInformationService.list(new LambdaQueryWrapper<TInvoiceInformation>().eq(TInvoiceInformation::getAppUserId, userId).eq(TInvoiceInformation::getDelFlag, 0)); |
| | | List<TInvoiceInformation> list = invoiceInformationService.list(new LambdaQueryWrapper<TInvoiceInformation>() |
| | | .eq(TInvoiceInformation::getAppUserId, userId).eq(TInvoiceInformation::getDelFlag, 0).orderByDesc(TInvoiceInformation::getIsDefault)); |
| | | List<InvoiceInformationVo> lists = new ArrayList<>(); |
| | | for (TInvoiceInformation tInvoiceInformation : list) { |
| | | InvoiceInformationVo vo = new InvoiceInformationVo(); |
| | |
| | | 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())){ |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alipay.api.internal.util.codec.Base64; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | |
| | | import com.ruoyi.account.wx.tools.WxAppletTools; |
| | | import com.ruoyi.account.wx.tools.WxUtils; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.FileUploadUtils; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | |
| | | import io.swagger.annotations.ApiParam; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.mock.web.MockMultipartFile; |
| | | import org.springframework.util.LinkedMultiValueMap; |
| | | import org.springframework.util.MultiValueMap; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.client.RestTemplate; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.security.SecureRandom; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | | * 微信小程序登录 前端控制器 |
| | |
| | | private WeixinProperties wxConfig; |
| | | @Autowired |
| | | private RestTemplate wxRestTemplate; |
| | | /** |
| | | * 上传文件存储在本地的根路径 |
| | | */ |
| | | @Value("${file.path}") |
| | | private String localFilePath; |
| | | @ApiOperation(value = "通过code获得openid,获取用户信息",tags = {"微信小程序登录"}) |
| | | @PostMapping("/openIdByJsCode") |
| | | public AjaxResult<Map<String, Object>> openIdByJsCode(@RequestBody AppletUserEncrypteData data) { |
| | |
| | | public AjaxResult<Map<String, Object>> openIdByJsCode(@RequestBody AppletUserDecodeData appletUserDecodeData) { |
| | | return AjaxResult.success(appUserService.wxLogin(appletUserDecodeData, null)); |
| | | } |
| | | public static MultipartFile convertInputStreamToMultipartFile(InputStream inputStream, String fileName, String contentType) throws IOException { |
| | | return new MockMultipartFile(fileName, fileName, contentType, inputStream); |
| | | } |
| | | @ApiOperation(value = "获取微信小程序二维码",tags = {"获取微信小程序二维码"}) |
| | | @PostMapping("/getQRCode") |
| | | public AjaxResult getQRCode() { |
| | | InputStream inputStream = null; |
| | | OutputStream outputStream = null; |
| | | WxAppletTools appletTools = new WxAppletTools(wxRestTemplate, wxConfig); |
| | | String accessToken = appletTools.getAccessToken(""); |
| | | try { |
| | | String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token=" + accessToken; |
| | | Map<String, Object> param = new HashMap<>(); |
| | | // param.put("page", "pageA/houseDetail"); |
| | | param.put("check_path", false); |
| | | param.put("env_version", "trial"); |
| | | param.put("width", 200); //二维码尺寸 |
| | | param.put("is_hyaline", true); // 是否需要透明底色, is_hyaline 为true时,生成透明底色的小程序码 参数仅对小程序码生效 |
| | | param.put("auto_color", true); // 自动配置线条颜色,如果颜色依然是黑色,则说明不建议配置主色调 参数仅对小程序码生效 |
| | | Map<String, Object> line_color = new HashMap<>(); |
| | | line_color.put("r", 0); |
| | | line_color.put("g", 0); |
| | | line_color.put("b", 0); |
| | | param.put("line_color", line_color); |
| | | System.err.println("调用生成微信URL接口传参:" + param); |
| | | MultiValueMap<String, String> headers = new LinkedMultiValueMap<>(); |
| | | HttpEntity requestEntity = new HttpEntity(param, headers); |
| | | ResponseEntity<byte[]> entity = wxRestTemplate.exchange(url, HttpMethod.POST, requestEntity, byte[].class, new Object[0]); |
| | | System.err.println("调用小程序生成微信永久小程序码URL接口返回结果:" + entity.getBody()); |
| | | byte[] result = entity.getBody(); |
| | | System.err.println(Base64.encodeBase64String(result)); |
| | | inputStream = new ByteArrayInputStream(result); |
| | | String finalFileName = System.currentTimeMillis() + "" + new SecureRandom().nextInt(0x0400) + ".jpeg"; |
| | | MultipartFile multipartFile = convertInputStreamToMultipartFile(inputStream, finalFileName, "image/jpeg"); |
| | | String name = FileUploadUtils.upload(localFilePath, multipartFile); |
| | | System.err.println(name); |
| | | return AjaxResult.success(name); |
| | | } catch (Exception e) { |
| | | System.err.println("调用小程序生成微信永久小程序码URL接口异常" + e); |
| | | } finally { |
| | | if (inputStream != null) { |
| | | try { |
| | | inputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | if (outputStream != null) { |
| | | try { |
| | | outputStream.close(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | @Override |
| | | public void init(FilterConfig filterConfig) throws ServletException { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void doFilter(ServletRequest servletRequest, ServletResponse servletResponse, FilterChain filterChain) throws IOException, ServletException { |
| | | HttpServletRequest request = (HttpServletRequest) servletRequest; |
| | | HttpServletResponse response = (HttpServletResponse) servletResponse; |
| | |
| | | filterChain.doFilter(request, response); |
| | | } |
| | | |
| | | @Override |
| | | public void destroy() { |
| | | |
| | | } |
| | | |
| | | |
| | | private void unauthorizedResponse(HttpServletResponse response, String msg) { |
| | |
| | | if(collect.isEmpty()){ |
| | | collect.add(-1L); |
| | | } |
| | | wrapper.in("id",collect); |
| | | wrapper.in("app_user_id",collect); |
| | | } |
| | | if (dto.getStatus()!=null){ |
| | | wrapper.eq("status",dto.getStatus()); |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | |
| | |
| | | |
| | | @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) |
| | |
| | | private String pcode; |
| | | private String province; |
| | | private String city; |
| | | private String code; |
| | | private String Hp; |
| | | private String AreaCode; |
| | | } |
| | |
| | | public class CarUtil { |
| | | |
| | | public static CarNumDto carNum(String num) { |
| | | String jsonStr = "{\"date\":[\n" + |
| | | String jsonStr ="{\n" + |
| | | " \"codeInfo\": [\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀A\",\n" + |
| | | " \"Hp\": \"冀A\",\n" + |
| | | "\"city\":\"石家庄\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀B\",\n" + |
| | | " \"Hp\": \"冀B\",\n" + |
| | | "\"city\":\"唐山\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀C\",\n" + |
| | | " \"Hp\": \"冀C\",\n" + |
| | | "\"city\":\"秦皇岛\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀D\",\n" + |
| | | " \"Hp\": \"冀D\",\n" + |
| | | "\"city\":\"邯郸\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130421\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀E\",\n" + |
| | | " \"Hp\": \"冀E\",\n" + |
| | | "\"city\":\"邢台\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130521\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀F\",\n" + |
| | | " \"Hp\": \"冀F\",\n" + |
| | | "\"city\":\"保定\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀G\",\n" + |
| | | " \"Hp\": \"冀G\",\n" + |
| | | "\"city\":\"张家口\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀H\",\n" + |
| | | " \"Hp\": \"冀H\",\n" + |
| | | "\"city\":\"承德\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130821\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀J\",\n" + |
| | | " \"Hp\": \"冀J\",\n" + |
| | | "\"city\":\"沧州\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀R\",\n" + |
| | | " \"Hp\": \"冀R\",\n" + |
| | | "\"city\":\"廊坊\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"131000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀S\",\n" + |
| | | " \"Hp\": \"冀S\",\n" + |
| | | "\"city\":\"沧州\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"130900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"冀T\",\n" + |
| | | " \"Hp\": \"冀T\",\n" + |
| | | "\"city\":\"衡水\",\n" + |
| | | "\"province\":\"河北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"131100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽A\",\n" + |
| | | " \"Hp\": \"辽A\",\n" + |
| | | "\"city\":\"沈阳\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"210100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽B\",\n" + |
| | | " \"Hp\": \"辽B\",\n" + |
| | | "\"city\":\"大连\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"231182\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽C\",\n" + |
| | | " \"Hp\": \"辽C\",\n" + |
| | | "\"city\":\"鞍山\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"340500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽D\",\n" + |
| | | " \"Hp\": \"辽D\",\n" + |
| | | "\"city\":\"抚顺\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"210421\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽E\",\n" + |
| | | " \"Hp\": \"辽E\",\n" + |
| | | "\"city\":\"本溪\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"210521\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽F\",\n" + |
| | | " \"Hp\": \"辽F\",\n" + |
| | | "\"city\":\"丹东\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"210600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽G\",\n" + |
| | | " \"Hp\": \"辽G\",\n" + |
| | | "\"city\":\"锦州\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"210700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽H\",\n" + |
| | | " \"Hp\": \"辽H\",\n" + |
| | | "\"city\":\"营口\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"210800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽J\",\n" + |
| | | " \"Hp\": \"辽J\",\n" + |
| | | "\"city\":\"阜新\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"210921\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽K\",\n" + |
| | | " \"Hp\": \"辽K\",\n" + |
| | | "\"city\":\"辽阳\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"211021\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽L\",\n" + |
| | | " \"Hp\": \"辽L\",\n" + |
| | | "\"city\":\"盘锦\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"211100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽M\",\n" + |
| | | " \"Hp\": \"辽M\",\n" + |
| | | "\"city\":\"铁岭\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"211221\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽N\",\n" + |
| | | " \"Hp\": \"辽N\",\n" + |
| | | "\"city\":\"朝阳\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"220104\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"辽p\",\n" + |
| | | " \"Hp\": \"辽P\",\n" + |
| | | "\"city\":\"葫芦岛\",\n" + |
| | | "\"province\":\"辽宁\",\n" + |
| | | "\"pcode\":\"LN\"\n" + |
| | | " \"Pcode\": \"LN\",\n" + |
| | | " \"AreaCode\": \"211400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖A\",\n" + |
| | | " \"Hp\": \"皖A\",\n" + |
| | | "\"city\":\"合肥\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖B\",\n" + |
| | | " \"Hp\": \"皖B\",\n" + |
| | | "\"city\":\"芜湖\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340221\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖C\",\n" + |
| | | " \"Hp\": \"皖C\",\n" + |
| | | "\"city\":\"蚌埠\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖D\",\n" + |
| | | " \"Hp\": \"皖D\",\n" + |
| | | "\"city\":\"淮南\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖E\",\n" + |
| | | " \"Hp\": \"皖E\",\n" + |
| | | "\"city\":\"马鞍山\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖F\",\n" + |
| | | " \"Hp\": \"皖F\",\n" + |
| | | "\"city\":\"淮北\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖G\",\n" + |
| | | " \"Hp\": \"皖G\",\n" + |
| | | "\"city\":\"铜陵\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖H\",\n" + |
| | | " \"Hp\": \"皖H\",\n" + |
| | | "\"city\":\"安庆\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖J\",\n" + |
| | | " \"Hp\": \"皖J\",\n" + |
| | | "\"city\":\"黄山\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"341003\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖K\",\n" + |
| | | " \"Hp\": \"皖K\",\n" + |
| | | "\"city\":\"阜阳\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"341200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖L\",\n" + |
| | | " \"Hp\": \"皖L\",\n" + |
| | | "\"city\":\"宿州\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"341300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖M\",\n" + |
| | | " \"Hp\": \"皖M\",\n" + |
| | | "\"city\":\"滁州\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"341100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖N\",\n" + |
| | | " \"Hp\": \"皖N\",\n" + |
| | | "\"city\":\"六安\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"341500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖p\",\n" + |
| | | " \"Hp\": \"皖P\",\n" + |
| | | "\"city\":\"宣城\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"341800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖Q\",\n" + |
| | | " \"Hp\": \"皖Q\",\n" + |
| | | "\"city\":\"巢湖\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"340181\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖R\",\n" + |
| | | " \"Hp\": \"皖R\",\n" + |
| | | "\"city\":\"池州\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"341700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"皖S\",\n" + |
| | | " \"Hp\": \"皖S\",\n" + |
| | | "\"city\":\"亳州\",\n" + |
| | | "\"province\":\"安徽\",\n" + |
| | | "\"pcode\":\"AH\"\n" + |
| | | " \"Pcode\": \"AH\",\n" + |
| | | " \"AreaCode\": \"341600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏A\",\n" + |
| | | " \"Hp\": \"苏A\",\n" + |
| | | "\"city\":\"南京\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏B\",\n" + |
| | | " \"Hp\": \"苏B\",\n" + |
| | | "\"city\":\"无锡\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏C\",\n" + |
| | | " \"Hp\": \"苏C\",\n" + |
| | | "\"city\":\"徐州\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏D\",\n" + |
| | | " \"Hp\": \"苏D\",\n" + |
| | | "\"city\":\"常州\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏E\",\n" + |
| | | " \"Hp\": \"苏E\",\n" + |
| | | "\"city\":\"苏州\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏F\",\n" + |
| | | " \"Hp\": \"苏F\",\n" + |
| | | "\"city\":\"南通\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏G\",\n" + |
| | | " \"Hp\": \"苏G\",\n" + |
| | | "\"city\":\"连云港\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏H\",\n" + |
| | | " \"Hp\": \"苏H\",\n" + |
| | | "\"city\":\"淮安\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320803\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏J\",\n" + |
| | | " \"Hp\": \"苏J\",\n" + |
| | | "\"city\":\"盐城\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"320900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏K\",\n" + |
| | | " \"Hp\": \"苏K\",\n" + |
| | | "\"city\":\"扬州\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"321000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏L\",\n" + |
| | | " \"Hp\": \"苏L\",\n" + |
| | | "\"city\":\"镇江\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"321100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏M\",\n" + |
| | | " \"Hp\": \"苏M\",\n" + |
| | | "\"city\":\"泰州\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"321200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"苏N\",\n" + |
| | | " \"Hp\": \"苏N\",\n" + |
| | | "\"city\":\"宿迁\",\n" + |
| | | "\"province\":\"江苏\",\n" + |
| | | "\"pcode\":\"JS\"\n" + |
| | | " \"Pcode\": \"JS\",\n" + |
| | | " \"AreaCode\": \"321300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂A\",\n" + |
| | | " \"Hp\": \"鄂A\",\n" + |
| | | "\"city\":\"武汉\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"420100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂B\",\n" + |
| | | " \"Hp\": \"鄂B\",\n" + |
| | | "\"city\":\"黄石\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"420202\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂C\",\n" + |
| | | " \"Hp\": \"鄂C\",\n" + |
| | | "\"city\":\"十堰\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"420300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂D\",\n" + |
| | | " \"Hp\": \"鄂D\",\n" + |
| | | "\"city\":\"荆州\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"421003\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂E\",\n" + |
| | | " \"Hp\": \"鄂E\",\n" + |
| | | "\"city\":\"宜昌\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"420500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂F\",\n" + |
| | | "\"city\":\"襄樊\",\n" + |
| | | " \"Hp\": \"鄂F\",\n" + |
| | | " \"city\": \"襄阳\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"420600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂G\",\n" + |
| | | " \"Hp\": \"鄂G\",\n" + |
| | | "\"city\":\"鄂州\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"420700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂H\",\n" + |
| | | " \"Hp\": \"鄂H\",\n" + |
| | | "\"city\":\"荆门 \",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"420800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂J\",\n" + |
| | | " \"Hp\": \"鄂J\",\n" + |
| | | "\"city\":\"黄冈\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"421100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂K\",\n" + |
| | | " \"Hp\": \"鄂K\",\n" + |
| | | "\"city\":\"孝感\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"420900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂L\",\n" + |
| | | " \"Hp\": \"鄂L\",\n" + |
| | | "\"city\":\"咸宁\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"421200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂M\",\n" + |
| | | " \"Hp\": \"鄂M\",\n" + |
| | | "\"city\":\"仙桃\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"429004\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂N\",\n" + |
| | | " \"Hp\": \"鄂N\",\n" + |
| | | "\"city\":\"潜江\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"429005\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂p\",\n" + |
| | | " \"Hp\": \"鄂P\",\n" + |
| | | "\"city\":\"神农架林区\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"429021\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂Q\",\n" + |
| | | " \"Hp\": \"鄂Q\",\n" + |
| | | "\"city\":\"恩施土家族苗族自治州\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"422800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂R\",\n" + |
| | | " \"Hp\": \"鄂R\",\n" + |
| | | "\"city\":\"天门\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"429006\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鄂S\",\n" + |
| | | " \"Hp\": \"鄂S\",\n" + |
| | | "\"city\":\"随州\",\n" + |
| | | "\"province\":\"湖北\",\n" + |
| | | "\"pcode\":\"HB\"\n" + |
| | | " \"Pcode\": \"HB\",\n" + |
| | | " \"AreaCode\": \"421300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋A\",\n" + |
| | | " \"Hp\": \"晋A\",\n" + |
| | | "\"city\":\"太原\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"140100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋B\",\n" + |
| | | " \"Hp\": \"晋B\",\n" + |
| | | "\"city\":\"大同\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"230606\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋C\",\n" + |
| | | " \"Hp\": \"晋C\",\n" + |
| | | "\"city\":\"阳泉\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"140300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋D\",\n" + |
| | | " \"Hp\": \"晋D\",\n" + |
| | | "\"city\":\"长治\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"140421\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋E\",\n" + |
| | | " \"Hp\": \"晋E\",\n" + |
| | | "\"city\":\"晋城\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"140500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋F\",\n" + |
| | | " \"Hp\": \"晋F\",\n" + |
| | | "\"city\":\"朔州\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"140600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋H\",\n" + |
| | | " \"Hp\": \"晋H\",\n" + |
| | | "\"city\":\"忻州\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"140900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋J\",\n" + |
| | | "\"city\":\"吕梁地区\",\n" + |
| | | " \"Hp\": \"晋J\",\n" + |
| | | " \"city\": \"吕梁\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"141100 \"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋K\",\n" + |
| | | " \"Hp\": \"晋K\",\n" + |
| | | "\"city\":\"晋中\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"140700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋L\",\n" + |
| | | " \"Hp\": \"晋L\",\n" + |
| | | "\"city\":\"临汾\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"141000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"晋M\",\n" + |
| | | " \"Hp\": \"晋M\",\n" + |
| | | "\"city\":\"运城\",\n" + |
| | | "\"province\":\"山西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"140800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉A\",\n" + |
| | | " \"Hp\": \"吉A\",\n" + |
| | | "\"city\":\"长春\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"220100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉B\",\n" + |
| | | " \"Hp\": \"吉B\",\n" + |
| | | "\"city\":\"吉林\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"220200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉C\",\n" + |
| | | " \"Hp\": \"吉C\",\n" + |
| | | "\"city\":\"四平\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"220300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉D\",\n" + |
| | | " \"Hp\": \"吉D\",\n" + |
| | | "\"city\":\"辽源\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"220400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉E\",\n" + |
| | | " \"Hp\": \"吉E\",\n" + |
| | | "\"city\":\"通化\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"220521\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉F\",\n" + |
| | | " \"Hp\": \"吉F\",\n" + |
| | | "\"city\":\"白山\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"220600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉G\",\n" + |
| | | " \"Hp\": \"吉G\",\n" + |
| | | "\"city\":\"白城\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"220800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉H\",\n" + |
| | | " \"Hp\": \"吉H\",\n" + |
| | | "\"city\":\"延边朝鲜族自治州\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"222400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉J\",\n" + |
| | | " \"Hp\": \"吉J\",\n" + |
| | | "\"city\":\"松原\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": \"220700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"吉K\",\n" + |
| | | " \"Hp\": \"吉K\",\n" + |
| | | "\"city\":\"长白山\",\n" + |
| | | "\"province\":\"吉林\",\n" + |
| | | "\"pcode\":\"JL\"\n" + |
| | | " \"Pcode\": \"JL\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤A\",\n" + |
| | | " \"Hp\": \"粤A\",\n" + |
| | | "\"city\":\"广州\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤B\",\n" + |
| | | " \"Hp\": \"粤B\",\n" + |
| | | "\"city\":\"深圳\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤C\",\n" + |
| | | " \"Hp\": \"粤C\",\n" + |
| | | "\"city\":\"珠海\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤D\",\n" + |
| | | " \"Hp\": \"粤D\",\n" + |
| | | "\"city\":\"汕头\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤E\",\n" + |
| | | " \"Hp\": \"粤E\",\n" + |
| | | "\"city\":\"佛山\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤F\",\n" + |
| | | " \"Hp\": \"粤F\",\n" + |
| | | "\"city\":\"韶关\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤G\",\n" + |
| | | " \"Hp\": \"粤G\",\n" + |
| | | "\"city\":\"湛江\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤H\",\n" + |
| | | " \"Hp\": \"粤H\",\n" + |
| | | "\"city\":\"肇庆\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"441200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤J\",\n" + |
| | | " \"Hp\": \"粤J\",\n" + |
| | | "\"city\":\"江门\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤K\",\n" + |
| | | " \"Hp\": \"粤K\",\n" + |
| | | "\"city\":\"茂名\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤L\",\n" + |
| | | " \"Hp\": \"粤L\",\n" + |
| | | "\"city\":\"惠州\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"441300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤M\",\n" + |
| | | " \"Hp\": \"粤M\",\n" + |
| | | "\"city\":\"梅州\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"441400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤N\",\n" + |
| | | " \"Hp\": \"粤N\",\n" + |
| | | "\"city\":\"汕尾\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"441500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤p\",\n" + |
| | | " \"Hp\": \"粤P\",\n" + |
| | | "\"city\":\"河源\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"441600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤Q\",\n" + |
| | | " \"Hp\": \"粤Q\",\n" + |
| | | "\"city\":\"阳江\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"441700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤R\",\n" + |
| | | " \"Hp\": \"粤R\",\n" + |
| | | "\"city\":\"清远\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"441800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤S\",\n" + |
| | | " \"Hp\": \"粤S\",\n" + |
| | | "\"city\":\"东莞\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"441900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤T\",\n" + |
| | | " \"Hp\": \"粤T\",\n" + |
| | | "\"city\":\"中山\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"442000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤U\",\n" + |
| | | " \"Hp\": \"粤U\",\n" + |
| | | "\"city\":\"潮州\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"445100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤V\",\n" + |
| | | " \"Hp\": \"粤V\",\n" + |
| | | "\"city\":\"揭阳\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"445200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤W\",\n" + |
| | | " \"Hp\": \"粤W\",\n" + |
| | | "\"city\":\"云浮\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"445300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤X\",\n" + |
| | | " \"Hp\": \"粤X\",\n" + |
| | | "\"city\":\"顺德区\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440606\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤Y\",\n" + |
| | | " \"Hp\": \"粤Y\",\n" + |
| | | "\"city\":\"南海区\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": \"440605\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"粤Z\",\n" + |
| | | " \"Hp\": \"粤Z\",\n" + |
| | | "\"city\":\"港澳进入内地车辆\",\n" + |
| | | "\"province\":\"广东\",\n" + |
| | | "\"pcode\":\"GD\"\n" + |
| | | " \"Pcode\": \"GD\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"宁A\",\n" + |
| | | " \"Hp\": \"宁A\",\n" + |
| | | "\"city\":\"银川\",\n" + |
| | | "\"province\":\"宁夏\",\n" + |
| | | "\"pcode\":\"NX\"\n" + |
| | | " \"Pcode\": \"NX\",\n" + |
| | | " \"AreaCode\": \"640100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"宁B\",\n" + |
| | | " \"Hp\": \"宁B\",\n" + |
| | | "\"city\":\"石嘴山\",\n" + |
| | | "\"province\":\"宁夏\",\n" + |
| | | "\"pcode\":\"NX\"\n" + |
| | | " \"Pcode\": \"NX\",\n" + |
| | | " \"AreaCode\": \"640200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"宁C\",\n" + |
| | | " \"Hp\": \"宁C\",\n" + |
| | | "\"city\":\"银南\",\n" + |
| | | "\"province\":\"宁夏\",\n" + |
| | | "\"pcode\":\"NX\"\n" + |
| | | " \"Pcode\": \"NX\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"宁D\",\n" + |
| | | " \"Hp\": \"宁D\",\n" + |
| | | "\"city\":\"固原\",\n" + |
| | | "\"province\":\"宁夏\",\n" + |
| | | "\"pcode\":\"NX\"\n" + |
| | | " \"Pcode\": \"NX\",\n" + |
| | | " \"AreaCode\": \"640400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"宁E\",\n" + |
| | | " \"Hp\": \"宁E\",\n" + |
| | | "\"city\":\"中卫\",\n" + |
| | | "\"province\":\"宁夏\",\n" + |
| | | "\"pcode\":\"NX\"\n" + |
| | | " \"Pcode\": \"NX\",\n" + |
| | | " \"AreaCode\": \"640500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京A\",\n" + |
| | | " \"Hp\": \"京A\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京B\",\n" + |
| | | " \"Hp\": \"京B\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京C\",\n" + |
| | | " \"Hp\": \"京C\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京D\",\n" + |
| | | " \"Hp\": \"京D\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京E\",\n" + |
| | | " \"Hp\": \"京E\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京F\",\n" + |
| | | " \"Hp\": \"京F\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京G\",\n" + |
| | | " \"Hp\": \"京G\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京H\",\n" + |
| | | " \"Hp\": \"京H\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京J\",\n" + |
| | | " \"Hp\": \"京J\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京K\",\n" + |
| | | " \"Hp\": \"京K\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京L\",\n" + |
| | | " \"Hp\": \"京L\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京M\",\n" + |
| | | " \"Hp\": \"京M\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"京Y\",\n" + |
| | | " \"Hp\": \"京Y\",\n" + |
| | | "\"city\":\"北京\",\n" + |
| | | "\"province\":\"北京\",\n" + |
| | | "\"pcode\":\"BJ\"\n" + |
| | | " \"Pcode\": \"BJ\",\n" + |
| | | " \"AreaCode\": \"110000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫A\",\n" + |
| | | " \"Hp\": \"豫A\",\n" + |
| | | "\"city\":\"郑州\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫B\",\n" + |
| | | " \"Hp\": \"豫B\",\n" + |
| | | "\"city\":\"开封\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫C\",\n" + |
| | | " \"Hp\": \"豫C\",\n" + |
| | | "\"city\":\"洛阳\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫D\",\n" + |
| | | " \"Hp\": \"豫D\",\n" + |
| | | "\"city\":\"平顶山\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫E\",\n" + |
| | | " \"Hp\": \"豫E\",\n" + |
| | | "\"city\":\"安阳\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410522\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫F\",\n" + |
| | | " \"Hp\": \"豫F\",\n" + |
| | | "\"city\":\"鹤壁\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫G\",\n" + |
| | | " \"Hp\": \"豫G\",\n" + |
| | | "\"city\":\"新乡\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410721\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫H\",\n" + |
| | | " \"Hp\": \"豫H\",\n" + |
| | | "\"city\":\"焦作\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫J\",\n" + |
| | | " \"Hp\": \"豫J\",\n" + |
| | | "\"city\":\"濮阳\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"410928\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫K\",\n" + |
| | | " \"Hp\": \"豫K\",\n" + |
| | | "\"city\":\"许昌\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"411023\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫L\",\n" + |
| | | " \"Hp\": \"豫L\",\n" + |
| | | "\"city\":\"漯河\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"411100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫M\",\n" + |
| | | " \"Hp\": \"豫M\",\n" + |
| | | "\"city\":\"三门峡\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"411200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫N\",\n" + |
| | | " \"Hp\": \"豫N\",\n" + |
| | | "\"city\":\"商丘\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"411400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫p\",\n" + |
| | | " \"Hp\": \"豫P\",\n" + |
| | | "\"city\":\"周口\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"411600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫Q\",\n" + |
| | | " \"Hp\": \"豫Q\",\n" + |
| | | "\"city\":\"驻马店\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"411700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫R\",\n" + |
| | | " \"Hp\": \"豫R\",\n" + |
| | | "\"city\":\"南阳\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"411300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫S\",\n" + |
| | | " \"Hp\": \"豫S\",\n" + |
| | | "\"city\":\"信阳\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"411500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"豫U\",\n" + |
| | | " \"Hp\": \"豫U\",\n" + |
| | | "\"city\":\"济源\",\n" + |
| | | "\"province\":\"河南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"419001\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑A\",\n" + |
| | | " \"Hp\": \"黑A\",\n" + |
| | | "\"city\":\"哈尔滨\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑B\",\n" + |
| | | " \"Hp\": \"黑B\",\n" + |
| | | "\"city\":\"齐齐哈尔\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑C\",\n" + |
| | | " \"Hp\": \"黑C\",\n" + |
| | | "\"city\":\"牡丹江\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"231000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑D\",\n" + |
| | | " \"Hp\": \"黑D\",\n" + |
| | | "\"city\":\"佳木斯\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑E\",\n" + |
| | | " \"Hp\": \"黑E\",\n" + |
| | | "\"city\":\"大庆\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑F\",\n" + |
| | | " \"Hp\": \"黑F\",\n" + |
| | | "\"city\":\"伊春\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230702\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑G\",\n" + |
| | | " \"Hp\": \"黑G\",\n" + |
| | | "\"city\":\"鸡西\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑H\",\n" + |
| | | " \"Hp\": \"黑H\",\n" + |
| | | "\"city\":\"鹤岗\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑J\",\n" + |
| | | " \"Hp\": \"黑J\",\n" + |
| | | "\"city\":\"双鸭山\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑K\",\n" + |
| | | " \"Hp\": \"黑K\",\n" + |
| | | "\"city\":\"七台河\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"230900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑L\",\n" + |
| | | " \"Hp\": \"黑L\",\n" + |
| | | "\"city\":\"松花江地区\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑M\",\n" + |
| | | " \"Hp\": \"黑M\",\n" + |
| | | "\"city\":\"绥化\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"231200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑N\",\n" + |
| | | " \"Hp\": \"黑N\",\n" + |
| | | "\"city\":\"黑河\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"231100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑p\",\n" + |
| | | " \"Hp\": \"黑P\",\n" + |
| | | "\"city\":\"大兴安岭地区\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": \"232700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"黑R\",\n" + |
| | | " \"Hp\": \"黑R\",\n" + |
| | | "\"city\":\"农垦系统\",\n" + |
| | | "\"province\":\"黑龙江\",\n" + |
| | | "\"pcode\":\"HLJ\"\n" + |
| | | " \"Pcode\": \"HLJ\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁A \",\n" + |
| | | " \"Hp\": \"鲁A\",\n" + |
| | | "\"city\":\"济南\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁B\",\n" + |
| | | " \"Hp\": \"鲁B\",\n" + |
| | | "\"city\":\"青岛\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁C\",\n" + |
| | | " \"Hp\": \"鲁C\",\n" + |
| | | "\"city\":\"淄博\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁D\",\n" + |
| | | " \"Hp\": \"鲁D\",\n" + |
| | | "\"city\":\"枣庄\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁E\",\n" + |
| | | " \"Hp\": \"鲁E\",\n" + |
| | | "\"city\":\"东营\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370502\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁F\",\n" + |
| | | " \"Hp\": \"鲁F\",\n" + |
| | | "\"city\":\"烟台\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁G\",\n" + |
| | | " \"Hp\": \"鲁G\",\n" + |
| | | "\"city\":\"潍坊\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁H\",\n" + |
| | | " \"Hp\": \"鲁H\",\n" + |
| | | "\"city\":\"济宁\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁J\",\n" + |
| | | " \"Hp\": \"鲁J\",\n" + |
| | | "\"city\":\"泰安\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁K\",\n" + |
| | | " \"Hp\": \"鲁K\",\n" + |
| | | "\"city\":\"威海\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"371000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁L\",\n" + |
| | | " \"Hp\": \"鲁L\",\n" + |
| | | "\"city\":\"日照\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"371100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁M\",\n" + |
| | | " \"Hp\": \"鲁M\",\n" + |
| | | "\"city\":\"滨州\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"371600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁N\",\n" + |
| | | " \"Hp\": \"鲁N\",\n" + |
| | | "\"city\":\"德州\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"371400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁p\",\n" + |
| | | " \"Hp\": \"鲁P\",\n" + |
| | | "\"city\":\"聊城\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"371500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁Q\",\n" + |
| | | " \"Hp\": \"鲁Q\",\n" + |
| | | "\"city\":\"临沂\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"371300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁R\",\n" + |
| | | " \"Hp\": \"鲁R\",\n" + |
| | | "\"city\":\"菏泽\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"371700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁S\",\n" + |
| | | " \"Hp\": \"鲁S\",\n" + |
| | | "\"city\":\"莱芜\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"371200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁U\",\n" + |
| | | "\"city\":\"青岛增补\",\n" + |
| | | " \"Hp\": \"鲁U\",\n" + |
| | | " \"city\": \"青岛\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁V\",\n" + |
| | | "\"city\":\"潍坊增补\",\n" + |
| | | " \"Hp\": \"鲁V\",\n" + |
| | | " \"city\": \"潍坊\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"鲁Y\",\n" + |
| | | " \"Hp\": \"鲁Y\",\n" + |
| | | "\"city\":\"烟台\",\n" + |
| | | "\"province\":\"山东\",\n" + |
| | | "\"pcode\":\"SD\"\n" + |
| | | " \"Pcode\": \"SD\",\n" + |
| | | " \"AreaCode\": \"370600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙A\",\n" + |
| | | " \"Hp\": \"浙A\",\n" + |
| | | "\"city\":\"杭州\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙B\",\n" + |
| | | " \"Hp\": \"浙B\",\n" + |
| | | "\"city\":\"宁波\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙C\",\n" + |
| | | " \"Hp\": \"浙C\",\n" + |
| | | "\"city\":\"温州\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙D\",\n" + |
| | | " \"Hp\": \"浙D\",\n" + |
| | | "\"city\":\"绍兴\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙E\",\n" + |
| | | " \"Hp\": \"浙E\",\n" + |
| | | "\"city\":\"湖州\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙F\",\n" + |
| | | " \"Hp\": \"浙F\",\n" + |
| | | "\"city\":\"嘉兴\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙G\",\n" + |
| | | " \"Hp\": \"浙G\",\n" + |
| | | "\"city\":\"金华\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙H\",\n" + |
| | | " \"Hp\": \"浙H\",\n" + |
| | | "\"city\":\"衢州\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙J\",\n" + |
| | | " \"Hp\": \"浙J\",\n" + |
| | | "\"city\":\"台州\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"331000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙K\",\n" + |
| | | " \"Hp\": \"浙K\",\n" + |
| | | "\"city\":\"丽水\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"331100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"浙L\",\n" + |
| | | " \"Hp\": \"浙L\",\n" + |
| | | "\"city\":\"舟山\",\n" + |
| | | "\"province\":\"浙江\",\n" + |
| | | "\"pcode\":\"ZJ\"\n" + |
| | | " \"Pcode\": \"ZJ\",\n" + |
| | | " \"AreaCode\": \"330900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂A\",\n" + |
| | | " \"Hp\": \"桂A\",\n" + |
| | | "\"city\":\"南宁\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂B\",\n" + |
| | | " \"Hp\": \"桂B\",\n" + |
| | | "\"city\":\"柳州\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂C\",\n" + |
| | | " \"Hp\": \"桂C\",\n" + |
| | | "\"city\":\"桂林\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂D\",\n" + |
| | | " \"Hp\": \"桂D\",\n" + |
| | | "\"city\":\"梧州\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂E\",\n" + |
| | | " \"Hp\": \"桂E\",\n" + |
| | | "\"city\":\"北海\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂F\",\n" + |
| | | " \"Hp\": \"桂F\",\n" + |
| | | "\"city\":\"崇左\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"451400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂G\",\n" + |
| | | " \"Hp\": \"桂G\",\n" + |
| | | "\"city\":\"来宾\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"451300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂H\",\n" + |
| | | " \"Hp\": \"桂H\",\n" + |
| | | "\"city\":\"桂林地区\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂J\",\n" + |
| | | " \"Hp\": \"桂J\",\n" + |
| | | "\"city\":\"贺州\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"451100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂K\",\n" + |
| | | " \"Hp\": \"桂K\",\n" + |
| | | "\"city\":\"玉林\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂L\",\n" + |
| | | " \"Hp\": \"桂L\",\n" + |
| | | "\"city\":\"百色\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"451000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂M\",\n" + |
| | | " \"Hp\": \"桂M\",\n" + |
| | | "\"city\":\"河池\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"451200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂N\",\n" + |
| | | " \"Hp\": \"桂N\",\n" + |
| | | "\"city\":\"钦州\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂p\",\n" + |
| | | " \"Hp\": \"桂P\",\n" + |
| | | "\"city\":\"防城港\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"桂R\",\n" + |
| | | " \"Hp\": \"桂R\",\n" + |
| | | "\"city\":\"贵港\",\n" + |
| | | "\"province\":\"广西\",\n" + |
| | | "\"pcode\":\"GX\"\n" + |
| | | " \"Pcode\": \"GX\",\n" + |
| | | " \"AreaCode\": \"450800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙A\",\n" + |
| | | " \"Hp\": \"蒙A\",\n" + |
| | | "\"city\":\"呼和浩特\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙B\",\n" + |
| | | " \"Hp\": \"蒙B\",\n" + |
| | | "\"city\":\"包头\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙C\",\n" + |
| | | " \"Hp\": \"蒙C\",\n" + |
| | | "\"city\":\"乌海\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙D\",\n" + |
| | | " \"Hp\": \"蒙D\",\n" + |
| | | "\"city\":\"赤峰\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙E\",\n" + |
| | | " \"Hp\": \"蒙E\",\n" + |
| | | "\"city\":\"呼伦贝尔 \",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙F\",\n" + |
| | | " \"Hp\": \"蒙F\",\n" + |
| | | "\"city\":\"兴安盟\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"152200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙G\",\n" + |
| | | " \"Hp\": \"蒙G\",\n" + |
| | | "\"city\":\"通辽\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙H\",\n" + |
| | | " \"Hp\": \"蒙H\",\n" + |
| | | "\"city\":\"锡林郭勒盟\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"152500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙J\",\n" + |
| | | " \"Hp\": \"蒙J\",\n" + |
| | | "\"city\":\"乌兰察布盟\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙K\",\n" + |
| | | " \"Hp\": \"蒙K\",\n" + |
| | | "\"city\":\"鄂尔多斯 \",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙L\",\n" + |
| | | " \"Hp\": \"蒙L\",\n" + |
| | | "\"city\":\"巴彦淖尔盟\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"150800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"蒙M \",\n" + |
| | | "\"city\":\" 阿拉善盟\",\n" + |
| | | " \"Hp\": \"蒙M \",\n" + |
| | | " \"city\": \" 阿拉善盟\",\n" + |
| | | "\"province\":\"内蒙古\",\n" + |
| | | "\"pcode\":\"NMG\"\n" + |
| | | " \"Pcode\": \"NMG\",\n" + |
| | | " \"AreaCode\": \"152900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽A\",\n" + |
| | | " \"Hp\": \"闽A\",\n" + |
| | | "\"city\":\"福州\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽B\",\n" + |
| | | " \"Hp\": \"闽B\",\n" + |
| | | "\"city\":\"莆田\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽C\",\n" + |
| | | " \"Hp\": \"闽C\",\n" + |
| | | "\"city\":\"泉州\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽D\",\n" + |
| | | " \"Hp\": \"闽D\",\n" + |
| | | "\"city\":\"厦门\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽E\",\n" + |
| | | " \"Hp\": \"闽E\",\n" + |
| | | "\"city\":\"漳州\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽F\",\n" + |
| | | " \"Hp\": \"闽F\",\n" + |
| | | "\"city\":\"龙岩\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽G\",\n" + |
| | | " \"Hp\": \"闽G\",\n" + |
| | | "\"city\":\"三明\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽H\",\n" + |
| | | " \"Hp\": \"闽H\",\n" + |
| | | "\"city\":\"南平\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽J\",\n" + |
| | | " \"Hp\": \"闽J\",\n" + |
| | | "\"city\":\"宁德\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": \"350900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"闽K\",\n" + |
| | | " \"Hp\": \"闽K\",\n" + |
| | | "\"city\":\"直系统\",\n" + |
| | | "\"province\":\"福建\",\n" + |
| | | "\"pcode\":\"FJ\"\n" + |
| | | " \"Pcode\": \"FJ\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川A\",\n" + |
| | | " \"Hp\": \"川A\",\n" + |
| | | "\"city\":\"成都\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"510100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川B\",\n" + |
| | | " \"Hp\": \"川B\",\n" + |
| | | "\"city\":\"绵阳\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"510700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川C\",\n" + |
| | | " \"Hp\": \"川C\",\n" + |
| | | "\"city\":\"自贡\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"510300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川D\",\n" + |
| | | " \"Hp\": \"川D\",\n" + |
| | | "\"city\":\"攀枝花\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"510400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川E\",\n" + |
| | | " \"Hp\": \"川E\",\n" + |
| | | "\"city\":\"泸州\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"510500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川F\",\n" + |
| | | " \"Hp\": \"川F\",\n" + |
| | | "\"city\":\"德阳\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"510600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川H\",\n" + |
| | | " \"Hp\": \"川H\",\n" + |
| | | "\"city\":\"广元\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"510800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川J\",\n" + |
| | | " \"Hp\": \"川J\",\n" + |
| | | "\"city\":\"遂宁\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"510900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川K\",\n" + |
| | | " \"Hp\": \"川K\",\n" + |
| | | "\"city\":\"内江\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川L\",\n" + |
| | | " \"Hp\": \"川L\",\n" + |
| | | "\"city\":\"乐山\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川M\",\n" + |
| | | " \"Hp\": \"川M\",\n" + |
| | | "\"city\":\"资阳\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"512000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川Q\",\n" + |
| | | " \"Hp\": \"川Q\",\n" + |
| | | "\"city\":\"宜宾\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511521\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川R\",\n" + |
| | | " \"Hp\": \"川R\",\n" + |
| | | "\"city\":\"南充\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川S\",\n" + |
| | | " \"Hp\": \"川S\",\n" + |
| | | "\"city\":\"达州\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川T\",\n" + |
| | | " \"Hp\": \"川T\",\n" + |
| | | "\"city\":\"雅安\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川U\",\n" + |
| | | " \"Hp\": \"川U\",\n" + |
| | | "\"city\":\"阿坝藏族羌族自治州\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"513200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川V\",\n" + |
| | | " \"Hp\": \"川V\",\n" + |
| | | "\"city\":\"甘孜藏族自治州\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"513300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川W\",\n" + |
| | | " \"Hp\": \"川W\",\n" + |
| | | "\"city\":\"凉山彝族自治州\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"513400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川X\",\n" + |
| | | " \"Hp\": \"川X\",\n" + |
| | | "\"city\":\"广安\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511602\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川Y\",\n" + |
| | | " \"Hp\": \"川Y\",\n" + |
| | | "\"city\":\"巴中\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"川Z\",\n" + |
| | | " \"Hp\": \"川Z\",\n" + |
| | | "\"city\":\"眉山\",\n" + |
| | | "\"province\":\"四川\",\n" + |
| | | "\"pcode\":\"SC\"\n" + |
| | | " \"Pcode\": \"SC\",\n" + |
| | | " \"AreaCode\": \"511400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"渝A\",\n" + |
| | | " \"Hp\": \"渝A\",\n" + |
| | | "\"city\":\"重庆区(江南)\",\n" + |
| | | "\"province\":\"重庆\",\n" + |
| | | "\"pcode\":\"ZQ\"\n" + |
| | | " \"Pcode\": \"ZQ\",\n" + |
| | | " \"AreaCode\": \"500100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"渝B\",\n" + |
| | | " \"Hp\": \"渝B\",\n" + |
| | | "\"city\":\"重庆区(江北)\",\n" + |
| | | "\"province\":\"重庆\",\n" + |
| | | "\"pcode\":\"ZQ\"\n" + |
| | | " \"Pcode\": \"ZQ\",\n" + |
| | | " \"AreaCode\": \"500100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"渝C\",\n" + |
| | | " \"Hp\": \"渝C\",\n" + |
| | | "\"city\":\"永川区\",\n" + |
| | | "\"province\":\"重庆\",\n" + |
| | | "\"pcode\":\"ZQ\"\n" + |
| | | " \"Pcode\": \"ZQ\",\n" + |
| | | " \"AreaCode\": \"500118\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"渝F\",\n" + |
| | | " \"Hp\": \"渝F\",\n" + |
| | | "\"city\":\"万州区\",\n" + |
| | | "\"province\":\"重庆\",\n" + |
| | | "\"pcode\":\"ZQ\"\n" + |
| | | " \"Pcode\": \"ZQ\",\n" + |
| | | " \"AreaCode\": \"500101\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"渝G\",\n" + |
| | | " \"Hp\": \"渝G\",\n" + |
| | | "\"city\":\"涪陵区\",\n" + |
| | | "\"province\":\"重庆\",\n" + |
| | | "\"pcode\":\"ZQ\"\n" + |
| | | " \"Pcode\": \"ZQ\",\n" + |
| | | " \"AreaCode\": \"500102\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"渝H\",\n" + |
| | | " \"Hp\": \"渝H\",\n" + |
| | | "\"city\":\"黔江区\",\n" + |
| | | "\"province\":\"重庆\",\n" + |
| | | "\"pcode\":\"ZQ\"\n" + |
| | | " \"Pcode\": \"ZQ\",\n" + |
| | | " \"AreaCode\": \"500114\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"津A\",\n" + |
| | | " \"Hp\": \"津A\",\n" + |
| | | "\"city\":\"天津\",\n" + |
| | | "\"province\":\"天津\",\n" + |
| | | "\"pcode\":\"TJ\"\n" + |
| | | " \"Pcode\": \"TJ\",\n" + |
| | | " \"AreaCode\": \"120000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"津B\",\n" + |
| | | " \"Hp\": \"津B\",\n" + |
| | | "\"city\":\"天津\",\n" + |
| | | "\"province\":\"天津\",\n" + |
| | | "\"pcode\":\"TJ\"\n" + |
| | | " \"Pcode\": \"TJ\",\n" + |
| | | " \"AreaCode\": \"120000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"津C\",\n" + |
| | | " \"Hp\": \"津C\",\n" + |
| | | "\"city\":\"天津\",\n" + |
| | | "\"province\":\"天津\",\n" + |
| | | "\"pcode\":\"TJ\"\n" + |
| | | " \"Pcode\": \"TJ\",\n" + |
| | | " \"AreaCode\": \"120000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"津D\",\n" + |
| | | " \"Hp\": \"津D\",\n" + |
| | | "\"city\":\"天津\",\n" + |
| | | "\"province\":\"天津\",\n" + |
| | | "\"pcode\":\"TJ\"\n" + |
| | | " \"Pcode\": \"TJ\",\n" + |
| | | " \"AreaCode\": \"120000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"津E\",\n" + |
| | | " \"Hp\": \"津E\",\n" + |
| | | "\"city\":\"天津\",\n" + |
| | | "\"province\":\"天津\",\n" + |
| | | "\"pcode\":\"TJ\"\n" + |
| | | " \"Pcode\": \"TJ\",\n" + |
| | | " \"AreaCode\": \"120000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"津F\",\n" + |
| | | " \"Hp\": \"津F\",\n" + |
| | | "\"city\":\"天津\",\n" + |
| | | "\"province\":\"天津\",\n" + |
| | | "\"pcode\":\"TJ\"\n" + |
| | | " \"Pcode\": \"TJ\",\n" + |
| | | " \"AreaCode\": \"120000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"津G\",\n" + |
| | | " \"Hp\": \"津G\",\n" + |
| | | "\"city\":\"天津\",\n" + |
| | | "\"province\":\"天津\",\n" + |
| | | "\"pcode\":\"TJ\"\n" + |
| | | " \"Pcode\": \"TJ\",\n" + |
| | | " \"AreaCode\": \"120000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"津H\",\n" + |
| | | " \"Hp\": \"津H\",\n" + |
| | | "\"city\":\"天津\",\n" + |
| | | "\"province\":\"天津\",\n" + |
| | | "\"pcode\":\"TJ\"\n" + |
| | | " \"Pcode\": \"TJ\",\n" + |
| | | " \"AreaCode\": \"120000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云A\",\n" + |
| | | " \"Hp\": \"云A\",\n" + |
| | | "\"city\":\"昆明\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云A-V\",\n" + |
| | | " \"Hp\": \"云A-V\",\n" + |
| | | "\"city\":\"东川\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530113\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云C\",\n" + |
| | | " \"Hp\": \"云C\",\n" + |
| | | "\"city\":\"昭通\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云D\",\n" + |
| | | " \"Hp\": \"云D\",\n" + |
| | | "\"city\":\"曲靖\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云E\",\n" + |
| | | " \"Hp\": \"云E\",\n" + |
| | | "\"city\":\"楚雄彝族自治州\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"532300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云F\",\n" + |
| | | " \"Hp\": \"云F\",\n" + |
| | | "\"city\":\"玉溪\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云G\",\n" + |
| | | " \"Hp\": \"云G\",\n" + |
| | | "\"city\":\"红河哈尼族彝族自治州\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"532500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云H\",\n" + |
| | | " \"Hp\": \"云H\",\n" + |
| | | "\"city\":\"文山壮族苗族自治州\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"532600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云J\",\n" + |
| | | " \"Hp\": \"云J\",\n" + |
| | | "\"city\":\"思茅\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530802\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云K\",\n" + |
| | | " \"Hp\": \"云K\",\n" + |
| | | "\"city\":\"西双版纳傣族自治州\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"532800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云L\",\n" + |
| | | " \"Hp\": \"云L\",\n" + |
| | | "\"city\":\"大理白族自治州\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"532900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云M\",\n" + |
| | | " \"Hp\": \"云M\",\n" + |
| | | "\"city\":\"保山\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云N\",\n" + |
| | | " \"Hp\": \"云N\",\n" + |
| | | "\"city\":\"德宏傣族景颇族自治州\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"533100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云p\",\n" + |
| | | " \"Hp\": \"云P\",\n" + |
| | | "\"city\":\"丽江\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云Q\",\n" + |
| | | " \"Hp\": \"云Q\",\n" + |
| | | "\"city\":\"怒江傈僳族自治州\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"533300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云R\",\n" + |
| | | " \"Hp\": \"云R\",\n" + |
| | | "\"city\":\"迪庆藏族自治州\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"533400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"云S\",\n" + |
| | | " \"Hp\": \"云S\",\n" + |
| | | "\"city\":\"临沧地区\",\n" + |
| | | "\"province\":\"云南\",\n" + |
| | | "\"pcode\":\"YN\"\n" + |
| | | " \"Pcode\": \"YN\",\n" + |
| | | " \"AreaCode\": \"530900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘A \",\n" + |
| | | " \"Hp\": \"湘A \",\n" + |
| | | "\"city\":\"长沙\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430121\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘B\",\n" + |
| | | " \"Hp\": \"湘B\",\n" + |
| | | "\"city\":\"株洲\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430221\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘C\",\n" + |
| | | " \"Hp\": \"湘C\",\n" + |
| | | "\"city\":\"湘潭\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430321\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘D\",\n" + |
| | | " \"Hp\": \"湘D\",\n" + |
| | | "\"city\":\"衡阳\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430421\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘E\",\n" + |
| | | " \"Hp\": \"湘E\",\n" + |
| | | "\"city\":\"邵阳\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430523\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘F\",\n" + |
| | | " \"Hp\": \"湘F\",\n" + |
| | | "\"city\":\"岳阳\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430621\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘G\",\n" + |
| | | " \"Hp\": \"湘G\",\n" + |
| | | "\"city\":\"张家界\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘H\",\n" + |
| | | " \"Hp\": \"湘H\",\n" + |
| | | "\"city\":\"益阳\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘J\",\n" + |
| | | " \"Hp\": \"湘J\",\n" + |
| | | "\"city\":\"常德\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"430700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘K\",\n" + |
| | | " \"Hp\": \"湘K\",\n" + |
| | | "\"city\":\"娄底\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"431300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘L\",\n" + |
| | | " \"Hp\": \"湘L\",\n" + |
| | | "\"city\":\"郴州\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"431000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘M\",\n" + |
| | | " \"Hp\": \"湘M\",\n" + |
| | | "\"city\":\"永州\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"431100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘N\",\n" + |
| | | " \"Hp\": \"湘N\",\n" + |
| | | "\"city\":\"怀化\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"431200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"湘U\",\n" + |
| | | " \"Hp\": \"湘U\",\n" + |
| | | "\"city\":\"湘西土家族苗族自治州\",\n" + |
| | | "\"province\":\"湖南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"433100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新A\",\n" + |
| | | " \"Hp\": \"新A\",\n" + |
| | | "\"city\":\"乌鲁木齐\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"650121\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新B\",\n" + |
| | | " \"Hp\": \"新B\",\n" + |
| | | "\"city\":\"昌吉回族自治州\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"652300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新C\",\n" + |
| | | " \"Hp\": \"新C\",\n" + |
| | | "\"city\":\"石河子\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"659001\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新D\",\n" + |
| | | " \"Hp\": \"新D\",\n" + |
| | | "\"city\":\"奎屯\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"654003\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新E\",\n" + |
| | | " \"Hp\": \"新E\",\n" + |
| | | "\"city\":\"博尔塔拉蒙古自治州\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"652700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新F\",\n" + |
| | | " \"Hp\": \"新F\",\n" + |
| | | "\"city\":\"伊犁哈萨克自治州直辖县\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"654000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新G\",\n" + |
| | | " \"Hp\": \"新G\",\n" + |
| | | "\"city\":\"塔城\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"654201\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新H\",\n" + |
| | | " \"Hp\": \"新H\",\n" + |
| | | "\"city\":\"阿勒泰\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"654301\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新J\",\n" + |
| | | " \"Hp\": \"新J\",\n" + |
| | | "\"city\":\"克拉玛依\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"650203\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新K\",\n" + |
| | | " \"Hp\": \"新K\",\n" + |
| | | "\"city\":\"吐鲁番\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"650400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新L\",\n" + |
| | | " \"Hp\": \"新L\",\n" + |
| | | "\"city\":\"哈密\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"650500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新M\",\n" + |
| | | " \"Hp\": \"新M\",\n" + |
| | | "\"city\":\"巴音郭愣蒙古自治州\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"652800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新N\",\n" + |
| | | " \"Hp\": \"新N\",\n" + |
| | | "\"city\":\"阿克苏\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"652901\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新p\",\n" + |
| | | " \"Hp\": \"新P\",\n" + |
| | | "\"city\":\"克孜勒苏柯尔克孜自治州\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"653000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新Q\",\n" + |
| | | " \"Hp\": \"新Q\",\n" + |
| | | "\"city\":\"喀什\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"653101\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"新R\",\n" + |
| | | " \"Hp\": \"新R\",\n" + |
| | | "\"city\":\"和田\",\n" + |
| | | "\"province\":\"新疆\",\n" + |
| | | "\"pcode\":\"XJ\"\n" + |
| | | " \"Pcode\": \"XJ\",\n" + |
| | | " \"AreaCode\": \"653221\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣A\",\n" + |
| | | " \"Hp\": \"赣A\",\n" + |
| | | "\"city\":\"南昌\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360121\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣B\",\n" + |
| | | " \"Hp\": \"赣B\",\n" + |
| | | "\"city\":\"赣州\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣C\",\n" + |
| | | " \"Hp\": \"赣C\",\n" + |
| | | "\"city\":\"宜春\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣D\",\n" + |
| | | " \"Hp\": \"赣D\",\n" + |
| | | "\"city\":\"吉安\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360821\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣E\",\n" + |
| | | " \"Hp\": \"赣E\",\n" + |
| | | "\"city\":\"上饶\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"361121\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣F\",\n" + |
| | | " \"Hp\": \"赣F\",\n" + |
| | | "\"city\":\"抚州\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"361000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣G\",\n" + |
| | | " \"Hp\": \"赣G\",\n" + |
| | | "\"city\":\"九江\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360421\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣H\",\n" + |
| | | " \"Hp\": \"赣H\",\n" + |
| | | "\"city\":\"景德镇\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣J\",\n" + |
| | | " \"Hp\": \"赣J\",\n" + |
| | | "\"city\":\"萍乡\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣K\",\n" + |
| | | " \"Hp\": \"赣K\",\n" + |
| | | "\"city\":\"新余\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣L\",\n" + |
| | | " \"Hp\": \"赣L\",\n" + |
| | | "\"city\":\"鹰潭\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": \"360600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"赣M\",\n" + |
| | | " \"Hp\": \"赣M\",\n" + |
| | | "\"city\":\"南昌,直系统\",\n" + |
| | | "\"province\":\"江西\",\n" + |
| | | "\"pcode\":\"JX\"\n" + |
| | | " \"Pcode\": \"JX\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘A\",\n" + |
| | | " \"Hp\": \"甘A\",\n" + |
| | | "\"city\":\"兰州\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘B\",\n" + |
| | | " \"Hp\": \"甘B\",\n" + |
| | | "\"city\":\"嘉峪关\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘C\",\n" + |
| | | " \"Hp\": \"甘C\",\n" + |
| | | "\"city\":\"金昌\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘D\",\n" + |
| | | " \"Hp\": \"甘D\",\n" + |
| | | "\"city\":\"白银\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620402\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘E\",\n" + |
| | | " \"Hp\": \"甘E\",\n" + |
| | | "\"city\":\"天水\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘F\",\n" + |
| | | " \"Hp\": \"甘F\",\n" + |
| | | "\"city\":\"酒泉\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘G\",\n" + |
| | | " \"Hp\": \"甘G\",\n" + |
| | | "\"city\":\"张掖\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘H\",\n" + |
| | | " \"Hp\": \"甘H\",\n" + |
| | | "\"city\":\"武威\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘J\",\n" + |
| | | " \"Hp\": \"甘J\",\n" + |
| | | "\"city\":\"定西\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"621100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘K\",\n" + |
| | | " \"Hp\": \"甘K\",\n" + |
| | | "\"city\":\"陇南\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"621200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘L\",\n" + |
| | | " \"Hp\": \"甘L\",\n" + |
| | | "\"city\":\"平凉\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"620800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘M\",\n" + |
| | | " \"Hp\": \"甘M\",\n" + |
| | | "\"city\":\"庆阳\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"621000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘N\",\n" + |
| | | " \"Hp\": \"甘N\",\n" + |
| | | "\"city\":\"临夏回族自治州\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"622900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"甘p\",\n" + |
| | | " \"Hp\": \"甘P\",\n" + |
| | | "\"city\":\"甘南藏族自治州\",\n" + |
| | | "\"province\":\"甘肃\",\n" + |
| | | "\"pcode\":\"GS\"\n" + |
| | | " \"Pcode\": \"GS\",\n" + |
| | | " \"AreaCode\": \"623000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕A\",\n" + |
| | | " \"Hp\": \"陕A\",\n" + |
| | | "\"city\":\"西安\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕B\",\n" + |
| | | " \"Hp\": \"陕B\",\n" + |
| | | "\"city\":\"铜川\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕C\",\n" + |
| | | " \"Hp\": \"陕C\",\n" + |
| | | "\"city\":\"宝鸡\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕D\",\n" + |
| | | " \"Hp\": \"陕D\",\n" + |
| | | "\"city\":\"咸阳\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕E\",\n" + |
| | | " \"Hp\": \"陕E\",\n" + |
| | | "\"city\":\"渭南\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕F\",\n" + |
| | | " \"Hp\": \"陕F\",\n" + |
| | | "\"city\":\"汉中\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕G\",\n" + |
| | | " \"Hp\": \"陕G\",\n" + |
| | | "\"city\":\"安康\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610900\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕H\",\n" + |
| | | " \"Hp\": \"陕H\",\n" + |
| | | "\"city\":\"商洛\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"611000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕J\",\n" + |
| | | " \"Hp\": \"陕J\",\n" + |
| | | "\"city\":\"延安\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕K\",\n" + |
| | | " \"Hp\": \"陕K\",\n" + |
| | | "\"city\":\"榆林\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"陕V\",\n" + |
| | | " \"Hp\": \"陕V\",\n" + |
| | | "\"city\":\"杨凌高新农业示范区\",\n" + |
| | | "\"province\":\"陕西\",\n" + |
| | | "\"pcode\":\"SX\"\n" + |
| | | " \"Pcode\": \"SX\",\n" + |
| | | " \"AreaCode\": \"610403\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵A\",\n" + |
| | | " \"Hp\": \"贵A\",\n" + |
| | | "\"city\":\"贵阳\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"520100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵B\",\n" + |
| | | " \"Hp\": \"贵B\",\n" + |
| | | "\"city\":\"六盘水\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"520200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵C\",\n" + |
| | | " \"Hp\": \"贵C\",\n" + |
| | | "\"city\":\"遵义\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"520300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵D\",\n" + |
| | | " \"Hp\": \"贵D\",\n" + |
| | | "\"city\":\"铜仁\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"520600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵E\",\n" + |
| | | " \"Hp\": \"贵E\",\n" + |
| | | "\"city\":\"黔西南布依族苗族自治州\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"522300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵F\",\n" + |
| | | " \"Hp\": \"贵F\",\n" + |
| | | "\"city\":\"毕节\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"520500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵G\",\n" + |
| | | " \"Hp\": \"贵G\",\n" + |
| | | "\"city\":\"安顺\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"520400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵H\",\n" + |
| | | " \"Hp\": \"贵H\",\n" + |
| | | "\"city\":\"黔东南苗族侗族自治州\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"522600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"贵J\",\n" + |
| | | " \"Hp\": \"贵J\",\n" + |
| | | "\"city\":\"黔南布依族苗族自治州\",\n" + |
| | | "\"province\":\"贵州\",\n" + |
| | | "\"pcode\":\"GZ\"\n" + |
| | | " \"Pcode\": \"GZ\",\n" + |
| | | " \"AreaCode\": \"522700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"青A\",\n" + |
| | | " \"Hp\": \"青A\",\n" + |
| | | "\"city\":\"西宁\",\n" + |
| | | "\"province\":\"青海\",\n" + |
| | | "\"pcode\":\"QH\"\n" + |
| | | " \"Pcode\": \"QH\",\n" + |
| | | " \"AreaCode\": \"630100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"青B\",\n" + |
| | | " \"Hp\": \"青B\",\n" + |
| | | "\"city\":\"海东\",\n" + |
| | | "\"province\":\"青海\",\n" + |
| | | "\"pcode\":\"QH\"\n" + |
| | | " \"Pcode\": \"QH\",\n" + |
| | | " \"AreaCode\": \"630200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"青C\",\n" + |
| | | " \"Hp\": \"青C\",\n" + |
| | | "\"city\":\"海北藏族自治州\",\n" + |
| | | "\"province\":\"青海\",\n" + |
| | | "\"pcode\":\"QH\"\n" + |
| | | " \"Pcode\": \"QH\",\n" + |
| | | " \"AreaCode\": \"632200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"青D\",\n" + |
| | | " \"Hp\": \"青D\",\n" + |
| | | "\"city\":\"黄南藏族自治州\",\n" + |
| | | "\"province\":\"青海\",\n" + |
| | | "\"pcode\":\"QH\"\n" + |
| | | " \"Pcode\": \"QH\",\n" + |
| | | " \"AreaCode\": \"632300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"青E\",\n" + |
| | | " \"Hp\": \"青E\",\n" + |
| | | "\"city\":\"藏族自治州\",\n" + |
| | | "\"province\":\"青海\",\n" + |
| | | "\"pcode\":\"QH\"\n" + |
| | | " \"Pcode\": \"QH\",\n" + |
| | | " \"AreaCode\": \"632800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"青F\",\n" + |
| | | " \"Hp\": \"青F\",\n" + |
| | | "\"city\":\"果洛藏族自治州\",\n" + |
| | | "\"province\":\"青海\",\n" + |
| | | "\"pcode\":\"QH\"\n" + |
| | | " \"Pcode\": \"QH\",\n" + |
| | | " \"AreaCode\": \"632600\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"青G\",\n" + |
| | | " \"Hp\": \"青G\",\n" + |
| | | "\"city\":\"玉树藏族自治州\",\n" + |
| | | "\"province\":\"青海\",\n" + |
| | | "\"pcode\":\"QH\"\n" + |
| | | " \"Pcode\": \"QH\",\n" + |
| | | " \"AreaCode\": \"632700\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"青H\",\n" + |
| | | " \"Hp\": \"青H\",\n" + |
| | | "\"city\":\"海西蒙古族藏族自治州\",\n" + |
| | | "\"province\":\"青海\",\n" + |
| | | "\"pcode\":\"QH\"\n" + |
| | | " \"Pcode\": \"QH\",\n" + |
| | | " \"AreaCode\": \"632800\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏A\",\n" + |
| | | " \"Hp\": \"藏A\",\n" + |
| | | "\"city\":\"拉萨\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": \"540100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏B\",\n" + |
| | | " \"Hp\": \"藏B\",\n" + |
| | | "\"city\":\"昌都地区\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": \"540300\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏C\",\n" + |
| | | " \"Hp\": \"藏C\",\n" + |
| | | "\"city\":\"山南地区\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": \"542200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏D\",\n" + |
| | | " \"Hp\": \"藏D\",\n" + |
| | | "\"city\":\"日喀则地区\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": \"540200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏E\",\n" + |
| | | " \"Hp\": \"藏E\",\n" + |
| | | "\"city\":\"那曲地区\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": \"542400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏F\",\n" + |
| | | " \"Hp\": \"藏F\",\n" + |
| | | "\"city\":\"阿里地区\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": \"542500\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏G\",\n" + |
| | | " \"Hp\": \"藏G\",\n" + |
| | | "\"city\":\"林芝地区\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": \"540400\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏H\",\n" + |
| | | " \"Hp\": \"藏H\",\n" + |
| | | "\"city\":\"天全县车辆管理所\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"藏J\",\n" + |
| | | " \"Hp\": \"藏J\",\n" + |
| | | "\"city\":\"格尔木车辆管理所\",\n" + |
| | | "\"province\":\"西藏\",\n" + |
| | | "\"pcode\":\"XC\"\n" + |
| | | " \"Pcode\": \"XC\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"琼A\",\n" + |
| | | " \"Hp\": \"琼A\",\n" + |
| | | "\"city\":\"海口\",\n" + |
| | | "\"province\":\"海南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"460100\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"琼B\",\n" + |
| | | " \"Hp\": \"琼B\",\n" + |
| | | "\"city\":\"三亚\",\n" + |
| | | "\"province\":\"海南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"460200\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"琼C\",\n" + |
| | | " \"Hp\": \"琼C\",\n" + |
| | | "\"city\":\"琼海\",\n" + |
| | | "\"province\":\"海南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"469002\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"琼D\",\n" + |
| | | " \"Hp\": \"琼D\",\n" + |
| | | "\"city\":\"五指山\",\n" + |
| | | "\"province\":\"海南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": \"469001\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"琼E\",\n" + |
| | | " \"Hp\": \"琼E\",\n" + |
| | | "\"city\":\"洋浦开发区\",\n" + |
| | | "\"province\":\"海南\",\n" + |
| | | "\"pcode\":\"HN\"\n" + |
| | | " \"Pcode\": \"HN\",\n" + |
| | | " \"AreaCode\": null\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"沪A\",\n" + |
| | | " \"Hp\": \"沪A\",\n" + |
| | | "\"city\":\"上海\",\n" + |
| | | "\"province\":\"上海\",\n" + |
| | | "\"pcode\":\"SH\"\n" + |
| | | " \"Pcode\": \"SH\",\n" + |
| | | " \"AreaCode\": \"310000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"沪B\",\n" + |
| | | " \"Hp\": \"沪B\",\n" + |
| | | "\"city\":\"上海\",\n" + |
| | | "\"province\":\"上海\",\n" + |
| | | "\"pcode\":\"SH\"\n" + |
| | | " \"Pcode\": \"SH\",\n" + |
| | | " \"AreaCode\": \"310000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"沪C\",\n" + |
| | | " \"Hp\": \"沪C\",\n" + |
| | | "\"city\":\"上海\",\n" + |
| | | "\"province\":\"上海\",\n" + |
| | | "\"pcode\":\"SH\"\n" + |
| | | " \"Pcode\": \"SH\",\n" + |
| | | " \"AreaCode\": \"310000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"沪D\",\n" + |
| | | " \"Hp\": \"沪D\",\n" + |
| | | "\"city\":\"上海\",\n" + |
| | | "\"province\":\"上海\",\n" + |
| | | "\"pcode\":\"SH\"\n" + |
| | | " \"Pcode\": \"SH\",\n" + |
| | | " \"AreaCode\": \"310000\"\n" + |
| | | "},\n" + |
| | | "{\n" + |
| | | "\"code\":\"沪R\",\n" + |
| | | "\"city\":\"崇明、长兴、横沙\",\n" + |
| | | " \"Hp\": \"沪R\",\n" + |
| | | " \"city\": \"崇明\",\n" + |
| | | "\"province\":\"上海\",\n" + |
| | | "\"pcode\":\"SH\"\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; |
| | | } |
| | | } |
| | |
| | | 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()); |
| | |
| | | tAppUserVipDetail.setDiscountMoney(vip.getMaximumDeduction()); |
| | | tAppUserVipDetail.setSendMonth(1); |
| | | tAppUserVipDetail.setVipJson(JSON.toJSONString(info.getData())); |
| | | tAppUserVipDetail.setVipType(type); |
| | | tAppUserVipDetailService.save(tAppUserVipDetail); |
| | | //直接赠送优惠卷 |
| | | for (SendCouponDto sendCouponDto : javaList) { |
| | |
| | | |
| | | |
| | | }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(); |
| | |
| | | |
| | | 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); |
| | | tAppUserVipDetail.setVipJson(JSON.toJSONString(info.getData())); |
| | | tAppUserVipDetail1.setVipType(type); |
| | | tAppUserVipDetail1.setVipJson(JSON.toJSONString(info.getData())); |
| | | tAppUserVipDetailService.save(tAppUserVipDetail1); |
| | | |
| | | } |
| | | // } |
| | | |
| | | } |
| | | |
| | |
| | | public class PointDetailUtil { |
| | | @Resource |
| | | private TAppUserIntegralChangeService appUserIntegralChangeService; |
| | | public void addDetail(Integer old,Integer now,Integer type,Long userId,String extension,String code){ |
| | | public void addDetail(Integer old,Integer now,Integer type,Long userId,String extension,String code,String orderCode){ |
| | | |
| | | TAppUserIntegralChange tAppUserIntegralChange= new TAppUserIntegralChange(); |
| | | tAppUserIntegralChange.setCode(OrderCodeUtil.getOrderCode(code)); |
| | |
| | | tAppUserIntegralChange.setCurrentIntegral(now); |
| | | tAppUserIntegralChange.setCreateTime(LocalDateTime.now()); |
| | | tAppUserIntegralChange.setExtension(extension); |
| | | tAppUserIntegralChange.setOrderCode(orderCode); |
| | | appUserIntegralChangeService.save(tAppUserIntegralChange); |
| | | |
| | | |
| | |
| | | import com.ruoyi.account.wx.body.resq.Code2SessionResqBody; |
| | | import com.ruoyi.account.wx.model.WeixinProperties; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据id获取合作商信息 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/getPartnerById/{id}") |
| | | public R<Partner> getPartnerById(@PathVariable("id") Integer id){ |
| | | Partner partner = partnerService.getPartner(id); |
| | | return R.ok(partner); |
| | | } |
| | | } |
| | |
| | | * @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(); |
| | | String chargingPileCode = number.substring(0, number.length() - 2); |
| | | String chargingGunCode = number.substring(number.length() - 2); |
| | | TChargingPile one = chargingPileService.lambdaQuery().eq(TChargingPile::getCode, chargingPileCode).one(); |
| | | TChargingGun chargingGun = chargingGunService.getOne(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getCode, chargingGunCode).eq(TChargingGun::getChargingPileId, one.getId())); |
| | | Site byId = siteService.getById(one.getSiteId()); |
| | | TAccountingStrategy byId1 = accountingStrategyService.getById(byId.getAccountingStrategyId()); |
| | | List<TAccountingStrategyDetail> list = accountingStrategyDetailService.lambdaQuery().eq(TAccountingStrategyDetail::getAccountingStrategyId, byId1.getId()).list(); |
| | |
| | | siteInfoVO.setVipElectrovalence(tAccountingStrategyDetail.getElectrovalence().multiply(byId1.getDiscount()).setScale(4, BigDecimal.ROUND_HALF_UP)); |
| | | } |
| | | } |
| | | siteInfoVO.setChargingGunId(chargingGun.getId()); |
| | | siteInfoVO.setChargingPileId(one.getId()); |
| | | siteInfoVO.setName(byId.getName()); |
| | | siteInfoVO.setNumber(one.getNumber().toString()); |
| | | siteInfoVO.setSpaceChargeExplain(byId.getSpaceChargeExplain()); |
| | | return R.ok(siteInfoVO); |
| | | } |
| | | /** |
| | | * 通过桩编号获取电站信息 遠程調用 |
| | | * @param number |
| | | * @return |
| | | */ |
| | | @PostMapping("/getSiteInfoByNumber1") |
| | | public R<SiteInfoVO> getSiteInfoByNumber1(@RequestParam("number") String number){ |
| | | SiteInfoVO siteInfoVO = new SiteInfoVO(); |
| | | 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(); |
| | | for (TAccountingStrategyDetail tAccountingStrategyDetail : list) { |
| | | // 当前时间属于那个阶段 取哪个阶段的电价 |
| | | if(LocalTime.now().isAfter(LocalTime.parse(tAccountingStrategyDetail.getStartTime())) && LocalTime.now().isBefore(LocalTime.parse(tAccountingStrategyDetail.getEndTime()))){ |
| | | siteInfoVO.setElectrovalence(tAccountingStrategyDetail.getElectrovalence()); |
| | | 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()); |
| | |
| | | PageInfo<GetSiteListDTO> list = siteService.getSiteList(siteList); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getSiteList/byUserId") |
| | | @ApiOperation(value = "获取站点列表", tags = {"管理后台-站点管理"}) |
| | | public R<List<GetSiteListDTO>> getSiteListByUserId(@RequestParam("userId") Long userId){ |
| | |
| | | @ResponseBody |
| | | @PostMapping("/getSiteByIds") |
| | | public R<List<Site>> getSiteByIds(@RequestBody List<Integer> ids){ |
| | | List<Site> sites = siteService.listByIds(ids); |
| | | List<Site> sites = siteService.list(new LambdaQueryWrapper<Site>().in(Site::getId, ids).eq(Site::getDelFlag, 0)); |
| | | return R.ok(sites); |
| | | } |
| | | |
| | |
| | | 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.BatchSetAccountingStrategy; |
| | | import com.ruoyi.chargingPile.api.query.TAccountingStrategyQuery; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyDetailVO; |
| | | import com.ruoyi.chargingPile.api.vo.TAccountingStrategyVO; |
| | |
| | | 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.service.TokenService; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.integration.api.feignClient.IntegrationClient; |
| | | 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; |
| | |
| | | private ISiteService siteService; |
| | | @Autowired |
| | | private SysUserClient sysUserClient; |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | |
| | | @Autowired |
| | | public TAccountingStrategyController(TAccountingStrategyService accountingStrategyService, TAccountingStrategyDetailService accountingStrategyDetailService) { |
| | |
| | | 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()) |
| | |
| | | |
| | | return AjaxResult.ok(accountingStrategyService.pageList(query)); |
| | | } |
| | | @Resource |
| | | private IntegrationClient integrationClient; |
| | | |
| | | @ApiOperation(tags = {"后台-申请表单-计费模板审核"},value = "审核") |
| | | @PostMapping(value = "/auth/pass") |
| | |
| | | } |
| | | |
| | | //硬件 |
| | | List<TChargingPile> list = chargingPileService.lambdaQuery().eq(TChargingPile::getSiteId, byId.getSiteId()).list(); |
| | | for (TChargingPile tChargingPile : list) { |
| | | integrationClient.setupBillingModel1(tChargingPile.getCode()); |
| | | } |
| | | |
| | | |
| | | } |
| | | }else { |
| | | if (byId.getAuditStatus()==1){ |
| | | |
| | | byId.setFirstRemark(steategyPassDto.getRemark()); |
| | | |
| | | }else if (byId.getAuditStatus()==2){ |
| | | byId.setTwoRemark(steategyPassDto.getRemark()); |
| | | } |
| | | |
| | | byId.setAuditStatus(4); |
| | | } |
| | | accountingStrategyService.updateById(byId); |
| | |
| | | |
| | | @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())); |
| | |
| | | import com.ruoyi.chargingPile.api.vo.GunStatusStatisticsVO; |
| | | import com.ruoyi.chargingPile.api.vo.SiteNameVO; |
| | | import com.ruoyi.chargingPile.api.vo.TChargingGunVO; |
| | | import com.ruoyi.chargingPile.config.FileUploadConfig; |
| | | import com.ruoyi.chargingPile.service.ISiteService; |
| | | import com.ruoyi.chargingPile.service.TChargingGunService; |
| | | import com.ruoyi.chargingPile.service.TChargingPileService; |
| | |
| | | |
| | | @Autowired |
| | | private TChargingGunService chargingGunService; |
| | | @Autowired |
| | | @Resource |
| | | private ChargingOrderClient chargingOrderClient; |
| | | |
| | | @Resource |
| | | private TChargingPileService chargingPileService; |
| | | @Resource |
| | | private ISiteService siteService; |
| | | |
| | | @Autowired |
| | | private FileUploadConfig fileUploadConfig; |
| | | |
| | | /** |
| | | * 查询充电枪列表 |
| | |
| | | public void downloadQRCode(@PathVariable Integer id, HttpServletResponse response){ |
| | | try { |
| | | TChargingGun chargingGun = chargingGunService.getById(id); |
| | | String fileName = URLEncoder.encode(chargingGun.getCode(), "UTF-8") + ".jpg"; |
| | | TChargingPile chargingPile = chargingPileService.getById(chargingGun.getId()); |
| | | String code = chargingPile.getCode() + chargingGun.getCode(); |
| | | String fileName = URLEncoder.encode(code, "UTF-8") + ".jpg"; |
| | | response.setContentType("application/force-download"); |
| | | response.addHeader("Content-Disposition", "attachment;fileName=" + fileName); |
| | | String url = "https://www.baidu.com?id=" + id; |
| | | String filePath = "D:/Program Files/nginx-1.20.2/html"; |
| | | String url = "https://mxcd.zhinenganguan.com?No=" + code; |
| | | String filePath = fileUploadConfig.getLocation(); |
| | | QRCodeUtils.encode(url, filePath); |
| | | FileInputStream inputStream = new FileInputStream(filePath); |
| | | ServletOutputStream out = response.getOutputStream(); |
| | |
| | | */ |
| | | @ApiOperation(tags = {"后台-工作台"},value = "设备状态统计") |
| | | @PutMapping(value = "/gunStatusStatistics") |
| | | public AjaxResult<GunStatusStatisticsVO> gunStatusStatistics() { |
| | | public R<GunStatusStatisticsVO> gunStatusStatistics() { |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | Long userId = SecurityUtils.getUserId(); |
| | | //获取当前登录的siteIds |
| | |
| | | for (GetSiteListDTO datum : siteList1.getRecords()) { |
| | | siteIds.add(datum.getId()); |
| | | } |
| | | return AjaxResult.ok(chargingGunService.gunStatusStatistics(siteIds)); |
| | | return R.ok(chargingGunService.gunStatusStatistics(siteIds)); |
| | | } |
| | | |
| | | /** |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | 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; |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | |
| | | private final TChargingPileService chargingPileService; |
| | | private final TChargingGunService chargingGunService; |
| | | |
| | | @Resource |
| | | private TAccountingStrategyService accountingStrategyService; |
| | | |
| | | @Resource |
| | | private TAccountingStrategyDetailService accountingStrategyDetailService; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | TChargingPile chargingPile = chargingPileService.getById(id); |
| | | return R.ok(chargingPile); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | return; |
| | | } |
| | | } |
| | | filterChain.doFilter(request, response); |
| | | filterChain.doFilter(servletRequest, servletResponse); |
| | | } |
| | | |
| | | |
| | |
| | | * @param siteIds |
| | | * @return |
| | | */ |
| | | List<Map<Integer, Integer>> getModeStatistics(@Param("siteIds")List<Integer> siteIds); |
| | | List<Map<String, Object>> getModeStatistics(@Param("siteIds")List<Integer> siteIds); |
| | | |
| | | /** |
| | | * 统计充电枪状态 |
| | |
| | | import io.seata.core.context.RootContext; |
| | | import io.seata.core.exception.TransactionException; |
| | | import io.seata.spring.annotation.GlobalTransactional; |
| | | import io.seata.tm.api.GlobalTransaction; |
| | | import io.seata.tm.api.GlobalTransactionContext; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | List<SysRole> data = r.getData(); |
| | | for (PartnerListDTO partnerListDTO : list) { |
| | | Integer roleId = partnerListDTO.getRoleId(); |
| | | if(null != roleId){ |
| | | if(null == roleId){ |
| | | continue; |
| | | } |
| | | SysRole sysRole = data.stream().filter(s -> roleId.equals(s.getRoleId())).findFirst().get(); |
| | | SysRole sysRole = data.stream().filter(s -> roleId.compareTo(s.getRoleId().intValue()) == 0).findFirst().get(); |
| | | if(null != sysRole){ |
| | | partnerListDTO.setRoleName(sysRole.getRoleName()); |
| | | } |
| | |
| | | @Override |
| | | @GlobalTransactional(rollbackFor = Exception.class)//分布式事务 |
| | | public AjaxResult addPartner(Partner partner) { |
| | | System.err.println("事务ID:" + RootContext.getXID()); |
| | | //校验参数和重复数据 |
| | | AjaxResult ajaxResult = addPartnerParameterCheck(partner); |
| | | if(ajaxResult.isError()){ |
| | |
| | | if(null != one){ |
| | | return AjaxResult.error("登录账号不能重复"); |
| | | } |
| | | //添加新数据 |
| | | this.save(partner); |
| | | //添加登录账户 |
| | | SysUser user = new SysUser(); |
| | | user.setPhonenumber(partner.getPhoneOne()); |
| | |
| | | user.setRoleType(2); |
| | | user.setObjectId(partner.getId()); |
| | | R r = sysUserClient.addSysUser(user); |
| | | if(r.getCode() != 200){ |
| | | // 手动进行全局事务回滚 |
| | | try { |
| | | GlobalTransactionContext.getCurrent().rollback(); |
| | | } catch (TransactionException e) { |
| | | throw new RuntimeException(e); |
| | | if(200 != r.getCode()){ |
| | | throw new RuntimeException(r.getMsg()); |
| | | } |
| | | return AjaxResult.error(r.getMsg()); |
| | | } |
| | | //添加新数据 |
| | | this.save(partner); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | |
| | | } |
| | | Partner oldPartner = this.getById(partner.getId()); |
| | | SysUser user = sysUserClient.queryUserByUserName(oldPartner.getAccount()).getData(); |
| | | |
| | | //修改数据 |
| | | this.updateById(partner); |
| | | //修改登录账户 |
| | | if(null == user){ |
| | | user = new SysUser(); |
| | |
| | | throw new RuntimeException(r.getMsg()); |
| | | } |
| | | } |
| | | |
| | | //修改数据 |
| | | this.updateById(partner); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | |
| | | //站点 |
| | | long count = siteService.count(new LambdaQueryWrapper<Site>().in(Site::getPartnerId, Arrays.asList(ids)).eq(Site::getDelFlag, 0)); |
| | | if(count > 0){ |
| | | return AjaxResult.error("当前合作商有关联站点,删除失败!"); |
| | | return AjaxResult.error("该合作商已关联站点不可删除!"); |
| | | } |
| | | //充电桩 |
| | | long count1 = chargingPileService.count(new LambdaQueryWrapper<TChargingPile>().eq(TChargingPile::getPartnerId, Arrays.asList(ids)).eq(TChargingPile::getDelFlag, 0)); |
| | | long count1 = chargingPileService.count(new LambdaQueryWrapper<TChargingPile>().in(TChargingPile::getPartnerId, Arrays.asList(ids)).eq(TChargingPile::getDelFlag, 0)); |
| | | if(count1 > 0){ |
| | | return AjaxResult.error("当前合作商有关联充电桩,删除失败!"); |
| | | return AjaxResult.error("该合作商已关联充电桩不可删除!"); |
| | | } |
| | | for (Integer id : ids) { |
| | | Partner partner = this.getById(id); |
| | |
| | | public AjaxResult delSite(Integer[] ids) { |
| | | //查询是否有关联数据 |
| | | //充电桩 |
| | | long count1 = chargingPileService.count(new LambdaQueryWrapper<TChargingPile>().eq(TChargingPile::getSiteId, Arrays.asList(ids)).eq(TChargingPile::getDelFlag, 0)); |
| | | long count1 = chargingPileService.count(new LambdaQueryWrapper<TChargingPile>().in(TChargingPile::getSiteId, Arrays.asList(ids)) |
| | | .eq(TChargingPile::getDelFlag, 0)); |
| | | if(count1 > 0){ |
| | | return AjaxResult.error("该站点有关联充电桩,删除失败!"); |
| | | return AjaxResult.error("该站点已添加充电桩,不可删除。"); |
| | | } |
| | | for (Integer id : ids) { |
| | | Site site = this.getById(id); |
| | |
| | | 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(); |
| | |
| | | return ajaxResult; |
| | | } |
| | | long count = this.count(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getCode, dto.getCode()) |
| | | .eq(TChargingGun::getDelFlag, 0)); |
| | | .eq(TChargingGun::getDelFlag, 0).eq(TChargingGun::getChargingPileId, dto.getChargingPileId())); |
| | | if(count > 0){ |
| | | return AjaxResult.error("接口编码已存在"); |
| | | } |
| | |
| | | return ajaxResult; |
| | | } |
| | | TChargingGun one = this.getOne(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getCode, dto.getCode()) |
| | | .eq(TChargingGun::getDelFlag, 0)); |
| | | .eq(TChargingGun::getDelFlag, 0).eq(TChargingGun::getChargingPileId, dto.getChargingPileId())); |
| | | if(null != one && !dto.getId().equals(one.getId())){ |
| | | return AjaxResult.error("接口编码已存在"); |
| | | } |
| | |
| | | GunStatusStatisticsVO gunStatusStatisticsVO = new GunStatusStatisticsVO(); |
| | | |
| | | if(CollectionUtils.isEmpty(siteIds)){ |
| | | 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); |
| | | statusStatisticsNull.put(2, 0); |
| | | statusStatisticsNull.put(3, 0); |
| | | gunStatusStatisticsVO.setStatusStatistics(statusStatisticsNull); |
| | | // List<Map<Integer, Integer>> modeStatisticsNull = new ArrayList<>(); |
| | | // HashMap<Integer, Integer> objectObjectHashMap1 = new HashMap<>(); |
| | | // objectObjectHashMap1.put(1, 0); |
| | | // modeStatisticsNull.add(objectObjectHashMap1); |
| | | // HashMap<Integer, Integer> objectObjectHashMap2= new HashMap<>(); |
| | | // objectObjectHashMap2.put(2, 0); |
| | | // modeStatisticsNull.add(objectObjectHashMap2); |
| | | // HashMap<Integer, Integer> objectObjectHashMap3= new HashMap<>(); |
| | | // objectObjectHashMap3.put(3, 0); |
| | | // modeStatisticsNull.add(objectObjectHashMap3); |
| | | // gunStatusStatisticsVO.setModeStatistics(modeStatisticsNull); |
| | | // Map<Integer, Integer> statusStatisticsNull = new HashMap<>(); |
| | | // statusStatisticsNull.put(1, 0); |
| | | // statusStatisticsNull.put(2, 0); |
| | | // statusStatisticsNull.put(3, 0); |
| | | // gunStatusStatisticsVO.setStatusStatistics(statusStatisticsNull); |
| | | List<StatusModeStatisticsVO> statusModeStatistics = new ArrayList<>(); |
| | | for (int i = 1; i < 4; i++) { |
| | | StatusModeStatisticsVO statusModeStatisticsVO = new StatusModeStatisticsVO(); |
| | |
| | | gunStatusStatisticsVO.setStatusModeStatistics(statusModeStatistics); |
| | | } |
| | | |
| | | List<Map<Integer, Integer>> modeStatistics = this.baseMapper.getModeStatistics(siteIds); |
| | | List<Map<String, Object>> 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); |
| | | Map<String, Object> modeStatistics1 = new HashMap<>(); |
| | | modeStatistics1.put("1", "0"); |
| | | modeStatistics1.put("2", "0"); |
| | | modeStatistics1.put("3", "0"); |
| | | modeStatistics.add(modeStatistics1); |
| | | } |
| | | gunStatusStatisticsVO.setModeStatistics(modeStatistics); |
| | | |
| | | List<Map<Integer, Integer>> statusStatistics = new ArrayList<>(); |
| | | List<Map<String, Integer>> statusStatistics = new ArrayList<>(); |
| | | // 离线 |
| | | Long count = this.baseMapper.selectCount(Wrappers.lambdaQuery(TChargingGun.class) |
| | | .eq(TChargingGun::getStatus, 1)); |
| | | statusStatistics.add(new HashMap<>(1,count.intValue())); |
| | | HashMap<String, Integer> objectObjectHashMap1 = new HashMap<>(); |
| | | objectObjectHashMap1.put("1", count.intValue()); |
| | | statusStatistics.add(objectObjectHashMap1); |
| | | // statusStatistics.put(1, count.intValue()); |
| | | // 故障 |
| | | count = this.baseMapper.selectCount(Wrappers.lambdaQuery(TChargingGun.class) |
| | | .eq(TChargingGun::getStatus, 7)); |
| | | statusStatistics.add(new HashMap<>(2,count.intValue())); |
| | | HashMap<String, Integer> objectObjectHashMap2 = new HashMap<>(); |
| | | objectObjectHashMap2.put("2", count.intValue()); |
| | | statusStatistics.add(objectObjectHashMap2); |
| | | |
| | | // statusStatistics.put(2, count.intValue()); |
| | | // 充电中 |
| | | count = this.baseMapper.selectCount(Wrappers.lambdaQuery(TChargingGun.class) |
| | | .in(TChargingGun::getStatus, Arrays.asList(3,4,5,6))); |
| | | statusStatistics.add(new HashMap<>(3,count.intValue())); |
| | | HashMap<String, Integer> objectObjectHashMap = new HashMap<>(); |
| | | objectObjectHashMap.put("3", count.intValue()); |
| | | statusStatistics.add(objectObjectHashMap); |
| | | |
| | | // statusStatistics.put(3, count.intValue()); |
| | | gunStatusStatisticsVO.setModeStatistics(statusStatistics); |
| | | gunStatusStatisticsVO.setStatusStatistics(statusStatistics); |
| | | |
| | | List<StatusModeStatisticsVO> statusModeStatisticsVOS = new ArrayList<>(); |
| | | StatusModeStatisticsVO statusModeStatistics1 = this.baseMapper.getStatusModeStatistics(siteIds,1); |
| | |
| | | } |
| | | } |
| | | }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); |
| | |
| | | public AjaxResult delChargingPile(Integer[] ids) { |
| | | //检查是否有关联数据 |
| | | //接口 |
| | | long count = chargingGunService.count(new LambdaQueryWrapper<TChargingGun>().eq(TChargingGun::getChargingPileId, Arrays.asList(ids)).eq(TChargingGun::getDelFlag, 0)); |
| | | long count = chargingGunService.count(new LambdaQueryWrapper<TChargingGun>().in(TChargingGun::getChargingPileId, Arrays.asList(ids)) |
| | | .eq(TChargingGun::getDelFlag, 0)); |
| | | if(count > 0){ |
| | | return AjaxResult.error("该充电桩有关联的接口数据,删除失败!"); |
| | | return AjaxResult.error("该充电桩已添加接口,不可删除。"); |
| | | } |
| | | for (Integer id : ids) { |
| | | TChargingPile chargingPile = this.getById(id); |
| | |
| | | a.phone, |
| | | a.service_phone as servicePhone, |
| | | a.parking_space as parkingSpace, |
| | | DATE_FORMAT('%Y-%m-%d %H:%i:%s', a.establishment_time) as establishmentTime, |
| | | DATE_FORMAT(a.establishment_time, '%Y-%m-%d %H:%i:%s') as establishmentTime, |
| | | c.num as chargingPileNumber, |
| | | a.sort, |
| | | a.accounting_strategy_id as accountingStrategyId, |
| | |
| | | return R.ok(message); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "远程重启",tags = {"硬件接口"}) |
| | | @PostMapping(value = "/platformRestart") |
| | | public R platformRestart(String deviceId) { |
| | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | .last(" and DATE_FORMAT(now(), '%H:%i') between start_time and end_time")); |
| | | return R.ok(one); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取订单对应的计费策略数据 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @PostMapping("/getAllAccountingStrategyDetailOrder") |
| | | public R<List<AccountingStrategyDetailOrder>> getAllAccountingStrategyDetailOrder(@RequestParam("orderId") Long orderId){ |
| | | List<AccountingStrategyDetailOrder> one = accountingStrategyDetailOrderService.list(new LambdaQueryWrapper<AccountingStrategyDetailOrder>() |
| | | .eq(AccountingStrategyDetailOrder::getChargingOrderId, orderId) |
| | | .orderByAsc(AccountingStrategyDetailOrder::getStartTime)); |
| | | return R.ok(one); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.api.model.AccountingStrategyOrder; |
| | | import com.ruoyi.order.service.AccountingStrategyOrderService; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/9/25 18:33 |
| | | */ |
| | | @RequestMapping("/accountingStrategyOrder") |
| | | @RestController |
| | | public class AccountingStrategyOrderController { |
| | | |
| | | @Resource |
| | | private AccountingStrategyOrderService accountingStrategyOrderService; |
| | | |
| | | |
| | | /** |
| | | * 根据id获取数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @PostMapping("/getAccountingStrategyOrderById") |
| | | public R<AccountingStrategyOrder> getAccountingStrategyOrderById(@RequestParam("id") Integer id){ |
| | | AccountingStrategyOrder accountingStrategyOrder = accountingStrategyOrderService.getById(id); |
| | | return R.ok(accountingStrategyOrder); |
| | | } |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.ServletInputStream; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.PrintWriter; |
| | | import java.time.YearMonth; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.time.temporal.ChronoUnit; |
| | | import java.time.temporal.TemporalAdjusters; |
| | | import java.util.*; |
| | |
| | | |
| | | /** |
| | | * 充电充值支付回调 |
| | | * @param request |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping(value = "/chargingOrderWXCallback") |
| | | public void chargingOrderWXCallback(HttpServletRequest request) { |
| | | Map<String, Object> data = wxPaymentClient.payNotify(request).getData(); |
| | | if (null != data) { |
| | | String out_trade_no = data.get("out_trade_no").toString(); |
| | | String transaction_id = data.get("transaction_id").toString(); |
| | | String attach = data.get("attach").toString(); |
| | | public void chargingOrderWXCallback(@RequestParam("out_trade_no") String out_trade_no, @RequestParam("transaction_id") String transaction_id, |
| | | @RequestParam("attach") String attach) { |
| | | AjaxResult ajaxResult = chargingOrderService.chargingOrderCallback(1, out_trade_no, transaction_id, attach); |
| | | if (ajaxResult.isSuccess()) { |
| | | wxPaymentClient.ack(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | /** |
| | | * 远程启动失败后退款回调 |
| | | * @param request |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping(value = "/chargingOrderStartupFailureWxRefund") |
| | | public void chargingOrderStartupFailureWxRefund(HttpServletRequest request){ |
| | | WxRefundNotifyResp data = wxPaymentClient.refundNotify(request).getData(); |
| | | if(null != data){ |
| | | String out_refund_no = data.getOut_refund_no(); |
| | | String refund_id = data.getRefund_id(); |
| | | String tradeState = data.getTradeState(); |
| | | String success_time = data.getSuccess_time(); |
| | | public void chargingOrderStartupFailureWxRefund(@RequestParam("out_trade_no") String out_refund_no, |
| | | @RequestParam("out_trade_no") String refund_id, |
| | | @RequestParam("out_trade_no") String tradeState, |
| | | @RequestParam("out_trade_no") String success_time){ |
| | | chargingOrderService.chargingOrderStartupFailureWxRefund(out_refund_no, refund_id, tradeState, success_time); |
| | | } |
| | | } |
| | | |
| | | |
| | |
| | | siteIds.add(statisticsQueryDto.getSiteId()); |
| | | } |
| | | if (statisticsQueryDto.getDayType()==1) { |
| | | List<Map<String,Object>> charMap = chargingOrderService.getHourType(siteIds,statisticsQueryDto); |
| | | List<Map<String,Object>> charMap1 = chargingOrderService.getHourType(siteIds,statisticsQueryDto); |
| | | List<Map<String, Object>> charMap = new ArrayList<>(); |
| | | // 生成从 "00:00" 到 "23:00" 的时间数据 |
| | | for (int hour = 0; hour < 24; hour++) { |
| | | String time = String.format("%02d:00", hour); |
| | | Map<String, Object> mapWithTimeValue = findMapWithTimeValue(charMap1, time); |
| | | if (mapWithTimeValue!=null){ |
| | | charMap.add(mapWithTimeValue); |
| | | }else { |
| | | Map<String, Object> timeMap = new HashMap<>(); |
| | | timeMap.put("time", time); // 初始化值为 null |
| | | timeMap.put("electrovalence", 0); |
| | | timeMap.put("orderCount", 0); |
| | | timeMap.put("servicecharge", 0); |
| | | timeMap.put("electricity", 0); |
| | | charMap.add(timeMap); |
| | | } |
| | | } |
| | | return R.ok(charMap); |
| | | }else if (statisticsQueryDto.getDayType()==2){ |
| | | List<Map<String,Object>> charMap = chargingOrderService.getDateType(siteIds,statisticsQueryDto); |
| | | return R.ok(charMap); |
| | | }else if (statisticsQueryDto.getDayType()==3){ |
| | | List<Map<String,Object>> charMap = chargingOrderService.getMonthType(siteIds,statisticsQueryDto); |
| | | // 假设 chargingOrderService.getDateType() 返回的是按天的数据 |
| | | List<Map<String, Object>> charMap1 = chargingOrderService.getDateType(siteIds, statisticsQueryDto); |
| | | |
| | | // 解析 startTime 和 endTime 为 LocalDate |
| | | LocalDate startDate = statisticsQueryDto.getStartTime(); |
| | | LocalDate endDate = statisticsQueryDto.getEndTime(); |
| | | |
| | | List<Map<String, Object>> dateRangeStatistics = new ArrayList<>(); |
| | | |
| | | // 遍历日期范围 |
| | | while (!startDate.isAfter(endDate)) { |
| | | String formattedDate = startDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | Map<String, Object> dailyStats = findMapWithDateValue(charMap1, formattedDate); |
| | | |
| | | if (dailyStats != null) { |
| | | dateRangeStatistics.add(dailyStats); |
| | | } else { |
| | | Map<String, Object> dateMap = new HashMap<>(); |
| | | dateMap.put("time", formattedDate); |
| | | dateMap.put("electrovalence", 0); |
| | | dateMap.put("orderCount", 0); |
| | | dateMap.put("servicecharge", 0); |
| | | dateMap.put("electricity", 0); |
| | | dateRangeStatistics.add(dateMap); |
| | | } |
| | | |
| | | // 移动到下一天 |
| | | startDate = startDate.plusDays(1); |
| | | } |
| | | |
| | | // return dateRangeStatistics; |
| | | return R.ok(dateRangeStatistics); |
| | | }else if (statisticsQueryDto.getDayType()==3){ |
| | | List<Map<String,Object>> charMap1 = chargingOrderService.getMonthType(siteIds,statisticsQueryDto); |
| | | // 解析 startTime 和 endTime 为 LocalDate |
| | | LocalDate startDate = statisticsQueryDto.getStartTime(); |
| | | LocalDate endDate = statisticsQueryDto.getEndTime(); |
| | | |
| | | List<Map<String, Object>> dateRangeStatistics = new ArrayList<>(); |
| | | |
| | | // 遍历日期范围 |
| | | while (!startDate.isAfter(endDate)) { |
| | | String formattedDate = startDate.format(DateTimeFormatter.ofPattern("yyyy-MM")); |
| | | Map<String, Object> dailyStats = findMapWithDateValue(charMap1, formattedDate); |
| | | |
| | | if (dailyStats != null) { |
| | | dateRangeStatistics.add(dailyStats); |
| | | } else { |
| | | Map<String, Object> dateMap = new HashMap<>(); |
| | | dateMap.put("time", formattedDate); |
| | | dateMap.put("electrovalence", 0); |
| | | dateMap.put("orderCount", 0); |
| | | dateMap.put("servicecharge", 0); |
| | | dateMap.put("electricity", 0); |
| | | dateRangeStatistics.add(dateMap); |
| | | } |
| | | |
| | | // 移动到下一天 |
| | | startDate = startDate.plusMonths(1); |
| | | } |
| | | return R.ok(dateRangeStatistics); |
| | | |
| | | } |
| | | return R.ok(); |
| | | |
| | | |
| | | } |
| | | |
| | | private static Map<String, Object> findMapWithTimeValue(List<Map<String, Object>> charMap1,String timeValue) { |
| | | for (Map<String, Object> map : charMap1) { |
| | | if (map.containsKey("time") && map.get("time").equals(timeValue)) { |
| | | return map; |
| | | } |
| | | } |
| | | return null; // 如果没有找到,返回 null |
| | | } |
| | | |
| | | private Map<String, Object> findMapWithDateValue(List<Map<String, Object>> list, String date) { |
| | | for (Map<String, Object> map : list) { |
| | | if (date.equals(map.get("time"))) { |
| | | return map; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping(value = "/work/use") |
| | | @ApiOperation(value = "运营情况", tags = {"管理后台-工作台"}) |
| | | @ApiOperation(value = "利用率", tags = {"管理后台-工作台"}) |
| | | public R workUse(@RequestBody ChargingDetailQueryDto statisticsQueryDto) { |
| | | List<Integer> siteIds = new ArrayList<>(); |
| | | if (statisticsQueryDto.getSiteId() == null) { |
| | |
| | | BigDecimal result = chargingCapacity.divide(totalRatedPower, 2, RoundingMode.HALF_UP); |
| | | map.put("chargingCapacity", result); |
| | | }); |
| | | return R.ok(capMap); |
| | | |
| | | |
| | | |
| | | // |
| | | // 解析 startTime 和 endTime 为 LocalDate |
| | | LocalDate startDate = statisticsQueryDto.getStartTime(); |
| | | LocalDate endDate = statisticsQueryDto.getEndTime(); |
| | | |
| | | List<Map<String, Object>> dateRangeStatistics = new ArrayList<>(); |
| | | |
| | | // 遍历日期范围 |
| | | while (!startDate.isAfter(endDate)) { |
| | | String formattedDate = startDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd")); |
| | | Map<String, Object> dailyStats = findMapWithDateValue(capMap, formattedDate); |
| | | |
| | | if (dailyStats != null) { |
| | | dateRangeStatistics.add(dailyStats); |
| | | } else { |
| | | Map<String, Object> dateMap = new HashMap<>(); |
| | | dateMap.put("time", formattedDate); |
| | | dateMap.put("chargingCapacity", 0); |
| | | dateRangeStatistics.add(dateMap); |
| | | } |
| | | |
| | | // 移动到下一天 |
| | | startDate = startDate.plusDays(1); |
| | | } |
| | | return R.ok(dateRangeStatistics); |
| | | |
| | | |
| | | } |
| | |
| | | @Resource |
| | | private TOrderInvoiceService invoiceService; |
| | | @ResponseBody |
| | | @PostMapping(value = "/work/shopOrder") |
| | | @GetMapping(value = "/work/shopOrder") |
| | | @ApiOperation(value = "购物订单统计", tags = {"管理后台-工作台"}) |
| | | public R shopOrder(@RequestBody ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | public R shopOrder() { |
| | | Long count = shoppingOrderService.lambdaQuery().eq(TShoppingOrder::getStatus, 1).count(); |
| | | Long count1 = shoppingOrderService.lambdaQuery().eq(TShoppingOrder::getStatus, 2).count(); |
| | | List<Long> counts = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping(value = "/work/invoice") |
| | | @GetMapping(value = "/work/invoice") |
| | | @ApiOperation(value = "开票统计", tags = {"管理后台-工作台"}) |
| | | public R invoice(@RequestBody ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | public R invoice() { |
| | | Long count = invoiceService.lambdaQuery().eq(TOrderInvoice::getStatus, 1).count(); |
| | | Long count1 = invoiceService.lambdaQuery().eq(TOrderInvoice::getStatus, 3).count(); |
| | | List<Long> counts = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping(value = "/work/users/count") |
| | | @GetMapping(value = "/work/users/count") |
| | | @ApiOperation(value = "用户数量", tags = {"管理后台-工作台"}) |
| | | public R usersCount(@RequestBody ChargingStatisticsQueryDto statisticsQueryDto) { |
| | | public R usersCount() { |
| | | List<Map<String,Object>> userMap = chargingOrderService.countAllUserData(); |
| | | return R.ok(userMap); |
| | | |
| | |
| | | import com.ruoyi.chargingPile.api.feignClient.ChargingPileClient; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPile; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.dto.ExchangeBackDto; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | |
| | | for (int i = 0; i < split1.length; i++) { |
| | | Integer reduce = tShoppingOrderService.list(new QueryWrapper<TShoppingOrder>() |
| | | .eq("order_type",1) |
| | | .ne("refund_status", 2)) |
| | | .eq("goods_id", split1[i]) |
| | | .isNull("refund_status")) |
| | | .stream().map(TShoppingOrder::getPurchaseQuantity).reduce(0, Integer::sum); |
| | | res.add(reduce); |
| | | } |
| | | break; |
| | | case 2: |
| | | for (int i = 0; i < split1.length; i++) { |
| | | Integer reduce = exchangeOrderService.list(new QueryWrapper<TExchangeOrder>().eq("order_type",1).ne("status",4).eq("goods_id", split1[i])) |
| | | Integer reduce = exchangeOrderService.list(new QueryWrapper<TExchangeOrder>().eq("order_type",1) |
| | | .ne("status",4).eq("goods_id", split1[i])) |
| | | .stream().map(TExchangeOrder::getPurchaseQuantity).reduce(0, Integer::sum); |
| | | res.add(reduce); |
| | | } |
| | |
| | | } |
| | | |
| | | @PostMapping("/create") |
| | | public R<Long> exchangeCreate(@RequestBody ExchangeDto exchangeDto){ |
| | | public R<ExchangeBackDto> exchangeCreate(@RequestBody ExchangeDto exchangeDto){ |
| | | TExchangeOrder tExchangeOrder = new TExchangeOrder(); |
| | | tExchangeOrder.setCode(OrderCodeUtil.getOrderCode("DH")); |
| | | tExchangeOrder.setAppUserId(exchangeDto.getUserId()); |
| | |
| | | tExchangeOrder.setCreateTime(LocalDateTime.now()); |
| | | tExchangeOrder.setDelFlag(false); |
| | | exchangeOrderService.save(tExchangeOrder); |
| | | return R.ok(tExchangeOrder.getId()); |
| | | ExchangeBackDto exchangeBackDto = new ExchangeBackDto(); |
| | | exchangeBackDto.setId(tExchangeOrder.getId()); |
| | | exchangeBackDto.setCode(tExchangeOrder.getCode()); |
| | | return R.ok(exchangeBackDto); |
| | | |
| | | } |
| | | |
| | |
| | | @RequestParam("invoiceUrl") String invoiceUrl){ |
| | | TOrderInvoice orderInvoice = orderInvoiceService.getById(id); |
| | | orderInvoice.setInvoiceUrl(invoiceUrl); |
| | | orderInvoice.setStatus(3); |
| | | orderInvoiceService.updateById(orderInvoice); |
| | | // 发送邮箱 |
| | | // 收件人电子邮箱,TODO 换成自己的收件箱 |
| | |
| | | //组装的顺序非常重要,一定要先组装文本域,再组装文件 |
| | | MimeBodyPart htmlPart = new MimeBodyPart(); |
| | | // 组装内容 |
| | | htmlPart.setContent("This is message content", "text/html;charset=UTF-8"); |
| | | htmlPart.setContent("开票", "text/html;charset=UTF-8"); |
| | | msgMultipart.addBodyPart(htmlPart); |
| | | |
| | | // 组装附件 |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | | |
| | | |
| | |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.order.api.model.TChargingOrderRefund; |
| | | import com.ruoyi.order.api.model.TExchangeOrder; |
| | | import com.ruoyi.order.api.model.TShoppingOrder; |
| | | import com.ruoyi.order.api.model.TShoppingOrderRefund; |
| | | import com.ruoyi.order.api.query.ShoppingOrderQuery; |
| | | import com.ruoyi.order.dto.*; |
| | | import com.ruoyi.order.service.TShoppingOrderRefundService; |
| | | import com.ruoyi.order.service.TShoppingOrderService; |
| | | import com.ruoyi.other.api.domain.TCoupon; |
| | | import com.ruoyi.other.api.domain.TGoods; |
| | | import com.ruoyi.other.api.feignClient.CouponClient; |
| | | import com.ruoyi.other.api.feignClient.GoodsClient; |
| | | import com.ruoyi.payment.api.feignClient.AliPaymentClient; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | private GoodsClient goodsClient; |
| | | @Resource |
| | | private CouponClient couponClient; |
| | | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private AliPaymentClient aliPaymentClient; |
| | | @Resource |
| | | private WxPaymentClient wxPaymentClient; |
| | | @Resource |
| | | private AppCouponClient appCouponClient; |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | @Resource |
| | | private TShoppingOrderRefundService shoppingOrderRefundService; |
| | | /** |
| | | * 远程管理后台取消订单后退款回调 |
| | | */ |
| | | @ResponseBody |
| | | @PostMapping(value = "/shoppingOrderWxRefund") |
| | | public void shoppingOrderWxRefund(@RequestParam("out_trade_no") String out_refund_no, |
| | | @RequestParam("out_trade_no") String refund_id, |
| | | @RequestParam("out_trade_no") String tradeState, |
| | | @RequestParam("out_trade_no") String success_time){ |
| | | if("SUCCESS".equals(tradeState)){ |
| | | TShoppingOrderRefund one = shoppingOrderRefundService.getOne(new LambdaQueryWrapper<TShoppingOrderRefund>().eq(TShoppingOrderRefund::getRefundCode, out_refund_no)); |
| | | one.setRefundSerialNumber(refund_id); |
| | | one.setRefundStatus(2); |
| | | one.setRefundTime(LocalDateTime.parse(success_time, DateTimeFormatter.ofPattern("yyyy-MM-DDTHH:mm:ss+TIMEZONE"))); |
| | | shoppingOrderRefundService.updateById(one); |
| | | TShoppingOrder byId = shoppingOrderService.getById(one.getShoppingOrderId()); |
| | | byId.setStatus(4); |
| | | shoppingOrderService.updateById(byId); |
| | | if (byId.getAppCouponId() != null) { |
| | | appCouponClient.refund(byId.getAppCouponId().toString()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/getShoppingOrderList") |
| | | @ApiOperation(value = "列表查询", tags = {"管理后台-购物订单"}) |
| | |
| | | PageInfo<TShoppingOrder> res = shoppingOrderService.pageList(query); |
| | | return AjaxResult.success(res); |
| | | } |
| | | @Resource |
| | | private SysUserClient sysUserClient; |
| | | |
| | | @GetMapping("/getShoppingOrderInfoById") |
| | | @ApiOperation(value = "根据订单id查看订单详情", tags = {"管理后台-购物订单"}) |
| | | public AjaxResult<TShoppingOrder> getShoppingOrderList(String id) { |
| | |
| | | TAppUserAddress data = appUserClient.getAddressById(byId.getAppUserAddressId()).getData(); |
| | | if (data!=null){ |
| | | byId.setReceivingName(data.getName()+"-"+data.getPhone()); |
| | | byId.setReceivingAddress(data.getAddress()); |
| | | byId.setReceivingAddress(data.getProvince()+data.getCity() |
| | | +(data.getDistrict()==null?"":data.getDistrict()) |
| | | +(data.getAddress()==null?"":data.getAddress()) |
| | | +(data.getHouseNumber()==null?"":data.getHouseNumber())); |
| | | } |
| | | } |
| | | if (byId.getOrderType()==1){ |
| | | TGoods data = goodsClient.getGoodsById(byId.getGoodsId()).getData(); |
| | | if (data!=null){ |
| | | byId.setName(data.getName()); |
| | | } |
| | | }else { |
| | | TCoupon data = couponClient.getCouponById1(byId.getCouponId()).getData(); |
| | | if (data!=null){ |
| | | byId.setName(data.getName()); |
| | | } |
| | | } |
| | | return AjaxResult.success(byId); |
| | | } |
| | | |
| | | @GetMapping("/deleteShoppingOrder") |
| | | @ApiOperation(value = "批量删除订单", tags = {"管理后台-购物订单"}) |
| | | public AjaxResult<TShoppingOrder> deleteShoppingOrder(String ids) { |
| | | shoppingOrderService.removeBatchByIds(Arrays.asList(ids.split(","))); |
| | | return AjaxResult.success(); |
| | | } |
| | | @Resource |
| | | private TokenService tokenService; |
| | | @Resource |
| | | private AliPaymentClient aliPaymentClient; |
| | | @Resource |
| | | private WxPaymentClient wxPaymentClient; |
| | | @Resource |
| | | private AppCouponClient appCouponClient; |
| | | |
| | | @GetMapping("/cancelShoppingOrder") |
| | | @ApiOperation(value = "取消订单", tags = {"管理后台-购物订单"}) |
| | | public AjaxResult cancelShoppingOrder(String id) { |
| | |
| | | byId.setCancellationId(userid); |
| | | byId.setCancellationTime(LocalDateTime.now()); |
| | | byId.setStatus(4); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | TShoppingOrderRefund tShoppingOrderRefund = new TShoppingOrderRefund(); |
| | | tShoppingOrderRefund.setPayTime(byId.getPayTime()); |
| | | tShoppingOrderRefund.setPayCode(byId.getSerialNumber()); |
| | | tShoppingOrderRefund.setPayAmount(byId.getPaymentAmount()); |
| | | tShoppingOrderRefund.setPayType(1); |
| | | tShoppingOrderRefund.setShoppingOrderId(byId.getId()); |
| | | tShoppingOrderRefund.setRefundAmount(byId.getPaymentAmount()); |
| | | tShoppingOrderRefund.setRefundStatus(1); |
| | | tShoppingOrderRefund.setCode("GWF" + sdf.format(new Date()) + Double.valueOf(Math.random() * 1000).intValue()); |
| | | tShoppingOrderRefund.setRefundTitle("后台取消订单"); |
| | | tShoppingOrderRefund.setRefundContent("后台取消订单"); |
| | | tShoppingOrderRefund.setRefundReason("后台取消订单"); |
| | | tShoppingOrderRefund.setRefundRemark("全额退款"); |
| | | tShoppingOrderRefund.setRefundTotalAmount(byId.getPaymentAmount()); |
| | | switch (byId.getPaymentType()){ |
| | | case 1: |
| | | // 微信 |
| | | WxPaymentRefundModel wxPaymentRefundModel = new WxPaymentRefundModel(); |
| | | wxPaymentRefundModel.setTransaction_id(byId.getSerialNumber()); |
| | | wxPaymentRefundModel.setOut_trade_no(byId.getCode()); |
| | | wxPaymentRefundModel.setOut_refund_no(OrderCodeUtil.getOrderCode("GW")); |
| | | // todo 部署到线上之后写回调地址 |
| | | // wxPaymentRefundModel.setNotify_url(""); |
| | | wxPaymentRefundModel.setOut_refund_no(OrderCodeUtil.getOrderCode("GWTK")); |
| | | wxPaymentRefundModel.setReason("后台购物订单退款"); |
| | | wxPaymentRefundModel.setNotify_url("/payment/wx/refund/notify"); |
| | | String string = byId.getPaymentAmount().multiply(new BigDecimal("100")).toString(); |
| | | if (string.contains(".")){ |
| | | string = string.substring(0,string.indexOf(".")); |
| | |
| | | int i = Integer.parseInt(string); |
| | | WxPaymentRefundModel.RefundAmount refundAmount = new WxPaymentRefundModel.RefundAmount(); |
| | | refundAmount.setTotal(i); |
| | | refundAmount.setCurrency("CNY"); |
| | | refundAmount.setRefund(i); |
| | | wxPaymentRefundModel.setAmount(refundAmount); |
| | | wxPaymentClient.refundOrderR(wxPaymentRefundModel); |
| | | R<String> stringR = wxPaymentClient.refundOrderR(wxPaymentRefundModel); |
| | | if(200 == stringR.getCode()){ |
| | | shoppingOrderRefundService.save(tShoppingOrderRefund); |
| | | } |
| | | break; |
| | | case 2: |
| | | // 支付宝 |
| | | RefundReq refundReq = new RefundReq(); |
| | | refundReq.setOutTradeNo(byId.getSerialNumber()); |
| | | String gw = OrderCodeUtil.getOrderCode("GW"); |
| | | String gw = OrderCodeUtil.getOrderCode("GWF"); |
| | | refundReq.setOutRequestNo(gw); |
| | | refundReq.setRefundAmount(byId.getPaymentAmount().toString()); |
| | | refundReq.setRefundReason("后台退款"); |
| | | refundReq.setRefundReason("后台购物订单退款"); |
| | | RefundResp data = aliPaymentClient.refund(refundReq).getData(); |
| | | if (data!=null){ |
| | | // 退款成功 回退优惠券 |
| | | // byId.setStatus(4); |
| | | byId.setStatus(4); |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-DDTHH:mm:ss+TIMEZONE"); |
| | | TShoppingOrderRefund one = shoppingOrderRefundService.getOne(new LambdaQueryWrapper<TShoppingOrderRefund>().eq(TShoppingOrderRefund::getRefundCode, data.getOutTradeNo())); |
| | | one.setRefundSerialNumber(data.getTradeNo()); |
| | | one.setRefundStatus(2); |
| | | one.setRefundTime(LocalDateTime.parse(sdf1.format(new Date()), DateTimeFormatter.ofPattern("yyyy-MM-DDTHH:mm:ss+TIMEZONE"))); |
| | | shoppingOrderRefundService.updateById(one); |
| | | if (byId.getAppCouponId()!=null){ |
| | | // 退款成功 回退优惠券 |
| | | appCouponClient.refund(byId.getAppCouponId().toString()); |
| | | } |
| | | byId.setRefundCode(gw); |
| | | byId.setRefundAmount(byId.getPaymentAmount()); |
| | | byId.setRefundStatus(2); |
| | | byId.setRefundSerialNumber(data.getTradeNo()); |
| | | } |
| | | shoppingOrderService.updateById(byId); |
| | | } |
| | | break; |
| | | } |
| | | shoppingOrderService.updateById(byId); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @GetMapping("/consignerShoppingOrder") |
| | | @ApiOperation(value = "发货", tags = {"管理后台-购物订单"}) |
| | | public AjaxResult consignerShoppingOrder(String id,String companyName,String code) { |
| | |
| | | shoppingOrderService.updateById(byId); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | @GetMapping("/getMyShoppingOrderList") |
| | | @ApiOperation(value = "获取购买订单列表", tags = {"小程序-商城购买订单"}) |
| | | public AjaxResult<Map<String, Object>> getMyShoppingOrderList(GetMyShoppingOrderList query){ |
| | |
| | | public AjaxResult<Map<String, Object>> getMyShoppingOrderListNum(){ |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | long dfh = shoppingOrderService.count(new LambdaQueryWrapper<TShoppingOrder>().eq(TShoppingOrder::getDelFlag, 0) |
| | | .eq(TShoppingOrder::getStatus, 1).eq(TShoppingOrder::getAppUserId, userId)); |
| | | .eq(TShoppingOrder::getStatus, 1).eq(TShoppingOrder::getAppUserId, userId).eq(TShoppingOrder::getPaymentStatus, 2)); |
| | | long dsh = shoppingOrderService.count(new LambdaQueryWrapper<TShoppingOrder>().eq(TShoppingOrder::getDelFlag, 0) |
| | | .eq(TShoppingOrder::getStatus, 2).eq(TShoppingOrder::getAppUserId, userId)); |
| | | .eq(TShoppingOrder::getStatus, 2).eq(TShoppingOrder::getAppUserId, userId).eq(TShoppingOrder::getPaymentStatus, 2)); |
| | | long ywc = shoppingOrderService.count(new LambdaQueryWrapper<TShoppingOrder>().eq(TShoppingOrder::getDelFlag, 0) |
| | | .eq(TShoppingOrder::getStatus, 3).eq(TShoppingOrder::getAppUserId, userId)); |
| | | .eq(TShoppingOrder::getStatus, 3).eq(TShoppingOrder::getAppUserId, userId).eq(TShoppingOrder::getPaymentStatus, 2)); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("dfh", dfh); |
| | | map.put("dsh", dsh); |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | @GetMapping("/getMyShoppingOrderInfo/{id}") |
| | | @ApiOperation(value = "获取购买订单详情", tags = {"小程序-商城购买订单","管理后台-支付订单-订单信息"}) |
| | | public AjaxResult<MyShoppingOrderInfo> getMyShoppingOrderInfo(@PathVariable String id){ |
| | | MyShoppingOrderInfo info = shoppingOrderService.getMyShoppingOrderInfo(id); |
| | | return AjaxResult.success(info); |
| | | } |
| | | |
| | | |
| | | |
| | | @PutMapping("/confirmReceipt/{id}") |
| | |
| | | return AjaxResult.error("订单已取消,不允许操作。"); |
| | | } |
| | | shoppingOrder.setStatus(3); |
| | | shoppingOrder.setReceivingTime(LocalDateTime.now()); |
| | | shoppingOrderService.updateById(shoppingOrder); |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | * 商城订单取消微信退款回调 |
| | | */ |
| | | @PostMapping("/cancelShoppingOrderWxRefund") |
| | | public void cancelShoppingOrderWxRefund(HttpServletRequest request){ |
| | | WxRefundNotifyResp data = wxPaymentClient.refundNotify(request).getData(); |
| | | if(null != data){ |
| | | String out_refund_no = data.getOut_refund_no(); |
| | | String refund_id = data.getRefund_id(); |
| | | String tradeState = data.getTradeState(); |
| | | String success_time = data.getSuccess_time(); |
| | | public void cancelShoppingOrderWxRefund(@RequestParam("out_refund_no") String out_refund_no, |
| | | @RequestParam("refund_id") String refund_id, |
| | | @RequestParam("tradeState") String tradeState, |
| | | @RequestParam("success_time") String success_time) { |
| | | shoppingOrderService.cancelShoppingOrderWxRefund(out_refund_no, refund_id, tradeState, success_time); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | @ResponseBody |
| | |
| | | @PostMapping("/addVipOrder") |
| | | @ApiOperation(value = "添加会员订单", tags = {"管理后台-会员订单"}) |
| | | public R<Long> addVipOrder(@RequestBody TVipOrder dto) { |
| | | if (dto.getId()!=null){ |
| | | List<TVipOrder> list = vipOrderService.lambdaQuery().eq(TVipOrder::getCode, dto.getCode()) |
| | | .ne(TVipOrder::getId, dto.getId()).list(); |
| | | if (!list.isEmpty())return R.fail("订单编号已存在"); |
| | | }else{ |
| | | List<TVipOrder> list = vipOrderService.lambdaQuery().eq(TVipOrder::getCode, dto.getCode()).list(); |
| | | if (!list.isEmpty())return R.fail("订单编号已存在"); |
| | | } |
| | | vipOrderService.saveOrUpdate(dto); |
| | | return R.ok(dto.getId()); |
| | | } |
| | |
| | | private String phone; |
| | | @Excel(name = "备注",width = 30) |
| | | private String remark; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "申请时间",width = 30,exportFormat="yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "申请时间",width = 30) |
| | | private String createTime; |
| | | |
| | | |
| | |
| | | package com.ruoyi.order.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.order.api.model.TExchangeOrder; |
| | | import com.ruoyi.order.api.query.ShoppingOrderQuery; |
| | | import com.ruoyi.order.dto.ExchangeOrderGoodsInfo; |
| | | import com.ruoyi.order.dto.GetMyExchangeOrder; |
| | | import com.ruoyi.order.dto.MyExchangeOrderList; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | import com.ruoyi.integration.api.vo.GetPlatformStopChargingReply; |
| | | import com.ruoyi.order.api.dto.SettlementConfirmAdd; |
| | | import com.ruoyi.order.api.feignClient.AccountingStrategyDetailOrderClient; |
| | | import com.ruoyi.order.api.feignClient.AccountingStrategyOrderClient; |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderAccountingStrategyClient; |
| | | import com.ruoyi.order.api.model.*; |
| | | import com.ruoyi.order.api.query.ChargingOrderQuery; |
| | |
| | | import com.ruoyi.order.service.TChargingOrderService; |
| | | import com.ruoyi.order.service.TOrderEvaluateService; |
| | | import com.ruoyi.order.service.*; |
| | | import com.ruoyi.other.api.domain.TCoupon; |
| | | import com.ruoyi.other.api.domain.TGoods; |
| | | import com.ruoyi.other.api.domain.*; |
| | | import com.ruoyi.order.vo.ChargingOrderListInfoVO; |
| | | import com.ruoyi.other.api.domain.TIntegralRule; |
| | | 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; |
| | |
| | | private AccountingStrategyDetailOrderClient accountingStrategyDetailOrderClient; |
| | | |
| | | @Resource |
| | | private AccountingStrategyOrderClient accountingStrategyOrderClient; |
| | | |
| | | @Resource |
| | | private AccountingStrategyClient accountingStrategyClient; |
| | | |
| | | @Resource |
| | |
| | | |
| | | @Resource |
| | | private VipClient vipClient; |
| | | |
| | | @Resource |
| | | private UserTagClient userTagClient; |
| | | |
| | | @Resource |
| | | private AppUserTagClient appUserTagClient; |
| | | |
| | | //计数器 |
| | | private Map<String, Integer> counter_map = new HashMap<>(); |
| | |
| | | chargingOrder.setRechargePaymentStatus(1); |
| | | chargingOrder.setRechargeAmount(addChargingOrder.getPaymentAmount()); |
| | | chargingOrder.setAppCouponId(addChargingOrder.getAppUserCouponId()); |
| | | if(null != appUser.getVipId()){ |
| | | chargingOrder.setVipDiscount(new BigDecimal(10)); |
| | | chargingOrder.setVipDiscountAmount(BigDecimal.ZERO); |
| | | |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(tChargingGun.getSiteId())).getData().get(0); |
| | | Integer accountingStrategyId = tChargingGun.getAccountingStrategyId(); |
| | | if(null == accountingStrategyId){ |
| | | //查询站点上面的计费策略 |
| | | accountingStrategyId = site.getAccountingStrategyId(); |
| | | } |
| | | TAccountingStrategy accountingStrategy = accountingStrategyClient.getAccountingStrategyById(accountingStrategyId).getData(); |
| | | |
| | | //直营站点才可以享受会员折扣 |
| | | if(null != appUser.getVipId() && 1 == site.getBusinessCategory()){ |
| | | TVip vip = vipClient.getInfo(appUser.getVipId()).getData(); |
| | | BigDecimal discount = null; |
| | | if(1 == vip.getType()){ |
| | | //普通会员折扣使用积分策略上的折扣,且有最高优惠金额 |
| | | discount = accountingStrategy.getDiscount(); |
| | | }else{ |
| | | //内部会员使用会员信息设置的折扣,没有最高优惠金额 |
| | | discount = vip.getDiscount(); |
| | | } |
| | | GetAppUserVipDetail getAppUserVipDetail = new GetAppUserVipDetail(); |
| | | getAppUserVipDetail.setAppUserId(appUser.getId()); |
| | | getAppUserVipDetail.setVipId(appUser.getVipId()); |
| | |
| | | if(null != vipDetail){ |
| | | Integer chargeNum = vipDetail.getChargeNum(); |
| | | if(0 > chargeNum){ |
| | | chargingOrder.setVipDiscount(vipDetail.getDiscount()); |
| | | BigDecimal discountAmount = addChargingOrder.getPaymentAmount().multiply((new BigDecimal(10) |
| | | .subtract(vipDetail.getDiscount())).divide(new BigDecimal(10))).setScale(4, BigDecimal.ROUND_HALF_EVEN); |
| | | chargingOrder.setVipDiscountAmount(discountAmount); |
| | | chargingOrder.setVipDiscount(discount); |
| | | } |
| | | } |
| | | |
| | | } |
| | | this.save(chargingOrder); |
| | | |
| | | //添加订单的计费策略 |
| | | Integer accountingStrategyId = tChargingGun.getAccountingStrategyId(); |
| | | if(null == accountingStrategyId){ |
| | | //查询站点上面的计费策略 |
| | | Site site = siteClient.getSiteByIds(Arrays.asList(tChargingGun.getSiteId())).getData().get(0); |
| | | accountingStrategyId = site.getAccountingStrategyId(); |
| | | } |
| | | TAccountingStrategy accountingStrategy = accountingStrategyClient.getAccountingStrategyById(accountingStrategyId).getData(); |
| | | List<TAccountingStrategyDetail> strategyDetailList = accountingStrategyDetailClient.getListByAccountingStrategyId(accountingStrategyId).getData(); |
| | | AccountingStrategyOrder accountingStrategyOrder = new AccountingStrategyOrder(); |
| | | BeanUtils.copyProperties(accountingStrategy, accountingStrategyOrder); |
| | |
| | | paymentOrder.setAmount(addChargingOrder.getPaymentAmount()); |
| | | paymentOrder.setOpenId(appUser.getWxOpenid()); |
| | | paymentOrder.setDescription("充电充值"); |
| | | paymentOrder.setNotifyUrl("/order/t-charging-order/chargingOrderWXCallback"); |
| | | paymentOrder.setNotifyUrl("/payment/wx/pay/notify"); |
| | | Map<String, Object> data = wxPaymentClient.orderPay(paymentOrder).getData(); |
| | | return AjaxResult.success(data); |
| | | } |
| | |
| | | req.setBody("充电充值"); |
| | | AliPaymentResp data = aliPaymentClient.payment(req).getData(); |
| | | if(null != data){ |
| | | data.setNotifyUrl(data.getNotifyUrl() + "/t-charging-order/chargingOrderALICallback"); |
| | | data.setNotifyUrl(data.getNotifyUrl() + "/order/t-charging-order/chargingOrderALICallback"); |
| | | return AjaxResult.success(data); |
| | | } |
| | | } |
| | |
| | | |
| | | //根据当前充值的金额和计费模板算出充电的金额 |
| | | BigDecimal rechargeAmount = chargingOrder.getRechargeAmount(); |
| | | //计算充电金额,会员需要将折扣金额加入到充电总金额中 |
| | | TChargingGun chargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | AccountingStrategyDetailOrder strategyDetail = accountingStrategyDetailOrderClient.getNowAccountingStrategyDetailOrder(chargingOrder.getId()).getData(); |
| | | //总单价 |
| | | BigDecimal totalUnitPrice = strategyDetail.getServiceCharge().add(strategyDetail.getElectrovalence()); |
| | | //计算能充电的度数 |
| | | BigDecimal degrees = rechargeAmount.divide(totalUnitPrice); |
| | | BigDecimal rechargeAmount1 = new BigDecimal(rechargeAmount.toString()); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("HHmm"); |
| | | Long now = Long.valueOf(sdf.format(new Date())); |
| | | Long nowTimeMillis = System.currentTimeMillis(); |
| | | //根据支付金额,获取出使用的计费策略明细 |
| | | //计算电费金额和服务费 |
| | | BigDecimal serviceCharge = strategyDetail.getServiceCharge().multiply(degrees); |
| | | BigDecimal electrovalence = strategyDetail.getElectrovalence().multiply(degrees); |
| | | BigDecimal serviceCharge = BigDecimal.ZERO; |
| | | BigDecimal electrovalence = BigDecimal.ZERO; |
| | | BigDecimal discountAmount = BigDecimal.ZERO; |
| | | BigDecimal discount = chargingOrder.getVipDiscount(); |
| | | //先根据额定功率计算出每秒充电度数,然后计算出支付金额能充多少度电 |
| | | TChargingGun tChargingGun = chargingGunClient.getChargingGunById(chargingOrder.getChargingGunId()).getData(); |
| | | BigDecimal s_degrees = tChargingGun.getRatedPower().divide(new BigDecimal(3600), 6, RoundingMode.HALF_EVEN); |
| | | |
| | | //再处理会员折扣 |
| | | BigDecimal discount = BigDecimal.ZERO; |
| | | TAppUser appUser = appUserClient.getUserById(chargingOrder.getAppUserId()).getData(); |
| | | List<AccountingStrategyDetailOrder> list = accountingStrategyDetailOrderClient.getAllAccountingStrategyDetailOrder(chargingOrder.getId()).getData(); |
| | | for (AccountingStrategyDetailOrder accountingStrategyDetailOrder : list) { |
| | | Integer start = Integer.valueOf(accountingStrategyDetailOrder.getStartTime().replaceAll(":", "")); |
| | | Integer end = Integer.valueOf(accountingStrategyDetailOrder.getEndTime().replaceAll(":", "")); |
| | | String[] split = accountingStrategyDetailOrder.getEndTime().split(":"); |
| | | if(now >= start && now < end){ |
| | | Calendar calendar = Calendar.getInstance(); |
| | | calendar.set(Calendar.HOUR_OF_DAY, Integer.valueOf(split[0])); |
| | | calendar.set(Calendar.MINUTE, Integer.valueOf(split[1])); |
| | | //到此策略结束的秒数 |
| | | if(null == nowTimeMillis){ |
| | | String[] split1 = accountingStrategyDetailOrder.getStartTime().split(":"); |
| | | Calendar calendar1 = Calendar.getInstance(); |
| | | calendar1.set(Calendar.HOUR_OF_DAY, Integer.valueOf(split1[0])); |
| | | calendar1.set(Calendar.MINUTE, Integer.valueOf(split1[1])); |
| | | nowTimeMillis = calendar.getTimeInMillis(); |
| | | } |
| | | long m = (calendar.getTimeInMillis() - nowTimeMillis) / 1000; |
| | | //每度电的单价 |
| | | BigDecimal total_unit = accountingStrategyDetailOrder.getElectrovalence().add(accountingStrategyDetailOrder.getServiceCharge()); |
| | | //每秒需要支付的金额 |
| | | BigDecimal multiply = s_degrees.multiply(total_unit); |
| | | //计算充值金额能充多长时间的电 |
| | | long times = rechargeAmount1.divide(multiply, 0, RoundingMode.DOWN).longValue(); |
| | | if(times > m){ |
| | | //充电时间跨度两个计费策略,需要继续对下一个策略进行计算 |
| | | electrovalence = accountingStrategyDetailOrder.getElectrovalence().multiply(s_degrees).multiply(new BigDecimal(m)); |
| | | serviceCharge = accountingStrategyDetailOrder.getServiceCharge().multiply(s_degrees).multiply(new BigDecimal(m)); |
| | | discountAmount = discountAmount.add(serviceCharge.multiply((new BigDecimal(10).subtract(discount)).divide(new BigDecimal(10)))); |
| | | rechargeAmount1 = rechargeAmount1.subtract(multiply.multiply(new BigDecimal(m))); |
| | | nowTimeMillis = null; |
| | | }else{ |
| | | electrovalence = accountingStrategyDetailOrder.getElectrovalence().multiply(s_degrees).multiply(new BigDecimal(times)); |
| | | serviceCharge = accountingStrategyDetailOrder.getServiceCharge().multiply(s_degrees).multiply(new BigDecimal(times)); |
| | | discountAmount = discountAmount.add(serviceCharge.multiply((new BigDecimal(10).subtract(discount)).divide(new BigDecimal(10)))); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | if(discountAmount.compareTo(BigDecimal.ZERO) >= 0){ |
| | | //计算会员最大优惠金额 |
| | | if(null != appUser.getVipId()){ |
| | | TVip vip = vipClient.getInfo(appUser.getVipId()).getData(); |
| | | BigDecimal maximumDeduction = vip.getMaximumDeduction(); |
| | | //普通会员有最高优惠限制 |
| | | if(vip.getType() == 1 && discountAmount.compareTo(maximumDeduction) > 0){ |
| | | discountAmount = maximumDeduction; |
| | | } |
| | | |
| | | //判断会员是否还有充电优惠次数 |
| | | GetAppUserVipDetail getAppUserVipDetail = new GetAppUserVipDetail(); |
| | | getAppUserVipDetail.setAppUserId(chargingOrder.getAppUserId()); |
| | | getAppUserVipDetail.setVipId(appUser.getVipId()); |
| | | TAppUserVipDetail data = appUserVipDetailClient.getAppUserVipDetail(getAppUserVipDetail).getData(); |
| | | if(data.getChargeNum() > 0){ |
| | | discount = serviceCharge.multiply(data.getDiscount().divide(new BigDecimal(10))); |
| | | data.setChargeNum(data.getChargeNum() - 1); |
| | | appUserVipDetailClient.updateAppUserVipDetail(data); |
| | | //会员有充电优惠次数,直接将优惠金额加入到充电费用中增加充电时长 |
| | | electrovalence = electrovalence.add(discountAmount); |
| | | } |
| | | } |
| | | electrovalence = electrovalence.add(discount); |
| | | } |
| | | chargingOrder.setChargeAmount(electrovalence); |
| | | chargingOrder.setVipDiscountAmount(discountAmount); |
| | | this.updateById(chargingOrder); |
| | | |
| | | |
| | | TChargingPile chargingPile = chargingPileClient.getChargingPileById(chargingGun.getChargingPileId()).getData(); |
| | | TChargingPile chargingPile = chargingPileClient.getChargingPileById(tChargingGun.getChargingPileId()).getData(); |
| | | //调用远程启动充电消息 |
| | | PlatformStartCharging platformStartCharging = new PlatformStartCharging(); |
| | | platformStartCharging.setTransaction_serial_number(chargingOrder.getCode()); |
| | | platformStartCharging.setCharging_pile_code(chargingPile.getCode()); |
| | | platformStartCharging.setCharging_gun_code(chargingGun.getCode()); |
| | | platformStartCharging.setCharging_gun_code(tChargingGun.getCode()); |
| | | //使用订单id作为逻辑卡号 |
| | | platformStartCharging.setCard_number(chargingOrder.getId().toString()); |
| | | platformStartCharging.setAccount_balance(electrovalence); |
| | | |
| | | System.err.println("-------------------远程调起开始充电请求-------------------"); |
| | | System.err.println(platformStartCharging.toString()); |
| | | |
| | | sendMessageClient.platformStartCharging(platformStartCharging); |
| | | //异步线程检测远程启动的应答结果。如果失败,则需要全额退款 |
| | | String code = chargingOrder.getCode(); |
| | |
| | | ScheduledExecutorService scheduler = Executors.newScheduledThreadPool(1); |
| | | scheduler.scheduleAtFixedRate(()->{ |
| | | List<PlatformStartChargingReply> data = platformStartChargingReplyClient.getPlatformStartChargingReply(code).getData(); |
| | | System.err.println("-------------------开始检查调起充电结果-------------------"); |
| | | System.err.println(data.toString()); |
| | | if(data.size() != 0){ |
| | | PlatformStartChargingReply platformStartChargingReply = data.get(1); |
| | | Integer startup_result = platformStartChargingReply.getStartup_result(); |
| | | Integer failure_cause = platformStartChargingReply.getFailure_cause(); |
| | | Integer counter = counter_map.get(code); |
| | | PreChargeCheck preChargeCheck1 = redisService.getCacheObject(key); |
| | | //状态为5的时候,硬件会间隔60秒后再次检测,依然未插枪,则不启动充电 |
| | | //因这里是间隔5秒执行检测,所以累计次数在30次以上 |
| | | if(failure_cause == 5 && null == counter || counter < 35){ |
| | | counter++; |
| | | //5分钟内还未插枪则取消充电,退回金额。 |
| | | if(failure_cause == 5 && (null == counter || counter < 300)){ |
| | | counter = (null == counter ? 0 : counter) + 1; |
| | | counter_map.put(code, counter); |
| | | //启动失败 |
| | | preChargeCheck1.setStartupSuccess(3); |
| | |
| | | redisService.setCacheObject(key, preChargeCheck1); |
| | | return; |
| | | } |
| | | |
| | | //清除计时器中的无效数据 |
| | | counter_map.remove(code); |
| | | //开始处理退款 |
| | | TChargingOrder order = this.getOne(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getCode, code)); |
| | | if(0 == startup_result){ |
| | | //启动失败 |
| | |
| | | order.setStatus(-1); |
| | | order.setEndMode(0); |
| | | }else{ |
| | | //启动成功 |
| | | preChargeCheck1.setStartupSuccess(2); |
| | | order.setStatus(3); |
| | | order.setStartTime(LocalDateTime.now()); |
| | |
| | | redisService.setCacheObject(key, preChargeCheck1); |
| | | //提前结束定时任务 |
| | | scheduler.shutdown(); |
| | | }else{ |
| | | log.error("未上传开启充电结果........"); |
| | | } |
| | | }, 5, 300, TimeUnit.SECONDS); |
| | | }, 5, 1, TimeUnit.SECONDS); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | |
| | | model.setOut_trade_no(chargingOrder.getCode()); |
| | | model.setOut_refund_no(chargingOrderRefund.getRefundCode()); |
| | | model.setReason("充电失败,取消充电订单"); |
| | | model.setNotify_url("/order/t-charging-order/chargingOrderStartupFailureWxRefund"); |
| | | model.setNotify_url("/payment/wx/refund/notify"); |
| | | WxPaymentRefundModel.RefundAmount amount = new WxPaymentRefundModel.RefundAmount(); |
| | | amount.setRefund(rechargeAmount.multiply(new BigDecimal(100)).intValue()); |
| | | amount.setTotal(rechargeAmount.multiply(new BigDecimal(100)).intValue()); |
| | |
| | | chargingOrder.setStatus(4); |
| | | chargingOrder.setEndMode(1); |
| | | this.updateById(chargingOrder); |
| | | |
| | | //处理用户标签数据 |
| | | List<TUserTag> data = userTagClient.getAllUserTag().getData(); |
| | | //累计充电次数 |
| | | long count1 = this.count(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getAppUserId, chargingOrder.getAppUserId()) |
| | | .eq(TChargingOrder::getRechargePaymentStatus, 2).isNotNull(TChargingOrder::getPaymentAmount).eq(TChargingOrder::getDelFlag, 0)); |
| | | List<TUserTag> userTagList1 = data.stream().filter(s -> s.getStandardCondition() == 1).collect(Collectors.toList()); |
| | | int old_times = 0; |
| | | Integer userTagId = null; |
| | | for (TUserTag tUserTag : userTagList1) { |
| | | Integer times = JSON.parseObject(tUserTag.getConditions()).getInteger("times"); |
| | | //加上本次充电 |
| | | //获取最大值标签 |
| | | if((count1 + 1) >= times && old_times < times){ |
| | | userTagId = tUserTag.getId(); |
| | | old_times = times; |
| | | } |
| | | } |
| | | if(null != userTagId){ |
| | | TAppUserTag appUserTag = new TAppUserTag(); |
| | | appUserTag.setAppUserId(chargingOrder.getAppUserId()); |
| | | appUserTag.setUserTagId(userTagId); |
| | | TAppUserTag data1 = appUserTagClient.getUserTag(appUserTag).getData(); |
| | | if(null == data1){ |
| | | data1 = new TAppUserTag(); |
| | | data1.setAppUserId(chargingOrder.getAppUserId()); |
| | | data1.setUserTagId(userTagId); |
| | | data1.setCreateTime(LocalDateTime.now()); |
| | | appUserTagClient.addUserTag(data1); |
| | | } |
| | | } |
| | | //充电评率 |
| | | List<TUserTag> userTagList2 = data.stream().filter(s -> s.getStandardCondition() == 2).collect(Collectors.toList()); |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
| | | for (TUserTag tUserTag : userTagList2) { |
| | | TAppUserTag appUserTag = new TAppUserTag(); |
| | | appUserTag.setAppUserId(chargingOrder.getAppUserId()); |
| | | appUserTag.setUserTagId(tUserTag.getId()); |
| | | TAppUserTag data1 = appUserTagClient.getUserTag(appUserTag).getData(); |
| | | if(null == data1){ |
| | | Integer day = JSON.parseObject(tUserTag.getConditions()).getInteger("day"); |
| | | Integer times = JSON.parseObject(tUserTag.getConditions()).getInteger("times"); |
| | | Calendar start = Calendar.getInstance(); |
| | | start.set(Calendar.DAY_OF_YEAR, start.get(Calendar.DAY_OF_YEAR) + day); |
| | | count1 = this.count(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getAppUserId, chargingOrder.getAppUserId()) |
| | | .eq(TChargingOrder::getRechargePaymentStatus, 2).isNotNull(TChargingOrder::getPaymentAmount) |
| | | .between(TChargingOrder::getStartTime, sdf.format(start.getTime()), sdf.format(new Date())).eq(TChargingOrder::getDelFlag, 0)); |
| | | //加上本次充电 |
| | | if(count1 >= times){ |
| | | data1 = new TAppUserTag(); |
| | | data1.setAppUserId(chargingOrder.getAppUserId()); |
| | | data1.setUserTagId(tUserTag.getId()); |
| | | data1.setCreateTime(LocalDateTime.now()); |
| | | appUserTagClient.addUserTag(data1); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | //异步线程处理停机 |
| | | ExecutorService cachedThreadPool = Executors.newFixedThreadPool(1); |
| | |
| | | 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("/payment/wx/refund/notify"); |
| | | WxPaymentRefundModel.RefundAmount amount = new WxPaymentRefundModel.RefundAmount(); |
| | | amount.setRefund(refundAmount.multiply(new BigDecimal(100)).intValue()); |
| | | amount.setTotal(rechargeAmount.multiply(new BigDecimal(100)).intValue()); |
| | |
| | | for (ChargingOrderVO chargingOrderVO : list) { |
| | | TChargingGun data3 = chargingGunClient.getChargingGunById(chargingOrderVO.getChargingGunId()).getData(); |
| | | TChargingPile data2 = chargingPileClient.getChargingPileById(chargingOrderVO.getChargingPileId()).getData(); |
| | | if (chargingOrderVO.getSiteId()!=null){ |
| | | List<Integer> integers = new ArrayList<>(); |
| | | integers.add(chargingOrderVO.getSiteId()); |
| | | List<Site> data = siteClient.getSiteByIds(integers).getData(); |
| | | if (!data.isEmpty())chargingOrderVO.setSiteName(data.get(0).getName()); |
| | | } |
| | | if (data2!=null && data3!=null){ |
| | | chargingOrderVO.setTerminalName(data2.getName()+"-"+data3.getName()); |
| | | |
| | |
| | | // 单个订单累计服务费 |
| | | BigDecimal serviceMoney1 = new BigDecimal("0"); |
| | | UploadRealTimeMonitoringData data5 = uploadRealTimeMonitoringDataClient.chargingOrderInfo(chargingOrderVO.getCode()).getData(); |
| | | if (data5!=null){ |
| | | chargingOrderVO.setChargingSecond(data5.getTime_remaining()*60L); |
| | | } |
| | | // 总收入 |
| | | if (chargingOrderVO.getRefundStatus() !=null && chargingOrderVO.getRefundStatus() == 2){ |
| | | income = income.add(chargingOrderVO.getPaymentAmount().subtract(chargingOrderVO.getRefundAmount())); |
| | |
| | | model.setOut_refund_no(chargingOrderRefund.getRefundCode()); |
| | | model.setTransaction_id(tChargingOrder.getRechargeSerialNumber()); |
| | | model.setReason("取消订单"); |
| | | model.setNotify_url("http://221.182.45.100:9000/order/t-shopping-order/cancelShoppingOrderWxRefund"); |
| | | model.setNotify_url("/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()); |
| | |
| | | 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"); |
| | | model.setNotify_url("/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()); |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.feignClient.AppUserAddressClient; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.feignClient.AppUserIntegralChangeClient; |
| | | import com.ruoyi.account.api.model.TAppUser; |
| | | import com.ruoyi.account.api.model.TAppUserAddress; |
| | | import com.ruoyi.account.api.model.TAppUserIntegralChange; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.order.api.model.TExchangeOrder; |
| | |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | |
| | | @Resource |
| | | private AppUserIntegralChangeClient appUserIntegralChangeClient; |
| | | |
| | | |
| | | |
| | | |
| | |
| | | String imgUrl = ""; |
| | | if(tExchangeOrder.getOrderType() == 1){ |
| | | TGoods goods = goodsClient.getGoodsById(tExchangeOrder.getGoodsId()).getData(); |
| | | if(null != goods){ |
| | | name = goods.getName(); |
| | | imgUrl = goods.getCoverPicture(); |
| | | } |
| | | }else{ |
| | | TCoupon coupon = couponClient.getCouponById1(tExchangeOrder.getCouponId()).getData(); |
| | | if(null != coupon){ |
| | | name = coupon.getName(); |
| | | imgUrl = coupon.getCoverPicture(); |
| | | } |
| | | } |
| | | exchangeOrderList.setName(name); |
| | | exchangeOrderList.setImgUrl(imgUrl); |
| | |
| | | String imgUrl = ""; |
| | | if(exchangeOrder.getOrderType() == 1){ |
| | | TGoods goods = goodsClient.getGoodsById(exchangeOrder.getGoodsId()).getData(); |
| | | if(null != goods){ |
| | | name = goods.getName(); |
| | | imgUrl = goods.getCoverPicture(); |
| | | } |
| | | }else{ |
| | | TCoupon coupon = couponClient.getCouponById1(exchangeOrder.getCouponId()).getData(); |
| | | 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); |
| | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | } |
| | |
| | | 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)){ |
| | | if(CollectionUtils.isEmpty(orderIds)){ |
| | | return new PageInfo<>(); |
| | | } |
| | | // 查询当前页的订单 |
| | | List<TChargingOrder> chargingOrders = chargingOrderMapper.selectList(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | .in(TChargingOrder::getId, orderIds)); |
| | |
| | | setGoodsInfo(item,tShoppingOrder); |
| | | } |
| | | }); |
| | | } |
| | | list.forEach(e->e.setUid(e.getId().toString())); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | |
| | | } |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); |
| | | String code = Double.valueOf(Math.random() * 1000).intValue() + sdf.format(new Date()); |
| | | //获取开票类型 |
| | | TInvoiceType invoiceType = invoiceTypeClient.getInvoiceType(addOrderInvoice.getInvoiceTypeId()).getData(); |
| | | addOrderInvoice.setInvoicingCompany(invoiceType.getInvoicingCompany()); |
| | | addOrderInvoice.setInvoiceType(invoiceType.getName()); |
| | | addOrderInvoice.setInvoiceMaterial(2); |
| | | addOrderInvoice.setInvoicingMethod(invoiceType.getInvoicingMethod()); |
| | | addOrderInvoice.setAppUserId(userId); |
| | | addOrderInvoice.setCode(code); |
| | | addOrderInvoice.setStatus(1); |
| | | addOrderInvoice.setCreateTime(LocalDateTime.now()); |
| | | this.save(addOrderInvoice); |
| | | //获取开票类型 |
| | | TInvoiceType invoiceType = invoiceTypeClient.getInvoiceType(addOrderInvoice.getInvoiceTypeId()).getData(); |
| | | for (Long orderId : orderIds) { |
| | | List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.list(new LambdaQueryWrapper<TChargingOrderAccountingStrategy>() |
| | | .eq(TChargingOrderAccountingStrategy::getChargingOrderId, orderId)); |
| | |
| | | List<TOrderInvoiceVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | for (TOrderInvoiceVO tOrderInvoiceVO : list) { |
| | | tOrderInvoiceVO.setUid(tOrderInvoiceVO.getId().toString()); |
| | | List<Long> collect = orderInvoiceDetailService.lambdaQuery().eq(TOrderInvoiceDetail::getOrderInvoiceId, tOrderInvoiceVO.getId()) |
| | | .eq(TOrderInvoiceDetail::getOrderType, 1).list().stream() |
| | | List<Long> collect = orderInvoiceDetailService.lambdaQuery().eq(TOrderInvoiceDetail::getOrderInvoiceId, tOrderInvoiceVO.getId()).list().stream() |
| | | .map(TOrderInvoiceDetail::getOrderId).collect(Collectors.toList()); |
| | | // 将其全部转化为String |
| | | tOrderInvoiceVO.setIds(collect.stream().map(String::valueOf).collect(Collectors.toList())); |
| | | } |
| | | // 查询这个开票的订单ids |
| | | |
| | | if (!list.isEmpty()){ |
| | | List<Long> ids = list.stream().map(TOrderInvoiceVO::getId).collect(Collectors.toList()); |
| | | |
| | | List<TOrderInvoiceDetail> orderInvoiceDetailList = orderInvoiceDetailService.list(new LambdaQueryWrapper<TOrderInvoiceDetail>() |
| | |
| | | |
| | | List<TAppUser> finalTAppUsers = tAppUsers; |
| | | list.forEach(e->{ |
| | | if (e.getOrderType()!=null&&e.getOrderType()==1){ |
| | | e.setServiceTariff(orderInvoiceDetailList.get(0).getServiceTariff()); |
| | | }else{ |
| | | e.setServiceTariff(new BigDecimal("0")); |
| | | } |
| | | e.setElectricityTariff(orderInvoiceDetailList.get(0).getElectricityTariff()); |
| | | e.setAddedServiceTariff(orderInvoiceDetailList.get(0).getAddedServiceTariff()); |
| | | e.setAddedService(orderInvoiceDetailList.stream().filter(t->t.getAddedService()!=null).map(TOrderInvoiceDetail::getAddedService).reduce(BigDecimal::add).get()); |
| | |
| | | e.setUserPhone(finalTAppUsers.stream().filter(t->t.getId()!=null).filter(m->m.getId().equals(Long.parseLong(e.getBillingUserId().toString()))).findFirst().get().getPhone()); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | |
| | | import com.ruoyi.order.mapper.TShoppingOrderMapper; |
| | | import com.ruoyi.order.service.TShoppingOrderRefundService; |
| | | import com.ruoyi.order.service.TShoppingOrderService; |
| | | import com.ruoyi.order.util.RedisLock; |
| | | import com.ruoyi.other.api.domain.TCoupon; |
| | | import com.ruoyi.other.api.domain.TGoods; |
| | | import com.ruoyi.other.api.feignClient.CouponClient; |
| | |
| | | import com.ruoyi.payment.api.vo.AliQueryOrder; |
| | | import com.ruoyi.payment.api.vo.NotifyV3PayDecodeRespBody; |
| | | import io.seata.spring.annotation.GlobalTransactional; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | |
| | | |
| | | @Resource |
| | | private TShoppingOrderRefundService shoppingOrderRefundService; |
| | | |
| | | @Autowired |
| | | public RedisTemplate redisTemplate; |
| | | |
| | | |
| | | |
| | |
| | | public Map<String, Object> getMyShoppingOrderList(GetMyShoppingOrderList query) { |
| | | Long userId = tokenService.getLoginUserApplet().getUserId(); |
| | | LambdaQueryWrapper<TShoppingOrder> wrapper = new LambdaQueryWrapper<TShoppingOrder>().eq(TShoppingOrder::getDelFlag, 0) |
| | | .eq(TShoppingOrder::getAppUserId, userId); |
| | | .eq(TShoppingOrder::getAppUserId, userId).eq(TShoppingOrder::getPaymentStatus, 2); |
| | | if(query.getStatus() != 0){ |
| | | wrapper.eq(TShoppingOrder::getStatus, query.getStatus()); |
| | | } |
| | |
| | | TAppUserAddress userAddress = appUserAddressClient.getAppUserAddressById(shoppingOrder.getAppUserAddressId()).getData(); |
| | | info.setConsignee(userAddress.getName()); |
| | | info.setPhone(userAddress.getPhone()); |
| | | info.setAddress(userAddress.getAddress()); |
| | | info.setAddress(userAddress.getProvince() + userAddress.getCity() + userAddress.getDistrict() + userAddress.getAddress()); |
| | | info.setExpressCompany(shoppingOrder.getExpressCompany()); |
| | | info.setExpressNumber(shoppingOrder.getExpressNumber()); |
| | | String name = ""; |
| | |
| | | shoppingOrderRefund.setRefundRemark("全额退款"); |
| | | shoppingOrderRefund.setRefundTotalAmount(refundAmount.add(bigDecimal)); |
| | | shoppingOrderRefund.setPayAmount(shoppingOrder.getPaymentAmount()); |
| | | |
| | | shoppingOrder.setCancellationTime(LocalDateTime.now()); |
| | | shoppingOrder.setCancellationId(shoppingOrder.getAppUserId()); |
| | | if(1 == paymentType){ |
| | | WxPaymentRefundModel model = new WxPaymentRefundModel(); |
| | | model.setOut_trade_no(shoppingOrder.getCode()); |
| | | model.setTransaction_id(shoppingOrder.getSerialNumber()); |
| | | model.setOut_refund_no(shoppingOrderRefund.getRefundCode()); |
| | | model.setReason("取消订单"); |
| | | model.setNotify_url("http://221.182.45.100:9000/order/t-shopping-order/cancelShoppingOrderWxRefund"); |
| | | model.setNotify_url("/order/t-shopping-order/cancelShoppingOrderWxRefund"); |
| | | WxPaymentRefundModel.RefundAmount amount = new WxPaymentRefundModel.RefundAmount(); |
| | | amount.setRefund(refundAmount.multiply(new BigDecimal(100)).intValue()); |
| | | amount.setTotal(shoppingOrder.getPaymentAmount().multiply(new BigDecimal(100)).intValue()); |
| | |
| | | model.setAmount(amount); |
| | | R<String> orderR = wxPaymentClient.refundOrderR(model); |
| | | if(200 == orderR.getCode()){ |
| | | this.updateById(shoppingOrder); |
| | | shoppingOrderRefundService.save(shoppingOrderRefund); |
| | | } |
| | | } |
| | |
| | | dto.setRefundReason("取消订单"); |
| | | RefundResp resp = aliPaymentClient.refund(dto).getData(); |
| | | if(null != resp){ |
| | | this.updateById(shoppingOrder); |
| | | SimpleDateFormat sdf1 = new SimpleDateFormat("yyyy-MM-DDTHH:mm:ss+TIMEZONE"); |
| | | AjaxResult success = cancelShoppingOrderWxRefund(resp.getOutTradeNo(), resp.getTradeNo(), "SUCCESS", sdf1.format(new Date())); |
| | | if(success.isSuccess()){ |
| | | shoppingOrderRefundService.save(shoppingOrderRefund); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | |
| | | shoppingOrderRefundService.updateById(one); |
| | | //判断是否需要回退库存 |
| | | TShoppingOrder shoppingOrder = this.getById(one.getShoppingOrderId()); |
| | | shoppingOrder.setStatus(4); |
| | | shoppingOrder.setRefundCode(one.getRefundSerialNumber()); |
| | | shoppingOrder.setRefundAmount(one.getRefundAmount()); |
| | | shoppingOrder.setRefundStatus(2); |
| | | shoppingOrder.setRefundTime(one.getRefundTime()); |
| | | this.updateById(shoppingOrder); |
| | | |
| | | //商品 |
| | | if(shoppingOrder.getOrderType() == 1){ |
| | | // todo 需完善redis锁 |
| | | //redis锁 和支付使用同一个锁 |
| | | RedisLock redisLock = new RedisLock(redisTemplate, "SHOPPING_GOODS_LOCK", 5, 30000); |
| | | try { |
| | | redisLock.lock(); |
| | | TGoods goods = goodsClient.getGoodsById(shoppingOrder.getGoodsId()).getData(); |
| | | Integer inventory = goods.getInventory(); |
| | | if(-1 != inventory){ |
| | | goods.setInventory(inventory + shoppingOrder.getPurchaseQuantity()); |
| | | goodsClient.updateGoods(goods); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | //解锁 |
| | | redisLock.unlock(); |
| | | } |
| | | } |
| | | //优惠券 |
| | | if(shoppingOrder.getOrderType() == 2){ |
| | | //redis锁 |
| | | //redis锁 和支付使用同一个锁 |
| | | RedisLock redisLock = new RedisLock(redisTemplate, "SHOPPING_COUPON_LOCK", 5, 30000); |
| | | try { |
| | | redisLock.lock(); |
| | | TCoupon coupon = couponClient.getCouponById1(shoppingOrder.getCouponId()).getData(); |
| | | Integer inventory = coupon.getInventoryQuantity(); |
| | | if(-1 != inventory){ |
| | | coupon.setInventoryQuantity(inventory + shoppingOrder.getPurchaseQuantity()); |
| | | couponClient.updateCoupon(coupon); |
| | | } |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | }finally { |
| | | //解锁 |
| | | redisLock.unlock(); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.success(); |
| | |
| | | if (data1!=null){ |
| | | tShoppingOrder.setName(data1.getName()); |
| | | } |
| | | tShoppingOrder.setStatus(3); |
| | | break; |
| | | } |
| | | if (tShoppingOrder.getAppUserId() != null){ |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.dto.GiveVipDto; |
| | | import com.ruoyi.account.api.feignClient.AppUserClient; |
| | | import com.ruoyi.account.api.model.TAppUser; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.order.api.model.TShoppingOrder; |
| | | import com.ruoyi.order.api.model.TVipOrder; |
| | |
| | | |
| | | @Resource |
| | | private VipClient vipClient; |
| | | @Resource |
| | | private AppUserClient appUserClient; |
| | | @Override |
| | | public PageInfo<TVipOrder> pageList(VipShoppingOrderQuery query) { |
| | | String startTime1 = null; |
| | |
| | | if (data!=null){ |
| | | tVipOrder.setName(data.getName()); |
| | | } |
| | | if (StringUtils.hasLength(tVipOrder.getTitle())) |
| | | { |
| | | // 去除最后两个字符 |
| | | tVipOrder.setName(tVipOrder.getTitle().substring(0, tVipOrder.getTitle().length() - 2)); |
| | | } |
| | | TAppUser data1 = appUserClient.getUserById(tVipOrder.getAppUserId()).getData(); |
| | | if (data1!=null)tVipOrder.setUserPhone(data1.getPhone()); |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
New file |
| | |
| | | package com.ruoyi.order.util; |
| | | |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | |
| | | import java.util.UUID; |
| | | import java.util.concurrent.TimeUnit; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/9/26 18:43 |
| | | */ |
| | | public class RedisLock { |
| | | private RedisTemplate<String, String> redisTemplate; |
| | | private String lockKey; |
| | | private int expireTime; // 锁的超时时间 |
| | | private int timeout; // 获取锁的超时时间 |
| | | |
| | | |
| | | public RedisLock(RedisTemplate<String, String> redisTemplate, String lockKey, int expireTime, int timeout) { |
| | | this.redisTemplate = redisTemplate; |
| | | this.lockKey = lockKey; |
| | | this.expireTime = expireTime; |
| | | this.timeout = timeout; |
| | | } |
| | | |
| | | public boolean lock() { |
| | | String identifier = UUID.randomUUID().toString(); |
| | | long end = System.currentTimeMillis() + timeout; |
| | | while (System.currentTimeMillis() < end) { |
| | | if (redisTemplate.opsForValue().setIfAbsent(lockKey, identifier, expireTime, TimeUnit.SECONDS)) { |
| | | return true; |
| | | } |
| | | // 可以使用延时来减少CPU占用 |
| | | try { |
| | | Thread.sleep(100); |
| | | } catch (InterruptedException e) { |
| | | Thread.currentThread().interrupt(); |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | public boolean unlock() { |
| | | String identifier = redisTemplate.opsForValue().get(lockKey); |
| | | if (identifier != null && identifier.equals(UUID.randomUUID().toString())) { |
| | | redisTemplate.delete(lockKey); |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.util.task; |
| | | |
| | | import com.alibaba.fastjson2.util.UUIDUtils; |
| | | import com.alibaba.nacos.common.utils.UuidUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.chargingPile.api.feignClient.SiteClient; |
| | | import com.ruoyi.chargingPile.api.model.Site; |
| | | import com.ruoyi.order.api.model.TChargingBill; |
| | | import com.ruoyi.order.service.TChargingBillService; |
| | | import org.apache.logging.log4j.core.util.UuidUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.time.ZoneId; |
| | | import java.time.format.DateTimeFormatter; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @date 2023/7/11 8:39 |
| | | */ |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | @Resource |
| | | private TChargingBillService chargingBillService; |
| | | @Resource |
| | | private SiteClient siteClient; |
| | | |
| | | public static void main(String[] args) { |
| | | LocalDate firstDayOfLastMonth = LocalDate.now().minusMonths(1). |
| | | withDayOfMonth(2); |
| | | String string = firstDayOfLastMonth.toString(); |
| | | // 将-替换为空字符串 |
| | | string = string.replace("-", ""); |
| | | System.err.println(string); |
| | | } |
| | | // 每月2号凌晨12点执行的定时任务 |
| | | @Scheduled(cron = "0 0 0 2 * ?") |
| | | public void taskMonth() { |
| | | try { |
| | | // 获取上个月的开始和结束日期 |
| | | LocalDate firstDayOfLastMonth = LocalDate.now().minusMonths(1). |
| | | withDayOfMonth(2); |
| | | String string = firstDayOfLastMonth.toString(); |
| | | // 将-替换为空字符串 |
| | | string = string.replace("-", ""); |
| | | // 生成一次全站订单 |
| | | TChargingBill tChargingBill = new TChargingBill(); |
| | | // 订单生成规则JSD+20231201(账单所属月份)+1131304205(随机10位数)+001(当月账单序号,每月重置) |
| | | Random random = new Random(); |
| | | String randomDigits = random.ints(10, 0, 10) // 生成10个随机数字,范围在0-9 |
| | | .mapToObj(String::valueOf) |
| | | .collect(Collectors.joining()); // 将其连接成一个字符串 |
| | | tChargingBill.setCode("JSD"+string+randomDigits+"001" ); |
| | | tChargingBill.setType(1); |
| | | tChargingBill.setBillTime(LocalDateTime.now()); |
| | | tChargingBill.setStatus(1); |
| | | tChargingBill.setOrderState(2); |
| | | chargingBillService.save(tChargingBill); |
| | | // 每月二号给每个站点生成上月账单 |
| | | List<Integer> collect = siteClient.getSiteAll().getData().stream().map(Site::getId).collect(Collectors.toList()); |
| | | List<TChargingBill> tChargingBills = new ArrayList<>(); |
| | | for (int i = 1; i <= collect.size(); i++) { |
| | | TChargingBill tChargingBill1 = new TChargingBill(); |
| | | Random random1 = new Random(); |
| | | String randomDigits1 = random1.ints(10, 0, 10) // 生成10个随机数字,范围在0-9 |
| | | .mapToObj(String::valueOf) |
| | | .collect(Collectors.joining()); // 将其连接成一个字符串 |
| | | tChargingBill1.setCode("JSD"+string+randomDigits1+i ); |
| | | tChargingBill1.setType(2); |
| | | tChargingBill1.setSiteId(collect.get(i)); |
| | | tChargingBill1.setBillTime(LocalDateTime.now()); |
| | | tChargingBill1.setStatus(1); |
| | | tChargingBill1.setOrderState(2); |
| | | tChargingBills.add(tChargingBill1); |
| | | } |
| | | if (!tChargingBills.isEmpty())chargingBillService.saveBatch(tChargingBills); |
| | | |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | // 每个月最后一天23点执行的定时任务 |
| | | @Scheduled(cron = "0 0 23 L * ?") |
| | | public void taskLastDay() { |
| | | try { |
| | | // 获取上个月的开始和结束日期 |
| | | LocalDate firstDayOfLastMonth = LocalDate.now().minusMonths(1). |
| | | withDayOfMonth(1); |
| | | LocalDate lastDayOfLastMonth = LocalDate.now().minusMonths(1). |
| | | withDayOfMonth(firstDayOfLastMonth.lengthOfMonth()); |
| | | // 将 LocalDate 转换为 LocalDateTime,并设定时间为一天的开始 |
| | | LocalDateTime startDateTime = firstDayOfLastMonth.atStartOfDay(); |
| | | LocalDateTime endDateTime = lastDayOfLastMonth.atTime(23, 59, 59); // 设定到最后一秒 |
| | | // 构建查询条件 |
| | | LambdaQueryWrapper<TChargingBill> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.ge(TChargingBill::getBillTime, |
| | | Date.from(startDateTime.atZone(ZoneId.systemDefault()).toInstant())) |
| | | .le(TChargingBill::getBillTime, |
| | | Date.from(endDateTime.atZone(ZoneId.systemDefault()).toInstant())); // 使用 le 包括最后一天的记录 |
| | | List<TChargingBill> list = chargingBillService.list(queryWrapper); |
| | | for (TChargingBill tChargingBill : list) { |
| | | tChargingBill.setStatus(2); |
| | | } |
| | | chargingBillService.updateBatchById(list); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | </if> |
| | | </select> |
| | | <select id="getNoInvoicedOrder" resultMap="BaseResultMap"> |
| | | select * from t_charging_order where del_flag = 0 and app_user_id = #{appUserId} |
| | | select * from t_charging_order where del_flag = 0 and status = 5 and recharge_payment_status = 2 and payment_amount is null and app_user_id = #{appUserId} |
| | | <if test="null != month and '' != month"> |
| | | and DATE_FORMAT(end_time, '%Y-%m') = #{month} |
| | | </if> |
| | |
| | | </if> |
| | | </select> |
| | | <select id="payOrderQuery" resultType="com.ruoyi.order.dto.PayOrderDto"> |
| | | SELECT * FROM (SELECT |
| | | SELECT o.*,i.phone FROM (SELECT |
| | | id, |
| | | `code`, |
| | | 1 as type, |
| | | title, |
| | | phone, |
| | | `status`, |
| | | order_amount, |
| | | payment_amount , |
| | |
| | | pay_time, |
| | | refund_status, |
| | | (payment_amount-refund_amount) as final_amount, |
| | | del_flag |
| | | del_flag, |
| | | app_user_id |
| | | FROM |
| | | charging_pile_order.t_charging_order |
| | | where recharge_payment_status = 2 |
| | |
| | | `code`, |
| | | 2 as type, |
| | | title, |
| | | phone, |
| | | `status`, |
| | | order_amount, |
| | | payment_amount , |
| | |
| | | pay_time, |
| | | refund_status, |
| | | (payment_amount-refund_amount) as final_amount, |
| | | del_flag |
| | | del_flag, |
| | | app_user_id |
| | | FROM |
| | | charging_pile_order.t_shopping_order |
| | | where payment_status = 2 |
| | |
| | | `code`, |
| | | 3 as type, |
| | | title, |
| | | phone, |
| | | payment_status AS `status`, |
| | | order_amount, |
| | | payment_amount , |
| | |
| | | pay_time, |
| | | refund_status, |
| | | (payment_amount-refund_amount) as final_amount, |
| | | del_flag |
| | | del_flag, |
| | | app_user_id |
| | | |
| | | FROM |
| | | charging_pile_order.t_vip_order |
| | |
| | | `code`, |
| | | 4 as type, |
| | | title, |
| | | phone, |
| | | `status`, |
| | | order_amount , |
| | | order_amount as payment_amount, |
| | |
| | | out_parking_time as pay_time, |
| | | null as refund_status, |
| | | 0 as final_amount, |
| | | 0 as del_flag |
| | | 0 as del_flag, |
| | | app_user_id |
| | | FROM |
| | | charging_pile_service.t_parking_record ) o |
| | | LEFT JOIN `charging_pile_account`.`t_app_user` i on o.app_user_id = i.id |
| | | <where> |
| | | o.del_flag = 0 |
| | | <if test="data.code != null and data.code != ''"> |
| | |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | <if test="data.isRefund == 1"> |
| | | AND o.refund_status is not null |
| | | </if> |
| | | <if test="data.isRefund == 1"> |
| | | AND o.refund_status is null |
| | | </if> |
| | | |
| | | </where> |
| | | ORDER BY o.create_time desc |
| | | |
| | |
| | | re.refund_remark, |
| | | co.recharge_serial_number as serail_number, |
| | | co.payment_amount, |
| | | co.pay_time |
| | | co.create_time as pay_time, |
| | | co.id as order_id, |
| | | co.app_user_id as user_id |
| | | FROM t_charging_order_refund re |
| | | LEFT JOIN t_charging_order co ON re.charging_order_id = co.id |
| | | UNION ALL |
| | |
| | | re.refund_remark, |
| | | so.serial_number, |
| | | so.payment_amount, |
| | | so.pay_time |
| | | so.create_time as pay_time, |
| | | so.id as order_id, |
| | | so.app_user_id as user_id |
| | | FROM t_shopping_order_refund re |
| | | LEFT JOIN t_shopping_order so on re.shopping_order_id = so.id |
| | | UNION ALL |
| | |
| | | vr.refund_remark, |
| | | vo.serial_number, |
| | | vo.payment_amount, |
| | | vo.pay_time |
| | | vo.create_time as pay_time, |
| | | vo.id as order_id, |
| | | vo.app_user_id as user_id |
| | | FROM t_vip_order_refund vr |
| | | LEFT JOIN t_vip_order vo on vr.vip_order_id = vo.id |
| | | |
| | |
| | | AND o.refund_code LIKE CONCAT('%',#{data.refundCode},'%') |
| | | </if> |
| | | </where> |
| | | |
| | | order by o.refund_time desc |
| | | |
| | | </select> |
| | | <select id="chargingOrderGroup" resultType="com.ruoyi.common.core.dto.ChargingOrderGroup"> |
| | |
| | | <if test="statisticsQueryDto.type == 2"> |
| | | end_time |
| | | </if> |
| | | , '%Y-%m-%d %H' ) as time, |
| | | , '%H:00' ) as time, |
| | | SUM(service_charge) as servicecharge, |
| | | SUM(electrovalence) as electrovalence, |
| | | SUM(electricity) as electricity, |
| | | count(1) as orderCount |
| | | FROM |
| | | t_charging_order |
| | |
| | | , '%Y-%m-%d' ) as time, |
| | | SUM(service_charge) as servicecharge, |
| | | SUM(electrovalence) as electrovalence, |
| | | count(1) as orderCount |
| | | count(1) as orderCount, |
| | | SUM(electricity) as electricity |
| | | FROM |
| | | t_charging_order |
| | | |
| | | WHERE del_flag = 0 and recharge_payment_status = 2 and DATE( |
| | | <if test="statisticsQueryDto.type == 1"> |
| | | start_time |
| | |
| | | , '%Y-%m' ) as time, |
| | | SUM(service_charge) as servicecharge, |
| | | SUM(electrovalence) as electrovalence, |
| | | count(1) as orderCount |
| | | count(1) as orderCount, |
| | | SUM(electricity) as electricity |
| | | FROM |
| | | t_charging_order |
| | | |
| | |
| | | </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 |
| | |
| | | <if test="null != req.code and req.code!=''"> |
| | | and t1.code LIKE CONCAT('%',#{req.code},'%') |
| | | </if> |
| | | <if test="null != req.status"> |
| | | and t1.status = #{req.status} |
| | | </if> |
| | | <if test="null != req.userIds and req.userIds.size()>0" > |
| | | and t1.app_user_id in |
| | | <foreach collection="req.userIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="null != req.couponIds and req.couponIds.size()>0 or null != req.couponIds and req.couponIds.size()>0" > |
| | | and (t1.goods_id in |
| | | <foreach collection="req.goodsIds" item="item" index="index" separator="," open="(" close=")"> |
| | | <if test="null != req.userIds and req.userIds.size()>0" > |
| | | and t1.app_user_id in |
| | | <foreach collection="req.userIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | or |
| | | </if> |
| | | |
| | | <if test="null != req.couponIds and req.couponIds.size()>0" > |
| | | and t1.coupon_id in |
| | | <foreach collection="req.couponIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | <if test="null != req.goodsIds and req.goodsIds.size()>0" > |
| | | and t1.goods_id in |
| | | <foreach collection="req.goodsIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="startTime1 != null and startTime1!=''"> |
| | | and (t1.create_time between #{startTime1} and #{startTime2} |
| | | and (t1.create_time between #{startTime1} and #{startTime2}) |
| | | </if> |
| | | AND t1.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | |
| | | <select id="getNoInvoicedOrder" resultMap="BaseResultMap"> |
| | | select * from t_shopping_order where del_flag = 0 and app_user_id = #{appUserId} |
| | | select * from t_shopping_order where del_flag = 0 and payment_status = 2 and status = 3 and app_user_id = #{appUserId} |
| | | <if test="null != month and '' != month"> |
| | | and DATE_FORMAT(create_time, '%Y-%m') = #{month} |
| | | </if> |
| | |
| | | <if test="null != req.code and req.code!=''"> |
| | | and t1.code LIKE CONCAT('%',#{req.code},'%') |
| | | </if> |
| | | <if test="null != req.status"> |
| | | and t1.status = #{req.status} |
| | | </if> |
| | | <if test="null != req.userIds and req.userIds.size()>0" > |
| | | and t1.app_user_id in |
| | | <foreach collection="req.userIds" item="item" index="index" separator="," open="(" close=")"> |
| | |
| | | </foreach> |
| | | </if> |
| | | |
| | | <if test="null != req.couponIds and req.couponIds.size()>0 or null != req.couponIds and req.couponIds.size()>0" > |
| | | and (t1.goods_id in |
| | | <foreach collection="req.goodsIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | or |
| | | <if test="null != req.couponIds and req.couponIds.size()>0" > |
| | | and t1.coupon_id in |
| | | <foreach collection="req.couponIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | <if test="null != req.goodsIds and req.goodsIds.size()>0" > |
| | | and t1.goods_id in |
| | | <foreach collection="req.goodsIds" item="item" index="index" separator="," open="(" close=")"> |
| | | #{item} |
| | | </foreach> |
| | | </if> |
| | | <if test="startTime1 != null and startTime1!=''"> |
| | | and (t1.create_time between #{startTime1} and #{startTime2} |
| | | and (t1.create_time between #{startTime1} and #{startTime2}) |
| | | </if> |
| | | and t1.payment_status = 2 |
| | | AND t1.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="sixBefore" resultType="com.ruoyi.order.dto.SixShopDto"> |
| | | SELECT |
| | |
| | | payment_amount |
| | | FROM |
| | | t_shopping_order |
| | | <where> |
| | | WHERE del_flag = 0 and payment_status = 2 and ISNULL(refund_status) and status!=4 |
| | | WHERE del_flag = 0 and payment_status = 2 and ISNULL(refund_status) and status!=4 and |
| | | |
| | | DATE_FORMAT(create_time, '%Y-%m-%d') between #{statisticsQueryDto.startTime} and #{statisticsQueryDto.endTime} |
| | | |
| | | |
| | | </where> |
| | | |
| | | |
| | | ) AS subquery |
| | | GROUP BY |
| | | DATE_FORMAT( subquery.create_time, '%Y-%m-%d' ); |
| | | DATE_FORMAT( subquery.create_time, '%Y-%m-%d' ) |
| | | |
| | | |
| | | </select> |
| | |
| | | and t1.vip_id = #{req.vipId} |
| | | </if> |
| | | <if test="startTime1 != null and startTime1!=''"> |
| | | and (t1.create_time between #{startTime1} and #{startTime2} |
| | | and t1.create_time between #{startTime1} and #{startTime2} |
| | | </if> |
| | | and t1.payment_status = 2 |
| | | AND t1.del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | order by t1.create_time desc |
| | | </select> |
| | | <select id="sixBefore" resultType="com.ruoyi.order.dto.SixVipDto"> |
| | | SELECT |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.enums.status.AdvertisingStatusEnum; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpEntity; |
| | | import org.springframework.http.HttpMethod; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.util.LinkedMultiValueMap; |
| | | import org.springframework.util.MultiValueMap; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.io.ByteArrayInputStream; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.OutputStream; |
| | | import java.security.SecureRandom; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告修改") |
| | | @Log(title = "【广告管理】修改广告", businessType = BusinessType.UPDATE,operatorType = OperatorType.MANAGE) |
| | | public AjaxResult updateVip(@RequestBody TAdvertising dto) { |
| | | if (dto.getJumpType() == 2){ |
| | | // 清空跳转地址 |
| | | advertisingService.updateById(dto); |
| | | LambdaUpdateWrapper<TAdvertising> tAdvertisingLambdaUpdateWrapper = new LambdaUpdateWrapper<>(); |
| | | tAdvertisingLambdaUpdateWrapper.eq(TAdvertising::getId,dto.getId()) |
| | | .set(TAdvertising::getJumpUrl,null); |
| | | advertisingService.update(tAdvertisingLambdaUpdateWrapper); |
| | | }else{ |
| | | advertisingService.updateById(dto); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getInfo") |
| | |
| | | public R<Page<TCompany>> unitPage(@RequestBody UnitListQueryDto unitListQueryDto) { |
| | | Page<TCompany> page = companyService.lambdaQuery() |
| | | .orderByDesc(TCompany::getCreateTime) |
| | | .like(unitListQueryDto.getCompanyName() != null && unitListQueryDto.getCompanyName().isEmpty(), TCompany::getName, unitListQueryDto.getCompanyName()) |
| | | .like(unitListQueryDto.getCompanyName() != null && unitListQueryDto.getCompanyName()!="", TCompany::getName, unitListQueryDto.getCompanyName()) |
| | | .page(Page.of(unitListQueryDto.getPageCurr(), unitListQueryDto.getPageSize())); |
| | | return R.ok(page); |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | |
| | | public AjaxResult<PageInfo<TCoupon>> pageList(@RequestBody CouponQuery dto) { |
| | | return AjaxResult.ok(tCouponService.pageList(dto)); |
| | | } |
| | | @ApiOperation(tags = {"管理后台-优惠券管理"},value = "优惠券列表分页查询") |
| | | @PostMapping(value = "/pageList3") |
| | | public AjaxResult<List<TCoupon>> pageList() { |
| | | List<TCoupon> tCoupons = new ArrayList<>(); |
| | | |
| | | List<TCoupon> list = tCouponService.lambdaQuery().eq(TCoupon::getStatus, 1) |
| | | .orderByDesc(TCoupon::getCreateTime).list(); |
| | | for (TCoupon tCoupon : list) { |
| | | if (tCoupon.getValidityPeriodMode()==1){ |
| | | if (LocalDateTime.now().isBefore(tCoupon.getEndTime())){ |
| | | tCoupons.add(tCoupon); |
| | | } |
| | | }else{ |
| | | tCoupons.add(tCoupon); |
| | | } |
| | | } |
| | | return AjaxResult.ok(tCoupons); |
| | | } |
| | | |
| | | /** |
| | | * 小程序远程调用 获取优惠券信息 |
| | |
| | | import com.ruoyi.account.api.model.TAppUser; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.dto.AppGoodQuery; |
| | | import com.ruoyi.common.core.dto.ExchangeBackDto; |
| | | import com.ruoyi.common.core.dto.PointChangeDto; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | |
| | | return R.ok(); |
| | | |
| | | } |
| | | @ApiOperation(tags = {"小程序-" + |
| | | "兑换商城"},value = "积分兑换商品") |
| | | @ApiOperation(tags = {"小程序-兑换商城"},value = "积分兑换商品") |
| | | @PostMapping(value = "/app/shop") |
| | | public AjaxResult<PageInfo<TGoods>> shop(@RequestBody ExchangeDto exchangeDto) { |
| | | //检查当前用户积分是否够 |
| | |
| | | Long count = orderClient.getExchangeById(exchangeDto.getGoodId(), userId,exchangeDto.getGoodType()).getData(); |
| | | if (good.getLimitExchangeTimes() != -1 && count >= good.getLimitExchangeTimes()) { |
| | | return AjaxResult.error("当前用户已兑换"+count+"张"); |
| | | }else { |
| | | //减少库存 |
| | | good.setInventory(good.getInventory()-exchangeDto.getNum()); |
| | | } |
| | | if (user.getPoints()<good.getRedeemPoints()){ |
| | | return AjaxResult.error("当前用户积分不足"); |
| | |
| | | point = coupon.getRedeemPoints(); |
| | | |
| | | Long count = orderClient.getExchangeById(exchangeDto.getGoodId(), userId,exchangeDto.getGoodType()).getData(); |
| | | if (coupon.getInventoryQuantity() != -1 && count >= coupon.getInventoryQuantity()) { |
| | | return AjaxResult.error("当前用户已到达兑换"+coupon+"次"); |
| | | } |
| | | if (user.getPoints()<point){ |
| | | return AjaxResult.error("当前用户积分不足"); |
| | | } |
| | | if (coupon.getInventoryQuantity() != -1 && count >= coupon.getInventoryQuantity()) { |
| | | return AjaxResult.error("当前用户已到达兑换"+coupon+"次"); |
| | | }else { |
| | | coupon.setInventoryQuantity(coupon.getInventoryQuantity()-exchangeDto.getNum()); |
| | | } |
| | | |
| | | |
| | | } |
| | | exchangeDto.setPoint(point); |
| | | exchangeDto.setUserId(userId); |
| | | //生成积分兑换成功的订单 |
| | | R<Long> longR = orderClient.exchangeCreate(exchangeDto); |
| | | R<ExchangeBackDto> longR = orderClient.exchangeCreate(exchangeDto); |
| | | if (exchangeDto.getGoodType()==2) { |
| | | TCoupon coupon = couponService.getById(exchangeDto.getGoodId()); |
| | | |
| | |
| | | pointChangeDto.setPoints(point); |
| | | pointChangeDto.setRemark(longR.getData().toString()); |
| | | pointChangeDto.setType(6); |
| | | pointChangeDto.setCode(longR.getData().getCode()); |
| | | appUserClient.changeDown(pointChangeDto); |
| | | return AjaxResult.success(); |
| | | |
| | |
| | | import java.time.LocalDateTime; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.ruoyi.common.core.domain.R; |
| | |
| | | private TIntegralRuleService integralRuleService; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 远程调用 获取首次添加车辆可获得积分 |
| | | * @return |
| | | */ |
| | | @PostMapping("/getAddCarIntegral") |
| | | public R<Integer> getAddCarIntegral() { |
| | | TIntegralRule one = integralRuleService.getOne(null); |
| | | String addVehiclesEarnsPoints = one.getAddVehiclesEarnsPoints(); |
| | | JSONObject jsonObject = JSON.parseObject(addVehiclesEarnsPoints); |
| | | Integer point = 0; |
| | | //增加车牌50分,必填 |
| | | point += jsonObject.getInteger("num1"); |
| | | point += jsonObject.getInteger("num2"); |
| | | point += jsonObject.getInteger("num3"); |
| | | point += jsonObject.getInteger("num4"); |
| | | return R.ok(point); |
| | | } |
| | | @GetMapping("/getSet") |
| | | @ApiOperation(tags = {"管理后台-积分管理","小程序-个人中心-签到"},value = "获取积分设置") |
| | | public R<TIntegralRule> getSet() { |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @GetMapping("/getInfo") |
| | | @ApiOperation(tags = {"管理后台-积分管理"},value = "type 1=积分规则说明," + |
| | | "2=会员折扣说明," + |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.TagListQueryDto; |
| | | import com.ruoyi.account.api.dto.UnitListQueryDto; |
| | |
| | | public R<Page<TUserTag>> page(@RequestBody TagListQueryDto tagListQueryDto) { |
| | | Page<TUserTag> page = tUserTagService.lambdaQuery() |
| | | .orderByDesc(TUserTag::getCreateTime) |
| | | .like(tagListQueryDto.getTagName()!=null&& tagListQueryDto.getTagName().isEmpty(), TUserTag::getName, tagListQueryDto.getTagName()) |
| | | .like(tagListQueryDto.getTagName()!=null&& tagListQueryDto.getTagName()!="", TUserTag::getName, tagListQueryDto.getTagName()) |
| | | .page(Page.of(tagListQueryDto.getPageCurr(), tagListQueryDto.getPageSize())); |
| | | return R.ok(page); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取所有有效数据 |
| | | * @return |
| | | */ |
| | | @PostMapping(value = "/getAllUserTag") |
| | | public R<List<TUserTag>> getAllUserTag(){ |
| | | List<TUserTag> list = tUserTagService.list(new LambdaQueryWrapper<TUserTag>().eq(TUserTag::getDelFlag, 0)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | 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; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "购买会员", tags = {"小程序-个人中心"}) |
| | | @GetMapping("/vipInfo/pay") |
| | | public R vipInfoPay(@RequestParam("vipId")Integer vipId,@RequestParam("buyType") Integer buyType, |
| | |
| | | |
| | | return R.ok(vipService.vipInfoPay(byId,payMoney,payType,discountMoney,discount,buyType,userId)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | StringBuilder couponIds = new StringBuilder(); |
| | | for (TCoupon tCoupon : list) { |
| | | couponIds.append(tCoupon.getId()).append(","); |
| | | // 如果优惠券库存为0 那么将优惠券状态改为下架 不启用 |
| | | if (tCoupon.getInventoryQuantity()==0){ |
| | | tCoupon.setStatus(2); |
| | | this.baseMapper.updateById(tCoupon); |
| | | |
| | | } |
| | | |
| | | } |
| | | if (!list.isEmpty()){ |
| | | if (StringUtils.hasLength(couponIds)){ |
| | |
| | | <if test="req.otherState != null and req.otherState == 2"> |
| | | AND inventory = 0 |
| | | </if> |
| | | <if test="req.otherState != null and req.otherState ==3"> |
| | | AND status = 2 |
| | | </if> |
| | | AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderClient; |
| | | import com.ruoyi.order.api.feignClient.OrderClient; |
| | | import com.ruoyi.order.api.feignClient.ShoppingOrderClient; |
| | | import com.ruoyi.payment.api.vo.PaymentOrder; |
| | | import com.ruoyi.payment.api.vo.WxRefundNotifyResp; |
| | | import com.ruoyi.payment.wx.enums.RefundEnum; |
| | |
| | | |
| | | @Resource |
| | | private OrderClient orderClient; |
| | | |
| | | @Resource |
| | | private ChargingOrderClient chargingOrderClient; |
| | | |
| | | @Resource |
| | | private ShoppingOrderClient shoppingOrderClient; |
| | | |
| | | |
| | | |
| | |
| | | log.info("支付回调:{}", params); |
| | | String outRefundNo = (String) params.get("transaction_id"); |
| | | String out_trade_no = params.get("out_trade_no").toString(); |
| | | String attach = params.get("attach").toString(); |
| | | String substring = out_trade_no.substring(0, 2); |
| | | switch (substring){ |
| | | //购物订单 |
| | |
| | | orderClient.vipCallBack(out_trade_no,outRefundNo); |
| | | System.err.println("----收到会员回调"); |
| | | break; |
| | | case "CD": |
| | | chargingOrderClient.chargingOrderWXCallback(out_trade_no, outRefundNo, attach); |
| | | System.err.println("----充电支付回调"); |
| | | break; |
| | | } |
| | | |
| | | wxV3Pay.ack(); |
| | | return R.ok(params); |
| | | } catch (Exception e) { |
| | | log.error("支付回调异常:{}", e, e); |
| | |
| | | // 时间不对的话,可以调用 WxTimeUtils.toRfc3339Date(success_time)转换一下 |
| | | String success_time = params.get("success_time").toString(); |
| | | if (tradeState.equals(RefundEnum.SUCCESS.name())) { |
| | | String substring = out_refund_no.substring(0, 3); |
| | | switch (substring){ |
| | | //充电订单 |
| | | case "CDF": |
| | | chargingOrderClient.chargingOrderStartupFailureWxRefund(out_refund_no, refund_id, tradeState, success_time); |
| | | System.err.println("----充电启动失败退款回调通知"); |
| | | break; |
| | | case "GDF": |
| | | shoppingOrderClient.cancelShoppingOrderWxRefund(out_refund_no, refund_id, tradeState, success_time); |
| | | System.err.println("----商城订单取消退款回调通知"); |
| | | break; |
| | | //充电订单 |
| | | case "GWF": |
| | | chargingOrderClient.shoppingOrderWxRefund(out_refund_no, refund_id, tradeState, success_time); |
| | | System.err.println("----管理后台取消购物订单退款回调通知"); |
| | | break; |
| | | } |
| | | |
| | | WxRefundNotifyResp resp = new WxRefundNotifyResp(); |
| | | resp.setOut_trade_no(out_trade_no); |
| | | resp.setOut_refund_no(out_refund_no); |