diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/PeopleVehicleFlowController.java b/gather-app/src/main/java/com/ruoyi/database/controller/PeopleVehicleFlowController.java index 320ed5a..0cb90fd 100644 --- a/gather-app/src/main/java/com/ruoyi/database/controller/PeopleVehicleFlowController.java +++ b/gather-app/src/main/java/com/ruoyi/database/controller/PeopleVehicleFlowController.java @@ -1,7 +1,5 @@ package com.ruoyi.database.controller; -import com.baomidou.mybatisplus.annotation.TableId; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.page.TableDataInfo; import com.ruoyi.database.domain.PeopleVehicleFlow; @@ -9,15 +7,13 @@ import com.ruoyi.database.service.PeopleVehicleFlowService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; -import org.aspectj.apache.bcel.generic.TABLESWITCH; -import org.springframework.security.core.parameters.P; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import java.util.List; -@Api(tags = "人脸记录表") +@Api(tags = "人口和车辆七天流量记录表") @RestController @RequiredArgsConstructor @RequestMapping("/base/peopleVehicleFlow") diff --git a/gather-app/src/main/java/com/ruoyi/database/controller/PeopleVehicleHourFlowController.java b/gather-app/src/main/java/com/ruoyi/database/controller/PeopleVehicleHourFlowController.java new file mode 100644 index 0000000..c355912 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/controller/PeopleVehicleHourFlowController.java @@ -0,0 +1,33 @@ +package com.ruoyi.database.controller; + +import com.ruoyi.common.core.controller.BaseController; +import com.ruoyi.common.core.page.TableDataInfo; +import com.ruoyi.database.domain.PeopleVehicleFlow; +import com.ruoyi.database.domain.PeopleVehicleHourFlow; +import com.ruoyi.database.service.PeopleVehicleHourFlowService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +@Api(tags = "人口和车辆当天流量记录表") +@RestController +@RequiredArgsConstructor +@RequestMapping("/base/peopleVehicleHourFlow") +public class PeopleVehicleHourFlowController extends BaseController { + + private final PeopleVehicleHourFlowService peopleVehicleHourFlowService; + + @GetMapping + @ApiOperation("查询人车记录表") + public TableDataInfo list(PeopleVehicleFlow peopleVehicleFlow) { + startPage(); + //QueryWrapper queryWrapper = new QueryWrapper<>(peopleVehicleFlow); + List list = peopleVehicleHourFlowService.list(); + return getDataTable(list); + } +} diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/PeopleVehicleFlow.java b/gather-app/src/main/java/com/ruoyi/database/domain/PeopleVehicleFlow.java index dfbbe83..c6dcaed 100644 --- a/gather-app/src/main/java/com/ruoyi/database/domain/PeopleVehicleFlow.java +++ b/gather-app/src/main/java/com/ruoyi/database/domain/PeopleVehicleFlow.java @@ -27,9 +27,15 @@ public class PeopleVehicleFlow extends BaseEntity { @ApiModelProperty("类型") private Integer statistic_type; + /** + * 流量 + */ @ApiModelProperty("数量") private String statistic_count; + /** + * 日期 + */ @ApiModelProperty("日期") private String statistic_time; } diff --git a/gather-app/src/main/java/com/ruoyi/database/domain/PeopleVehicleHourFlow.java b/gather-app/src/main/java/com/ruoyi/database/domain/PeopleVehicleHourFlow.java new file mode 100644 index 0000000..04377ef --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/domain/PeopleVehicleHourFlow.java @@ -0,0 +1,41 @@ +package com.ruoyi.database.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +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; + +@Data +@EqualsAndHashCode(callSuper = false) +@TableName(value = "statistics_user_vehicle_hour_info") +@ApiModel(value = "StatisticsUserVehicleHour", description = "人车当日24小时数据量") +public class PeopleVehicleHourFlow { + /** + * 主键 + */ + @ApiModelProperty("主键") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 类别(1:人/2:车) + */ + @ApiModelProperty("类型") + private Integer statistic_type; + + /** + * 流量 + */ + @ApiModelProperty("数量") + private String statistic_count; + + /** + * 日期 + */ + @ApiModelProperty("日期") + private String statistic_time; + +} diff --git a/gather-app/src/main/java/com/ruoyi/database/mapper/PeopleVehicleHourFlowMapper.java b/gather-app/src/main/java/com/ruoyi/database/mapper/PeopleVehicleHourFlowMapper.java new file mode 100644 index 0000000..35874ba --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/mapper/PeopleVehicleHourFlowMapper.java @@ -0,0 +1,9 @@ +package com.ruoyi.database.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.ruoyi.database.domain.PeopleVehicleHourFlow; +import org.apache.ibatis.annotations.Mapper; + +@Mapper +public interface PeopleVehicleHourFlowMapper extends BaseMapper { +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/PeopleVehicleHourFlowService.java b/gather-app/src/main/java/com/ruoyi/database/service/PeopleVehicleHourFlowService.java new file mode 100644 index 0000000..67f93c6 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/PeopleVehicleHourFlowService.java @@ -0,0 +1,8 @@ +package com.ruoyi.database.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.ruoyi.database.domain.PeopleVehicleHourFlow; + + +public interface PeopleVehicleHourFlowService extends IService { +} diff --git a/gather-app/src/main/java/com/ruoyi/database/service/impl/PeopleVehicleHourFlowServiceImpl.java b/gather-app/src/main/java/com/ruoyi/database/service/impl/PeopleVehicleHourFlowServiceImpl.java new file mode 100644 index 0000000..06cf322 --- /dev/null +++ b/gather-app/src/main/java/com/ruoyi/database/service/impl/PeopleVehicleHourFlowServiceImpl.java @@ -0,0 +1,14 @@ +package com.ruoyi.database.service.impl; + + +import com.baomidou.dynamic.datasource.annotation.DS; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.ruoyi.database.domain.PeopleVehicleHourFlow; +import com.ruoyi.database.mapper.PeopleVehicleHourFlowMapper; +import com.ruoyi.database.service.PeopleVehicleHourFlowService; +import org.springframework.stereotype.Service; + +@Service +@DS("mysql") +public class PeopleVehicleHourFlowServiceImpl extends ServiceImpl implements PeopleVehicleHourFlowService { +} \ No newline at end of file