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
0b3b7f94
Commit
0b3b7f94
authored
Sep 14, 2021
by
tangfang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改注册判断银行卡
parent
04e07083
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
8 deletions
+64
-8
CompanyController.java
.../pangding/web/authority/controller/CompanyController.java
+5
-0
DistributionFeign.java
...a/com/pangding/web/authority/feign/DistributionFeign.java
+24
-0
CompanyConsumer.java
...n/java/com/pangding/web/authority/mq/CompanyConsumer.java
+13
-1
CompanyService.java
...va/com/pangding/web/authority/service/CompanyService.java
+7
-0
CompanyServiceImpl.java
...ngding/web/authority/service/impl/CompanyServiceImpl.java
+15
-7
No files found.
src/main/java/com/pangding/web/authority/controller/CompanyController.java
View file @
0b3b7f94
...
...
@@ -76,6 +76,11 @@ public class CompanyController {
return
ResponseResult
.
result
(
companyService
.
findCompanyById
(
req
));
}
@RequestMapping
(
value
=
"synCompany"
)
@ApiOperation
(
value
=
"找到公司信息"
,
notes
=
"找到公司信息"
)
public
ResponseResult
<
String
>
synCompany
(
@RequestBody
CompanyReqVo
req
){
return
companyService
.
synCompanyInfo
(
req
);
}
}
src/main/java/com/pangding/web/authority/feign/DistributionFeign.java
0 → 100644
View file @
0b3b7f94
package
com
.
pangding
.
web
.
authority
.
feign
;
import
com.pangding.web.vo.product.req.merchant.CompanyCompanySaveSimpleReqVo
;
import
com.yanzuoguang.util.vo.ResponseResult
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.MediaType
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMethod
;
import
org.springframework.web.bind.annotation.RestController
;
@FeignClient
(
value
=
"pd-interface-distribution"
)
@RestController
@RequestMapping
(
value
=
"/conversion"
,
method
=
RequestMethod
.
POST
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
public
interface
DistributionFeign
{
/**
* 途比达推荐大屏数据
* 公司信息保存
*/
@PostMapping
(
value
=
"/sendCompanyInfo"
,
produces
=
MediaType
.
APPLICATION_JSON_UTF8_VALUE
)
ResponseResult
<
String
>
sendCompanyInfo
(
CompanyCompanySaveSimpleReqVo
req
);
}
src/main/java/com/pangding/web/authority/mq/CompanyConsumer.java
View file @
0b3b7f94
...
...
@@ -4,6 +4,7 @@ import com.pangding.web.authority.service.CompanyMsgService;
import
com.pangding.web.authority.service.FinanceService
;
import
com.pangding.web.constant.MqConstant
;
import
com.pangding.web.mq.CompanyProducer
;
import
com.pangding.web.mq.DistributionProducer
;
import
com.pangding.web.mq.OrderProducer
;
import
com.pangding.web.mq.PayProducer
;
import
com.pangding.web.vo.order.req.CapitalFlowReqVo
;
...
...
@@ -14,6 +15,7 @@ import com.pangding.web.vo.order.tl.CashWithdrawalReqVo;
import
com.pangding.web.vo.order.tl.SoundReqVo
;
import
com.pangding.web.vo.system.req.CompanyMsgReqVo
;
import
com.pangding.web.vo.system.req.company.UpdateCompanyMoneyReqVo
;
import
com.pangding.web.vo.system.res.company.CompanyResVo
;
import
com.rabbitmq.client.Channel
;
import
com.yanzuoguang.mq.service.MqService
;
import
com.yanzuoguang.mq.vo.MessageVo
;
...
...
@@ -40,13 +42,14 @@ public class CompanyConsumer {
@Autowired
private
OrderProducer
orderProducer
;
@Autowired
private
DistributionProducer
distributionProducer
;
@Autowired
private
MqService
mqService
;
@Autowired
private
CompanyMsgService
companyMsgService
;
@Autowired
private
FinanceService
financeService
;
/**
* 初始化mq
*/
...
...
@@ -216,4 +219,13 @@ public class CompanyConsumer {
payProducer
.
sendSound
(
soundReqVo
);
}
/**
* 同步公司信息
*
* @param companyResVo
*/
public
void
synCompany
(
CompanyResVo
companyResVo
)
{
distributionProducer
.
synCompany
(
companyResVo
);
}
}
src/main/java/com/pangding/web/authority/service/CompanyService.java
View file @
0b3b7f94
...
...
@@ -209,4 +209,11 @@ public interface CompanyService{
com
.
pangding
.
web
.
vo
.
system
.
res
.
company
.
CompanyResVo
findCompanyById
(
com
.
pangding
.
web
.
vo
.
system
.
req
.
company
.
CompanyReqVo
req
);
/**
* 同步公司信息
* @param req
* @return
*/
ResponseResult
synCompanyInfo
(
CompanyReqVo
req
);
}
src/main/java/com/pangding/web/authority/service/impl/CompanyServiceImpl.java
View file @
0b3b7f94
...
...
@@ -150,7 +150,7 @@ public class CompanyServiceImpl implements CompanyService {
public
void
updateCompany
(
CompanyUpdateReqVo
reqVo
)
{
CompanyResVo
companyResVo
=
companyDao
.
load
(
reqVo
.
getId
(),
CompanyResVo
.
class
);
if
(
StringHelper
.
isEmpty
(
companyResVo
))
{
if
(
StringHelper
.
isEmpty
(
companyResVo
))
{
throw
new
CodeException
(
"暂无公司信息"
);
}
CompanyVo
companyVo
=
new
CompanyVo
();
...
...
@@ -160,7 +160,7 @@ public class CompanyServiceImpl implements CompanyService {
CompanyExtendVo
companyExtendVo
=
new
CompanyExtendVo
();
ObjectHelper
.
writeWithFromClass
(
companyExtendVo
,
companyResVo
);
ObjectHelper
.
writeWithFromClass
(
companyExtendVo
,
reqVo
);
if
(
StringHelper
.
isEmpty
(
companyExtendVo
.
getQrCode
()))
{
if
(
StringHelper
.
isEmpty
(
companyExtendVo
.
getQrCode
()))
{
companyExtendVo
.
setQrCode
(
DateHelper
.
getNow
()
.
replace
(
"-"
,
""
)
.
replace
(
":"
,
""
)
...
...
@@ -168,8 +168,6 @@ public class CompanyServiceImpl implements CompanyService {
}
}
...
...
@@ -1086,16 +1084,16 @@ public class CompanyServiceImpl implements CompanyService {
// 更新或新增公司规则表
List
<
CompanyRuleVo
>
companyRuleVoList
=
reqVo
.
getCompanyRuleVoList
();
for
(
int
i
=
0
;
i
<
companyRuleVoList
.
size
();
i
++)
{
for
(
int
i
=
0
;
i
<
companyRuleVoList
.
size
();
i
++)
{
CompanyRuleVo
companyRuleVo
=
companyRuleVoList
.
get
(
i
);
CompanyRuleVo
sqlCompanyRuleVo
=
companyRuleDao
.
load
(
companyRuleVo
.
getCompanyRuleId
(),
companyRuleVo
.
getClass
());
if
(
StringHelper
.
isEmpty
(
sqlCompanyRuleVo
))
{
if
(
StringHelper
.
isEmpty
(
sqlCompanyRuleVo
))
{
sqlCompanyRuleVo
=
new
CompanyRuleVo
();
ObjectHelper
.
writeWithFromClass
(
sqlCompanyRuleVo
,
companyRuleVo
);
sqlCompanyRuleVo
.
setCompanyId
(
companyVo
.
getId
());
sqlCompanyRuleVo
.
setCompanyRuleId
(
StringHelper
.
getNewID
());
companyRuleDao
.
create
(
sqlCompanyRuleVo
);
}
else
{
}
else
{
ObjectHelper
.
writeWithFromClass
(
sqlCompanyRuleVo
,
companyRuleVo
);
sqlCompanyRuleVo
.
setUpdateDate
(
DateHelper
.
getNow
());
companyRuleDao
.
update
(
sqlCompanyRuleVo
);
...
...
@@ -1293,4 +1291,14 @@ public class CompanyServiceImpl implements CompanyService {
return
companyResVo
;
}
public
ResponseResult
synCompanyInfo
(
CompanyReqVo
req
)
{
req
.
setStatus
(
6
);
List
<
CompanyResVo
>
companyResVoList
=
companyDao
.
loadList
(
req
,
CompanyResVo
.
class
);
for
(
int
i
=
0
;
i
<
companyResVoList
.
size
();
i
++)
{
CompanyResVo
companyResVo
=
companyResVoList
.
get
(
i
);
companyConsumer
.
synCompany
(
companyResVo
);
}
return
ResponseResult
.
result
(
"同步完成"
);
}
}
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