jpz
zmyYYDS 2024-01-10 22:05:24 +08:00
parent 9b30e365ca
commit e823462f26
10 changed files with 27 additions and 22 deletions

View File

@ -74,6 +74,10 @@
<groupId>doctor</groupId> <groupId>doctor</groupId>
<artifactId>doctor-common-swagger</artifactId> <artifactId>doctor-common-swagger</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</dependency>
<dependency> <dependency>
<groupId>doctor</groupId> <groupId>doctor</groupId>

View File

@ -3,10 +3,9 @@ package doctor.controller;
import doctor.common.core.web.controller.BaseController; import doctor.common.core.web.controller.BaseController;
import doctor.common.core.web.page.TableDataInfo; import doctor.common.core.web.page.TableDataInfo;
import doctor.entity.VideoCategoryEntity; import doctor.domain.entity.VideoCategoryEntity;
import doctor.entity.VideoEntity; import doctor.domain.entity.VideoEntity;
import doctor.service.HealthUserVideoService; import doctor.service.HealthUserVideoService;
import doctor.system.api.domain.SysUser;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
@ -22,9 +21,9 @@ public class HealthUserVideoController extends BaseController {
private HealthUserVideoService healthUserVideoService; private HealthUserVideoService healthUserVideoService;
@GetMapping("/findVideoCategoryList") @GetMapping("/findVideoCategoryList")
public TableDataInfo findVideoCategoryList(VideoCategoryEntity entity){ public TableDataInfo findVideoCategoryList(){
startPage(); startPage();
List<VideoCategoryEntity> List = healthUserVideoService.findVideoCategoryList(entity); List<VideoCategoryEntity> List = healthUserVideoService.findVideoCategoryList();
return getDataTable(List); return getDataTable(List);
} }

View File

@ -1,4 +1,4 @@
package doctor.entity; package doctor.domain.entity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;

View File

@ -1,4 +1,4 @@
package doctor.entity; package doctor.domain.entity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;

View File

@ -1,4 +1,4 @@
package doctor.entity; package doctor.domain.entity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;

View File

@ -1,4 +1,4 @@
package doctor.entity; package doctor.domain.entity;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -19,6 +19,9 @@ public class VideoEntity {
private String abstracts; private String abstracts;
private String originalUrl; private String originalUrl;
private Integer duration; private Integer duration;
private Integer whetherCollection;
private Integer whetherBuy;
private Integer buyNum;
private Integer price; private Integer price;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")

View File

@ -1,15 +1,14 @@
package doctor.mapper; package doctor.mapper;
import doctor.entity.VideoCategoryEntity; import doctor.domain.entity.VideoCategoryEntity;
import doctor.entity.VideoEntity; import doctor.domain.entity.VideoEntity;
import doctor.system.api.domain.SysUser;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
public interface HealthUserVideoMapper { public interface HealthUserVideoMapper {
List<VideoCategoryEntity> findVideoCategoryList(VideoCategoryEntity entity); List<VideoCategoryEntity> findVideoCategoryList();
List<VideoEntity> findVideoVoList(@Param("categoryId") Integer categoryId); List<VideoEntity> findVideoVoList(@Param("categoryId") Integer categoryId);
} }

View File

@ -2,13 +2,13 @@ package doctor.service;
import doctor.entity.VideoCategoryEntity; import doctor.domain.entity.VideoCategoryEntity;
import doctor.entity.VideoEntity; import doctor.domain.entity.VideoEntity;
import java.util.List; import java.util.List;
public interface HealthUserVideoService { public interface HealthUserVideoService {
List<VideoCategoryEntity> findVideoCategoryList(VideoCategoryEntity entity); List<VideoCategoryEntity> findVideoCategoryList();
List<VideoEntity> findVideoVoList(Integer categoryId); List<VideoEntity> findVideoVoList(Integer categoryId);
} }

View File

@ -1,8 +1,8 @@
package doctor.service.impl; package doctor.service.impl;
import doctor.entity.VideoCategoryEntity; import doctor.domain.entity.VideoCategoryEntity;
import doctor.entity.VideoEntity; import doctor.domain.entity.VideoEntity;
import doctor.mapper.HealthUserVideoMapper; import doctor.mapper.HealthUserVideoMapper;
import doctor.service.HealthUserVideoService; import doctor.service.HealthUserVideoService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -16,8 +16,8 @@ public class HealthUserVideoServiceImpl implements HealthUserVideoService {
private HealthUserVideoMapper healthUserVideoMapper; private HealthUserVideoMapper healthUserVideoMapper;
@Override @Override
public List<VideoCategoryEntity> findVideoCategoryList(VideoCategoryEntity entity) { public List<VideoCategoryEntity> findVideoCategoryList() {
return healthUserVideoMapper.findVideoCategoryList(entity); return healthUserVideoMapper.findVideoCategoryList();
} }
@Override @Override

View File

@ -5,10 +5,10 @@
<mapper namespace="doctor.mapper.HealthUserVideoMapper"> <mapper namespace="doctor.mapper.HealthUserVideoMapper">
<select id="findVideoCategoryList" resultType="doctor.entity.VideoCategoryEntity"> <select id="findVideoCategoryList" resultType="doctor.domain.entity.VideoCategoryEntity">
select * from video_category select * from video_category
</select> </select>
<select id="findVideoVoList" resultType="doctor.entity.VideoEntity"> <select id="findVideoVoList" resultType="doctor.domain.entity.VideoEntity">
select * from video where category_id=#{categoryId} select * from video where category_id=#{categoryId}
</select> </select>
</mapper> </mapper>