Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile
# Conflicts:
# ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/OrderFallbackFactory.java
9 文件已重命名
19个文件已修改
51个文件已添加
New file |
| | |
| | | package com.ruoyi.account.api.dto; |
| | | |
| | | import com.ruoyi.account.api.model.TAppUser; |
| | | import com.ruoyi.account.api.model.TAppUserCar; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | @Data |
| | | public class UserDetailDto extends TAppUser { |
| | | @ApiModelProperty("累计充电数") |
| | | private Long orderCount; |
| | | @ApiModelProperty("单位名称") |
| | | private String unitName; |
| | | |
| | | @ApiModelProperty("车辆列表") |
| | | List<TAppUserCar> carList; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.api.dto; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class UserListQueryDto extends BasePage { |
| | | String userPhone; |
| | | String cityCode; |
| | | Integer status; |
| | | Integer userTagId; |
| | | Integer vipTypeId; |
| | | Integer companyId; |
| | | } |
| | |
| | | private LocalDateTime lastLoginTime; |
| | | |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "标签名称") |
| | | @TableField(exist = false) |
| | | private String tagName; |
| | | @ApiModelProperty(value = "vip名称") |
| | | @TableField(exist = false) |
| | | private String vipName; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author luodangjia |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_app_user_vip_detail") |
| | | @ApiModel(value="TAppUserVipDetail对象", description="") |
| | | public class TAppUserVipDetail implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId("id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("app_user_id") |
| | | private Long appUserId; |
| | | |
| | | @ApiModelProperty(value = "剩余充电次数") |
| | | @TableField("charge_num") |
| | | private Integer chargeNum; |
| | | |
| | | @ApiModelProperty(value = "会员id") |
| | | @TableField("vip_id") |
| | | private Integer vipId; |
| | | |
| | | @ApiModelProperty(value = "会员开始时间") |
| | | @TableField("start_time") |
| | | private LocalDateTime startTime; |
| | | |
| | | @ApiModelProperty(value = "会员结束时间") |
| | | @TableField("end_time") |
| | | private LocalDateTime endTime; |
| | | |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/8 9:29 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class GetSiteListDTO { |
| | | @ApiModelProperty(value = "站点id") |
| | | private Integer id; |
| | | @ApiModelProperty(value = "站点编号") |
| | | private String code; |
| | | @ApiModelProperty(value = "站点名称") |
| | | private String name; |
| | | @ApiModelProperty(value = "合作商名称") |
| | | private String partnerName; |
| | | @ApiModelProperty(value = "站点类型(0=其他,1=公共,2=个人,3=公交(专业),4=环卫(专用),5=物流(专用),6=出租车(专用))") |
| | | private Integer siteType; |
| | | @ApiModelProperty(value = "经营类型(1=直营,2=非直营)") |
| | | private Integer businessCategory; |
| | | @ApiModelProperty(value = "站点状态(1=正常使用,2=维修中,3=关闭下线)") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "详细地址") |
| | | private String address; |
| | | @ApiModelProperty(value = "站点电话") |
| | | private String phone; |
| | | @ApiModelProperty(value = "服务电话") |
| | | private String servicePhone; |
| | | @ApiModelProperty(value = "车位数") |
| | | private Integer parkingSpace; |
| | | @ApiModelProperty(value = "建站时间") |
| | | private String establishmentTime; |
| | | @ApiModelProperty(value = "充电桩数量") |
| | | private Integer chargingPileNumber; |
| | | @ApiModelProperty(value = "排序") |
| | | private Integer sort; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @ApiModelProperty(value = "站点id") |
| | | private Integer id; |
| | | /** |
| | | * 合作商id |
| | | */ |
| | | @TableField("partner_id") |
| | | @ApiModelProperty(value = "合作商id", required = true) |
| | | private Integer partnerId; |
| | | /** |
| | | * 站点编号 |
| | | */ |
| | | @TableField("code") |
| | | @ApiModelProperty(value = "站点编号", required = true) |
| | | private String code; |
| | | /** |
| | | * 站点名称 |
| | | */ |
| | | @TableField("name") |
| | | @ApiModelProperty(value = "站点名称", required = true) |
| | | private String name; |
| | | /** |
| | | * 站点类型(0=其他,1=公共,2=个人,3=公交(专业),4=环卫(专用),5=物流(专用),6=出租车(专用)) |
| | | */ |
| | | @TableField("site_type") |
| | | @ApiModelProperty(value = "站点类型(0=其他,1=公共,2=个人,3=公交(专业),4=环卫(专用),5=物流(专用),6=出租车(专用))", required = true) |
| | | private Integer siteType; |
| | | /** |
| | | * 经营类型(1=直营,2=非直营) |
| | | */ |
| | | @TableField("business_category") |
| | | @ApiModelProperty(value = "经营类型(1=直营,2=非直营)", required = true) |
| | | private Integer businessCategory; |
| | | /** |
| | | * 站点状态(1=正常使用,2=维修中,3=关闭下线) |
| | | */ |
| | | @TableField("status") |
| | | @ApiModelProperty(value = "站点状态(1=正常使用,2=维修中,3=关闭下线)", required = true) |
| | | private Integer status; |
| | | /** |
| | | * 建设场所(0=其他,1=居民区,2=公共机构,3=企事业单位,4=写字楼,5=工业园区,6=交通枢纽,7=大型文体设施,8=城市绿地,9=大型建筑配建停车场,10=路边停车位,11=城际高速服务区) |
| | | */ |
| | | @TableField("construction_site") |
| | | @ApiModelProperty(value = "建设场所(0=其他,1=居民区,2=公共机构,3=企事业单位,4=写字楼,5=工业园区,6=交通枢纽,7=大型文体设施,8=城市绿地,9=大型建筑配建停车场,10=路边停车位,11=城际高速服务区)", required = true) |
| | | private Integer constructionSite; |
| | | /** |
| | | * 站点环境图 |
| | | */ |
| | | @TableField("img_url") |
| | | @ApiModelProperty(value = "站点环境图", required = true) |
| | | private String imgUrl; |
| | | /** |
| | | * 省名称 |
| | | */ |
| | | @TableField("province") |
| | | @ApiModelProperty(value = "省名称", required = true) |
| | | private String province; |
| | | /** |
| | | * 省区划代码 |
| | | */ |
| | | @TableField("province_code") |
| | | @ApiModelProperty(value = "省区划代码", required = true) |
| | | private String provinceCode; |
| | | /** |
| | | * 市名称 |
| | | */ |
| | | @TableField("city") |
| | | @ApiModelProperty(value = "市名称", required = true) |
| | | private String city; |
| | | /** |
| | | * 市区划代码 |
| | | */ |
| | | @TableField("city_code") |
| | | @ApiModelProperty(value = "市区划代码", required = true) |
| | | private String cityCode; |
| | | /** |
| | | * 区县名称 |
| | | */ |
| | | @TableField("districts") |
| | | @ApiModelProperty(value = "区县名称", required = true) |
| | | private String districts; |
| | | /** |
| | | * 区县区划代码 |
| | | */ |
| | | @TableField("districts_code") |
| | | @ApiModelProperty(value = "区县区划代码", required = true) |
| | | private String districtsCode; |
| | | /** |
| | | * 经度 |
| | | */ |
| | | @TableField("lon") |
| | | @ApiModelProperty(value = "经度", required = true) |
| | | private String lon; |
| | | /** |
| | | * 纬度 |
| | | */ |
| | | @TableField("lat") |
| | | @ApiModelProperty(value = "纬度", required = true) |
| | | private String lat; |
| | | /** |
| | | * 详细地址 |
| | | */ |
| | | @TableField("address") |
| | | @ApiModelProperty(value = "详细地址", required = true) |
| | | private String address; |
| | | /** |
| | | * 国家代码 |
| | | */ |
| | | @TableField("country_code") |
| | | @ApiModelProperty(value = "国家代码") |
| | | private String countryCode; |
| | | /** |
| | | * 站点电话 |
| | | */ |
| | | @TableField("phone") |
| | | @ApiModelProperty(value = "站点电话", required = true) |
| | | private String phone; |
| | | /** |
| | | * 服务电话 |
| | | */ |
| | | @TableField("service_phone") |
| | | @ApiModelProperty(value = "服务电话", required = true) |
| | | private String servicePhone; |
| | | /** |
| | | * 站点引导 |
| | | */ |
| | | @TableField("guide") |
| | | @ApiModelProperty(value = "站点引导") |
| | | private String guide; |
| | | /** |
| | | * 开始服务时间 |
| | | */ |
| | | @TableField("start_service_time") |
| | | @ApiModelProperty(value = "开始服务时间") |
| | | private String startServiceTime; |
| | | /** |
| | | * 结束服务时间 |
| | | */ |
| | | @TableField("end_service_time") |
| | | @ApiModelProperty(value = "结束服务时间") |
| | | private String endServiceTime; |
| | | /** |
| | | * 站内提供服务 |
| | | */ |
| | | @TableField("service_description") |
| | | @ApiModelProperty(value = "站内提供服务") |
| | | private String serviceDescription; |
| | | /** |
| | | * 车型描述 |
| | | */ |
| | | @TableField("vehicle_description") |
| | | @ApiModelProperty(value = "车型描述") |
| | | private String vehicleDescription; |
| | | /** |
| | | * 车位数 |
| | | */ |
| | | @TableField("parking_space") |
| | | @ApiModelProperty(value = "车位数", required = true) |
| | | private Integer parkingSpace; |
| | | /** |
| | | * 充电费率描述 |
| | | */ |
| | | @TableField("rate_description") |
| | | @ApiModelProperty(value = "充电费率描述") |
| | | private String rateDescription; |
| | | /** |
| | | * 超时占位费说明 |
| | | */ |
| | | @TableField("space_charge_explain") |
| | | @ApiModelProperty(value = "超时占位费说明") |
| | | private String spaceChargeExplain; |
| | | /** |
| | | * 计费策略id |
| | | */ |
| | | @TableField("accounting_strategy_id") |
| | | @ApiModelProperty(value = "计费策略id") |
| | | private Integer accountingStrategyId; |
| | | /** |
| | | * 建站时间 |
| | | */ |
| | | @TableField("establishment_time") |
| | | @ApiModelProperty(value = "建站时间", notes = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private LocalDate establishmentTime; |
| | | /** |
| | | * 排序 |
| | | */ |
| | | @TableField("sort") |
| | | @ApiModelProperty(value = "排序", required = true) |
| | | private Integer sort; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @TableField("remark") |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | /** |
| | | * 评分 |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_charging_pile_notification") |
| | | @ApiModel(value="TChargingPileNotification对象", description="") |
| | | public class TChargingPileNotification implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId("id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "充电桩id") |
| | | @TableField("charging_pile_id") |
| | | private Integer chargingPileId; |
| | | |
| | | @ApiModelProperty(value = "通知内容") |
| | | @TableField("content") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "发送时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除状态(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_fault_message") |
| | | @ApiModel(value="TFaultMessage对象", description="") |
| | | public class TFaultMessage extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("app_user_id") |
| | | private Long appUserId; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "充电桩id") |
| | | @TableField("charging_pile_id") |
| | | private Integer chargingPileId; |
| | | |
| | | @ApiModelProperty(value = "状态(1=离线,2=故障)") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "故障时间") |
| | | @TableField("down_time") |
| | | private LocalDateTime downTime; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_parking_record") |
| | | @ApiModel(value="TParkingRecord对象", description="") |
| | | public class TParkingRecord implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "订单id") |
| | | @TableId("id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("app_user_id") |
| | | private Long appUserId; |
| | | |
| | | @ApiModelProperty(value = "车牌号") |
| | | @TableField("license_plate") |
| | | private String licensePlate; |
| | | |
| | | @ApiModelProperty(value = "车辆颜色") |
| | | @TableField("vehicle_color") |
| | | private String vehicleColor; |
| | | |
| | | @ApiModelProperty(value = "充电订单id") |
| | | @TableField("charging_order_id") |
| | | private Long chargingOrderId; |
| | | |
| | | @ApiModelProperty(value = "停车场id") |
| | | @TableField("parking_lot_id") |
| | | private Integer parkingLotId; |
| | | |
| | | @ApiModelProperty(value = "入场时间") |
| | | @TableField("in_parking_time") |
| | | private LocalDateTime inParkingTime; |
| | | |
| | | @ApiModelProperty(value = "出场时间") |
| | | @TableField("out_parking_time") |
| | | private LocalDateTime outParkingTime; |
| | | |
| | | @ApiModelProperty(value = "停车时长(分钟)") |
| | | @TableField("parking_duration") |
| | | private Integer parkingDuration; |
| | | |
| | | @ApiModelProperty(value = "总费用") |
| | | @TableField("order_amount") |
| | | private BigDecimal orderAmount; |
| | | |
| | | @ApiModelProperty(value = "状态(1=已进场,2=已出场,3=已缴费出场)") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "出场方式(1=缴费出场,2=免费时长内放行)") |
| | | @TableField("out_parking_type") |
| | | private Integer outParkingType; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.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.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_partner_site") |
| | | @ApiModel(value="TPartnerSite对象", description="") |
| | | public class TPartnerSite implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "合作商id") |
| | | @TableField("partner_id") |
| | | private Integer partnerId; |
| | | |
| | | @ApiModelProperty(value = "菜单id") |
| | | @TableField("site_menu_id") |
| | | private Integer siteMenuId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_repair") |
| | | @ApiModel(value="TRepair对象", description="") |
| | | public class TRepair extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "报修人") |
| | | @TableField("repairman") |
| | | private String repairman; |
| | | |
| | | @ApiModelProperty(value = "站点id") |
| | | @TableField("site_id") |
| | | private Integer siteId; |
| | | |
| | | @ApiModelProperty(value = "充电桩id") |
| | | @TableField("charging_pile_id") |
| | | private Integer chargingPileId; |
| | | |
| | | @ApiModelProperty(value = "报修内容") |
| | | @TableField("content") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value = "报修时间") |
| | | @TableField("repair_time") |
| | | private LocalDateTime repairTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_site") |
| | | @ApiModel(value="TSite对象", description="") |
| | | public class TSite extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "合作商id") |
| | | @TableField("partner_id") |
| | | private Integer partnerId; |
| | | |
| | | @ApiModelProperty(value = "站点编号") |
| | | @TableField("code") |
| | | private String code; |
| | | |
| | | @ApiModelProperty(value = "站点名称") |
| | | @TableField("name") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "站点类型(0=其他,1=公共,2=个人,3=公交(专业),4=环卫(专用),5=物流(专用),6=出租车(专用))") |
| | | @TableField("site_type") |
| | | private Integer siteType; |
| | | |
| | | @ApiModelProperty(value = "经营类型(1=直营,2=非直营)") |
| | | @TableField("business_category") |
| | | private Integer businessCategory; |
| | | |
| | | @ApiModelProperty(value = "站点状态(1=正常使用,2=维修中,3=关闭下线)") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "建设场所(0=其他,1=居民区,2=公共机构,3=企事业单位,4=写字楼,5=工业园区,6=交通枢纽,7=大型文体设施,8=城市绿地,9=大型建筑配建停车场,10=路边停车位,11=城际高速服务区)") |
| | | @TableField("construction_site") |
| | | private Integer constructionSite; |
| | | |
| | | @ApiModelProperty(value = "站点环境图") |
| | | @TableField("img_url") |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty(value = "省名称") |
| | | @TableField("province") |
| | | private String province; |
| | | |
| | | @ApiModelProperty(value = "省区划代码") |
| | | @TableField("province_code") |
| | | private String provinceCode; |
| | | |
| | | @ApiModelProperty(value = "市名称") |
| | | @TableField("city") |
| | | private String city; |
| | | |
| | | @ApiModelProperty(value = "市区划代码") |
| | | @TableField("city_code") |
| | | private String cityCode; |
| | | |
| | | @ApiModelProperty(value = "区县名称") |
| | | @TableField("districts") |
| | | private String districts; |
| | | |
| | | @ApiModelProperty(value = "区县区划代码") |
| | | @TableField("districts_code") |
| | | private String districtsCode; |
| | | |
| | | @ApiModelProperty(value = "经度") |
| | | @TableField("lon") |
| | | private String lon; |
| | | |
| | | @ApiModelProperty(value = "纬度") |
| | | @TableField("lat") |
| | | private String lat; |
| | | |
| | | @ApiModelProperty(value = "详细地址") |
| | | @TableField("address") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "国家代码") |
| | | @TableField("country_code") |
| | | private String countryCode; |
| | | |
| | | @ApiModelProperty(value = "站点电话") |
| | | @TableField("phone") |
| | | private String phone; |
| | | |
| | | @ApiModelProperty(value = "服务电话") |
| | | @TableField("service_phone") |
| | | private String servicePhone; |
| | | |
| | | @ApiModelProperty(value = "站点引导") |
| | | @TableField("guide") |
| | | private String guide; |
| | | |
| | | @ApiModelProperty(value = "开始服务时间") |
| | | @TableField("start_service_time") |
| | | private String startServiceTime; |
| | | |
| | | @ApiModelProperty(value = "结束服务时间") |
| | | @TableField("end_service_time") |
| | | private String endServiceTime; |
| | | |
| | | @ApiModelProperty(value = "站内提供服务") |
| | | @TableField("service_description") |
| | | private String serviceDescription; |
| | | |
| | | @ApiModelProperty(value = "车型描述") |
| | | @TableField("vehicle_description") |
| | | private String vehicleDescription; |
| | | |
| | | @ApiModelProperty(value = "车位数") |
| | | @TableField("parking_space") |
| | | private Integer parkingSpace; |
| | | |
| | | @ApiModelProperty(value = "充电费率描述") |
| | | @TableField("rate_description") |
| | | private String rateDescription; |
| | | |
| | | @ApiModelProperty(value = "超时占位费说明") |
| | | @TableField("space_charge_explain") |
| | | private String spaceChargeExplain; |
| | | |
| | | @ApiModelProperty(value = "计费策略id") |
| | | @TableField("accounting_strategy_id") |
| | | private Integer accountingStrategyId; |
| | | |
| | | @ApiModelProperty(value = "建站时间") |
| | | @TableField("establishment_time") |
| | | private LocalDateTime establishmentTime; |
| | | |
| | | @ApiModelProperty(value = "排序") |
| | | @TableField("sort") |
| | | private Integer sort; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "评分") |
| | | @TableField("mark") |
| | | private Integer mark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.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.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_site_menu") |
| | | @ApiModel(value="TSiteMenu对象", description="") |
| | | public class TSiteMenu implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "菜单ID") |
| | | @TableId(value = "menu_id", type = IdType.AUTO) |
| | | private Integer menuId; |
| | | |
| | | @ApiModelProperty(value = "菜单名称") |
| | | @TableField("menu_name") |
| | | private String menuName; |
| | | |
| | | @ApiModelProperty(value = "父菜单ID") |
| | | @TableField("parent_id") |
| | | private Long parentId; |
| | | |
| | | @ApiModelProperty(value = "显示顺序") |
| | | @TableField("order_num") |
| | | private Integer orderNum; |
| | | |
| | | @ApiModelProperty(value = "路由地址") |
| | | @TableField("path") |
| | | private String path; |
| | | |
| | | @ApiModelProperty(value = "组件路径") |
| | | @TableField("component") |
| | | private String component; |
| | | |
| | | @ApiModelProperty(value = "路由参数") |
| | | @TableField("query") |
| | | private String query; |
| | | |
| | | @ApiModelProperty(value = "是否为外链(0是 1否)") |
| | | @TableField("is_frame") |
| | | private Integer isFrame; |
| | | |
| | | @ApiModelProperty(value = "是否缓存(0缓存 1不缓存)") |
| | | @TableField("is_cache") |
| | | private Integer isCache; |
| | | |
| | | @ApiModelProperty(value = "菜单类型(M目录 C菜单 F按钮)") |
| | | @TableField("menu_type") |
| | | private String menuType; |
| | | |
| | | @ApiModelProperty(value = "菜单状态(0显示 1隐藏)") |
| | | @TableField("visible") |
| | | private String visible; |
| | | |
| | | @ApiModelProperty(value = "菜单状态(0正常 1停用)") |
| | | @TableField("status") |
| | | private Boolean status; |
| | | |
| | | @ApiModelProperty(value = "权限标识") |
| | | @TableField("perms") |
| | | private String perms; |
| | | |
| | | @ApiModelProperty(value = "菜单图标") |
| | | @TableField("icon") |
| | | private String icon; |
| | | |
| | | @ApiModelProperty(value = "创建者") |
| | | @TableField("create_by") |
| | | private String createBy; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "更新者") |
| | | @TableField("update_by") |
| | | private String updateBy; |
| | | |
| | | @ApiModelProperty(value = "更新时间") |
| | | @TableField("update_time") |
| | | private LocalDateTime updateTime; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.query; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.Value; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/8 9:24 |
| | | */ |
| | | @Data |
| | | @ApiModel |
| | | public class GetSiteList extends BasePage { |
| | | @ApiModelProperty(value = "站点名称") |
| | | private String name; |
| | | @ApiModelProperty(value = "合作商名称") |
| | | private String partnerName; |
| | | @ApiModelProperty(value = "站点类型(0=其他,1=公共,2=个人,3=公交(专业),4=环卫(专用),5=物流(专用),6=出租车(专用))") |
| | | private Integer siteType; |
| | | @ApiModelProperty(value = "经营类型(1=直营,2=非直营)") |
| | | private Integer businessCategory; |
| | | @ApiModelProperty(value = "站点状态(1=正常使用,2=维修中,3=关闭下线)") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "站点省代码") |
| | | private String provinceCode; |
| | | @ApiModelProperty(value = "站点市代码") |
| | | private String cityCode; |
| | | @ApiModelProperty(value = "站点区代码") |
| | | private String districtsCode; |
| | | } |
| | |
| | | package com.ruoyi.order.api.factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderClient; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | public ChargingOrderClient create(Throwable throwable) { |
| | | log.error("充电订单调用失败:{}", throwable.getMessage()); |
| | | return new ChargingOrderClient() { |
| | | |
| | | |
| | | @Override |
| | | public R<Long> useOrderCount(Long userId) { |
| | | return R.fail("订单计数:" + throwable.getMessage()); |
| | | |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | 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.ChargingOrderFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | /** |
| | | * 充电订单服务 |
| | |
| | | */ |
| | | @FeignClient(contextId = "ChargingOrderClient", value = ServiceNameConstants.CONTRACT_SERVICE, fallbackFactory = ChargingOrderFallbackFactory.class) |
| | | public interface ChargingOrderClient { |
| | | @PostMapping(value = "/t-charging-order/useOrderCount") |
| | | R<Long> useOrderCount(@RequestParam Long userId); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.api.domain; |
| | | |
| | | 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 lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/8 11:55 |
| | | */ |
| | | @Data |
| | | @TableName("t_region") |
| | | public class Region { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 城市名称 |
| | | */ |
| | | @TableField("name") |
| | | private String name; |
| | | /** |
| | | * 行政区划代码 |
| | | */ |
| | | @TableField("code") |
| | | private String code; |
| | | /** |
| | | * 城市code |
| | | */ |
| | | @TableField("citycode") |
| | | private String citycode; |
| | | /** |
| | | * 父级ID |
| | | */ |
| | | @TableField("parent_id") |
| | | private Integer parentId; |
| | | /** |
| | | * 英文名称 |
| | | */ |
| | | @TableField("english") |
| | | private String english; |
| | | } |
| | |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 商品服务降级处理 |
| | | * |
| | |
| | | public R deleteTag(Integer id) { |
| | | return R.fail("查询标签:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Map<Integer, String>> getTagMap(List<Integer> ids) { |
| | | return R.fail("查询标签map:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<TUserTag> getByIdTag(Integer id) { |
| | | return R.fail("查询标签:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Map<Integer, String>> getVipMap(List<Integer> ids) { |
| | | return R.fail("获取会员map:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 商品服务 |
| | | * @author ruoyi |
| | |
| | | @PostMapping(value = "/t-company/unit/delete") |
| | | R unitDelete(@RequestParam Integer id); |
| | | |
| | | @PostMapping(value = "/t-company/unit/detail") |
| | | R<TCompany> unitDetail(@RequestParam Integer id); |
| | | |
| | | //标签分页 |
| | | @PostMapping(value = "/t-user-tag/page") |
| | |
| | | //用户新增标签 |
| | | @PostMapping(value = "/t-user-tag/addorUpdateTag") |
| | | R addorUpdateTag(@RequestBody TUserTag tUserTag); |
| | | //删除用户标签 |
| | | @PostMapping(value = "/t-user-tag/delete") |
| | | R deleteTag(@RequestParam Integer id); |
| | | |
| | | //获取标签Map |
| | | @PostMapping(value = "/t-user-tag/getTagMap") |
| | | R<Map<Integer, String>> getTagMap(@RequestBody List<Integer> ids); |
| | | //获取标签 |
| | | @PostMapping(value = "/t-user-tag/getById") |
| | | R<TUserTag> getByIdTag(@RequestParam Integer id); |
| | | |
| | | @PostMapping(value = "/vip/getVipMap") |
| | | R<Map<Integer, String>> getVipMap(@RequestBody List<Integer> ids); |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.common.core.enums.status; |
| | | |
| | | import lombok.Getter; |
| | | |
| | | /** |
| | | * @Description |
| | | * @Author xiaochen |
| | | * @Date 2023/6/8 16:42 |
| | | */ |
| | | public enum AdvertisingStatusEnum { |
| | | |
| | | |
| | | NO(0, "否"), |
| | | YES(1, "是"); |
| | | |
| | | @Getter |
| | | private String desc; |
| | | |
| | | |
| | | @Getter |
| | | private int code; |
| | | |
| | | |
| | | AdvertisingStatusEnum(int code, String desc) { |
| | | this.code = code; |
| | | this.desc = desc; |
| | | } |
| | | |
| | | /** |
| | | * 通过code获取枚举 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static AdvertisingStatusEnum fromCode(Integer code) { |
| | | AdvertisingStatusEnum[] resultTypes = AdvertisingStatusEnum.values(); |
| | | for (AdvertisingStatusEnum resultType : resultTypes) { |
| | | if (code.equals(resultType.getCode())) { |
| | | return resultType; |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | <version>3.6.2</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>commons-lang</groupId> |
| | | <artifactId>commons-lang</artifactId> |
| | | <version>2.6</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-api-order</artifactId> |
| | | <version>3.6.2</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.UnitListQueryDto; |
| | | import com.ruoyi.account.api.dto.UserDetailDto; |
| | | import com.ruoyi.account.api.dto.UserListQueryDto; |
| | | import com.ruoyi.account.api.model.TAppUser; |
| | | import com.ruoyi.account.api.model.TAppUserCar; |
| | | import com.ruoyi.account.api.model.TAppUserTag; |
| | | import com.ruoyi.account.api.model.TAppUserVipDetail; |
| | | import com.ruoyi.account.service.TAppUserCarService; |
| | | import com.ruoyi.account.service.TAppUserService; |
| | | import com.ruoyi.account.service.TAppUserTagService; |
| | | import com.ruoyi.account.service.TAppUserVipDetailService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import com.ruoyi.common.security.annotation.RequiresPermissions; |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderClient; |
| | | import com.ruoyi.other.api.domain.TCompany; |
| | | import com.ruoyi.other.api.domain.TUserTag; |
| | | import com.ruoyi.other.api.feignClient.OtherClient; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.Duration; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | private OtherClient otherClient; |
| | | @Resource |
| | | private TAppUserService appUserService; |
| | | @Resource |
| | | private TAppUserTagService appUserTagService; |
| | | |
| | | @Resource |
| | | private TAppUserVipDetailService tAppUserVipDetailService; |
| | | @Resource |
| | | private ChargingOrderClient chargingOrderClient; |
| | | |
| | | @Resource |
| | | private TAppUserCarService appUserCarService; |
| | | |
| | | @ApiOperation(value = "单位管理列表", tags = {"用户管理-单位管理"}) |
| | | @PostMapping(value = "/unit/page") |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "用户列表", tags = {"用户管理-用户管理"}) |
| | | @ApiOperation(value = "用户列表", tags = {"用户管理-用户列表"}) |
| | | @PostMapping(value = "/user/page") |
| | | public R<Page<TCompany>> userPage(@RequestBody UnitListQueryDto unitListQueryDto) { |
| | | public R<Page<TAppUser>> userPage(@RequestBody UserListQueryDto userListQueryDto) { |
| | | List<Long> userIds = new ArrayList<>(); |
| | | |
| | | //拿到标签tag |
| | | //如果要筛选标签。用标签获取useids |
| | | if (userListQueryDto.getUserTagId() != null){ |
| | | userIds = appUserTagService.lambdaQuery().eq(TAppUserTag::getUserTagId, userListQueryDto.getUserTagId()).list().stream().map(TAppUserTag::getAppUserId).collect(Collectors.toList()); |
| | | } |
| | | |
| | | //拿到会员map |
| | | |
| | | |
| | | //列表查询 |
| | | 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.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()) |
| | | .in(!userIds.isEmpty(),TAppUser::getId,userIds) |
| | | .page(Page.of(userListQueryDto.getPageCurr(), userListQueryDto.getPageSize())); |
| | | |
| | | if (page.getRecords().isEmpty()){ |
| | | return R.ok(page); |
| | | } |
| | | List<Integer> vipIds = new ArrayList<>(); |
| | | vipIds = page.getRecords().stream().map(TAppUser::getVipId).collect(Collectors.toList()); |
| | | //获取会员map |
| | | R<Map<Integer, String>> vipMap = otherClient.getVipMap(vipIds); |
| | | //循环处理 |
| | | for (TAppUser appUser : page.getRecords()) { |
| | | //拿到最新的tagId |
| | | TAppUserTag one = appUserTagService.lambdaQuery().eq(TAppUserTag::getAppUserId, appUser.getId()).orderByDesc(TAppUserTag::getCreateTime).last("limit 1").one(); |
| | | //设置最新的tagName |
| | | R<TUserTag> byIdTag = otherClient.getByIdTag(one.getUserTagId()); |
| | | if (byIdTag.getData()!=null) { |
| | | appUser.setTagName(byIdTag.getData().getName()); |
| | | } |
| | | //匹配vipMap的值 |
| | | appUser.setVipName(vipMap.getData().get(appUser.getVipId())); |
| | | } |
| | | return R.ok(page); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "用户添加编辑", tags = {"用户管理-用户列表"}) |
| | | @PostMapping(value = "/user/addOrUpdate") |
| | | public R addOrUpdate(@RequestBody TAppUser tAppUser) { |
| | | if (tAppUser.getId() != null){ |
| | | //为编辑操作,要进行vip的逻辑处理 |
| | | TAppUser nowUser = appUserService.getById(tAppUser.getId()); |
| | | //会员结束时间不为空 |
| | | if (tAppUser.getVipEndTime()!=null&&tAppUser.getVipEndTime()!=nowUser.getVipEndTime()){ |
| | | //计算改变后的结束时间和当前结束时间差距了多少时间 |
| | | Duration duration = Duration.between(tAppUser.getVipEndTime(), nowUser.getVipEndTime()); |
| | | List<TAppUserVipDetail> detailList = tAppUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, tAppUser.getId()).gt(TAppUserVipDetail::getEndTime, LocalDateTime.now()).orderByAsc(TAppUserVipDetail::getStartTime).list(); |
| | | //如果是增加,则将明细表里当前会员的结束时间往后移,并将其余未开始会员的开始时间和结束时间往后移 |
| | | if (tAppUser.getVipEndTime().isAfter(nowUser.getVipEndTime())){ |
| | | for (int i = 0; i < detailList.size(); i++) { |
| | | TAppUserVipDetail tAppUserVipDetail = detailList.get(i); |
| | | if (i == 0 ){ |
| | | tAppUserVipDetail.setEndTime(tAppUser.getVipEndTime().plus(duration)); |
| | | }else { |
| | | tAppUserVipDetail.setStartTime(tAppUserVipDetail.getStartTime().plus(duration)); |
| | | tAppUserVipDetail.setEndTime(tAppUserVipDetail.getEndTime().plus(duration)); |
| | | } |
| | | } |
| | | }else { |
| | | //如果是减少,将当前会员结束时间减少,并将其余会员开始和结束时间都往前移动 |
| | | for (int i = 0; i < detailList.size(); i++) { |
| | | TAppUserVipDetail tAppUserVipDetail = detailList.get(i); |
| | | if (i == 0 ){ |
| | | tAppUserVipDetail.setEndTime(tAppUser.getVipEndTime().minus(duration)); |
| | | }else { |
| | | tAppUserVipDetail.setStartTime(tAppUserVipDetail.getStartTime().minus(duration)); |
| | | tAppUserVipDetail.setEndTime(tAppUserVipDetail.getEndTime().minus(duration)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | appUserService.saveOrUpdate(tAppUser); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "用户详情", tags = {"用户管理-用户列表"}) |
| | | @PostMapping(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())); |
| | | user.setVipName(vipMap.getData().get(user.getVipId())); |
| | | } |
| | | //获取累计充电数量 |
| | | R<Long> useOrderCount = chargingOrderClient.useOrderCount(user.getId()); |
| | | userDetailDto.setOrderCount(useOrderCount.getData()); |
| | | R<TCompany> tCompanyR = otherClient.unitDetail(user.getCompanyId()); |
| | | if (tCompanyR.getData()!=null){ |
| | | userDetailDto.setUnitName(tCompanyR.getData().getName()); |
| | | } |
| | | List<TAppUserCar> carList = appUserCarService.lambdaQuery().eq(TAppUserCar::getAppUserId, id).orderByDesc(BasePojo::getCreateTime).list(); |
| | | userDetailDto.setCarList(carList); |
| | | |
| | | List<Integer> tagIds = appUserTagService.lambdaQuery().eq(TAppUserTag::getAppUserId, id).orderByDesc(TAppUserTag::getCreateTime).list().stream().map(TAppUserTag::getUserTagId).collect(Collectors.toList()); |
| | | R<Map<Integer, String>> tagMap = otherClient.getTagMap(tagIds); |
| | | userDetailDto.setTagName(tagMap.getData().values().toString()); |
| | | return R.ok(userDetailDto); |
| | | } |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.account.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.account.api.model.TAppUserVipDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author luodangjia |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TAppUserVipDetailMapper extends BaseMapper<TAppUserVipDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.account.api.model.TAppUserVipDetail; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author luodangjia |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TAppUserVipDetailService extends IService<TAppUserVipDetail> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.model.TAppUserVipDetail; |
| | | import com.ruoyi.account.mapper.TAppUserVipDetailMapper; |
| | | |
| | | import com.ruoyi.account.service.TAppUserVipDetailService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author luodangjia |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Service |
| | | public class TAppUserVipDetailServiceImpl extends ServiceImpl<TAppUserVipDetailMapper, TAppUserVipDetail> implements TAppUserVipDetailService { |
| | | |
| | | } |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TAppCouponMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TAppCouponMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TAppCouponMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppCoupon"> |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TAppUserAddressMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TAppUserAddressMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TAppUserAddressMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserAddress"> |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TAppUserCarMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TAppUserCarMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TAppUserCarMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserCar"> |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TAppUserIntegralChangeMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TAppUserIntegralChangeMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TAppUserIntegralChangeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserIntegralChange"> |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TAppUserMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TAppUserMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TAppUserMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUser"> |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TAppUserSignMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TAppUserSignMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TAppUserSignMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserSign"> |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TAppUserTagMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TAppUserTagMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TAppUserTagMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserTag"> |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TInviteUserMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TInviteUserMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TInviteUserMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TInviteUser"> |
File was renamed from ruoyi-api/ruoyi-api-account/src/main/resources/mapper/account/TInvoiceInformationMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.account.api.mapper.TInvoiceInformationMapper"> |
| | | <mapper namespace="com.ruoyi.account.mapper.TInvoiceInformationMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TInvoiceInformation"> |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.conditions.query.LambdaQueryChainWrapper; |
| | | import com.ruoyi.chargingPile.api.dto.PartnerListDTO; |
| | | import com.ruoyi.chargingPile.api.model.Partner; |
| | | import com.ruoyi.chargingPile.api.query.GetPartnerList; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getPartnerList") |
| | | @ApiOperation(value = "获取合作商列表", tags = {"管理后台-合作商列表"}) |
| | | @ApiOperation(value = "获取合作商列表", tags = {"管理后台-合作商管理"}) |
| | | public AjaxResult<PageInfo<PartnerListDTO>> getPartnerList(@RequestBody GetPartnerList partnerList){ |
| | | PageInfo<PartnerListDTO> list = partnerService.getPartnerList(partnerList); |
| | | return AjaxResult.success(list); |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/addPartner") |
| | | @ApiOperation(value = "添加合作商", tags = {"管理后台-合作商列表"}) |
| | | @ApiOperation(value = "添加合作商", tags = {"管理后台-合作商管理"}) |
| | | public AjaxResult addPartner(@RequestBody Partner partner){ |
| | | return partnerService.addPartner(partner); |
| | | } |
| | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getPartner/{id}") |
| | | @ApiOperation(value = "获取合作商详情", tags = {"管理后台-合作商列表"}) |
| | | @ApiOperation(value = "获取合作商详情", tags = {"管理后台-合作商管理"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "合作商id", name = "id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/editPartner") |
| | | @ApiOperation(value = "编辑合作商", tags = {"管理后台-合作商列表"}) |
| | | @ApiOperation(value = "编辑合作商", tags = {"管理后台-合作商管理"}) |
| | | public AjaxResult editPartner(@RequestBody Partner partner){ |
| | | return partnerService.editPartner(partner); |
| | | } |
| | |
| | | |
| | | @ResponseBody |
| | | @DeleteMapping("/delPartner/{id}") |
| | | @ApiOperation(value = "删除合作商", tags = {"管理后台-合作商列表"}) |
| | | @ApiOperation(value = "删除合作商", tags = {"管理后台-合作商管理"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "合作商id", name = "id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/resetPassword") |
| | | @ApiOperation(value = "合作商重置密码", tags = {"管理后台-合作商列表"}) |
| | | @ApiOperation(value = "合作商重置密码", tags = {"管理后台-合作商管理"}) |
| | | public AjaxResult resetPassword(@RequestBody ResetPassword resetPassword){ |
| | | return partnerService.resetPassword(resetPassword); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getPartner") |
| | | @ApiOperation(value = "获取所有合作商", tags = {"管理后台-站点管理"}) |
| | | public AjaxResult<List<Partner>> getPartner(){ |
| | | List<Partner> list = partnerService.list(new LambdaQueryWrapper<Partner>().eq(Partner::getDelFlag, 0)); |
| | | return AjaxResult.success(list); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | import com.ruoyi.chargingPile.api.dto.GetSiteListDTO; |
| | | import com.ruoyi.chargingPile.api.model.Site; |
| | | import com.ruoyi.chargingPile.api.query.GetSiteList; |
| | | import com.ruoyi.chargingPile.service.ISiteService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | private ISiteService siteService; |
| | | |
| | | |
| | | |
| | | public AjaxResult<> getSiteList(){ |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getSiteList") |
| | | @ApiOperation(value = "获取站点列表", tags = {"管理后台-站点管理"}) |
| | | public AjaxResult<PageInfo<GetSiteListDTO>> getSiteList(@RequestBody GetSiteList siteList){ |
| | | PageInfo<GetSiteListDTO> list = siteService.getSiteList(siteList); |
| | | return AjaxResult.success(list); |
| | | } |
| | | |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/getSiteList") |
| | | @ApiOperation(value = "添加站点", tags = {"管理后台-站点管理"}) |
| | | public AjaxResult addSite(@RequestBody Site site){ |
| | | return siteService.addSite(site); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/editSite") |
| | | @ApiOperation(value = "编辑站点", tags = {"管理后台-站点管理"}) |
| | | public AjaxResult editSite(@RequestBody Site site){ |
| | | return siteService.editSite(site); |
| | | } |
| | | |
| | | @ResponseBody |
| | | @DeleteMapping("/delSite/{id}") |
| | | @ApiOperation(value = "编辑站点", tags = {"管理后台-站点管理"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "站点id", name = "id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | public AjaxResult delSite(@PathVariable Integer id){ |
| | | return siteService.delSite(id); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-charging-pile-notification") |
| | | public class TChargingPileNotificationController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-fault-message") |
| | | public class TFaultMessageController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-parking-record") |
| | | public class TParkingRecordController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-partner-site") |
| | | public class TPartnerSiteController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-repair") |
| | | public class TRepairController { |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-site-menu") |
| | | public class TSiteMenuController { |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.dto.GetSiteListDTO; |
| | | import com.ruoyi.chargingPile.api.model.Site; |
| | | import com.ruoyi.chargingPile.api.query.GetSiteList; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/7 19:49 |
| | | */ |
| | | public interface SiteMapper extends BaseMapper<Site> { |
| | | |
| | | |
| | | /** |
| | | * 获取站点列表 |
| | | * @param pageInfo |
| | | * @param siteList |
| | | * @return |
| | | */ |
| | | List<GetSiteListDTO> getSiteList(PageInfo<GetSiteListDTO> pageInfo, @Param("item") GetSiteList siteList); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPileNotification; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TChargingPileNotificationMapper extends BaseMapper<TChargingPileNotification> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TFaultMessage; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TFaultMessageMapper extends BaseMapper<TFaultMessage> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TParkingRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TParkingRecordMapper extends BaseMapper<TParkingRecord> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TPartnerSite; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TPartnerSiteMapper extends BaseMapper<TPartnerSite> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TRepair; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TRepairMapper extends BaseMapper<TRepair> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TSiteMenu; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TSiteMenuMapper extends BaseMapper<TSiteMenu> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.dto.GetSiteListDTO; |
| | | import com.ruoyi.chargingPile.api.model.Site; |
| | | import com.ruoyi.chargingPile.api.query.GetSiteList; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/7 19:54 |
| | | */ |
| | | public interface ISiteService extends IService<Site> { |
| | | |
| | | |
| | | /** |
| | | * 获取站点管理列表 |
| | | * @param siteList |
| | | * @return |
| | | */ |
| | | PageInfo<GetSiteListDTO> getSiteList(GetSiteList siteList); |
| | | |
| | | |
| | | /** |
| | | * 添加站点信息 |
| | | * @param site |
| | | * @return |
| | | */ |
| | | AjaxResult addSite(Site site); |
| | | |
| | | |
| | | /** |
| | | * 编辑站点 |
| | | * @param site |
| | | * @return |
| | | */ |
| | | AjaxResult editSite(Site site); |
| | | |
| | | |
| | | /** |
| | | * 删除站点 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | AjaxResult delSite(Integer id); |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPileNotification; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TChargingPileNotificationService extends IService<TChargingPileNotification> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TFaultMessage; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TFaultMessageService extends IService<TFaultMessage> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TParkingRecord; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TParkingRecordService extends IService<TParkingRecord> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TPartnerSite; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TPartnerSiteService extends IService<TPartnerSite> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TRepair; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TRepairService extends IService<TRepair> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TSiteMenu; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | public interface TSiteMenuService extends IService<TSiteMenu> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.dto.GetSiteListDTO; |
| | | import com.ruoyi.chargingPile.api.model.Site; |
| | | import com.ruoyi.chargingPile.api.query.GetSiteList; |
| | | import com.ruoyi.chargingPile.mapper.SiteMapper; |
| | | import com.ruoyi.chargingPile.service.ISiteService; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | |
| | | */ |
| | | @Service |
| | | public class SiteServiceImpl extends ServiceImpl<SiteMapper, Site> implements ISiteService { |
| | | |
| | | |
| | | /** |
| | | * 获取站点管理列表数据 |
| | | * @param siteList |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageInfo<GetSiteListDTO> getSiteList(GetSiteList siteList) { |
| | | PageInfo<GetSiteListDTO> pageInfo = new PageInfo<>(siteList.getPageCurr(), siteList.getPageSize()); |
| | | List<GetSiteListDTO> list = this.baseMapper.getSiteList(pageInfo, siteList); |
| | | return pageInfo.setRecords(list); |
| | | } |
| | | |
| | | /** |
| | | * 添加站点信息 |
| | | * @param site |
| | | * @return |
| | | */ |
| | | @Override |
| | | public AjaxResult addSite(Site site) { |
| | | AjaxResult ajaxResult = addSiteVerify(site); |
| | | if(ajaxResult.isError()){ |
| | | return ajaxResult; |
| | | } |
| | | Site one = this.getOne(new LambdaQueryWrapper<Site>().eq(Site::getCode, site.getCode()).eq(Site::getDelFlag, 0)); |
| | | if(null != one){ |
| | | return AjaxResult.error("站点编号重复"); |
| | | } |
| | | site.setMark(0); |
| | | this.save(site); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 编辑站点 |
| | | * @param site |
| | | * @return |
| | | */ |
| | | @Override |
| | | public AjaxResult editSite(Site site) { |
| | | AjaxResult ajaxResult = addSiteVerify(site); |
| | | if(ajaxResult.isError()){ |
| | | return ajaxResult; |
| | | } |
| | | Site one = this.getOne(new LambdaQueryWrapper<Site>().eq(Site::getCode, site.getCode()).eq(Site::getDelFlag, 0)); |
| | | if(null != one && !one.getCode().equals(site.getCode())){ |
| | | return AjaxResult.error("站点编号重复"); |
| | | } |
| | | this.updateById(site); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |
| | | * 校验必填项 |
| | | * @param site |
| | | * @return |
| | | */ |
| | | AjaxResult addSiteVerify(Site site){ |
| | | if(null == site.getPartnerId()){ |
| | | return AjaxResult.error("合作商不能为空"); |
| | | } |
| | | if(StringUtils.isEmpty(site.getCode())){ |
| | | return AjaxResult.error("站点编号不能为空"); |
| | | } |
| | | if(StringUtils.isEmpty(site.getName())){ |
| | | return AjaxResult.error("站点名称不能为空"); |
| | | } |
| | | if(null == site.getSiteType()){ |
| | | return AjaxResult.error("站点类型不能为空"); |
| | | } |
| | | if(null == site.getBusinessCategory()){ |
| | | return AjaxResult.error("经营类别不能为空"); |
| | | } |
| | | if(null == site.getStatus()){ |
| | | return AjaxResult.error("站点状态不能为空"); |
| | | } |
| | | if(null == site.getConstructionSite()){ |
| | | return AjaxResult.error("建设场所不能为空"); |
| | | } |
| | | if(StringUtils.isEmpty(site.getProvince()) || StringUtils.isEmpty(site.getProvinceCode()) || |
| | | StringUtils.isEmpty(site.getCity()) || StringUtils.isEmpty(site.getCityCode()) || |
| | | StringUtils.isEmpty(site.getDistricts()) || StringUtils.isEmpty(site.getDistrictsCode())){ |
| | | return AjaxResult.error("所在区域不能为空"); |
| | | } |
| | | if(StringUtils.isEmpty(site.getAddress())){ |
| | | return AjaxResult.error("详细地址不能为空"); |
| | | } |
| | | if(StringUtils.isEmpty(site.getLon()) || StringUtils.isEmpty(site.getLat())){ |
| | | return AjaxResult.error("地图位置不能为空"); |
| | | } |
| | | if(StringUtils.isEmpty(site.getPhone())){ |
| | | return AjaxResult.error("站点电话不能为空"); |
| | | } |
| | | if(StringUtils.isEmpty(site.getServicePhone())){ |
| | | return AjaxResult.error("服务电话不能为空"); |
| | | } |
| | | if(null == site.getParkingSpace()){ |
| | | return AjaxResult.error("车位数量不能为空"); |
| | | } |
| | | if(null == site.getSort()){ |
| | | return AjaxResult.error("排序不能为空"); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | | /** |
| | | * 删除站点 |
| | | * @param id 站点id |
| | | * @return |
| | | */ |
| | | @Override |
| | | public AjaxResult delSite(Integer id) { |
| | | //查询是否有关联数据 |
| | | //充电桩 |
| | | // todo 待完善 |
| | | Site site = this.getById(id); |
| | | site.setDelFlag(true); |
| | | this.updateById(site); |
| | | return AjaxResult.success(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TChargingPileNotification; |
| | | import com.ruoyi.chargingPile.mapper.TChargingPileNotificationMapper; |
| | | import com.ruoyi.chargingPile.service.TChargingPileNotificationService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Service |
| | | public class TChargingPileNotificationServiceImpl extends ServiceImpl<TChargingPileNotificationMapper, TChargingPileNotification> implements TChargingPileNotificationService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TFaultMessage; |
| | | import com.ruoyi.chargingPile.mapper.TFaultMessageMapper; |
| | | import com.ruoyi.chargingPile.service.TFaultMessageService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Service |
| | | public class TFaultMessageServiceImpl extends ServiceImpl<TFaultMessageMapper, TFaultMessage> implements TFaultMessageService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TParkingRecord; |
| | | import com.ruoyi.chargingPile.mapper.TParkingRecordMapper; |
| | | import com.ruoyi.chargingPile.service.TParkingRecordService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Service |
| | | public class TParkingRecordServiceImpl extends ServiceImpl<TParkingRecordMapper, TParkingRecord> implements TParkingRecordService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TPartnerSite; |
| | | import com.ruoyi.chargingPile.mapper.TPartnerSiteMapper; |
| | | import com.ruoyi.chargingPile.service.TPartnerSiteService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Service |
| | | public class TPartnerSiteServiceImpl extends ServiceImpl<TPartnerSiteMapper, TPartnerSite> implements TPartnerSiteService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TRepair; |
| | | import com.ruoyi.chargingPile.mapper.TRepairMapper; |
| | | import com.ruoyi.chargingPile.service.TRepairService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Service |
| | | public class TRepairServiceImpl extends ServiceImpl<TRepairMapper, TRepair> implements TRepairService { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TSiteMenu; |
| | | import com.ruoyi.chargingPile.mapper.TSiteMenuMapper; |
| | | import com.ruoyi.chargingPile.service.TSiteMenuService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-08 |
| | | */ |
| | | @Service |
| | | public class TSiteMenuServiceImpl extends ServiceImpl<TSiteMenuMapper, TSiteMenu> implements TSiteMenuService { |
| | | |
| | | } |
| | |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="getSiteList" resultType="com.ruoyi.chargingPile.api.dto.GetSiteListDTO"> |
| | | select |
| | | a.id, |
| | | a.code, |
| | | a.name, |
| | | b.name as partnerName, |
| | | a.site_type as siteType, |
| | | a.business_category as businessCategory, |
| | | a.status, |
| | | CONCAT(a.province, a.city, a.districts, a.address) as address, |
| | | 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, |
| | | c.num as chargingPileNumber, |
| | | a.sort |
| | | from t_site a |
| | | left join t_partner b on (a.partner_id = b.id) |
| | | left join (select site_id, count(1) as num from t_charging_pile where del_flag = 0 group by site_id) c on (a.id = c.site_id) |
| | | WHERE a.del_flag = 0 |
| | | <if test="null != item.name and '' != item.name"> |
| | | and a.name like CONCAT('%', #{item.name}, '%') |
| | | </if> |
| | | <if test="null != item.partnerName and '' != item.partnerName"> |
| | | and b.name like CONCAT('%', #{item.partnerName}, '%') |
| | | </if> |
| | | <if test="null != item.siteType"> |
| | | and a.site_type = #{item.siteType} |
| | | </if> |
| | | <if test="null != item.businessCategory"> |
| | | and a.business_category = #{item.businessCategory} |
| | | </if> |
| | | <if test="null != item.status"> |
| | | and a.status = #{item.status} |
| | | </if> |
| | | <if test="null != item.provinceCode and '' != item.provinceCode"> |
| | | and a.province_code = #{item.provinceCode} |
| | | </if> |
| | | <if test="null != item.cityCode and '' != item.cityCode"> |
| | | and a.city_code = #{item.cityCode} |
| | | </if> |
| | | <if test="null != item.districtsCode and '' != item.districtsCode"> |
| | | and a.districts_code = #{item.districtsCode} |
| | | </if> |
| | | order by a.sort desc, a.create_time desc limit #{item.pageCurr}, #{item.pageSize} |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TChargingPileNotificationMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TChargingPileNotification"> |
| | | <id column="id" property="id" /> |
| | | <result column="site_id" property="siteId" /> |
| | | <result column="charging_pile_id" property="chargingPileId" /> |
| | | <result column="content" property="content" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, site_id, charging_pile_id, content, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TFaultMessageMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TFaultMessage"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="site_id" property="siteId" /> |
| | | <result column="charging_pile_id" property="chargingPileId" /> |
| | | <result column="status" property="status" /> |
| | | <result column="down_time" property="downTime" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, site_id, charging_pile_id, status, down_time, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TParkingRecordMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TParkingRecord"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="license_plate" property="licensePlate" /> |
| | | <result column="vehicle_color" property="vehicleColor" /> |
| | | <result column="charging_order_id" property="chargingOrderId" /> |
| | | <result column="parking_lot_id" property="parkingLotId" /> |
| | | <result column="in_parking_time" property="inParkingTime" /> |
| | | <result column="out_parking_time" property="outParkingTime" /> |
| | | <result column="parking_duration" property="parkingDuration" /> |
| | | <result column="order_amount" property="orderAmount" /> |
| | | <result column="status" property="status" /> |
| | | <result column="out_parking_type" property="outParkingType" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, license_plate, vehicle_color, charging_order_id, parking_lot_id, in_parking_time, out_parking_time, parking_duration, order_amount, status, out_parking_type, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TPartnerSiteMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TPartnerSite"> |
| | | <id column="id" property="id" /> |
| | | <result column="site_id" property="siteId" /> |
| | | <result column="partner_id" property="partnerId" /> |
| | | <result column="site_menu_id" property="siteMenuId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, site_id, partner_id, site_menu_id |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TRepairMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TRepair"> |
| | | <id column="id" property="id" /> |
| | | <result column="repairman" property="repairman" /> |
| | | <result column="site_id" property="siteId" /> |
| | | <result column="charging_pile_id" property="chargingPileId" /> |
| | | <result column="content" property="content" /> |
| | | <result column="repair_time" property="repairTime" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, repairman, site_id, charging_pile_id, content, repair_time, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.chargingPile.mapper.TSiteMenuMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TSiteMenu"> |
| | | <id column="menu_id" property="menuId" /> |
| | | <result column="menu_name" property="menuName" /> |
| | | <result column="parent_id" property="parentId" /> |
| | | <result column="order_num" property="orderNum" /> |
| | | <result column="path" property="path" /> |
| | | <result column="component" property="component" /> |
| | | <result column="query" property="query" /> |
| | | <result column="is_frame" property="isFrame" /> |
| | | <result column="is_cache" property="isCache" /> |
| | | <result column="menu_type" property="menuType" /> |
| | | <result column="visible" property="visible" /> |
| | | <result column="status" property="status" /> |
| | | <result column="perms" property="perms" /> |
| | | <result column="icon" property="icon" /> |
| | | <result column="create_by" property="createBy" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="update_by" property="updateBy" /> |
| | | <result column="update_time" property="updateTime" /> |
| | | <result column="remark" property="remark" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | menu_id, menu_name, parent_id, order_num, `path`, component, query, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.api.model.TChargingOrder; |
| | | import com.ruoyi.order.service.TChargingOrderService; |
| | | import io.swagger.annotations.Api; |
| | | 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; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/t-charging-order") |
| | | public class TChargingOrderController { |
| | | |
| | | @Resource |
| | | private TChargingOrderService chargingOrderService; |
| | | |
| | | @PostMapping(value = "/useOrderCount") |
| | | public R<Long> useOrderCount(@RequestParam Long userId) { |
| | | Long count = chargingOrderService.lambdaQuery().eq(TChargingOrder::getAppUserId, userId).count(); |
| | | |
| | | return R.ok(count); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.other.api.domain.Region; |
| | | import com.ruoyi.other.service.IRegionService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/8 12:00 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/region") |
| | | public class RegionController { |
| | | |
| | | @Resource |
| | | private IRegionService regionService; |
| | | |
| | | |
| | | @ResponseBody |
| | | @GetMapping("/getRegion/{pid}") |
| | | @ApiOperation(value = "获取省市区数据", tags = {"管理后台-站点管理"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "父级id,没有传0", name = "pid", required = true) |
| | | }) |
| | | public AjaxResult<List<Region>> getRegion(@PathVariable Integer pid){ |
| | | List<Region> list = regionService.list(new LambdaQueryWrapper<Region>().eq(Region::getParentId, pid)); |
| | | return AjaxResult.success(list); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.enums.status.AdvertisingStatusEnum; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TAdvertising; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | public AjaxResult<PageInfo<TAdvertising>> pageList(@RequestBody AdvertisingDTO dto) { |
| | | return AjaxResult.ok(advertisingService.pageList(dto)); |
| | | } |
| | | |
| | | @ApiOperation(tags = {"小程序-广告管理"},value = "广告列表查询") |
| | | @PostMapping(value = "/list") |
| | | public AjaxResult<List<TAdvertising>> list() { |
| | | return AjaxResult.ok(advertisingService.list(Wrappers.lambdaQuery(TAdvertising.class) |
| | | .eq(TAdvertising::getStatus, AdvertisingStatusEnum.YES.getCode()))); |
| | | } |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping(value = "/unit/delete") |
| | | public R<TCompany> delete(@RequestParam Integer id) { |
| | | |
| | | |
| | | return R.ok( companyService.getById(id)); |
| | | } |
| | | } |
| | | |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Resource |
| | | private TUserTagService tUserTagService; |
| | | |
| | | //标签分页 |
| | | @PostMapping(value = "/page") |
| | | public R<Page<TUserTag>> page(@RequestBody TagListQueryDto tagListQueryDto) { |
| | | Page<TUserTag> page = tUserTagService.lambdaQuery() |
| | |
| | | return R.ok(page); |
| | | |
| | | } |
| | | |
| | | //标签新增修改 |
| | | @PostMapping(value = "/addorUpdateTag") |
| | | public R addorUpdateTag(@RequestBody TUserTag tUserTag) { |
| | | tUserTag.setCreateTime(LocalDateTime.now()); |
| | | tUserTagService.saveOrUpdate(tUserTag); |
| | | return R.ok(); |
| | | } |
| | | |
| | | //标签删除 |
| | | @PostMapping(value = "/delete") |
| | | public R delete(@RequestParam Integer id) { |
| | | tUserTagService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | //获取标签map |
| | | @PostMapping(value = "/getTagMap") |
| | | public R<Map<Integer, String>> getTagMap(@RequestBody List<Integer> ids) { |
| | | |
| | | List<TUserTag> list = tUserTagService.lambdaQuery().in(!ids.isEmpty(), TUserTag::getId, ids).list(); |
| | | Map<Integer, String> idNameMap = list.stream() |
| | | .collect(Collectors.toMap( |
| | | TUserTag::getId, |
| | | TUserTag::getName |
| | | )); |
| | | return R.ok(idNameMap); |
| | | } |
| | | |
| | | @PostMapping(value = "/getById") |
| | | public R<TUserTag> getById(@RequestParam Integer id) { |
| | | |
| | | return R.ok(tUserTagService.getById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TIntegralRule; |
| | | import com.ruoyi.other.api.domain.TUserTag; |
| | | import com.ruoyi.other.api.domain.TVip; |
| | | import com.ruoyi.other.service.TVipService; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | return AjaxResult.ok(vipService.pageList(pageCurr,pageSize)); |
| | | } |
| | | |
| | | //获取会员Map |
| | | @PostMapping(value = "/getVipMap") |
| | | public R<Map<Integer, String>> getVipMap(@RequestBody List<Integer> ids) { |
| | | |
| | | List<TVip> list = vipService.lambdaQuery().in(!ids.isEmpty(), TVip::getId, ids).list(); |
| | | Map<Integer, String> idNameMap = list.stream() |
| | | .collect(Collectors.toMap( |
| | | TVip::getId, |
| | | TVip::getName |
| | | )); |
| | | return R.ok(idNameMap); |
| | | } |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.other.api.domain.Region; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/8 11:59 |
| | | */ |
| | | public interface RegionMapper extends BaseMapper<Region> { |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.other.api.domain.Region; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/8 11:59 |
| | | */ |
| | | public interface IRegionService extends IService<Region> { |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.other.api.domain.Region; |
| | | import com.ruoyi.other.mapper.RegionMapper; |
| | | import com.ruoyi.other.service.IRegionService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2024/8/8 11:59 |
| | | */ |
| | | @Service |
| | | public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements IRegionService { |
| | | } |