Sfoglia il codice sorgente

managew 发行产品返回产品名

master
chenchaod 1 mese fa
parent
commit
8ea3ccc423

+ 74
- 0
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/dto/product/promotion/PromotePageModel.java Vedi File

@@ -0,0 +1,74 @@
package cn.com.taiji.managew.dto.product.promotion;

import cn.com.taiji.core.entity.dict.EnableStatus;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import java.time.LocalDateTime;

/**
* @Author:ChenChao
* @Date:2025/7/23 23:03
* @Filename:PromotePageModel
* @description:
*/
@Data
@ApiModel(description = "推广产品分页响应")
public class PromotePageModel {

@ApiModelProperty(value = "产品名称")
private String productName;//产品名称
@ApiModelProperty(value = "发行产品ID")
@Column(name = "RELEASE_ID")
private String releaseId;//发行产品ID
@ApiModelProperty(value = "推广合同")
@Column(name = "CONTRACT")
private String contract;//推广合同
@ApiModelProperty(value = "发行范围")
@Column(name = "ISSUE_SCOPE")
private String issueScope;//发行范围
@ApiModelProperty(value = "推广渠道")
@Column(name = "AGENCY_ID")
private String agencyId;//推广渠道
@ApiModelProperty(value = "有效期格式 1日 2月 3季 4年")
@Column(name = "VALIDITY_FORMAT")
private Integer validityFormat;//有效期格式 1日 2月 3季 4年
@ApiModelProperty(value = "产品有效期")
@Column(name = "PRODUCT_VALIDITY")
private Integer productValidity;//产品有效期
@ApiModelProperty(value = "下架日期")
@Column(name = "DATE_OF_DELIST")
private LocalDateTime dateOfDelist;//下架日期
@ApiModelProperty(value = "上架日期")
@Column(name = "DATE_OF_LISTING")
private LocalDateTime dateOfListing;//上架日期
@ApiModelProperty(value = "操作人id")
@Column(name = "OPERATE_USER_ID")
private String operateUserId;//操作人id
@ApiModelProperty(value = "操作人姓名")
@Column(name = "OPERATE_USER_NAME")
private String operateUserName;//操作人姓名
@ApiModelProperty(value = "审核通过状态 0-通过 1-不通过 2-待审核")
@Column(name = "EXAMINE")
private Integer examine = 2;//审核通过状态 0-通过 1-不通过 2-待审核
@ApiModelProperty(value = "审核原因")
@Column(name = "EXAMINE_DES")
private String examineDes;//审核原因
@ApiModelProperty(value = "变更原因")
@Column(name = "CHANGE_REASON")
private String changeReason;//变更原因
@ApiModelProperty(value = "状态")
@Column(name = "STATUS")
@Enumerated(EnumType.STRING)
private EnableStatus status = EnableStatus.DISABLE;//状态
@ApiModelProperty(value = "创建时间")
@Column(name = "INSERT_TIME")
private LocalDateTime insertTime = LocalDateTime.now();//创建时间
@ApiModelProperty(value = "更新时间")
@Column(name = "UPDATE_TIME")
private LocalDateTime updateTime = LocalDateTime.now();//更新时间
}

+ 8
- 1
zhywpt-app-managew/src/main/java/cn/com/taiji/managew/manager/product/PromotionManagerImpl.java Vedi File

@@ -76,7 +76,14 @@ public class PromotionManagerImpl extends AbstractManagewManager implements Prom
@Override
public Pagination page(PromotePageRequsetDTO req) {
IssueProductPromotionPageRequest request = copyProperties(req, new IssueProductPromotionPageRequest());
return issueProductPromotionRepo.page(request);
return issueProductPromotionRepo.page(request).convertResult(this::cover);
}

private PromotePageModel cover(IssueProductPromotion o) {
PromotePageModel promotePageModel = copyProperties(o, new PromotePageModel());
IssueProduct product = issueProductRepo.findByReleaseId(o.getReleaseId());
promotePageModel.setProductName(product.getProductName());
return promotePageModel;
}

@Transactional(rollbackFor = Exception.class)

Loading…
Annulla
Salva