-
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($starter): remove the usage of BeanUtil
New coding rules: 1. The class annotated with `@org.mapstruct.Mapper` should be named with the postfix `-MapStructMapper`. For example, QuartzJobConfigurationMapStructMapper.java 2. MyBatis mapper classes should be under package `repository` BREAKING CHANGE: ban using any packages of BeanUtil; the package name of MyBatis mappers has changed to `repository`
- Loading branch information
1 parent
6e5121a
commit 3e2872e
Showing
6 changed files
with
49 additions
and
17 deletions.
There are no files selected for viewing
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
36 changes: 36 additions & 0 deletions
36
...ftware/maf/springcloudstarter/quartz/converter/QuartzJobConfigurationMapStructMapper.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,36 @@ | ||
/* | ||
* Copyright By ZATI | ||
* Copyright By 3a3c88295d37870dfd3b25056092d1a9209824b256c341f2cdc296437f671617 | ||
* All rights reserved. | ||
* | ||
* If you are not the intended user, you are hereby notified that any use, disclosure, copying, printing, forwarding or | ||
* dissemination of this property is strictly prohibited. If you have got this file in error, delete it from your | ||
* system. | ||
*/ | ||
package com.jmsoftware.maf.springcloudstarter.quartz.converter; | ||
|
||
import com.jmsoftware.maf.springcloudstarter.quartz.entity.QuartzJobConfigurationExcel; | ||
import com.jmsoftware.maf.springcloudstarter.quartz.entity.persistence.QuartzJobConfiguration; | ||
import org.mapstruct.Mapper; | ||
import org.mapstruct.Mapping; | ||
import org.mapstruct.factory.Mappers; | ||
|
||
/** | ||
* Description: QuartzJobConfigurationMapStructMapper, change description here. | ||
* | ||
* @author Johnny Miller (鍾俊), e-mail: johnnysviva@outlook.com, date: 2/5/2022 2:44 PM | ||
**/ | ||
@Mapper | ||
public interface QuartzJobConfigurationMapStructMapper { | ||
QuartzJobConfigurationMapStructMapper INSTANCE = Mappers.getMapper(QuartzJobConfigurationMapStructMapper.class); | ||
|
||
/** | ||
* Convert from quartz job configuration. | ||
* | ||
* @param quartzJobConfigurationExcel the quartz job configuration excel | ||
* @return the quartz job configuration | ||
*/ | ||
@Mapping(target = "id", ignore = true) | ||
@Mapping(target = "deleted", ignore = true) | ||
QuartzJobConfiguration of(QuartzJobConfigurationExcel quartzJobConfigurationExcel); | ||
} |
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
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
2 changes: 1 addition & 1 deletion
2
spring-cloud-starter/src/main/resources/mapper/quartz/QuartzJobConfigurationMapper.xml
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