Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
T
traffic-front
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wangxiaoming
traffic-front
Commits
48a2be64
Commit
48a2be64
authored
Apr 26, 2019
by
Memorydoc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
邮箱邮件拉去
parent
fb2e3aab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
1026 additions
and
23 deletions
+1026
-23
FileServiceConfig.java
...ava/pwc/taxtech/atms/common/config/FileServiceConfig.java
+1
-1
ShareJob.java
.../main/java/pwc/taxtech/atms/common/schedule/ShareJob.java
+24
-0
EncryptUtil.java
...c/main/java/pwc/taxtech/atms/common/util/EncryptUtil.java
+303
-0
JavaEmailUtil.java
...main/java/pwc/taxtech/atms/common/util/JavaEmailUtil.java
+0
-0
SpringContextUtil.java
.../java/pwc/taxtech/atms/common/util/SpringContextUtil.java
+3
-1
ProjectStatusManageController.java
...axtech/atms/controller/ProjectStatusManageController.java
+2
-1
JwtAuthenticationFilter.java
...va/pwc/taxtech/atms/security/JwtAuthenticationFilter.java
+0
-4
TaxEamilServiceImpl.java
...va/pwc/taxtech/atms/service/impl/TaxEamilServiceImpl.java
+70
-0
applicationContext-job.xml
atms-api/src/main/resources/applicationContext-job.xml
+19
-0
conf.properties
atms-api/src/main/resources/conf/conf.properties
+7
-0
conf_profile_dev.properties
atms-api/src/main/resources/conf/conf_profile_dev.properties
+8
-0
conf_profile_pub.properties
atms-api/src/main/resources/conf/conf_profile_pub.properties
+7
-0
conf_profile_staging.properties
...i/src/main/resources/conf/conf_profile_staging.properties
+6
-0
conf_profile_uat.properties
atms-api/src/main/resources/conf/conf_profile_uat.properties
+8
-0
ShareTest.java
...rc/test/java/pwc/taxtech/atms/service/impl/ShareTest.java
+33
-0
generatorConfig.xml
atms-dao/etc/generator-mysql/generatorConfig.xml
+3
-16
PwcTaxLogMapper.java
...o/src/main/java/pwc/taxtech/atms/dao/PwcTaxLogMapper.java
+141
-0
TaxEmailMapper.java
...ao/src/main/java/pwc/taxtech/atms/dao/TaxEmailMapper.java
+141
-0
PwcTaxLog.java
...-dao/src/main/java/pwc/taxtech/atms/entity/PwcTaxLog.java
+250
-0
PwcTaxLogExample.java
...c/main/java/pwc/taxtech/atms/entity/PwcTaxLogExample.java
+0
-0
TaxEmail.java
atms-dao/src/main/java/pwc/taxtech/atms/entity/TaxEmail.java
+0
-0
TaxEmailExample.java
...rc/main/java/pwc/taxtech/atms/entity/TaxEmailExample.java
+0
-0
PwcTaxLogMapper.xml
...c/main/resources/pwc/taxtech/atms/dao/PwcTaxLogMapper.xml
+0
-0
TaxEmailMapper.xml
...rc/main/resources/pwc/taxtech/atms/dao/TaxEmailMapper.xml
+0
-0
No files found.
atms-api/src/main/java/pwc/taxtech/atms/common/config/FileServiceConfig.java
View file @
48a2be64
...
...
@@ -9,7 +9,7 @@ public class FileServiceConfig {
private
String
uploadUrl
;
@Value
(
"${file_upload_query_url}"
)
private
String
downloadUrl
;
public
String
getDownloadUrl
()
{
return
downloadUrl
;
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/common/schedule/ShareJob.java
0 → 100644
View file @
48a2be64
package
pwc
.
taxtech
.
atms
.
common
.
schedule
;
import
org.quartz.JobExecutionContext
;
import
org.quartz.JobExecutionException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.scheduling.quartz.QuartzJobBean
;
import
pwc.taxtech.atms.service.impl.TaxEamilServiceImpl
;
/**
* @version 1.0
* @program: atms
* @description: 分享模块定时任务
* @author: Kevin
* @create: 2019-04-26 12:16
**/
public
class
ShareJob
extends
QuartzJobBean
{
@Autowired
private
TaxEamilServiceImpl
taxEamilService
;
@Override
protected
void
executeInternal
(
JobExecutionContext
context
)
throws
JobExecutionException
{
taxEamilService
.
jobEmail
();
}
}
atms-api/src/main/java/pwc/taxtech/atms/common/util/EncryptUtil.java
0 → 100644
View file @
48a2be64
package
pwc
.
taxtech
.
atms
.
common
.
util
;
import
com.sun.org.apache.xerces.internal.impl.dv.util.Base64
;
import
javax.crypto.Cipher
;
import
javax.crypto.KeyGenerator
;
import
javax.crypto.Mac
;
import
javax.crypto.SecretKey
;
import
javax.crypto.spec.SecretKeySpec
;
import
java.security.MessageDigest
;
import
java.security.SecureRandom
;
public
class
EncryptUtil
{
public
static
final
String
MD5
=
"MD5"
;
public
static
final
String
SHA1
=
"SHA1"
;
public
static
final
String
HmacMD5
=
"HmacMD5"
;
public
static
final
String
HmacSHA1
=
"HmacSHA1"
;
public
static
final
String
DES
=
"DES"
;
public
static
final
String
AES
=
"AES"
;
/**编码格式;默认使用uft-8*/
public
static
String
charset
=
"utf-8"
;
/**DES*/
public
static
int
keysizeDES
=
0
;
/**AES*/
public
static
int
keysizeAES
=
128
;
public
static
EncryptUtil
me
;
private
EncryptUtil
(){
//单例
}
//双重锁
public
static
EncryptUtil
getInstance
(){
if
(
me
==
null
)
{
synchronized
(
EncryptUtil
.
class
)
{
if
(
me
==
null
){
me
=
new
EncryptUtil
();
}
}
}
return
me
;
}
/**
* 使用MessageDigest进行单向加密(无密码)
* @param res 被加密的文本
* @param algorithm 加密算法名称
* @return
*/
private
static
String
messageDigest
(
String
res
,
String
algorithm
){
try
{
MessageDigest
md
=
MessageDigest
.
getInstance
(
algorithm
);
byte
[]
resBytes
=
charset
==
null
?
res
.
getBytes
():
res
.
getBytes
(
charset
);
return
base64
(
md
.
digest
(
resBytes
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
/**
* 使用KeyGenerator进行单向/双向加密(可设密码)
* @param res 被加密的原文
* @param algorithm 加密使用的算法名称
* @param key 加密使用的秘钥
* @return
*/
private
static
String
keyGeneratorMac
(
String
res
,
String
algorithm
,
String
key
){
try
{
SecretKey
sk
=
null
;
if
(
key
==
null
)
{
KeyGenerator
kg
=
KeyGenerator
.
getInstance
(
algorithm
);
sk
=
kg
.
generateKey
();
}
else
{
byte
[]
keyBytes
=
charset
==
null
?
key
.
getBytes
():
key
.
getBytes
(
charset
);
sk
=
new
SecretKeySpec
(
keyBytes
,
algorithm
);
}
Mac
mac
=
Mac
.
getInstance
(
algorithm
);
mac
.
init
(
sk
);
byte
[]
result
=
mac
.
doFinal
(
res
.
getBytes
());
return
base64
(
result
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
/**
* 使用KeyGenerator双向加密,DES/AES,注意这里转化为字符串的时候是将2进制转为16进制格式的字符串,不是直接转,因为会出错
* @param res 加密的原文
* @param algorithm 加密使用的算法名称
* @param key 加密的秘钥
* @param keysize
* @param isEncode
* @return
*/
private
static
String
keyGeneratorES
(
String
res
,
String
algorithm
,
String
key
,
int
keysize
,
boolean
isEncode
){
try
{
KeyGenerator
kg
=
KeyGenerator
.
getInstance
(
algorithm
);
if
(
keysize
==
0
)
{
byte
[]
keyBytes
=
charset
==
null
?
key
.
getBytes
():
key
.
getBytes
(
charset
);
kg
.
init
(
new
SecureRandom
(
keyBytes
));
}
else
if
(
key
==
null
)
{
kg
.
init
(
keysize
);
}
else
{
byte
[]
keyBytes
=
charset
==
null
?
key
.
getBytes
():
key
.
getBytes
(
charset
);
kg
.
init
(
keysize
,
new
SecureRandom
(
keyBytes
));
}
SecretKey
sk
=
kg
.
generateKey
();
SecretKeySpec
sks
=
new
SecretKeySpec
(
sk
.
getEncoded
(),
algorithm
);
Cipher
cipher
=
Cipher
.
getInstance
(
algorithm
);
if
(
isEncode
)
{
cipher
.
init
(
Cipher
.
ENCRYPT_MODE
,
sks
);
byte
[]
resBytes
=
charset
==
null
?
res
.
getBytes
():
res
.
getBytes
(
charset
);
return
parseByte2HexStr
(
cipher
.
doFinal
(
resBytes
));
}
else
{
cipher
.
init
(
Cipher
.
DECRYPT_MODE
,
sks
);
return
new
String
(
cipher
.
doFinal
(
parseHexStr2Byte
(
res
)));
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
null
;
}
private
static
String
base64
(
byte
[]
res
){
return
Base64
.
encode
(
res
);
}
/**将二进制转换成16进制 */
public
static
String
parseByte2HexStr
(
byte
buf
[])
{
StringBuffer
sb
=
new
StringBuffer
();
for
(
int
i
=
0
;
i
<
buf
.
length
;
i
++)
{
String
hex
=
Integer
.
toHexString
(
buf
[
i
]
&
0xFF
);
if
(
hex
.
length
()
==
1
)
{
hex
=
'0'
+
hex
;
}
sb
.
append
(
hex
.
toUpperCase
());
}
return
sb
.
toString
();
}
/**将16进制转换为二进制*/
public
static
byte
[]
parseHexStr2Byte
(
String
hexStr
)
{
if
(
hexStr
.
length
()
<
1
)
return
null
;
byte
[]
result
=
new
byte
[
hexStr
.
length
()/
2
];
for
(
int
i
=
0
;
i
<
hexStr
.
length
()/
2
;
i
++)
{
int
high
=
Integer
.
parseInt
(
hexStr
.
substring
(
i
*
2
,
i
*
2
+
1
),
16
);
int
low
=
Integer
.
parseInt
(
hexStr
.
substring
(
i
*
2
+
1
,
i
*
2
+
2
),
16
);
result
[
i
]
=
(
byte
)
(
high
*
16
+
low
);
}
return
result
;
}
/**
* md5加密算法进行加密(不可逆)
* @param res 需要加密的原文
* @return
*/
public
static
String
MD5
(
String
res
)
{
return
messageDigest
(
res
,
MD5
);
}
/**
* md5加密算法进行加密(不可逆)
* @param res 需要加密的原文
* @param key 秘钥
* @return
*/
public
static
String
MD5
(
String
res
,
String
key
)
{
return
keyGeneratorMac
(
res
,
HmacMD5
,
key
);
}
/**
* 使用SHA1加密算法进行加密(不可逆)
* @param res 需要加密的原文
* @return
*/
public
static
String
SHA1
(
String
res
)
{
return
messageDigest
(
res
,
SHA1
);
}
/**
* 使用SHA1加密算法进行加密(不可逆)
* @param res 需要加密的原文
* @param key 秘钥
* @return
*/
public
static
String
SHA1
(
String
res
,
String
key
)
{
return
keyGeneratorMac
(
res
,
HmacSHA1
,
key
);
}
/**
* 使用DES加密算法进行加密(可逆)
* @param res 需要加密的原文
* @param key 秘钥
* @return
*/
public
String
DESencode
(
String
res
,
String
key
)
{
return
keyGeneratorES
(
res
,
DES
,
key
,
keysizeDES
,
true
);
}
/**
* 对使用DES加密算法的密文进行解密(可逆)
* @param res 需要解密的密文
* @param key 秘钥
* @return
*/
public
static
String
DESdecode
(
String
res
,
String
key
)
{
return
keyGeneratorES
(
res
,
DES
,
key
,
keysizeDES
,
false
);
}
/**
* 生成密钥
* 自动生成base64 编码后的AES128位密钥
*
* @throws //NoSuchAlgorithmException
* @throws //UnsupportedEncodingException
*/
public
static
String
getAESKey
()
throws
Exception
{
KeyGenerator
kg
=
KeyGenerator
.
getInstance
(
"AES"
);
kg
.
init
(
128
);
//要生成多少位,只需要修改这里即可128, 192或256
SecretKey
sk
=
kg
.
generateKey
();
byte
[]
b
=
sk
.
getEncoded
();
return
parseByte2HexStr
(
b
);
}
/**
* 使用AES加密算法经行加密(可逆)
* @param res 需要加密的密文
* @param key 秘钥
* @return
*/
public
static
String
AESencode
(
String
res
,
String
key
)
{
return
keyGeneratorES
(
res
,
AES
,
key
,
keysizeAES
,
true
);
}
/**
* 对使用AES加密算法的密文进行解密
* @param res 需要解密的密文
* @param key 秘钥
* @return
*/
public
static
String
AESdecode
(
String
res
,
String
key
)
{
return
keyGeneratorES
(
res
,
AES
,
key
,
keysizeAES
,
false
);
}
/**
* 使用异或进行加密
* @param res 需要加密的密文
* @param key 秘钥
* @return
*/
public
static
String
XORencode
(
String
res
,
String
key
)
{
byte
[]
bs
=
res
.
getBytes
();
for
(
int
i
=
0
;
i
<
bs
.
length
;
i
++)
{
bs
[
i
]
=
(
byte
)
((
bs
[
i
])
^
key
.
hashCode
());
}
return
parseByte2HexStr
(
bs
);
}
/**
* 使用异或进行解密
* @param res 需要解密的密文
* @param key 秘钥
* @return
*/
public
static
String
XORdecode
(
String
res
,
String
key
)
{
byte
[]
bs
=
parseHexStr2Byte
(
res
);
for
(
int
i
=
0
;
i
<
bs
.
length
;
i
++)
{
bs
[
i
]
=
(
byte
)
((
bs
[
i
])
^
key
.
hashCode
());
}
return
new
String
(
bs
);
}
/**
* 直接使用异或(第一调用加密,第二次调用解密)
* @param res 密文
* @param key 秘钥
* @return
*/
public
static
int
XOR
(
int
res
,
String
key
)
{
return
res
^
key
.
hashCode
();
}
/**
* 使用Base64进行加密
* @param res 密文
* @return
*/
public
static
String
Base64Encode
(
String
res
)
{
return
Base64
.
encode
(
res
.
getBytes
());
}
/**
* 使用Base64进行解密
* @param res
* @return
*/
public
static
String
Base64Decode
(
String
res
)
{
return
new
String
(
Base64
.
decode
(
res
));
}
}
\ No newline at end of file
atms-api/src/main/java/pwc/taxtech/atms/common/util/JavaEmailUtil.java
0 → 100644
View file @
48a2be64
This diff is collapsed.
Click to expand it.
atms-api/src/main/java/pwc/taxtech/atms/common/util/SpringContextUtil.java
View file @
48a2be64
...
...
@@ -8,6 +8,7 @@ import pwc.taxtech.atms.dao.*;
import
pwc.taxtech.atms.invoice.InputInvoiceMapper
;
import
pwc.taxtech.atms.invoice.OutputInvoiceDetailMapper
;
import
pwc.taxtech.atms.invoice.OutputInvoiceMapper
;
import
pwc.taxtech.atms.service.impl.DidiFileUploadService
;
import
pwc.taxtech.atms.service.impl.DistributedIdService
;
import
pwc.taxtech.atms.vat.dao.*
;
...
...
@@ -75,7 +76,7 @@ public class SpringContextUtil implements ApplicationContextAware {
public
static
CitBalanceSheetPrcAdjustMapper
citBalanceSheetPrcAdjustMapper
;
public
static
CitProfitPrcAdjustMapper
citProfitPrcAdjustMapper
;
public
static
BalanceSheetMapper
balanceSheetMapper
;
public
static
DidiFileUploadService
didiFileUploadService
;
public
static
Map
map
=
new
HashMap
<
String
,
Object
>();
/**
...
...
@@ -150,6 +151,7 @@ public class SpringContextUtil implements ApplicationContextAware {
certifiedInvoicesListMapper
=
webApplicationContext
.
getBean
(
CertifiedInvoicesListMapper
.
class
);
trialBalanceMappingMapper
=
webApplicationContext
.
getBean
(
TrialBalanceMappingMapper
.
class
);
revenueConfigMapper
=
webApplicationContext
.
getBean
(
RevenueConfigMapper
.
class
);
didiFileUploadService
=
webApplicationContext
.
getBean
(
DidiFileUploadService
.
class
);
/* map.put("balance_sheet", balanceMapper);
map.put("profit_loss_statement",profitLossStatementMapper);
map.put("cash_flow", cashFlowMapper);
...
...
atms-api/src/main/java/pwc/taxtech/atms/controller/ProjectStatusManageController.java
View file @
48a2be64
...
...
@@ -26,7 +26,8 @@ public class ProjectStatusManageController {
public
OperationResultDto
<
ProjectStatusManageDto
>
setProjectStatus
(
@PathVariable
(
"projectId"
)
String
projectId
,
@PathVariable
(
"periodId"
)
Integer
periodId
,
@PathVariable
(
"status"
)
Integer
status
)
{
return
projectStatusManageService
.
setProjectStatus
(
projectId
,
periodId
,
status
,
identityService
.
getIdentityUser
().
getId
());
return
projectStatusManageService
.
setProjectStatus
(
projectId
,
periodId
,
status
,
identityService
.
getIdentityUser
().
getId
());
}
...
...
atms-api/src/main/java/pwc/taxtech/atms/security/JwtAuthenticationFilter.java
View file @
48a2be64
package
pwc
.
taxtech
.
atms
.
security
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
io.jsonwebtoken.impl.DefaultClaims
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -11,8 +9,6 @@ import org.springframework.security.core.Authentication;
import
org.springframework.security.core.AuthenticationException
;
import
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter
;
import
org.springframework.util.StringUtils
;
import
pwc.taxtech.atms.common.util.HttpUtil
;
import
pwc.taxtech.atms.dto.AtmsTokenDto
;
import
javax.servlet.FilterChain
;
import
javax.servlet.ServletException
;
...
...
atms-api/src/main/java/pwc/taxtech/atms/service/impl/TaxEamilServiceImpl.java
0 → 100644
View file @
48a2be64
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
pwc.taxtech.atms.common.util.JavaEmailUtil
;
import
pwc.taxtech.atms.dao.TaxEmailMapper
;
import
pwc.taxtech.atms.entity.TaxEmail
;
import
pwc.taxtech.atms.entity.TaxEmailExample
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
/**
* @version 1.0
* @program: atms
* @description:
* @author: Kevin
* @create: 2019-04-26 12:28
**/
@Service
public
class
TaxEamilServiceImpl
{
private
Logger
logger
=
LoggerFactory
.
getLogger
(
TaxEamilServiceImpl
.
class
);
@Autowired
private
TaxEmailMapper
taxEmailMapper
;
@Autowired
private
JavaEmailUtil
javaEmailUtil
;
@Autowired
protected
DistributedIdService
idService
;
public
void
jobEmail
()
{
try
{
List
<
Map
<
String
,
Object
>>
emails
=
javaEmailUtil
.
getEmails
(
true
);
emails
.
forEach
(
e
->
{
TaxEmail
taxEmail
=
new
TaxEmail
();
taxEmail
.
setCreateBy
((
String
)
e
.
get
(
"from_person"
));
taxEmail
.
setCreatetime
((
Date
)
e
.
get
(
"sendDate"
));
taxEmail
.
setId
(
String
.
valueOf
(
idService
.
nextId
()));
if
(
e
.
get
(
"type"
)
!=
null
&&
e
.
get
(
"type"
).
equals
(
"1"
)){
taxEmail
.
setContent
((
String
)
e
.
get
(
"content"
));
taxEmail
.
setType
(
1
);
}
else
{
taxEmail
.
setType
(
0
);
taxEmail
.
setUrl
((
String
)
e
.
get
(
"url"
));
}
taxEmail
.
setAttachUrl
((
String
)
e
.
get
(
"attachUrl"
));
taxEmail
.
setTitle
((
String
)
e
.
get
(
"subject"
));
taxEmail
.
setHashkey
(
String
.
valueOf
((((
String
)
e
.
get
(
"attachUrl"
)
+
(
String
)
e
.
get
(
"subject"
)).
hashCode
())));
if
(
judgeHashKey
(
taxEmail
.
getHashkey
()))
taxEmailMapper
.
insertSelective
(
taxEmail
);
});
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
logger
.
warn
(
"获取邮件失败"
);
}
}
public
boolean
judgeHashKey
(
String
hashKey
){
TaxEmailExample
example
=
new
TaxEmailExample
();
example
.
createCriteria
().
andHashkeyEqualTo
(
hashKey
);
List
<
TaxEmail
>
taxEmails
=
taxEmailMapper
.
selectByExample
(
example
);
if
(
taxEmails
.
size
()
!=
0
)
return
false
;
return
true
;
}
}
atms-api/src/main/resources/applicationContext-job.xml
View file @
48a2be64
...
...
@@ -39,6 +39,7 @@
<ref
bean=
"lgApiJobTrigger"
/>
<ref
bean=
"orgSyncJobTrigger"
/>
<ref
bean=
"analysisJobTrigger"
/>
<ref
bean=
"shareJobTrigger"
/>
</list>
</property>
<property
name=
"jobDetails"
>
...
...
@@ -46,6 +47,7 @@
<ref
bean=
"lgGlBalanceJob"
/>
<ref
bean=
"orgSyncJob"
/>
<ref
bean=
"analysisJob"
/>
<ref
bean=
"shareJob"
/>
</list>
</property>
<property
name=
"taskExecutor"
ref=
"executor"
/>
...
...
@@ -91,6 +93,15 @@
<property
name=
"requestsRecovery"
value=
"false"
/>
<property
name=
"description"
value=
"分析模块"
/>
</bean>
<!--shareJob-->
<bean
name=
"shareJob"
class=
"org.springframework.scheduling.quartz.JobDetailFactoryBean"
>
<property
name=
"jobClass"
value=
"pwc.taxtech.atms.common.schedule.ShareJob"
/>
<property
name=
"durability"
value=
"true"
/>
<property
name=
"requestsRecovery"
value=
"false"
/>
<property
name=
"description"
value=
"分享模块"
/>
</bean>
<!-- 每天凌晨一点执行一次-->
<bean
id=
"analysisJobTrigger"
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
ref=
"analysisJob"
/>
...
...
@@ -98,5 +109,12 @@
</bean>
<!-- shareJob 任务执行设定-->
<bean
id=
"shareJobTrigger"
class=
"org.springframework.scheduling.quartz.CronTriggerFactoryBean"
>
<property
name=
"jobDetail"
ref=
"shareJob"
/>
<property
name=
"cronExpression"
value=
"59 * * * * ? *"
/>
</bean>
<!-- 分布式事务配置 end -->
</beans>
\ No newline at end of file
atms-api/src/main/resources/conf/conf.properties
View file @
48a2be64
...
...
@@ -21,6 +21,13 @@ jwt.powerToken=${jwt.powerToken}
jwt.expireSecond
=
${jwt.expireSecond}
jwt.refreshSecond
=
${jwt.refreshSecond}
#email config
email.host
=
${email.host}
email.store.protocol
=
${email.store.protocol}
email.address
=
${email.address}
email.password
=
${email.password}
email.aesKey
=
${email.aesKey}
#File Server Config
file.server.url
=
${file.server.url}
file.server.upload
=
${file.server.upload}
...
...
atms-api/src/main/resources/conf/conf_profile_dev.properties
View file @
48a2be64
...
...
@@ -21,6 +21,14 @@ jwt.refreshSecond=600
file.server.url
=
http://10.158.230.144:1886
file.server.upload
=
/api/v1/upload
#email config
email.host
=
pop3.163.com
email.store.protocol
=
pop3
email.address
=
17615195790@163.com
email.password
=
7C4858868DDFAAFBFCE08C57997427A3
email.aesKey
=
47CA9CA045075A721E16B111536BD3C5
#upload
max_file_length
=
104857600
...
...
atms-api/src/main/resources/conf/conf_profile_pub.properties
View file @
48a2be64
...
...
@@ -26,6 +26,13 @@ jwt.refreshSecond=600
file.server.url
=
http://dts.erp.didichuxing.com:9001
file.server.upload
=
/api/v1/upload
#email config
email.host
=
pop3.163.com
email.store.protocol
=
pop3
email.address
=
17615195790@163.com
email.password
=
7C4858868DDFAAFBFCE08C57997427A3
email.aesKey
=
47CA9CA045075A721E16B111536BD3C5
#upload
max_file_length
=
104857600
...
...
atms-api/src/main/resources/conf/conf_profile_staging.properties
View file @
48a2be64
...
...
@@ -21,6 +21,12 @@ jwt.refreshSecond=600
file.server.url
=
http://10.158.230.144:1886
file.server.upload
=
/api/v1/upload
#email config
email.host
=
pop3.163.com
email.store.protocol
=
pop3
email.address
=
17615195790@163.com
email.password
=
7C4858868DDFAAFBFCE08C57997427A3
email.aesKey
=
47CA9CA045075A721E16B111536BD3C5
#upload
max_file_length
=
104857600
...
...
atms-api/src/main/resources/conf/conf_profile_uat.properties
View file @
48a2be64
...
...
@@ -22,6 +22,14 @@ jwt.powerToken=xxxx
jwt.expireSecond
=
180000
jwt.refreshSecond
=
600
#email config
email.host
=
pop3.163.com
email.store.protocol
=
pop3
email.address
=
17615195790@163.com
email.password
=
7C4858868DDFAAFBFCE08C57997427A3
email.aesKey
=
47CA9CA045075A721E16B111536BD3C5
#File Server Config
file.server.url
=
http://dts.erp.didichuxing.com:9001
file.server.upload
=
/api/v1/upload
...
...
atms-api/src/test/java/pwc/taxtech/atms/service/impl/ShareTest.java
0 → 100644
View file @
48a2be64
package
pwc
.
taxtech
.
atms
.
service
.
impl
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.PropertySource
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
org.springframework.test.context.web.WebAppConfiguration
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* @version 1.0
* @program: atms
* @description:
* @author: Kevin
* @create: 2019-04-26 15:15
**/
@WebAppConfiguration
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext.xml"
})
@PropertySource
(
"classpath:/conf/conf_profile_dev.properties"
)
public
class
ShareTest
{
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
DataInitTest
.
class
);
@Autowired
private
TaxEamilServiceImpl
taxEamilService
;
@Test
public
void
jobEmail
(){
taxEamilService
.
jobEmail
();
}
}
atms-dao/etc/generator-mysql/generatorConfig.xml
View file @
48a2be64
...
...
@@ -41,26 +41,13 @@
<property
name=
"rootInterface"
value=
"pwc.taxtech.atms.MyMapper"
/>
</javaClientGenerator>
<table
tableName=
"
wf_record"
domainObjectName=
"WfRecord
"
>
<table
tableName=
"
data_import_log"
domainObjectName=
"DataImportLog
"
>
<property
name=
"useActualColumnNames"
value=
"false"
/>
<property
name=
"ignoreQualifiersAtRuntime"
value=
"true"
/>
<columnOverride
column=
"period"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
<columnOverride
column=
"type"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
<columnOverride
column=
"status"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
<columnOverride
column=
"tms_period_month"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
<columnOverride
column=
"period_month"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
</table>
<table
tableName=
"wf_record_detail"
domainObjectName=
"WfRecordDetail"
>
<property
name=
"useActualColumnNames"
value=
"false"
/>
<property
name=
"ignoreQualifiersAtRuntime"
value=
"true"
/>
<columnOverride
column=
"status"
javaType=
"java.lang.Integer"
jdbcType=
"TINYINT"
/>
</table>
<!-- <table tableName="data_import_log" domainObjectName="DataImportLog">-->
<!-- <property name="useActualColumnNames" value="false"/>-->
<!-- <property name="ignoreQualifiersAtRuntime" value="true"/>-->
<!-- <columnOverride column="type" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- <columnOverride column="tms_period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- <columnOverride column="period_month" javaType="java.lang.Integer" jdbcType="TINYINT"/>-->
<!-- </table>-->
<!--<table tableName="analysis_expected_tax_return" domainObjectName="AnalysisExpectedTaxReturn">-->
<!--<property name="useActualColumnNames" value="false"/>-->
...
...
atms-dao/src/main/java/pwc/taxtech/atms/dao/PwcTaxLogMapper.java
0 → 100644
View file @
48a2be64
package
pwc
.
taxtech
.
atms
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyMapper
;
import
pwc.taxtech.atms.entity.PwcTaxLog
;
import
pwc.taxtech.atms.entity.PwcTaxLogExample
;
@Mapper
public
interface
PwcTaxLogMapper
extends
MyMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
long
countByExample
(
PwcTaxLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
deleteByExample
(
PwcTaxLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
String
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
insert
(
PwcTaxLog
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
insertSelective
(
PwcTaxLog
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
List
<
PwcTaxLog
>
selectByExampleWithBLOBsWithRowbounds
(
PwcTaxLogExample
example
,
RowBounds
rowBounds
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
List
<
PwcTaxLog
>
selectByExampleWithBLOBs
(
PwcTaxLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
List
<
PwcTaxLog
>
selectByExampleWithRowbounds
(
PwcTaxLogExample
example
,
RowBounds
rowBounds
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
List
<
PwcTaxLog
>
selectByExample
(
PwcTaxLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
PwcTaxLog
selectByPrimaryKey
(
String
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
PwcTaxLog
record
,
@Param
(
"example"
)
PwcTaxLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
PwcTaxLog
record
,
@Param
(
"example"
)
PwcTaxLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
updateByExample
(
@Param
(
"record"
)
PwcTaxLog
record
,
@Param
(
"example"
)
PwcTaxLogExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
updateByPrimaryKeySelective
(
PwcTaxLog
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
updateByPrimaryKeyWithBLOBs
(
PwcTaxLog
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
int
updateByPrimaryKey
(
PwcTaxLog
record
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/dao/TaxEmailMapper.java
0 → 100644
View file @
48a2be64
package
pwc
.
taxtech
.
atms
.
dao
;
import
java.util.List
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.session.RowBounds
;
import
pwc.taxtech.atms.MyMapper
;
import
pwc.taxtech.atms.entity.TaxEmail
;
import
pwc.taxtech.atms.entity.TaxEmailExample
;
@Mapper
public
interface
TaxEmailMapper
extends
MyMapper
{
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
long
countByExample
(
TaxEmailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
deleteByExample
(
TaxEmailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
deleteByPrimaryKey
(
String
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
insert
(
TaxEmail
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
insertSelective
(
TaxEmail
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
List
<
TaxEmail
>
selectByExampleWithBLOBsWithRowbounds
(
TaxEmailExample
example
,
RowBounds
rowBounds
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
List
<
TaxEmail
>
selectByExampleWithBLOBs
(
TaxEmailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
List
<
TaxEmail
>
selectByExampleWithRowbounds
(
TaxEmailExample
example
,
RowBounds
rowBounds
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
List
<
TaxEmail
>
selectByExample
(
TaxEmailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
TaxEmail
selectByPrimaryKey
(
String
id
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
updateByExampleSelective
(
@Param
(
"record"
)
TaxEmail
record
,
@Param
(
"example"
)
TaxEmailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
updateByExampleWithBLOBs
(
@Param
(
"record"
)
TaxEmail
record
,
@Param
(
"example"
)
TaxEmailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
updateByExample
(
@Param
(
"record"
)
TaxEmail
record
,
@Param
(
"example"
)
TaxEmailExample
example
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
updateByPrimaryKeySelective
(
TaxEmail
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
updateByPrimaryKeyWithBLOBs
(
TaxEmail
record
);
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table tax_email
*
* @mbg.generated
*/
int
updateByPrimaryKey
(
TaxEmail
record
);
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/entity/PwcTaxLog.java
0 → 100644
View file @
48a2be64
package
pwc
.
taxtech
.
atms
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* This class was generated by MyBatis Generator.
* This class corresponds to the database table pwc_tax_log
*
* @mbg.generated do_not_delete_during_merge
*/
public
class
PwcTaxLog
extends
BaseEntity
implements
Serializable
{
/**
* Database Column Remarks:
* token
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.id
*
* @mbg.generated
*/
private
String
id
;
/**
* Database Column Remarks:
* 标题名称和url合并生成的hash值
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.email_id
*
* @mbg.generated
*/
private
String
emailId
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.createTime
*
* @mbg.generated
*/
private
Date
createtime
;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.del_flag
*
* @mbg.generated
*/
private
Integer
delFlag
;
/**
* Database Column Remarks:
* 日志类型
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.type
*
* @mbg.generated
*/
private
Integer
type
;
/**
* Database Column Remarks:
* 内容
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column pwc_tax_log.user_id
*
* @mbg.generated
*/
private
String
userId
;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.id
*
* @return the value of pwc_tax_log.id
*
* @mbg.generated
*/
public
String
getId
()
{
return
id
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.id
*
* @param id the value for pwc_tax_log.id
*
* @mbg.generated
*/
public
void
setId
(
String
id
)
{
this
.
id
=
id
==
null
?
null
:
id
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.email_id
*
* @return the value of pwc_tax_log.email_id
*
* @mbg.generated
*/
public
String
getEmailId
()
{
return
emailId
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.email_id
*
* @param emailId the value for pwc_tax_log.email_id
*
* @mbg.generated
*/
public
void
setEmailId
(
String
emailId
)
{
this
.
emailId
=
emailId
==
null
?
null
:
emailId
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.createTime
*
* @return the value of pwc_tax_log.createTime
*
* @mbg.generated
*/
public
Date
getCreatetime
()
{
return
createtime
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.createTime
*
* @param createtime the value for pwc_tax_log.createTime
*
* @mbg.generated
*/
public
void
setCreatetime
(
Date
createtime
)
{
this
.
createtime
=
createtime
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.del_flag
*
* @return the value of pwc_tax_log.del_flag
*
* @mbg.generated
*/
public
Integer
getDelFlag
()
{
return
delFlag
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.del_flag
*
* @param delFlag the value for pwc_tax_log.del_flag
*
* @mbg.generated
*/
public
void
setDelFlag
(
Integer
delFlag
)
{
this
.
delFlag
=
delFlag
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.type
*
* @return the value of pwc_tax_log.type
*
* @mbg.generated
*/
public
Integer
getType
()
{
return
type
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.type
*
* @param type the value for pwc_tax_log.type
*
* @mbg.generated
*/
public
void
setType
(
Integer
type
)
{
this
.
type
=
type
;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column pwc_tax_log.user_id
*
* @return the value of pwc_tax_log.user_id
*
* @mbg.generated
*/
public
String
getUserId
()
{
return
userId
;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column pwc_tax_log.user_id
*
* @param userId the value for pwc_tax_log.user_id
*
* @mbg.generated
*/
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
==
null
?
null
:
userId
.
trim
();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table pwc_tax_log
*
* @mbg.generated
*/
@Override
public
String
toString
()
{
StringBuilder
sb
=
new
StringBuilder
();
sb
.
append
(
getClass
().
getSimpleName
());
sb
.
append
(
" ["
);
sb
.
append
(
"Hash = "
).
append
(
hashCode
());
sb
.
append
(
", id="
).
append
(
id
);
sb
.
append
(
", emailId="
).
append
(
emailId
);
sb
.
append
(
", createtime="
).
append
(
createtime
);
sb
.
append
(
", delFlag="
).
append
(
delFlag
);
sb
.
append
(
", type="
).
append
(
type
);
sb
.
append
(
", userId="
).
append
(
userId
);
sb
.
append
(
"]"
);
return
sb
.
toString
();
}
}
\ No newline at end of file
atms-dao/src/main/java/pwc/taxtech/atms/entity/PwcTaxLogExample.java
0 → 100644
View file @
48a2be64
This diff is collapsed.
Click to expand it.
atms-dao/src/main/java/pwc/taxtech/atms/entity/TaxEmail.java
0 → 100644
View file @
48a2be64
This diff is collapsed.
Click to expand it.
atms-dao/src/main/java/pwc/taxtech/atms/entity/TaxEmailExample.java
0 → 100644
View file @
48a2be64
This diff is collapsed.
Click to expand it.
atms-dao/src/main/resources/pwc/taxtech/atms/dao/PwcTaxLogMapper.xml
0 → 100644
View file @
48a2be64
This diff is collapsed.
Click to expand it.
atms-dao/src/main/resources/pwc/taxtech/atms/dao/TaxEmailMapper.xml
0 → 100644
View file @
48a2be64
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment