From 90458719d61d77a638cd4962b3445d8a0a5b6e9e Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期四, 08 八月 2024 11:39:23 +0800
Subject: [PATCH] 站點

---
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/TSiteService.java              |   16 ++
 ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TSite.java                   |  166 ++++++++++++++++++++
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TSiteMenuController.java    |   20 ++
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TSiteMenuMapper.java            |   16 ++
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TSiteMenuServiceImpl.java |   20 ++
 ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AdvertisingStatusEnum.java   |   45 +++++
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TAdvertisingController.java               |   11 +
 ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TSiteMenu.java               |  108 +++++++++++++
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TSiteController.java        |   20 ++
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/TSiteMenuService.java          |   16 ++
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TSiteServiceImpl.java     |   20 ++
 ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TSiteMapper.java                |   16 ++
 12 files changed, 474 insertions(+), 0 deletions(-)

diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TSite.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TSite.java
new file mode 100644
index 0000000..b099b24
--- /dev/null
+++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TSite.java
@@ -0,0 +1,166 @@
+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;
+
+
+}
diff --git a/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TSiteMenu.java b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TSiteMenu.java
new file mode 100644
index 0000000..ac58640
--- /dev/null
+++ b/ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TSiteMenu.java
@@ -0,0 +1,108 @@
+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;
+
+
+}
diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AdvertisingStatusEnum.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AdvertisingStatusEnum.java
new file mode 100644
index 0000000..33aa0dd
--- /dev/null
+++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/enums/status/AdvertisingStatusEnum.java
@@ -0,0 +1,45 @@
+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;
+    }
+
+}
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TSiteController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TSiteController.java
new file mode 100644
index 0000000..cca7998
--- /dev/null
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TSiteController.java
@@ -0,0 +1,20 @@
+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")
+public class TSiteController {
+
+}
+
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TSiteMenuController.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TSiteMenuController.java
new file mode 100644
index 0000000..4bb8d88
--- /dev/null
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TSiteMenuController.java
@@ -0,0 +1,20 @@
+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 {
+
+}
+
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TSiteMapper.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TSiteMapper.java
new file mode 100644
index 0000000..34a1b07
--- /dev/null
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TSiteMapper.java
@@ -0,0 +1,16 @@
+package com.ruoyi.chargingPile.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.ruoyi.chargingPile.api.model.TSite;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author xiaochen
+ * @since 2024-08-08
+ */
+public interface TSiteMapper extends BaseMapper<TSite> {
+
+}
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TSiteMenuMapper.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TSiteMenuMapper.java
new file mode 100644
index 0000000..57d50bc
--- /dev/null
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/mapper/TSiteMenuMapper.java
@@ -0,0 +1,16 @@
+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> {
+
+}
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/TSiteMenuService.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/TSiteMenuService.java
new file mode 100644
index 0000000..094b78f
--- /dev/null
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/TSiteMenuService.java
@@ -0,0 +1,16 @@
+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> {
+
+}
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/TSiteService.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/TSiteService.java
new file mode 100644
index 0000000..bbcca46
--- /dev/null
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/TSiteService.java
@@ -0,0 +1,16 @@
+package com.ruoyi.chargingPile.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.ruoyi.chargingPile.api.model.TSite;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author xiaochen
+ * @since 2024-08-08
+ */
+public interface TSiteService extends IService<TSite> {
+
+}
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TSiteMenuServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TSiteMenuServiceImpl.java
new file mode 100644
index 0000000..293aaba
--- /dev/null
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TSiteMenuServiceImpl.java
@@ -0,0 +1,20 @@
+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 {
+
+}
diff --git a/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TSiteServiceImpl.java b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TSiteServiceImpl.java
new file mode 100644
index 0000000..9fba9fc
--- /dev/null
+++ b/ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/service/impl/TSiteServiceImpl.java
@@ -0,0 +1,20 @@
+package com.ruoyi.chargingPile.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.ruoyi.chargingPile.api.model.TSite;
+import com.ruoyi.chargingPile.mapper.TSiteMapper;
+import com.ruoyi.chargingPile.service.TSiteService;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author xiaochen
+ * @since 2024-08-08
+ */
+@Service
+public class TSiteServiceImpl extends ServiceImpl<TSiteMapper, TSite> implements TSiteService {
+
+}
diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TAdvertisingController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TAdvertisingController.java
index 98ae556..4cfac38 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TAdvertisingController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TAdvertisingController.java
@@ -1,6 +1,8 @@
 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;
@@ -13,6 +15,8 @@
 import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
 
 /**
  * <p>
@@ -56,5 +60,12 @@
     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())));
+    }
 }
 

--
Gitblit v1.7.1