This commit is contained in:
雷欧(林平凡)
2025-10-10 14:24:59 +08:00
parent 939660297d
commit 4ccd5f799e
6 changed files with 323 additions and 27 deletions

View File

@@ -40,6 +40,10 @@ public class BatchPublishItem extends BaseEntity
@Excel(name = "账号名称")
private String accountRemark;
/** 子账号(会员名) */
@Excel(name = "子账号")
private String subAccount;
/** 发品状态0待发布 1发布中 2发布成功 3发布失败 4上架中 5已上架 6上架失败 */
@Excel(name = "发品状态", readConverterExp = "0=待发布,1=发布中,2=发布成功,3=发布失败,4=上架中,5=已上架,6=上架失败")
private Integer status;
@@ -118,6 +122,14 @@ public class BatchPublishItem extends BaseEntity
this.accountRemark = accountRemark;
}
public String getSubAccount() {
return subAccount;
}
public void setSubAccount(String subAccount) {
this.subAccount = subAccount;
}
public Integer getStatus() {
return status;
}
@@ -191,6 +203,7 @@ public class BatchPublishItem extends BaseEntity
.append("productName", getProductName())
.append("targetAccount", getTargetAccount())
.append("accountRemark", getAccountRemark())
.append("subAccount", getSubAccount())
.append("status", getStatus())
.append("productId", getProductId())
.append("productStatus", getProductStatus())

View File

@@ -23,9 +23,9 @@ public class BatchPublishRequest {
@NotEmpty(message = "商品列表不能为空")
private List<ProductItem> products;
/** 目标ERP账号列表 */
@NotEmpty(message = "目标账号不能为空")
private List<String> targetAccounts;
/** 账号配置列表(包含多个主账号及其子账号) */
@NotEmpty(message = "账号配置不能为空")
private List<AccountConfig> accountConfigs;
/** 通用参数 */
@NotNull(message = "通用参数不能为空")
@@ -34,6 +34,35 @@ public class BatchPublishRequest {
/** 延迟上架时间默认3秒 */
private Integer delaySeconds = 3;
/**
* 账号配置(主账号+子账号列表)
*/
public static class AccountConfig {
/** 目标ERP账号appid */
@NotBlank(message = "目标账号不能为空")
private String targetAccount;
/** 该账号下的子账号列表 */
@NotEmpty(message = "子账号不能为空")
private List<String> subAccounts;
public String getTargetAccount() {
return targetAccount;
}
public void setTargetAccount(String targetAccount) {
this.targetAccount = targetAccount;
}
public List<String> getSubAccounts() {
return subAccounts;
}
public void setSubAccounts(List<String> subAccounts) {
this.subAccounts = subAccounts;
}
}
public static class ProductItem {
/** SKUID */
@NotBlank(message = "SKUID不能为空")
@@ -292,12 +321,12 @@ public class BatchPublishRequest {
this.products = products;
}
public List<String> getTargetAccounts() {
return targetAccounts;
public List<AccountConfig> getAccountConfigs() {
return accountConfigs;
}
public void setTargetAccounts(List<String> targetAccounts) {
this.targetAccounts = targetAccounts;
public void setAccountConfigs(List<AccountConfig> accountConfigs) {
this.accountConfigs = accountConfigs;
}
public CommonParams getCommonParams() {