-
Notifications
You must be signed in to change notification settings - Fork 3
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
1 parent
0fc0795
commit 62fb1d6
Showing
10 changed files
with
120 additions
and
82 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,4 +35,5 @@ build/ | |
.vscode/ | ||
/out/ | ||
|
||
src/main/resources/application-tencent.yml | ||
### 自定义 ### | ||
application-tencent.yml |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.xjx.ddtcrawler.domain; | ||
|
||
import com.baomidou.mybatisplus.annotation.IdType; | ||
import com.baomidou.mybatisplus.annotation.TableField; | ||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import lombok.Data; | ||
|
||
import java.io.Serial; | ||
import java.io.Serializable; | ||
|
||
/** | ||
* There is description | ||
* | ||
* @author sleepybear | ||
* @date 2022/05/03 15:53 | ||
*/ | ||
@Data | ||
public class BaseDomain implements Serializable { | ||
@Serial | ||
private static final long serialVersionUID = -5347501343901713024L; | ||
|
||
@TableId(value = "id", type = IdType.AUTO) | ||
private Long id; | ||
@TableField("modify_time") | ||
private Long modifyTime; | ||
} |
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,49 +1,44 @@ | ||
package com.xjx.ddtcrawler.domain; | ||
|
||
import com.baomidou.mybatisplus.annotation.IdType; | ||
import com.baomidou.mybatisplus.annotation.TableField; | ||
import com.baomidou.mybatisplus.annotation.TableId; | ||
import com.baomidou.mybatisplus.annotation.TableName; | ||
import com.xjx.ddtcrawler.utils.EncryptedUtils; | ||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
|
||
import java.io.Serial; | ||
import java.io.Serializable; | ||
|
||
/** | ||
* @author XJX | ||
* @date 2021/8/1 20:56 | ||
*/ | ||
@Data | ||
@EqualsAndHashCode(callSuper = true) | ||
@TableName("template") | ||
public class Template implements Serializable { | ||
public class Template extends BaseDomain { | ||
@Serial | ||
private static final long serialVersionUID = 6076962907927806205L; | ||
|
||
@TableId(value = "id", type = IdType.AUTO) | ||
private Long id; | ||
@TableField("name") | ||
private String name; | ||
@TableField("price") | ||
private Double price; | ||
@TableField("modify_time") | ||
private Long modifyTime; | ||
@TableField(exist = false) | ||
private Boolean isEncrypted = false; | ||
|
||
public void encryptId() { | ||
if (this.isEncrypted) { | ||
return; | ||
} | ||
this.id = EncryptedUtils.encryptTemplateId(this.id); | ||
this.setId(EncryptedUtils.encryptTemplateId(this.getId())); | ||
this.isEncrypted = true; | ||
} | ||
|
||
public void decryptId() { | ||
if (!this.isEncrypted) { | ||
return; | ||
} | ||
this.id = EncryptedUtils.decryptTemplateId(this.id); | ||
this.setId(EncryptedUtils.decryptTemplateId(this.getId())); | ||
this.isEncrypted = false; | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
td, th { | ||
text-align: center; | ||
border: 1px solid; | ||
} | ||
|
||
.table-item-name { | ||
width: 200px; | ||
} | ||
|
||
.table-seller { | ||
width: 200px; | ||
} | ||
|
||
.table-time { | ||
width: 200px; | ||
} | ||
|
||
.bid-unit-black { | ||
color: black; | ||
} | ||
|
||
.mouth-unit-black { | ||
color: black; | ||
} | ||
|
||
.bid-unit-red { | ||
color: red; | ||
} | ||
|
||
.mouth-unit-red { | ||
color: red; | ||
} | ||
|
||
.has-buyer { | ||
color: cadetblue; | ||
} | ||
|
||
.expected-price { | ||
color: darkgray; | ||
} | ||
|
||
.has-border { | ||
border: darkgray solid 1px; | ||
display: inline-block; | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// axios 全局拦截器 | ||
axios.interceptors.response.use( | ||
// 如果返回的状态码为 200,说明接口请求成功,可以正常拿到数据 | ||
(response) => { | ||
let res = response.data; | ||
let code = res.code; | ||
if (code === 0) { | ||
return response | ||
} else { | ||
let message = res.message; | ||
if (code > -10) { | ||
alert(message); | ||
} else { | ||
alert("系统错误!\n" + message); | ||
} | ||
// 直接拒绝往下面返回结果信息 | ||
return Promise.reject(response); | ||
} | ||
}, | ||
// 否则的话抛出错误 | ||
(error) => { | ||
let response = error.response; | ||
if (response == null) { | ||
alert(`请求失败,请检查网络`); | ||
return Promise.reject(error); | ||
} | ||
let status = response.status; | ||
let request = error.request; | ||
alert(`请求失败,status = ${status}\n url:${request.responseURL}`); | ||
return Promise.reject(error); | ||
} | ||
); |
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
File renamed without changes.