小程序页面

This commit is contained in:
GYJ
2025-02-14 14:59:18 +08:00
parent 4c6d521118
commit 5d1db1d4bd
8 changed files with 349 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
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 MiniAppPagesDTO {
/**
* id
*/
@NotNull(message = "id不能为空", groups = {UpdateGroup.class})
private Long id;
/**
* 图标
*/
private String icon;
/**
* 页面名称
*/
@NotBlank(message = "页面路径不能为空", groups = {Group.class})
private String name;
/**
* 页面路径
*/
@NotBlank(message = "页面路径不能为空", groups = {Group.class})
private String path;
/**
* 页面描述
*/
private String description;
/**
* 状态 1:启用 0:禁用
*/
private Integer status = 1;
/**
* 排序
*/
private Integer sort = 1;
}

View File

@@ -0,0 +1,81 @@
package com.czg.system.entity;
import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.io.Serial;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* 小程序页面路径 实体类。
*
* @author mac
* @since 2025-02-12
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@Table("tb_mini_app_pages")
public class MiniAppPages implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 自增id
*/
@Id(keyType = KeyType.Auto)
private Long id;
/**
* icon图片
*/
private String icon;
/**
* 页面名称
*/
private String name;
/**
* 页面路径
*/
private String path;
/**
* 页面描述
*/
private String description;
/**
* 页面状态0未启用1已启用
*/
private Integer status;
/**
* 排序
*/
private Integer sort;
/**
* 创建时间
*/
@Column(onInsertValue = "now()")
private LocalDateTime createTime;
/**
* 更新时间
*/
@Column(onInsertValue = "now()", onUpdateValue = "now()")
private LocalDateTime updateTime;
}

View File

@@ -0,0 +1,43 @@
package com.czg.system.service;
import com.czg.resp.CzgResult;
import com.czg.system.dto.MiniAppPagesDTO;
import com.czg.system.entity.MiniAppPages;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
/**
* 店铺支付类型 服务层。
*
* @author mac
* @since 2025-02-12
*/
public interface MiniAppPageService extends IService<MiniAppPages> {
/**
* 新增小程序页面
* @param pagesDTO 小程序页面
* @return 结果
*/
CzgResult<Long> insertMiniAppPage(MiniAppPagesDTO pagesDTO);
/**
* 修改小程序页面
* @param pagesDTO 小程序页面
* @return 结果
*/
CzgResult<Boolean> updateMiniAppPage(MiniAppPagesDTO pagesDTO);
/**
* 删除小程序页面
* @param id 小程序页面主键
* @return 结果
*/
CzgResult<Boolean> deleteMiniAppPageById(Long id);
/**
* 查询小程序页面列表
* @return 结果
*/
CzgResult<Page<MiniAppPagesDTO>> getMiniAppPage(String name, String path, Integer status);
}