多店铺需求

This commit is contained in:
Tankaikai
2025-04-07 15:16:36 +08:00
parent 982aab3108
commit ed1bd44f6a
12 changed files with 463 additions and 7 deletions

View File

@@ -0,0 +1,54 @@
package com.czg.account.dto;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 分店管理DTO
* @author tankaikai
* @since 2025-04-07 14:12
*/
@Data
public class ShopBranchDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 分店id
*/
private Long id;
/**
* 店铺名称
*/
private String shopName;
/**
* 账号
*/
private String account;
/**
* 联系电话
*/
private String phone;
/**
* 是否启用商品同步 1-是 0-否
*/
private Integer isEnableProdSync;
/**
* 是否启用会员同步 1-是 0-否
*/
private Integer isEnableVipSync;
/**
* 是否启用耗材同步 1-是 0-否
*/
private Integer isEnableConsSync;
/**
* 是否允许账号登录 1-是 0-否
*/
private Integer isAllowAccountLogin;
/**
* 备注
*/
private String remark;
}

View File

@@ -0,0 +1,27 @@
package com.czg.account.dto.shopinfo;
import lombok.Data;
import java.io.Serial;
import java.io.Serializable;
/**
* 下拉店铺列表DTO
* @author tankaikai
* @since 2025-04-07 13:45
*/
@Data
public class ShopBranchSelectDTO implements Serializable {
@Serial
private static final long serialVersionUID = 1L;
/**
* 店铺ID
*/
private Long shopId;
/**
* 店铺名称
*/
private String shopName;
}

View File

@@ -40,4 +40,8 @@ public enum BranchDataSyncMethodEnum {
return null;
}
public static boolean checkValue(String value) {
return getValues().contains(value);
}
}

View File

@@ -0,0 +1,53 @@
package com.czg.account.service;
import com.czg.account.dto.ShopBranchDTO;
import com.mybatisflex.core.paginate.Page;
/**
* 分店管理Service
*
* @author tankaikai
* @since 2025-04-07 14:09
*/
public interface ShopBranchService {
/**
* 查询分店列表
*
* @param shopId 主店id
* @return 分店列表
*/
Page<ShopBranchDTO> findPage(Long shopId);
/**
* 设计数据同步方式
*
* @param shopId 主店id
* @param dataSyncMethod 数据同步方式 {@link com.czg.account.enums.BranchDataSyncMethodEnum}
*/
void settingDataSyncMethod(Long shopId, String dataSyncMethod);
/**
* 数据同步启用
* @param branchShopId 分店id
*/
void dataSyncEnable(Long branchShopId);
/**
* 账号启用
* @param branchShopId 分店id
*/
void accountEnable(Long branchShopId);
/**
* 账号禁用
* @param branchShopId 分店id
*/
void accountDisable(Long branchShopId);
/**
* 查询是否允许分店账号登录
* @param branchShopId 分店id
* @return 是否允许分店账号登录 {@code true} 允许,{@code false} 不允许
*/
boolean isAllowAccountLogin(Long branchShopId);
}

View File

@@ -6,6 +6,8 @@ import com.czg.account.entity.ShopInfo;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.service.IService;
import java.util.List;
/**
* @author Administrator
*/
@@ -24,4 +26,5 @@ public interface ShopInfoService extends IService<ShopInfo> {
Page<ShopInfoSubVO> getSubList(String lat, String lng, float distance);
List<ShopBranchSelectDTO> findShopBranch(Long shopId);
}