TASK:查affiliate列表接口添加参数校验;打开佣金计算定时器

This commit is contained in:
2025-08-20 09:37:35 +08:00
parent b02009bf14
commit 59a3015170
3 changed files with 4 additions and 2 deletions

View File

@@ -96,7 +96,7 @@ public class PaymentTask {
//
}
// @Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
@Scheduled(cron = "0 */5 * * * *") // Run every 5 minutes
public void updateAffiliateInfoWithPayment(){
// log.info("佣金计算定时器");
affiliateService.updateAffiliateInfoWithPayment();

View File

@@ -43,7 +43,7 @@ public class AffiliateController {
@ApiOperation(value = "获取affiliate列表")
@PostMapping("/list")
public Response<PageBaseResponse<AffiliateVO>> getAffiliateList(@Valid @RequestBody AffiliateQueryDTO affiliateQueryDTO) {
public Response<PageBaseResponse<AffiliateVO>> getAffiliateList(@Validated @RequestBody AffiliateQueryDTO affiliateQueryDTO) {
return Response.success(affiliateService.getAffiliateList(affiliateQueryDTO));
}

View File

@@ -6,6 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
@EqualsAndHashCode(callSuper = true)
@Data
@@ -18,6 +19,7 @@ public class AffiliateQueryDTO extends TimeQueryBaseDTO{
private Long affiliateId;
@NotBlank(message = "orderBy cannot be empty")
@Pattern(regexp = "id|createTime|totalIncome", message = "允许排序字段只有id|createTime|totalIncome")
@ApiModelProperty("目前允许按id, createTime, totalIncome进行排序")
private String orderBy;