添加“render_worker”相关CRUD代码
This commit is contained in:
parent
5c93a22f9b
commit
2040cf23a4
@ -0,0 +1,19 @@
|
||||
package com.ycwl.basic.mapper.pc;
|
||||
|
||||
import com.ycwl.basic.model.pc.renderWorker.entity.RenderWorkerEntity;
|
||||
import com.ycwl.basic.model.pc.renderWorker.req.RenderWorkerReqQuery;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/11/29 17:22
|
||||
*/
|
||||
public interface RenderWorkerMapper {
|
||||
List<RenderWorkerEntity> list(RenderWorkerReqQuery renderWorkerReqQuery);
|
||||
RenderWorkerEntity getById(Long id);
|
||||
int add(RenderWorkerEntity member);
|
||||
int deleteById(Long id);
|
||||
int update(RenderWorkerEntity member);
|
||||
int updateStatus(Long id);
|
||||
}
|
@ -1,8 +1,10 @@
|
||||
package com.ycwl.basic.model.pc.face.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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
@ -11,6 +13,7 @@ import java.util.Date;
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/11/29 15:18
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("人脸查询响应参数")
|
||||
public class FaceRespVO {
|
||||
private Long id;
|
||||
@ -24,6 +27,8 @@ public class FaceRespVO {
|
||||
private BigDecimal firstMatchRate;
|
||||
@ApiModelProperty("匹配的结果,JSON字符串")
|
||||
private String matchResult;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createAt;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateAt;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.ycwl.basic.model.pc.faceSample.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;
|
||||
@ -45,6 +46,8 @@ public class FaceSampleRespVO {
|
||||
*/
|
||||
@ApiModelProperty("是否匹配,0未匹配,1已匹配")
|
||||
private Integer status;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createAt;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateAt;
|
||||
}
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.ycwl.basic.model.pc.member.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;
|
||||
@ -65,6 +66,8 @@ public class MemberRespVO {
|
||||
*/
|
||||
@ApiModelProperty("城市")
|
||||
private String city;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createDate;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateAt;
|
||||
}
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.ycwl.basic.model.pc.order.resp;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
@ -69,25 +70,30 @@ public class OrderRespVO {
|
||||
* 订单创建时间
|
||||
*/
|
||||
@ApiModelProperty("订单创建时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createAt;
|
||||
/**
|
||||
* 订单更新时间
|
||||
*/
|
||||
@ApiModelProperty("订单更新时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateAt;
|
||||
/**
|
||||
* 订单支付时间
|
||||
*/
|
||||
@ApiModelProperty("订单支付时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date payAt;
|
||||
/**
|
||||
* 订单取消时间
|
||||
*/
|
||||
@ApiModelProperty("订单取消时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date cancelAt;
|
||||
/**
|
||||
* 订单退款时间
|
||||
*/
|
||||
@ApiModelProperty("订单退款时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date refundAt;
|
||||
}
|
||||
|
@ -0,0 +1,80 @@
|
||||
package com.ycwl.basic.model.pc.renderWorker.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/11/29 17:24
|
||||
* 渲染机管理表
|
||||
*/
|
||||
@Data
|
||||
@TableName("render_worker")
|
||||
public class RenderWorkerEntity {
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 渲染机名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 系统
|
||||
*/
|
||||
private String platform;
|
||||
/**
|
||||
* 运行环境
|
||||
*/
|
||||
private String runTimeVersion;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
private String version;
|
||||
/**
|
||||
* 访问秘钥
|
||||
*/
|
||||
private String accessKey;
|
||||
/**
|
||||
* cpu数量
|
||||
*/
|
||||
private Integer cpuCount;
|
||||
/**
|
||||
* cpu使用率
|
||||
*/
|
||||
private BigDecimal cpuUsage;
|
||||
/**
|
||||
* 内存总量,MB
|
||||
*/
|
||||
private BigDecimal memoryTotal;
|
||||
/**
|
||||
* 内存余量,MB
|
||||
*/
|
||||
private BigDecimal memoryAvailable;
|
||||
/**
|
||||
* 支持的功能,逗号隔开
|
||||
*/
|
||||
private String supportFeature;
|
||||
/**
|
||||
* 是否仅用于指定景区,空或0不适用,否则为景区ID
|
||||
*/
|
||||
private Long scenicOnly;
|
||||
/**
|
||||
* 是否仅用于测试,0不是,1是
|
||||
*/
|
||||
private Integer testOnly;
|
||||
/**
|
||||
* 是否在线,0不在,1在
|
||||
*/
|
||||
private Integer online;
|
||||
/**
|
||||
* 状态,0禁用,1启用
|
||||
*/
|
||||
private Integer status;
|
||||
private Date createAt;
|
||||
private Date updateAt;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,81 @@
|
||||
package com.ycwl.basic.model.pc.renderWorker.req;
|
||||
|
||||
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 java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/11/29 17:24
|
||||
* 渲染机管理表
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("渲染机列表查询参数")
|
||||
public class RenderWorkerReqQuery {
|
||||
@TableId
|
||||
private Long id;
|
||||
/**
|
||||
* 渲染机名称
|
||||
*/
|
||||
@ApiModelProperty("渲染机名称")
|
||||
private String name;
|
||||
/**
|
||||
* 系统
|
||||
*/
|
||||
@ApiModelProperty("系统")
|
||||
private String platform;
|
||||
/**
|
||||
* 运行环境
|
||||
*/
|
||||
@ApiModelProperty("运行环境")
|
||||
private String runTimeVersion;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
@ApiModelProperty("版本")
|
||||
private String version;
|
||||
/**
|
||||
* cpu数量
|
||||
*/
|
||||
@ApiModelProperty("cpu数量")
|
||||
private Integer cpuCount;
|
||||
/**
|
||||
* cpu使用率
|
||||
*/
|
||||
@ApiModelProperty("cpu使用率")
|
||||
private BigDecimal cpuUsage;
|
||||
/**
|
||||
* 支持的功能,逗号隔开
|
||||
*/
|
||||
@ApiModelProperty("支持的功能,逗号隔开")
|
||||
private String supportFeature;
|
||||
/**
|
||||
* 是否仅用于指定景区,空或0不适用,否则为景区ID
|
||||
*/
|
||||
@ApiModelProperty("是否仅用于指定景区,空或0不适用,否则为景区ID")
|
||||
private Long scenicOnly;
|
||||
/**
|
||||
* 是否仅用于测试,0不是,1是
|
||||
*/
|
||||
@ApiModelProperty("是否仅用于测试,0不是,1是")
|
||||
private Integer testOnly;
|
||||
/**
|
||||
* 是否在线,0不在,1在
|
||||
*/
|
||||
@ApiModelProperty("是否在线,0不在,1在")
|
||||
private Integer online;
|
||||
/**
|
||||
* 状态,0禁用,1启用
|
||||
*/
|
||||
@ApiModelProperty("状态,0禁用,1启用")
|
||||
private Integer status;
|
||||
private Date startTime;
|
||||
private Date endTime;
|
||||
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.ycwl.basic.model.pc.renderWorker.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.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author:longbinbin
|
||||
* @Date:2024/11/29 17:24
|
||||
* 渲染机管理表
|
||||
*/
|
||||
@Data
|
||||
@ApiModel("查询渲染机列表响应对象")
|
||||
public class RenderWorkerRespVO {
|
||||
private Long id;
|
||||
/**
|
||||
* 渲染机名称
|
||||
*/
|
||||
@ApiModelProperty("渲染机名称")
|
||||
private String name;
|
||||
/**
|
||||
* 系统
|
||||
*/
|
||||
@ApiModelProperty("系统")
|
||||
private String platform;
|
||||
/**
|
||||
* 运行环境
|
||||
*/
|
||||
@ApiModelProperty("运行环境")
|
||||
private String runTimeVersion;
|
||||
/**
|
||||
* 版本
|
||||
*/
|
||||
@ApiModelProperty("版本")
|
||||
private String version;
|
||||
/**
|
||||
* 访问秘钥
|
||||
*/
|
||||
@ApiModelProperty("访问秘钥")
|
||||
private String accessKey;
|
||||
/**
|
||||
* cpu数量
|
||||
*/
|
||||
@ApiModelProperty("cpu数量")
|
||||
private Integer cpuCount;
|
||||
/**
|
||||
* cpu使用率
|
||||
*/
|
||||
@ApiModelProperty("cpu使用率")
|
||||
private BigDecimal cpuUsage;
|
||||
/**
|
||||
* 内存总量,MB
|
||||
*/
|
||||
@ApiModelProperty("内存总量,MB")
|
||||
private BigDecimal memoryTotal;
|
||||
/**
|
||||
* 内存余量,MB
|
||||
*/
|
||||
@ApiModelProperty("内存余量,MB")
|
||||
private BigDecimal memoryAvailable;
|
||||
/**
|
||||
* 支持的功能,逗号隔开
|
||||
*/
|
||||
@ApiModelProperty("支持的功能,逗号隔开")
|
||||
private String supportFeature;
|
||||
/**
|
||||
* 是否仅用于指定景区,空或0不适用,否则为景区ID
|
||||
*/
|
||||
@ApiModelProperty("是否仅用于指定景区,空或0不适用,否则为景区ID")
|
||||
private Long scenicOnly;
|
||||
/**
|
||||
* 是否仅用于测试,0不是,1是
|
||||
*/
|
||||
@ApiModelProperty("是否仅用于测试,0不是,1是")
|
||||
private Integer testOnly;
|
||||
/**
|
||||
* 是否在线,0不在,1在
|
||||
*/
|
||||
@ApiModelProperty("是否在线,0不在,1在")
|
||||
private Integer online;
|
||||
/**
|
||||
* 状态,0禁用,1启用
|
||||
*/
|
||||
@ApiModelProperty("状态,0禁用,1启用")
|
||||
private Integer status;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date createAt;
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private Date updateAt;
|
||||
|
||||
|
||||
}
|
124
src/main/resources/mapper/pc/RenderWorkerMapper.xml
Normal file
124
src/main/resources/mapper/pc/RenderWorkerMapper.xml
Normal file
@ -0,0 +1,124 @@
|
||||
<?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.RenderWorkerMapper">
|
||||
<insert id="add">
|
||||
insert into render_worker(id, `name`, platform, runtime_version, version, access_key,
|
||||
cpu_count, cpu_usage, memory_total, memory_available, support_feature, scenic_only, test_only, `online`, `status`)
|
||||
VALUES (#{id}, #{name}, #{platform}, #{runtimeVersion}, #{version}, #{accessKey},
|
||||
#{cpuCount}, #{cpuUsage}, #{memoryTotal}, #{memoryAvailable}, #{supportFeature}, #{scenicOnly}, #{testOnly}, #{online}, #{status})
|
||||
|
||||
</insert>
|
||||
<update id="update">
|
||||
update render_worker
|
||||
<set>
|
||||
<if test="name!= null and name!= ''">
|
||||
name = #{name},
|
||||
</if>
|
||||
<if test="platform!= null and platform!= ''">
|
||||
platform = #{platform},
|
||||
</if>
|
||||
<if test="runtimeVersion!= null and runtimeVersion!= ''">
|
||||
runtime_version = #{runtimeVersion},
|
||||
</if>
|
||||
<if test="version!= null and version!= ''">
|
||||
version = #{version},
|
||||
</if>
|
||||
<if test="accessKey!= null and accessKey!= ''">
|
||||
access_key = #{accessKey},
|
||||
</if>
|
||||
<if test="cpuCount!= null">
|
||||
cpu_count = #{cpuCount},
|
||||
</if>
|
||||
<if test="cpuUsage!= null">
|
||||
cpu_usage = #{cpuUsage},
|
||||
</if>
|
||||
<if test="memoryTotal!= null">
|
||||
memory_total = #{memoryTotal},
|
||||
</if>
|
||||
<if test="memoryAvailable!= null">
|
||||
memory_available = #{memoryAvailable},
|
||||
</if>
|
||||
<if test="supportFeature!= null">
|
||||
support_feature = #{supportFeature},
|
||||
</if>
|
||||
<if test="scenicOnly!= null">
|
||||
scenic_only = #{scenicOnly},
|
||||
</if>
|
||||
<if test="testOnly!= null">
|
||||
test_only = #{testOnly},
|
||||
</if>
|
||||
<if test="online!= null">
|
||||
`online` = #{online},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<update id="updateStatus">
|
||||
update render_worker
|
||||
set status = (CASE
|
||||
status
|
||||
WHEN 1 THEN
|
||||
0
|
||||
WHEN 0 THEN
|
||||
1
|
||||
ELSE null
|
||||
END)
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete from render_worker where id = #{id}
|
||||
</delete>
|
||||
|
||||
<select id="list" resultType="com.ycwl.basic.model.pc.renderWorker.entity.RenderWorkerEntity">
|
||||
select id, `name`, platform, runtime_version, version, access_key,
|
||||
cpu_count, cpu_usage, memory_total, memory_available, support_feature, scenic_only, test_only, `online`, `status`, create_at, update_at
|
||||
from render_worker
|
||||
<where>
|
||||
<if test="name!= null and name!= ''">
|
||||
and `name` like concat('%', #{name}, '%')
|
||||
</if>
|
||||
<if test="platform!= null and platform!= ''">
|
||||
and platform like concat('%', #{platform}, '%')
|
||||
</if>
|
||||
<if test="runtimeVersion!= null and runtimeVersion!= ''">
|
||||
and runtime_version like concat('%', #{runtimeVersion}, '%')
|
||||
</if>
|
||||
<if test="version!= null and version!= ''">
|
||||
and version like concat('%', #{version}, '%')
|
||||
</if>
|
||||
<if test="cpuCount!= null">
|
||||
and cpu_count = #{cpuCount}
|
||||
</if>
|
||||
<if test="cpuUsage!= null">
|
||||
and cpu_usage = #{cpuUsage}
|
||||
</if>
|
||||
<if test="supportFeature!= null">
|
||||
and support_feature like concat('%',#{supportFeature},'%')
|
||||
</if>
|
||||
<if test="scenicOnly!= null">
|
||||
and scenic_only = #{scenicOnly}
|
||||
</if>
|
||||
<if test="testOnly!= null">
|
||||
and test_only = #{testOnly}
|
||||
</if>
|
||||
<if test="online!= null">
|
||||
and `online` = #{online}
|
||||
</if>
|
||||
<if test="status!= null">
|
||||
and `status` = #{status}
|
||||
</if>
|
||||
<if test="startTime!=null">
|
||||
and create_at >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
and create_at <= #{endTime}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.renderWorker.entity.RenderWorkerEntity">
|
||||
select id, `name`, platform, runtime_version, version, access_key,
|
||||
cpu_count, cpu_usage, memory_total, memory_available, support_feature, scenic_only, test_only, `online`, `status`, create_at, update_at
|
||||
from render_worker
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
Loading…
x
Reference in New Issue
Block a user