TASK:查affiliate列表接口添加参数校验;打开佣金计算定时器
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user