店铺区域接口

This commit is contained in:
张松
2025-02-19 11:00:39 +08:00
parent 019fada4b9
commit 0d2efef2a1
6 changed files with 99 additions and 18 deletions

View File

@@ -0,0 +1,34 @@
package com.czg.account.dto.area;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* 店铺区域 实体类。
*
* @author zs
* @since 2025-02-18
*/
@Data
public class ShopAreaAddDTO implements Serializable {
/**
* 排序
*/
private Integer sort;
/**
* 区域名称
*/
@NotEmpty(message = "店铺名称不为空")
private String name;
}

View File

@@ -28,11 +28,6 @@ public class ShopAreaEditDTO implements Serializable {
@NotNull
private Integer id;
/**
* 店铺Id
*/
private Integer shopId;
/**
* 排序
*/

View File

@@ -39,7 +39,7 @@ public class ShopTableArea implements Serializable {
/**
* 店铺Id
*/
private Integer shopId;
private Long shopId;
/**
* 排序
@@ -55,6 +55,6 @@ public class ShopTableArea implements Serializable {
private LocalDateTime createdTime;
@Column(onInsertValue = "now()", onUpdateValue = "now()")
private Long updatedTime;
private LocalDateTime updatedTime;
}

View File

@@ -1,5 +1,7 @@
package com.czg.account.service;
import com.czg.account.dto.area.ShopAreaAddDTO;
import com.czg.account.dto.area.ShopAreaEditDTO;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import com.czg.account.entity.ShopTableArea;
@@ -13,4 +15,9 @@ import com.czg.account.entity.ShopTableArea;
public interface ShopTableAreaService extends IService<ShopTableArea> {
Page<ShopTableArea> pageInfo(Long shopId, String name);
boolean edit(Long shopId, ShopAreaEditDTO shopAreaEditDTO);
Boolean add(ShopAreaAddDTO shopAreaAddDTO);
}