-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
1,224 additions
and
271 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
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
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
20 changes: 20 additions & 0 deletions
20
.../hocg/boot/mybatis/plus/extensions/tpl/autoconfiguration/TplMybatisPlusExtProperties.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,20 @@ | ||
package in.hocg.boot.mybatis.plus.extensions.tpl.autoconfiguration; | ||
|
||
import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
/** | ||
* Created by hocgin on 2020/8/15 | ||
* email: hocgin@gmail.com | ||
* | ||
* @author hocgin | ||
*/ | ||
@Getter | ||
@Setter | ||
@ConfigurationProperties(TplMybatisPlusExtProperties.PREFIX) | ||
public class TplMybatisPlusExtProperties { | ||
public static final String PREFIX = MyBatisPlusExtensionsConstants.PROPERTIES_PREFIX + ".tpl"; | ||
|
||
} |
21 changes: 0 additions & 21 deletions
21
...-tpl-autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/tpl/entity/Tpl.java
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
...configure/src/main/java/in/hocg/boot/mybatis/plus/extensions/tpl/mapper/TplMpeMapper.java
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...figure/src/main/java/in/hocg/boot/mybatis/plus/extensions/tpl/mapper/xml/TplMpeMapper.xml
This file was deleted.
Oops, something went wrong.
13 changes: 0 additions & 13 deletions
13
...nfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/tpl/service/TplMpeService.java
This file was deleted.
Oops, something went wrong.
21 changes: 0 additions & 21 deletions
21
...rc/main/java/in/hocg/boot/mybatis/plus/extensions/tpl/service/impl/TplMpeServiceImpl.java
This file was deleted.
Oops, something went wrong.
6 changes: 4 additions & 2 deletions
6
...atis/plus/extensions/webmagic/TplMpe.java → ...plus/extensions/webmagic/WebmagicMpe.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,13 +1,15 @@ | ||
package in.hocg.boot.mybatis.plus.extensions.webmagic; | ||
|
||
|
||
import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; | ||
|
||
/** | ||
* Created by hocgin on 2022/3/24 | ||
* email: hocgin@gmail.com | ||
* | ||
* @author hocgin | ||
*/ | ||
public class TplMpe { | ||
public class WebmagicMpe { | ||
public static final String PACKAGE = MyBatisPlusExtensionsConstants.PACKAGE_PREFIX + ".webmagic"; | ||
public static final String MAPPER_PACKAGE = TplMpe.PACKAGE + ".mapper"; | ||
public static final String MAPPER_PACKAGE = WebmagicMpe.PACKAGE + ".mapper"; | ||
} |
15 changes: 0 additions & 15 deletions
15
...ybatis/plus/extensions/webmagic/autoconfiguration/TplMybatisPlusExtAutoConfiguration.java
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
...s/plus/extensions/webmagic/autoconfiguration/WebmagicMybatisPlusExtAutoConfiguration.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,25 @@ | ||
package in.hocg.boot.mybatis.plus.extensions.webmagic.autoconfiguration; | ||
|
||
import in.hocg.boot.mybatis.plus.extensions.webmagic.WebmagicMpe; | ||
import lombok.RequiredArgsConstructor; | ||
import lombok.extern.slf4j.Slf4j; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.boot.context.properties.EnableConfigurationProperties; | ||
import org.springframework.context.annotation.ComponentScan; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.context.annotation.Lazy; | ||
|
||
/** | ||
* Created by hocgin on 2022/3/24 | ||
* email: hocgin@gmail.com | ||
* | ||
* @author hocgin | ||
*/ | ||
@Slf4j | ||
@Configuration | ||
@ConditionalOnProperty(prefix = WebmagicMybatisPlusExtProperties.PREFIX, name = "enabled", matchIfMissing = true) | ||
@EnableConfigurationProperties(WebmagicMybatisPlusExtProperties.class) | ||
@ComponentScan(WebmagicMpe.PACKAGE) | ||
@RequiredArgsConstructor(onConstructor = @__(@Lazy)) | ||
public class WebmagicMybatisPlusExtAutoConfiguration { | ||
} |
20 changes: 20 additions & 0 deletions
20
.../mybatis/plus/extensions/webmagic/autoconfiguration/WebmagicMybatisPlusExtProperties.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,20 @@ | ||
package in.hocg.boot.mybatis.plus.extensions.webmagic.autoconfiguration; | ||
|
||
import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
|
||
/** | ||
* Created by hocgin on 2020/8/15 | ||
* email: hocgin@gmail.com | ||
* | ||
* @author hocgin | ||
*/ | ||
@Getter | ||
@Setter | ||
@ConfigurationProperties(WebmagicMybatisPlusExtProperties.PREFIX) | ||
public class WebmagicMybatisPlusExtProperties { | ||
public static final String PREFIX = MyBatisPlusExtensionsConstants.PROPERTIES_PREFIX + ".webmagic"; | ||
|
||
} |
28 changes: 28 additions & 0 deletions
28
...ain/java/in/hocg/boot/mybatis/plus/extensions/webmagic/controller/WebmagicController.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,28 @@ | ||
package in.hocg.boot.mybatis.plus.extensions.webmagic.controller; | ||
|
||
|
||
import io.swagger.annotations.Api; | ||
import org.springframework.validation.annotation.Validated; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.context.annotation.Lazy; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
/** | ||
* <p> | ||
* [BOOT] 爬虫采集表 前端控制器 | ||
* </p> | ||
* | ||
* @author hocgin | ||
* @since 2022-06-16 | ||
*/ | ||
@Api(tags = "[BOOT] 爬虫采集表") | ||
@Validated | ||
@RestController | ||
@RequiredArgsConstructor(onConstructor = @__(@Lazy)) | ||
@RequestMapping("/webmagic") | ||
public class WebmagicController { | ||
|
||
} | ||
|
19 changes: 0 additions & 19 deletions
19
...autoconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/webmagic/entity/Tpl.java
This file was deleted.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
...onfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/webmagic/entity/Webmagic.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,52 @@ | ||
package in.hocg.boot.mybatis.plus.extensions.webmagic.entity; | ||
|
||
import com.baomidou.mybatisplus.annotation.TableField; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import in.hocg.boot.mybatis.plus.autoconfiguration.core.struct.basic.enhance.CommonEntity; | ||
import in.hocg.boot.mybatis.plus.extensions.context.constants.MyBatisPlusExtensionsConstants; | ||
import io.swagger.annotations.ApiModelProperty; | ||
import lombok.EqualsAndHashCode; | ||
import lombok.Getter; | ||
import lombok.Setter; | ||
import lombok.experimental.Accessors; | ||
|
||
import java.time.LocalDateTime; | ||
|
||
/** | ||
* <p> | ||
* [BOOT] 爬虫采集表 | ||
* </p> | ||
* | ||
* @author hocgin | ||
* @since 2022-06-16 | ||
*/ | ||
@Getter | ||
@Setter | ||
@EqualsAndHashCode(callSuper = true) | ||
@Accessors(chain = true) | ||
@TableName(MyBatisPlusExtensionsConstants.TABLE_PREFIX + "webmagic") | ||
public class Webmagic extends CommonEntity<Webmagic> { | ||
|
||
private static final long serialVersionUID = 1L; | ||
|
||
@ApiModelProperty("类型") | ||
@TableField("type") | ||
private String type; | ||
@ApiModelProperty("完成状态") | ||
@TableField("status") | ||
private String status; | ||
@ApiModelProperty("失败原因") | ||
@TableField("fail_reason") | ||
private String failReason; | ||
@ApiModelProperty("拉取的地址") | ||
@TableField("pull_url") | ||
private String pullUrl; | ||
@ApiModelProperty("拉取的数据") | ||
@TableField("pull_data") | ||
private String pullData; | ||
@ApiModelProperty("完成时间") | ||
@TableField("finished_at") | ||
private LocalDateTime finishedAt; | ||
|
||
|
||
} |
21 changes: 21 additions & 0 deletions
21
...toconfigure/src/main/java/in/hocg/boot/mybatis/plus/extensions/webmagic/enums/Status.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,21 @@ | ||
package in.hocg.boot.mybatis.plus.extensions.webmagic.enums; | ||
|
||
import in.hocg.boot.utils.enums.ICode; | ||
import lombok.Getter; | ||
import lombok.RequiredArgsConstructor; | ||
|
||
/** | ||
* Created by hocgin on 2022/6/16 | ||
* email: hocgin@gmail.com | ||
* | ||
* @author hocgin | ||
*/ | ||
@Getter | ||
@RequiredArgsConstructor | ||
public enum Status implements ICode { | ||
Progress("progress", "进行中"), | ||
Fail("fail", "失败"), | ||
Done("done", "完成"); | ||
private final String code; | ||
private final String name; | ||
} |
Oops, something went wrong.