修改bug
添加“source”相关CRUD代码
This commit is contained in:
parent
dcd228f2c7
commit
ccaeada98b
@ -13,8 +13,8 @@ import java.util.List;
|
||||
public interface RenderWorkerMapper {
|
||||
List<RenderWorkerEntity> list(RenderWorkerReqQuery renderWorkerReqQuery);
|
||||
RenderWorkerEntity getById(Long id);
|
||||
int add(RenderWorkerEntity member);
|
||||
int add(RenderWorkerEntity renderWorker);
|
||||
int deleteById(Long id);
|
||||
int update(RenderWorkerEntity member);
|
||||
int update(RenderWorkerEntity renderWorker);
|
||||
int updateStatus(Long id);
|
||||
}
|
||||
|
@ -15,9 +15,9 @@ import java.util.List;
|
||||
public interface ScenicMapper {
|
||||
List<ScenicRespVO> list(ScenicReqQuery scenicReqQuery);
|
||||
ScenicRespVO getById(Long id);
|
||||
int add(ScenicEntity member);
|
||||
int add(ScenicEntity scenic);
|
||||
int deleteById(Long id);
|
||||
int update(ScenicEntity member);
|
||||
int update(ScenicEntity scenic);
|
||||
int updateStatus(Long id);
|
||||
|
||||
/**
|
||||
|
22
src/main/java/com/ycwl/basic/mapper/pc/SourceMapper.java
Normal file
22
src/main/java/com/ycwl/basic/mapper/pc/SourceMapper.java
Normal file
@ -0,0 +1,22 @@
|
||||
package com.ycwl.basic.mapper.pc;
|
||||
|
||||
import com.ycwl.basic.model.pc.scenic.entity.ScenicEntity;
|
||||
import com.ycwl.basic.model.pc.scenic.req.ScenicReqQuery;
|
||||
import com.ycwl.basic.model.pc.scenic.resp.ScenicRespVO;
|
||||
import com.ycwl.basic.model.pc.source.entity.SourceEntity;
|
||||
import com.ycwl.basic.model.pc.source.req.SourceReqQuery;
|
||||
import com.ycwl.basic.model.pc.source.resp.SourceRespVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/12/2 11:21
|
||||
*/
|
||||
public interface SourceMapper {
|
||||
List<SourceRespVO> list(SourceReqQuery sourceReqQuery);
|
||||
SourceRespVO getById(Long id);
|
||||
int add(SourceEntity source);
|
||||
int deleteById(Long id);
|
||||
int update(SourceEntity source);
|
||||
}
|
@ -1,6 +1,7 @@
|
||||
package com.ycwl.basic.model.pc.broker.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -13,7 +14,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("查询推客列表请求参数")
|
||||
public class BrokerReqQuery {
|
||||
public class BrokerReqQuery extends BaseQueryParameterReq {
|
||||
private Long id;
|
||||
@ApiModelProperty("推客名称")
|
||||
private String name;
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.ycwl.basic.model.pc.device.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -13,7 +14,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("设备查询参数")
|
||||
public class DeviceReqQuery {
|
||||
public class DeviceReqQuery extends BaseQueryParameterReq {
|
||||
@ApiModelProperty("景区id")
|
||||
private Long scenicId;
|
||||
@ApiModelProperty("设备名称")
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.ycwl.basic.model.pc.face.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -14,7 +15,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("人脸查询参数")
|
||||
public class FaceReqQuery {
|
||||
public class FaceReqQuery extends BaseQueryParameterReq {
|
||||
@ApiModelProperty("会员id")
|
||||
private Long memberId;
|
||||
@ApiModelProperty("用户上传的人脸照片")
|
||||
|
@ -2,6 +2,7 @@ package com.ycwl.basic.model.pc.faceSample.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -14,7 +15,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("人脸样本查询参数")
|
||||
public class FaceSampleReqQuery {
|
||||
public class FaceSampleReqQuery extends BaseQueryParameterReq {
|
||||
/**
|
||||
* 来源设备
|
||||
*/
|
||||
|
@ -2,6 +2,7 @@ package com.ycwl.basic.model.pc.member.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -14,7 +15,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("查询用户列表请求参数")
|
||||
public class MemberReqQuery {
|
||||
public class MemberReqQuery extends BaseQueryParameterReq {
|
||||
/**
|
||||
* 微信openId
|
||||
*/
|
||||
|
@ -2,6 +2,7 @@ package com.ycwl.basic.model.pc.order.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -15,7 +16,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "订单查询对象")
|
||||
public class OrderReqQuery {
|
||||
public class OrderReqQuery extends BaseQueryParameterReq {
|
||||
@ApiModelProperty("用户昵称")
|
||||
private String memberNickname;
|
||||
@ApiModelProperty("用户真实名称")
|
||||
|
@ -2,6 +2,7 @@ package com.ycwl.basic.model.pc.renderWorker.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -16,7 +17,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("渲染机列表查询参数")
|
||||
public class RenderWorkerReqQuery {
|
||||
public class RenderWorkerReqQuery extends BaseQueryParameterReq {
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ycwl.basic.model.pc.role.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -16,5 +17,6 @@ public class RoleListRespVO {
|
||||
@ApiModelProperty(value = "0正常 1关闭")
|
||||
private Integer status;
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.ycwl.basic.model.pc.scenic.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
@ -35,5 +36,6 @@ public class ScenicConfigEntity {
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package com.ycwl.basic.model.pc.scenic.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -16,7 +17,7 @@ import java.util.Date;
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("景区列表查询参数")
|
||||
public class ScenicReqQuery {
|
||||
public class ScenicReqQuery extends BaseQueryParameterReq {
|
||||
/**
|
||||
* 景区名称
|
||||
*/
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ycwl.basic.model.pc.scenic.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ycwl.basic.model.pc.scenic.entity.ScenicConfigEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
@ -67,7 +68,9 @@ public class ScenicRespVO {
|
||||
*/
|
||||
@ApiModelProperty("状态 1启用0关闭")
|
||||
private String status;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
@ApiModelProperty("景区配置")
|
||||
private ScenicConfigEntity scenicConfig;
|
||||
|
@ -0,0 +1,38 @@
|
||||
package com.ycwl.basic.model.pc.source.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/12/02 11:29
|
||||
* 视频源
|
||||
*/
|
||||
@Data
|
||||
@TableName("source")
|
||||
public class SourceEntity {
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 景区id
|
||||
*/
|
||||
private Long scenicId;
|
||||
/**
|
||||
* 来源设备id
|
||||
*/
|
||||
private Long deviceId;
|
||||
/**
|
||||
* 所属用户
|
||||
*/
|
||||
private Long memberId;
|
||||
/**
|
||||
* 文件存储地址
|
||||
*/
|
||||
private String url;
|
||||
private Date createTime;
|
||||
private Date updateTime;
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package com.ycwl.basic.model.pc.source.req;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.ycwl.basic.model.common.BaseQueryParameterReq;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/12/02 11:29
|
||||
* 视频源
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "视频源查询对象")
|
||||
public class SourceReqQuery extends BaseQueryParameterReq {
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 景区id
|
||||
*/
|
||||
@ApiModelProperty("景区id")
|
||||
private Long scenicId;
|
||||
/**
|
||||
* 来源设备id
|
||||
*/
|
||||
@ApiModelProperty("来源设备id")
|
||||
private Long deviceId;
|
||||
/**
|
||||
* 所属用户
|
||||
*/
|
||||
@ApiModelProperty("所属用户")
|
||||
private Long memberId;
|
||||
/**
|
||||
* 文件存储地址
|
||||
*/
|
||||
@ApiModelProperty("文件存储地址")
|
||||
private String url;
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
}
|
@ -0,0 +1,47 @@
|
||||
package com.ycwl.basic.model.pc.source.resp;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/12/02 11:29
|
||||
* 视频源
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "视频源响应对象")
|
||||
public class SourceRespVO {
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 景区id
|
||||
*/
|
||||
@ApiModelProperty("景区id")
|
||||
private Long scenicId;
|
||||
@ApiModelProperty("景区名称")
|
||||
private String scenicName;
|
||||
/**
|
||||
* 来源设备id
|
||||
*/
|
||||
@ApiModelProperty("来源设备id")
|
||||
private Long deviceId;
|
||||
/**
|
||||
* 所属用户
|
||||
*/
|
||||
@ApiModelProperty("所属用户")
|
||||
private Long memberId;
|
||||
/**
|
||||
* 文件存储地址
|
||||
*/
|
||||
@ApiModelProperty("文件存储地址")
|
||||
private String url;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
}
|
@ -114,7 +114,7 @@
|
||||
<result property="status" column="status"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<association property="scenicConfig" column="id" javaType="com.ycwl.basic.model.pc.scenic.entity.ScenicConfigEntity">
|
||||
<association property="scenicConfig" javaType="com.ycwl.basic.model.pc.scenic.entity.ScenicConfigEntity">
|
||||
<id property="id" column="c.id"/>
|
||||
<result property="scenicId" column="s.id"/>
|
||||
<result property="startTime" column="c.start_time"/>
|
||||
|
38
src/main/resources/mapper/pc/SourceMapper.xml
Normal file
38
src/main/resources/mapper/pc/SourceMapper.xml
Normal file
@ -0,0 +1,38 @@
|
||||
<?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.ycwl.basic.mapper.pc.SourceMapper">
|
||||
<insert id="add">
|
||||
insert into source(id, scenic_id, device_id, member_id, url) values (#{id}, #{scenicId}, #{deviceId}, #{memberId}, #{url})
|
||||
</insert>
|
||||
<update id="update">
|
||||
update source
|
||||
<set>
|
||||
<if test="scenicId!= null">scenic_id = #{scenicId}, </if>
|
||||
<if test="deviceId!= null">device_id = #{deviceId}, </if>
|
||||
<if test="memberId!= null">member_id = #{memberId}, </if>
|
||||
<if test="url!= null">url = #{url}, </if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete from source where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="list" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||
select so.id, scenic_id, device_id, member_id, url, so.create_time, so.update_time,sc.`name` as scenicName
|
||||
from source so
|
||||
left join scenic sc on sc.id = so.scenic_id
|
||||
<where>
|
||||
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
|
||||
<if test="deviceId!= null">and device_id = #{deviceId} </if>
|
||||
<if test="memberId!= null">and member_id = #{memberId} </if>
|
||||
<if test="url!= null">and url = #{url} </if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.source.resp.SourceRespVO">
|
||||
select so.id, scenic_id, device_id, member_id, url, so.create_time, so.update_time,sc.`name` as scenicName
|
||||
from source so
|
||||
left join scenic sc on sc.id = so.scenic_id
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user