Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
F
finance-api
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Data-王博
finance-api
Commits
daf402f5
Commit
daf402f5
authored
Feb 19, 2017
by
Data-王博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
湖北消金 - 提供提前还款接口 提供保存邮件接口
parent
8d271558
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
132 additions
and
1 deletion
+132
-1
ApiCommonController.java
.../quantgroup/financial/controller/ApiCommonController.java
+11
-0
SystemToolsController.java
...uantgroup/financial/controller/SystemToolsController.java
+38
-0
IHuBeiCFCDao.java
src/main/java/cn/quantgroup/financial/dao/IHuBeiCFCDao.java
+2
-0
ISystemDao.java
src/main/java/cn/quantgroup/financial/dao/ISystemDao.java
+12
-0
HuBeiCFCDaoImpl.java
...ava/cn/quantgroup/financial/dao/impl/HuBeiCFCDaoImpl.java
+2
-0
SystemDaoImpl.java
.../java/cn/quantgroup/financial/dao/impl/SystemDaoImpl.java
+35
-0
HuBeiServiceImpl.java
...n/quantgroup/financial/service/impl/HuBeiServiceImpl.java
+1
-0
IMailService.java
...ava/cn/quantgroup/financial/service/sys/IMailService.java
+5
-0
MailServiceImpl.java
...uantgroup/financial/service/sys/impl/MailServiceImpl.java
+25
-0
MailInfoMapper.xml
src/main/resources/mapper/MailInfoMapper.xml
+1
-1
No files found.
src/main/java/cn/quantgroup/financial/controller/ApiCommonController.java
View file @
daf402f5
...
...
@@ -132,6 +132,17 @@ public class ApiCommonController {
return
JsonResult
.
SUCCESS
();
}
@RequestMapping
(
value
=
"/hubei/checkDisc"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
@ResponseBody
JsonResult
checkDisc
(
@RequestParam
(
"applyDt"
)
String
applyDt
,
@RequestParam
(
"docName"
)
String
docName
){
try
{
huBeiService
.
handleDiscData
(
HubeiCFCDataType
.
SEND_ADVANCE_REPAYMENT_CHECK
,
docName
,
null
,
new
Integer
(
1
).
byteValue
(),
applyDt
);
}
catch
(
Exception
e
)
{
logger
.
error
(
e
.
getMessage
(),
e
);
}
return
JsonResult
.
SUCCESS
();
}
@RequestMapping
(
value
=
"/hubei/returnDisc"
,
method
=
{
RequestMethod
.
POST
,
RequestMethod
.
GET
})
public
@ResponseBody
JsonResult
getReturnDisc
(
@RequestParam
(
"applyDt"
)
String
applyDt
,
@RequestParam
(
"type"
)
Integer
type
){
try
{
...
...
src/main/java/cn/quantgroup/financial/controller/SystemToolsController.java
0 → 100644
View file @
daf402f5
package
cn
.
quantgroup
.
financial
.
controller
;
import
cn.quantgroup.financial.json.JsonResult
;
import
cn.quantgroup.financial.model.MailInfo
;
import
cn.quantgroup.financial.model.PaymentDetail
;
import
cn.quantgroup.financial.service.sys.IMailService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.web.bind.annotation.*
;
/**
* Created by WuKong on 2017/2/19.
*/
@Controller
@RequestMapping
(
"/system"
)
public
class
SystemToolsController
{
@Autowired
private
IMailService
mailService
;
@RequestMapping
(
value
=
"/mailinfo/save"
,
method
=
RequestMethod
.
POST
)
public
@ResponseBody
JsonResult
saveMailInfo
(
@RequestBody
MailInfo
mailInfo
){
Long
mailId
=
null
;
if
(
mailInfo
!=
null
){
mailId
=
mailService
.
saveMailInfo
(
mailInfo
);
}
return
JsonResult
.
SUCCESS
(
mailId
);
}
@RequestMapping
(
value
=
"/mailinfo/delete"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
,
RequestMethod
.
DELETE
})
public
@ResponseBody
JsonResult
paymentNotify
(
@RequestParam
(
"mailId"
)
Long
mailId
){
Integer
row
=
null
;
if
(
mailId
!=
null
){
row
=
mailService
.
deleteMailInfo
(
mailId
);
}
return
JsonResult
.
SUCCESS
(
row
);
}
}
src/main/java/cn/quantgroup/financial/dao/IHuBeiCFCDao.java
View file @
daf402f5
...
...
@@ -47,4 +47,6 @@ public interface IHuBeiCFCDao {
Integer
getMaxSeqNoByDocId
(
Long
docId
);
List
<
MailInfo
>
getListByType
(
Byte
type
);
}
src/main/java/cn/quantgroup/financial/dao/ISystemDao.java
0 → 100644
View file @
daf402f5
package
cn
.
quantgroup
.
financial
.
dao
;
import
cn.quantgroup.financial.model.MailInfo
;
/**
* Created by WuKong on 2017/2/19.
*/
public
interface
ISystemDao
{
Long
saveMailInfo
(
MailInfo
mailInfo
);
Integer
deleteMailInfo
(
Long
mailId
);
}
src/main/java/cn/quantgroup/financial/dao/impl/HuBeiCFCDaoImpl.java
View file @
daf402f5
...
...
@@ -136,4 +136,6 @@ public class HuBeiCFCDaoImpl implements IHuBeiCFCDao {
public
List
<
MailInfo
>
getListByType
(
Byte
type
){
return
mailInfoMapper
.
getByType
(
type
);
}
}
src/main/java/cn/quantgroup/financial/dao/impl/SystemDaoImpl.java
0 → 100644
View file @
daf402f5
package
cn
.
quantgroup
.
financial
.
dao
.
impl
;
import
cn.quantgroup.financial.dao.ISystemDao
;
import
cn.quantgroup.financial.mapper.MailInfoMapper
;
import
cn.quantgroup.financial.model.MailInfo
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.Date
;
/**
* Created by WuKong on 2017/2/19.
*/
@Service
public
class
SystemDaoImpl
implements
ISystemDao
{
@Autowired
MailInfoMapper
mailInfoMapper
;
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Long
saveMailInfo
(
MailInfo
mailInfo
){
mailInfo
.
setCreatetime
(
new
Date
());
mailInfo
.
setUpdatetime
(
new
Date
());
mailInfoMapper
.
insert
(
mailInfo
);
return
mailInfo
.
getId
();
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
public
Integer
deleteMailInfo
(
Long
mailId
){
return
mailInfoMapper
.
deleteByPrimaryKey
(
mailId
);
}
}
src/main/java/cn/quantgroup/financial/service/impl/HuBeiServiceImpl.java
View file @
daf402f5
...
...
@@ -797,4 +797,5 @@ public class HuBeiServiceImpl implements IHuBeiService {
return
huBeiDocName
;
}
}
src/main/java/cn/quantgroup/financial/service/sys/IMailService.java
View file @
daf402f5
package
cn
.
quantgroup
.
financial
.
service
.
sys
;
import
cn.quantgroup.financial.model.MailInfo
;
import
org.springframework.mail.MailException
;
import
org.springframework.mail.SimpleMailMessage
;
import
org.springframework.mail.javamail.MimeMessagePreparator
;
...
...
@@ -67,4 +68,8 @@ public interface IMailService {
MimeMessage
createMimeMessage
(
InputStream
var1
)
throws
MailException
;
DataSource
getDataSource
(
String
content
,
String
fileName
);
Long
saveMailInfo
(
MailInfo
mailInfo
);
Integer
deleteMailInfo
(
Long
id
);
}
src/main/java/cn/quantgroup/financial/service/sys/impl/MailServiceImpl.java
View file @
daf402f5
package
cn
.
quantgroup
.
financial
.
service
.
sys
.
impl
;
import
cn.quantgroup.financial.constant.EncodingConfig
;
import
cn.quantgroup.financial.dao.IHuBeiCFCDao
;
import
cn.quantgroup.financial.dao.ISystemDao
;
import
cn.quantgroup.financial.model.MailInfo
;
import
cn.quantgroup.financial.service.sys.IMailSendCallback
;
import
cn.quantgroup.financial.service.sys.IMailService
;
import
org.apache.commons.collections.CollectionUtils
;
...
...
@@ -32,6 +35,12 @@ public class MailServiceImpl implements IMailService {
@Autowired
private
JavaMailSender
javaMailSender
;
@Autowired
private
IHuBeiCFCDao
huBeiCFCDao
;
@Autowired
private
ISystemDao
systemDao
;
private
static
final
Logger
logger
=
LoggerFactory
.
getLogger
(
MailServiceImpl
.
class
);
/**
...
...
@@ -334,4 +343,20 @@ public class MailServiceImpl implements IMailService {
return
(
file
.
exists
()
&&
file
.
isFile
())
?
file
:
null
;
}
/**
* 保存邮件信息
* @param mailInfo
* @return
*/
@Override
public
Long
saveMailInfo
(
MailInfo
mailInfo
){
return
systemDao
.
saveMailInfo
(
mailInfo
);
}
@Override
public
Integer
deleteMailInfo
(
Long
id
){
return
systemDao
.
deleteMailInfo
(
id
);
}
}
src/main/resources/mapper/MailInfoMapper.xml
View file @
daf402f5
...
...
@@ -27,7 +27,7 @@
delete from mailinfo
where id = #{id,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
parameterType=
"cn.quantgroup.financial.model.MailInfo"
>
<insert
id=
"insert"
parameterType=
"cn.quantgroup.financial.model.MailInfo"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into mailinfo (id, mail, mailType,
createTime, updateTime)
values (#{id,jdbcType=BIGINT}, #{mail,jdbcType=VARCHAR}, #{mailtype,jdbcType=TINYINT},
...
...
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