-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat($Quartz): provide Quartz job maintenance
- Loading branch information
1 parent
05b9cd0
commit 9beb7c2
Showing
9 changed files
with
254 additions
and
93 deletions.
There are no files selected for viewing
183 changes: 90 additions & 93 deletions
183
common/src/main/java/com/jmsoftware/maf/common/bean/PageResponseBodyBean.java
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
...jmsoftware/maf/springcloudstarter/quartz/controller/QuartzJobConfigurationController.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package com.jmsoftware.maf.springcloudstarter.quartz.controller; | ||
|
||
import com.jmsoftware.maf.common.bean.PageResponseBodyBean; | ||
import com.jmsoftware.maf.springcloudstarter.quartz.entity.GetQuartzJobConfigurationPageListItem; | ||
import com.jmsoftware.maf.springcloudstarter.quartz.entity.GetQuartzJobConfigurationPageListPayload; | ||
import com.jmsoftware.maf.springcloudstarter.quartz.service.QuartzJobConfigurationService; | ||
import io.swagger.annotations.Api; | ||
import io.swagger.annotations.ApiOperation; | ||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.validation.annotation.Validated; | ||
import org.springframework.web.bind.annotation.GetMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
import javax.validation.Valid; | ||
|
||
/** | ||
* <h1>QuartzJobConfigurationController</h1> | ||
* <p> | ||
* Change description here. | ||
* | ||
* @author Johnny Miller (鍾俊), email: johnnysviva@outlook.com, 9/26/21 11:58 PM | ||
**/ | ||
@Validated | ||
@RestController | ||
@RequiredArgsConstructor | ||
@Api(tags = {"Quartz Job Configuration API"}) | ||
public class QuartzJobConfigurationController { | ||
private final QuartzJobConfigurationService service; | ||
|
||
@GetMapping("/quartz-job-configurations") | ||
@ApiOperation(value = "/quartz-job-configurations", notes = "Retrieve Quartz job configuration page list") | ||
public PageResponseBodyBean<GetQuartzJobConfigurationPageListItem> getPageList( | ||
@Valid GetQuartzJobConfigurationPageListPayload payload | ||
) { | ||
return this.service.getPageList(payload); | ||
} | ||
} |
30 changes: 30 additions & 0 deletions
30
...msoftware/maf/springcloudstarter/quartz/entity/GetQuartzJobConfigurationPageListItem.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package com.jmsoftware.maf.springcloudstarter.quartz.entity; | ||
|
||
import lombok.Data; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
/** | ||
* <h1>GetQuartzJobConfigurationPageListItem</h1> | ||
* <p> | ||
* Change description here. | ||
* | ||
* @author Johnny Miller (鍾俊), email: johnnysviva@outlook.com, 9/27/21 12:07 AM | ||
**/ | ||
@Data | ||
public class GetQuartzJobConfigurationPageListItem { | ||
private Long id; | ||
private String name; | ||
private String group; | ||
private String serviceName; | ||
private String invokeTarget; | ||
private String cronExpression; | ||
private Byte misfirePolicy; | ||
private Byte concurrent; | ||
private String description; | ||
private Byte status; | ||
private String createdBy; | ||
private LocalDateTime createdTime; | ||
private String modifiedBy; | ||
private LocalDateTime modifiedTime; | ||
} |
18 changes: 18 additions & 0 deletions
18
...ftware/maf/springcloudstarter/quartz/entity/GetQuartzJobConfigurationPageListPayload.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.jmsoftware.maf.springcloudstarter.quartz.entity; | ||
|
||
import com.jmsoftware.maf.common.bean.PaginationBase; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
/** | ||
* <h1>GetQuartzJobConfigurationPageListPayload</h1> | ||
* <p> | ||
* Change description here. | ||
* | ||
* @author Johnny Miller (鍾俊), email: johnnysviva@outlook.com, 9/27/21 12:07 AM | ||
**/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
public class GetQuartzJobConfigurationPageListPayload extends PaginationBase { | ||
private String serviceName; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
...a/com/jmsoftware/maf/springcloudstarter/quartz/service/QuartzJobConfigurationService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,28 @@ | ||
package com.jmsoftware.maf.springcloudstarter.quartz.service; | ||
|
||
import com.baomidou.mybatisplus.extension.service.IService; | ||
import com.jmsoftware.maf.common.bean.PageResponseBodyBean; | ||
import com.jmsoftware.maf.springcloudstarter.quartz.entity.GetQuartzJobConfigurationPageListItem; | ||
import com.jmsoftware.maf.springcloudstarter.quartz.entity.GetQuartzJobConfigurationPageListPayload; | ||
import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; | ||
import org.springframework.validation.annotation.Validated; | ||
|
||
import javax.validation.Valid; | ||
|
||
/** | ||
* Description: QuartzJobConfigurationService | ||
* | ||
* @author Johnny Miller (锺俊), email: johnnysviva@outlook.com, date: 9/23/2021 8:23 AM | ||
*/ | ||
@Validated | ||
public interface QuartzJobConfigurationService extends IService<QuartzJobConfiguration> { | ||
/** | ||
* Gets page list. | ||
* | ||
* @param payload the payload | ||
* @return the page list | ||
*/ | ||
PageResponseBodyBean<GetQuartzJobConfigurationPageListItem> getPageList( | ||
@Valid GetQuartzJobConfigurationPageListPayload payload | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters