Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
platform
/
finance_serv
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b8432cbe
authored
Aug 06, 2018
by
王军业
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
【顾客接口】
1 parent
d074a0aa
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
81 additions
and
0 deletions
code/finance_serv/src/main/java/com/vion/financial/controller/CustomerController.java
code/finance_serv/src/main/java/com/vion/financial/service/imp/CustomerServiceImpl.java
code/finance_serv/src/main/java/com/vion/financial/controller/CustomerController.java
0 → 100644
View file @
b8432cb
package
com
.
vion
.
financial
.
controller
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
com.vion.financial.service.CustomerService
;
@RestController
public
class
CustomerController
extends
BaseController
{
@Autowired
CustomerService
customerService
;
@GetMapping
(
value
=
"/customers"
)
@ResponseBody
public
Object
queryCustomers
()
{
return
customerService
.
queryCustomer
();
}
}
code/finance_serv/src/main/java/com/vion/financial/service/imp/CustomerServiceImpl.java
0 → 100644
View file @
b8432cb
package
com
.
vion
.
financial
.
service
.
imp
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.vion.financial.entity.Customer
;
import
com.vion.financial.mapper.CustomerMapper
;
import
com.vion.financial.mapper.DeliverGoodsMapper
;
import
com.vion.financial.service.AppendixService
;
import
com.vion.financial.service.ContractService
;
import
com.vion.financial.service.CustomerService
;
import
com.vion.financial.vo.FailCode
;
import
com.vion.financial.vo.SuccessCode
;
@Service
public
class
CustomerServiceImpl
implements
CustomerService
{
Logger
logger
=
LoggerFactory
.
getLogger
(
DeliverGoodsServiceImpl
.
class
);
@Autowired
SuccessCode
successCode
;
@Autowired
FailCode
failCode
;
@Autowired
CustomerMapper
customerMapper
;
@Override
public
Object
addCustomer
(
Customer
customer
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
public
Object
queryCustomer
()
{
// TODO Auto-generated method stub
logger
.
info
(
"=====================查询顾客信息========================"
);
try
{
return
customerMapper
.
queryCustomer
();
}
catch
(
Exception
e
)
{
// TODO: handle exception
logger
.
error
(
"查询顾客信息出错"
+
e
.
getLocalizedMessage
(),
e
);
failCode
.
setEcode
(
"500"
);
failCode
.
setEnote
(
"Fail"
);
return
failCode
;
}
}
@Override
public
Object
updateCustomer
(
Customer
customer
)
{
// TODO Auto-generated method stub
return
null
;
}
@Override
public
Object
deleteCustomer
(
int
n
)
{
// TODO Auto-generated method stub
return
null
;
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment