版本信息操作

This commit is contained in:
GYJ
2025-02-12 16:24:44 +08:00
parent 8a4d083bc8
commit 6725f7bf32
8 changed files with 272 additions and 45 deletions

View File

@@ -0,0 +1,32 @@
package com.czg.system.dto;
import com.czg.validator.group.Group;
import com.czg.validator.group.UpdateGroup;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
/**
* @author GYJoker
*/
@Data
public class VersionDTO {
@NotNull(message = "版本id不能为空", groups = {UpdateGroup.class})
private Long id;
@NotBlank(message = "渠道不能为空", groups = {Group.class})
private String source;
@NotBlank(message = "版本类型不能为空", groups = {Group.class})
private String type;
@NotBlank(message = "版本号不能为空", groups = {Group.class})
private String version;
private Integer isForce = 0;
private String message;
@NotBlank(message = "下载地址不能为空", groups = {Group.class})
private String url;
}

View File

@@ -31,15 +31,15 @@ public class Version implements Serializable {
private static final long serialVersionUID = 1L;
@Id(keyType = KeyType.Auto)
private Integer id;
private Long id;
/**
* LDBL_APP;WX;
* pc 桌面端, manager_app 管理端, phone_book 电话机点餐
*/
private String source;
/**
* ios;android;
* 0 windows1 安卓2 iOS
*/
private String type;
@@ -49,9 +49,9 @@ public class Version implements Serializable {
private String version;
/**
* 0不更新1更新
* 0强制更新1强制更新
*/
private Integer isUp;
private Integer isForce;
/**
* 更新提示内容
@@ -64,9 +64,9 @@ public class Version implements Serializable {
private String url;
/**
* 选中 0否 1是
* 更新者id
*/
private Integer sel;
private Long updateUserId;
/**
* 创建时间

View File

@@ -1,8 +1,12 @@
package com.czg.system.service;
import com.czg.resp.CzgResult;
import com.czg.system.dto.VersionDTO;
import com.mybatisflex.core.service.IService;
import com.czg.system.entity.Version;
import java.util.List;
/**
* 版本管理 服务层。
*
@@ -11,4 +15,38 @@ import com.czg.system.entity.Version;
*/
public interface VersionService extends IService<Version> {
/**
* 新增版本
* @param versionDTO 版本信息
* @return Long id
*/
CzgResult<Long> insertVersion(VersionDTO versionDTO);
/**
* 更新版本
* @param versionDTO 版本信息
* @return Long id
*/
CzgResult<Long> updateVersion(VersionDTO versionDTO);
/**
* 删除版本
* @param id 版本id
* @return Long id
*/
CzgResult<Long> deleteVersion(Long id);
/**
* 获取版本信息
* @param source 渠道
* @param type 类型
* @return VersionDTO
*/
CzgResult<VersionDTO> getVersionInfo(String source, String type);
/**
* 获取版本列表
* @return List<VersionDTO>
*/
CzgResult<List<VersionDTO>> getVersionList();
}