Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
T
tcm-system
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
TCM
tcm-system
Commits
fe3f4ecf
Commit
fe3f4ecf
authored
Jun 18, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 6.18
增加了订单服务需要的提现功能
parent
d351b736
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
190 additions
and
12 deletions
+190
-12
FinanceController.java
.../pangding/web/authority/controller/FinanceController.java
+29
-0
AuthorityDaoImpl.java
...com/pangding/web/authority/dao/impl/AuthorityDaoImpl.java
+2
-1
FinanceService.java
...va/com/pangding/web/authority/service/FinanceService.java
+12
-0
AuthorityServiceImpl.java
...ding/web/authority/service/impl/AuthorityServiceImpl.java
+4
-4
FinanceServiceImpl.java
...ngding/web/authority/service/impl/FinanceServiceImpl.java
+48
-0
RegisterServiceImpl.java
...gding/web/authority/service/impl/RegisterServiceImpl.java
+4
-0
AuthorityVo.java
src/main/java/com/pangding/web/authority/vo/AuthorityVo.java
+19
-4
AuthorityGetReqVo.java
...om/pangding/web/authority/vo/reqvo/AuthorityGetReqVo.java
+3
-3
AuthorityListReqVo.java
...m/pangding/web/authority/vo/reqvo/AuthorityListReqVo.java
+10
-0
WithdrawalReqVo.java
.../com/pangding/web/authority/vo/reqvo/WithdrawalReqVo.java
+27
-0
WithdrawalResVo.java
.../com/pangding/web/authority/vo/resvo/WithdrawalResVo.java
+32
-0
No files found.
src/main/java/com/pangding/web/authority/controller/FinanceController.java
0 → 100644
View file @
fe3f4ecf
package
com
.
pangding
.
web
.
authority
.
controller
;
import
com.pangding.web.authority.service.FinanceService
;
import
com.pangding.web.authority.vo.reqvo.WithdrawalReqVo
;
import
com.pangding.web.authority.vo.resvo.WithdrawalResVo
;
import
com.yanzuoguang.util.helper.CheckerHelper
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.*
;
/**
* @Author zhangjinyao
* @create 2019/6/18 19:53
*/
@RestController
@RequestMapping
(
value
=
"/finance"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
class
FinanceController
{
@Autowired
private
FinanceService
financeServiceImpl
;
@PostMapping
(
value
=
"/withdrawal"
)
public
ResponseResult
<
WithdrawalResVo
>
withdrawal
(
@RequestBody
WithdrawalReqVo
reqVo
){
CheckerHelper
.
newInstance
()
.
notBlankCheck
(
"companyId"
,
reqVo
.
getCompanyId
())
.
checkException
();
return
ResponseResult
.
result
(
financeServiceImpl
.
withdrawal
(
reqVo
));
}
}
src/main/java/com/pangding/web/authority/dao/impl/AuthorityDaoImpl.java
View file @
fe3f4ecf
...
@@ -34,9 +34,10 @@ public class AuthorityDaoImpl extends BaseDaoImpl implements AuthorityDao {
...
@@ -34,9 +34,10 @@ public class AuthorityDaoImpl extends BaseDaoImpl implements AuthorityDao {
.
add
(
"id"
,
"and pid = ? "
)
.
add
(
"id"
,
"and pid = ? "
)
.
add
(
"pid"
,
"and pid = ? "
)
.
add
(
"pid"
,
"and pid = ? "
)
.
add
(
"sort"
,
"and sort = ? "
)
.
add
(
"sort"
,
"and sort = ? "
)
.
add
(
"levelOne"
,
"and pid = '' "
);
.
add
(
"levelOne"
,
"and pid = ''
order by sort asc
"
);
table
.
add
(
GET_LEVEL_ONE
,
"select * from pd_authority where 1=1 "
)
table
.
add
(
GET_LEVEL_ONE
,
"select * from pd_authority where 1=1 "
)
.
add
(
"attribute"
,
"and attribute = ?"
)
.
add
(
"levelOne"
,
"and pid = '' order by sort asc"
);
.
add
(
"levelOne"
,
"and pid = '' order by sort asc"
);
table
.
add
(
AFTER
,
"select * from pd_authority where 1=1 "
)
table
.
add
(
AFTER
,
"select * from pd_authority where 1=1 "
)
...
...
src/main/java/com/pangding/web/authority/service/FinanceService.java
0 → 100644
View file @
fe3f4ecf
package
com
.
pangding
.
web
.
authority
.
service
;
import
com.pangding.web.authority.vo.reqvo.WithdrawalReqVo
;
import
com.pangding.web.authority.vo.resvo.WithdrawalResVo
;
/**
* @Author zhangjinyao
* @create 2019/6/18 20:01
*/
public
interface
FinanceService
{
WithdrawalResVo
withdrawal
(
WithdrawalReqVo
reqVo
);
}
src/main/java/com/pangding/web/authority/service/impl/AuthorityServiceImpl.java
View file @
fe3f4ecf
...
@@ -74,8 +74,8 @@ public class AuthorityServiceImpl implements AuthorityService {
...
@@ -74,8 +74,8 @@ public class AuthorityServiceImpl implements AuthorityService {
ObjectHelper
.
writeWithFrom
(
afterReqVo
,
authorityVo
);
ObjectHelper
.
writeWithFrom
(
afterReqVo
,
authorityVo
);
List
<
AuthorityVo
>
authorityVoList
=
authorityDao
.
after
(
afterReqVo
);
List
<
AuthorityVo
>
authorityVoList
=
authorityDao
.
after
(
afterReqVo
);
for
(
AuthorityVo
authorityVo2:
authorityVoList
)
{
for
(
AuthorityVo
authorityVo2:
authorityVoList
)
{
String
sort
=
authorityVo2
.
getSort
();
Integer
sort
=
authorityVo2
.
getSort
();
String
newSort
=
(
Integer
.
parseInt
(
sort
)+
1
)
+
""
;
Integer
newSort
=
sort
+
1
;
authorityVo2
.
setSort
(
newSort
);
authorityVo2
.
setSort
(
newSort
);
authorityDao
.
update
(
authorityVo2
);
authorityDao
.
update
(
authorityVo2
);
}
}
...
@@ -91,8 +91,8 @@ public class AuthorityServiceImpl implements AuthorityService {
...
@@ -91,8 +91,8 @@ public class AuthorityServiceImpl implements AuthorityService {
ObjectHelper
.
writeWithFrom
(
afterReqVo
,
authorityVo
);
ObjectHelper
.
writeWithFrom
(
afterReqVo
,
authorityVo
);
List
<
AuthorityVo
>
authorityVoList
=
authorityDao
.
after
(
afterReqVo
);
List
<
AuthorityVo
>
authorityVoList
=
authorityDao
.
after
(
afterReqVo
);
for
(
AuthorityVo
authorityVo2:
authorityVoList
)
{
for
(
AuthorityVo
authorityVo2:
authorityVoList
)
{
String
sort
=
authorityVo2
.
getSort
();
Integer
sort
=
authorityVo2
.
getSort
();
String
newSort
=
(
Integer
.
parseInt
(
sort
)-
1
)
+
""
;
Integer
newSort
=
sort
-
1
;
authorityVo2
.
setSort
(
newSort
);
authorityVo2
.
setSort
(
newSort
);
authorityDao
.
update
(
authorityVo2
);
authorityDao
.
update
(
authorityVo2
);
}
}
...
...
src/main/java/com/pangding/web/authority/service/impl/FinanceServiceImpl.java
0 → 100644
View file @
fe3f4ecf
package
com
.
pangding
.
web
.
authority
.
service
.
impl
;
import
com.pangding.web.authority.dao.CompanyBankCardDao
;
import
com.pangding.web.authority.dao.CompanyExtendDao
;
import
com.pangding.web.authority.service.FinanceService
;
import
com.pangding.web.authority.vo.CompanyBankCardVo
;
import
com.pangding.web.authority.vo.CompanyExtendVo
;
import
com.pangding.web.authority.vo.reqvo.CompanyExtendGetReqVo
;
import
com.pangding.web.authority.vo.reqvo.WithdrawalReqVo
;
import
com.pangding.web.authority.vo.resvo.WithdrawalResVo
;
import
com.yanzuoguang.util.exception.CodeException
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
/**
* @Author zhangjinyao
* @create 2019/6/18 20:01
*/
@Service
public
class
FinanceServiceImpl
implements
FinanceService
{
@Autowired
private
CompanyExtendDao
companyExtendDaoImpl
;
@Autowired
private
CompanyBankCardDao
companyBankCardDaoImpl
;
@Override
public
WithdrawalResVo
withdrawal
(
WithdrawalReqVo
reqVo
)
{
/*返回对象*/
WithdrawalResVo
resVo
=
new
WithdrawalResVo
();
CompanyExtendGetReqVo
getReqVo
=
new
CompanyExtendGetReqVo
();
getReqVo
.
setId
(
reqVo
.
getCompanyId
());
CompanyExtendVo
extendVo
=
companyExtendDaoImpl
.
load
(
getReqVo
,
CompanyExtendVo
.
class
);
if
(
null
==
extendVo
){
throw
new
CodeException
(
"未查到该公司数据"
);
}
resVo
.
setWithdrawTotalCash
(
extendVo
.
getWithdrawTotalCash
());
List
<
CompanyBankCardVo
>
companyBankCardVoList
=
companyBankCardDaoImpl
.
loadList
(
reqVo
,
CompanyBankCardVo
.
class
);
if
(
null
==
companyBankCardVoList
||
companyBankCardVoList
.
isEmpty
()){
throw
new
CodeException
(
"该公司暂无银行卡信息,请添加"
);
}
resVo
.
setBankCardVoList
(
companyBankCardVoList
);
return
resVo
;
}
}
src/main/java/com/pangding/web/authority/service/impl/RegisterServiceImpl.java
View file @
fe3f4ecf
...
@@ -27,6 +27,7 @@ import javax.annotation.Resource;
...
@@ -27,6 +27,7 @@ import javax.annotation.Resource;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpSession
;
import
javax.servlet.http.HttpSession
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -417,6 +418,7 @@ public class RegisterServiceImpl implements RegisterService {
...
@@ -417,6 +418,7 @@ public class RegisterServiceImpl implements RegisterService {
levelOneList
.
add
(
authorityVo
);
levelOneList
.
add
(
authorityVo
);
}
}
}
}
Collections
.
sort
(
levelOneList
);
if
(
null
==
levelOneList
||
levelOneList
.
isEmpty
()){
if
(
null
==
levelOneList
||
levelOneList
.
isEmpty
()){
throw
new
CodeException
(
"该用户暂无权限,请添加"
);
throw
new
CodeException
(
"该用户暂无权限,请添加"
);
}
}
...
@@ -428,6 +430,7 @@ public class RegisterServiceImpl implements RegisterService {
...
@@ -428,6 +430,7 @@ public class RegisterServiceImpl implements RegisterService {
resVo1
.
setChildList
(
childList
);
resVo1
.
setChildList
(
childList
);
authorityListByLevel
.
add
(
resVo1
);
authorityListByLevel
.
add
(
resVo1
);
}
}
Collections
.
sort
(
authorityListByLevel
);
resVo
.
setAuthorityListByLevel
(
authorityListByLevel
);
resVo
.
setAuthorityListByLevel
(
authorityListByLevel
);
}
}
loginCompanyResVo
.
setBankCardCodeList
(
bankCardCodeList
);
loginCompanyResVo
.
setBankCardCodeList
(
bankCardCodeList
);
...
@@ -450,6 +453,7 @@ public class RegisterServiceImpl implements RegisterService {
...
@@ -450,6 +453,7 @@ public class RegisterServiceImpl implements RegisterService {
childResList
.
add
(
resVo
);
childResList
.
add
(
resVo
);
}
}
}
}
Collections
.
sort
(
childResList
);
return
childResList
;
return
childResList
;
}
}
...
...
src/main/java/com/pangding/web/authority/vo/AuthorityVo.java
View file @
fe3f4ecf
...
@@ -14,7 +14,7 @@ import java.sql.Timestamp;
...
@@ -14,7 +14,7 @@ import java.sql.Timestamp;
* @author zhangjinyao
* @author zhangjinyao
*/
*/
@TableAnnotation
(
"pd_authority"
)
@TableAnnotation
(
"pd_authority"
)
public
class
AuthorityVo
extends
BaseVo
implements
InitDao
{
public
class
AuthorityVo
extends
BaseVo
implements
InitDao
,
Comparable
<
AuthorityVo
>
{
private
String
id
;
private
String
id
;
...
@@ -37,13 +37,23 @@ public class AuthorityVo extends BaseVo implements InitDao {
...
@@ -37,13 +37,23 @@ public class AuthorityVo extends BaseVo implements InitDao {
private
String
createTime
;
private
String
createTime
;
private
String
sort
;
private
Integer
sort
;
public
String
getSort
()
{
private
Integer
attribute
;
public
Integer
getAttribute
()
{
return
attribute
;
}
public
void
setAttribute
(
Integer
attribute
)
{
this
.
attribute
=
attribute
;
}
public
Integer
getSort
()
{
return
sort
;
return
sort
;
}
}
public
void
setSort
(
String
sort
)
{
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
this
.
sort
=
sort
;
}
}
...
@@ -123,4 +133,9 @@ public class AuthorityVo extends BaseVo implements InitDao {
...
@@ -123,4 +133,9 @@ public class AuthorityVo extends BaseVo implements InitDao {
public
void
init
()
{
public
void
init
()
{
this
.
createTime
=
StringHelper
.
getFirst
(
this
.
createTime
,
DateHelper
.
getNow
());
this
.
createTime
=
StringHelper
.
getFirst
(
this
.
createTime
,
DateHelper
.
getNow
());
}
}
@Override
public
int
compareTo
(
AuthorityVo
authorityVo
)
{
return
this
.
sort
-
authorityVo
.
getSort
();
}
}
}
src/main/java/com/pangding/web/authority/vo/reqvo/AuthorityGetReqVo.java
View file @
fe3f4ecf
...
@@ -10,7 +10,7 @@ public class AuthorityGetReqVo {
...
@@ -10,7 +10,7 @@ public class AuthorityGetReqVo {
private
String
pid
;
private
String
pid
;
private
String
sort
;
private
Integer
sort
;
public
String
getReqId
()
{
public
String
getReqId
()
{
return
reqId
;
return
reqId
;
...
@@ -20,11 +20,11 @@ public class AuthorityGetReqVo {
...
@@ -20,11 +20,11 @@ public class AuthorityGetReqVo {
this
.
reqId
=
reqId
;
this
.
reqId
=
reqId
;
}
}
public
String
getSort
()
{
public
Integer
getSort
()
{
return
sort
;
return
sort
;
}
}
public
void
setSort
(
String
sort
)
{
public
void
setSort
(
Integer
sort
)
{
this
.
sort
=
sort
;
this
.
sort
=
sort
;
}
}
...
...
src/main/java/com/pangding/web/authority/vo/reqvo/AuthorityListReqVo.java
View file @
fe3f4ecf
...
@@ -11,6 +11,16 @@ public class AuthorityListReqVo {
...
@@ -11,6 +11,16 @@ public class AuthorityListReqVo {
private
String
roleId
;
private
String
roleId
;
private
Integer
attribute
;
public
Integer
getAttribute
()
{
return
attribute
;
}
public
void
setAttribute
(
Integer
attribute
)
{
this
.
attribute
=
attribute
;
}
public
String
getRoleId
()
{
public
String
getRoleId
()
{
return
roleId
;
return
roleId
;
}
}
...
...
src/main/java/com/pangding/web/authority/vo/reqvo/WithdrawalReqVo.java
0 → 100644
View file @
fe3f4ecf
package
com
.
pangding
.
web
.
authority
.
vo
.
reqvo
;
/**
* @Author zhangjinyao
* @create 2019/6/18 19:57
*/
public
class
WithdrawalReqVo
{
private
String
reqId
;
private
String
companyId
;
public
String
getReqId
()
{
return
reqId
;
}
public
void
setReqId
(
String
reqId
)
{
this
.
reqId
=
reqId
;
}
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
}
src/main/java/com/pangding/web/authority/vo/resvo/WithdrawalResVo.java
0 → 100644
View file @
fe3f4ecf
package
com
.
pangding
.
web
.
authority
.
vo
.
resvo
;
import
com.pangding.web.authority.vo.CompanyBankCardVo
;
import
java.math.BigDecimal
;
import
java.util.List
;
/**
* @Author zhangjinyao
* @create 2019/6/18 19:58
*/
public
class
WithdrawalResVo
{
private
BigDecimal
withdrawTotalCash
;
private
List
<
CompanyBankCardVo
>
bankCardVoList
;
public
BigDecimal
getWithdrawTotalCash
()
{
return
withdrawTotalCash
;
}
public
void
setWithdrawTotalCash
(
BigDecimal
withdrawTotalCash
)
{
this
.
withdrawTotalCash
=
withdrawTotalCash
;
}
public
List
<
CompanyBankCardVo
>
getBankCardVoList
()
{
return
bankCardVoList
;
}
public
void
setBankCardVoList
(
List
<
CompanyBankCardVo
>
bankCardVoList
)
{
this
.
bankCardVoList
=
bankCardVoList
;
}
}
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