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
94413733
Commit
94413733
authored
Jul 12, 2019
by
zjy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user/role/tright 7.12
parent
69d970e2
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
169 additions
and
77 deletions
+169
-77
WechatUserDaoImpl.java
...om/pangding/web/authority/dao/impl/WechatUserDaoImpl.java
+2
-2
DataServiceImpl.java
.../pangding/web/authority/service/impl/DataServiceImpl.java
+78
-36
IndexServiceImpl.java
...pangding/web/authority/service/impl/IndexServiceImpl.java
+2
-2
PangdingPartnerServiceImpl.java
...eb/authority/service/impl/PangdingPartnerServiceImpl.java
+3
-3
WechatUserVo.java
...main/java/com/pangding/web/authority/vo/WechatUserVo.java
+79
-29
WechatUserGetReqVo.java
...m/pangding/web/authority/vo/reqvo/WechatUserGetReqVo.java
+5
-5
No files found.
src/main/java/com/pangding/web/authority/dao/impl/WechatUserDaoImpl.java
View file @
94413733
...
...
@@ -27,14 +27,14 @@ public class WechatUserDaoImpl extends BaseDaoImpl implements WechatUserDao {
register
(
WechatUserVo
.
class
);
table
.
add
(
GET_USER_NUM
,
"select count(id) as num from pd_wechat_user where 1=1 "
)
.
add
(
"
companyId"
,
"and
company_id = ? "
)
.
add
(
"
sourceCompanyId"
,
"and source_
company_id = ? "
)
.
add
(
"start"
,
"and subscribe_date >= ? "
)
.
add
(
"end"
,
"and subscribe_date < ? "
);
table
.
add
(
GET_USER_LIST
,
"select * from pd_wechat_user where 1=1 "
)
.
add
(
"start"
,
"and subscribe_date >= ? "
)
.
add
(
"end"
,
"and subscribe_date < ? "
)
.
add
(
"
companyId"
,
"and
company_id = ? order by subscribe_date desc"
);
.
add
(
"
sourceCompanyId"
,
"and source_
company_id = ? order by subscribe_date desc"
);
}
@Override
...
...
src/main/java/com/pangding/web/authority/service/impl/DataServiceImpl.java
View file @
94413733
...
...
@@ -198,26 +198,39 @@ public class DataServiceImpl implements DataService {
TyyTouristVo
tyyTouristVo
=
reqVo
.
getTyyTouristVo
();
OrderRelVo
orderRelVo
=
reqVo
.
getOrderRelVo
();
/*OrderVo表*/
if
(
null
!=
tyyOrdersVo
){
saveOrderVoStepThree
(
tyyOrdersVo
,
tyyOrderbackVoList
,
orderRelVo
);
}
/*OrderExtendVo表*/
if
(
null
!=
tyyOrdersVo
){
saveOrderExtendVoStepThree
(
tyyOrdersVo
);
}
/*OrderRefundVo表*/
if
(
null
!=
tyyOrderbackVoList
){
saveOrderRefundVoStepThree
(
tyyOrderbackVoList
);
}
/*OrderStatusVo表*/
if
(
null
!=
tyyOrdersVo
){
saveOrderStatusVoStepThree
(
tyyOrdersVo
);
}
/*OrderTicketDetailVo表*/
if
(
null
!=
tyyOrderdetailsVo
&&
null
!=
tyyOrdersVo
){
saveOrderTicketDetailVoStepThree
(
tyyOrderdetailsVo
,
tyyOrdersVo
);
}
/*OrderTouristVo表*/
if
(
null
!=
tyyTouristVo
){
saveOrderTouristVoStepThree
(
tyyTouristVo
);
}
/*DiscountDetailVo表*/
if
(
null
!=
tyyOrdersVo
){
saveDiscountDetailVoStepThree
(
tyyOrdersVo
);
}
}
private
void
saveDiscountDetailVoStepThree
(
TyyOrdersVo
tyyOrdersVo
)
{
...
...
@@ -388,11 +401,13 @@ public class DataServiceImpl implements DataService {
double
pdRefundMoney
=
0
d
;
double
refundMoney
=
0
d
;
for
(
TyyOrderbackVo
tyyOrderbackVo:
tyyOrderbackVoList
)
{
if
(
null
!=
tyyOrderbackVo
){
refundNum
+=
tyyOrderbackVo
.
getRefundnum
();
refundFee
+=
tyyOrderbackVo
.
getRefundFee
();
pdRefundMoney
+=
tyyOrderbackVo
.
getReceiveMoney
();
refundMoney
+=
tyyOrderbackVo
.
getRefundMoney
();
}
}
OrderVo
orderVo
=
new
OrderVo
();
if
(
null
!=
orderRelVo
){
orderVo
.
setPid
(
orderRelVo
.
getGroup_ordersn
());
...
...
@@ -411,7 +426,9 @@ public class DataServiceImpl implements DataService {
orderVo
.
setTicket_phone
(
tyyOrdersVo
.
getUsertel
());
orderVo
.
setCost_price
(
tyyOrdersVo
.
getPurchaseprice
());
orderVo
.
setCost_total_money
(
tyyOrdersVo
.
getPurchaseprice
()*
tyyOrdersVo
.
getBuynum
());
if
(
null
!=
tyyOrdersVo
.
getDiscountprice
()
&&
null
!=
orderVo
.
getCost_total_money
()){
orderVo
.
setOrder_money
(
orderVo
.
getCost_total_money
()-
tyyOrdersVo
.
getDiscountprice
());
}
orderVo
.
setRefund_fee
(
refundFee
);
orderVo
.
setPd_refund_money
(
pdRefundMoney
);
orderVo
.
setDiscount_money
(
tyyOrdersVo
.
getDiscountprice
());
...
...
@@ -444,26 +461,39 @@ public class DataServiceImpl implements DataService {
TyyTouristVo
tyyTouristVo
=
reqVo
.
getTyyTouristVo
();
/*pd_order*/
if
(
null
!=
tyyOrderVo
||
null
!=
tyyOrderMixVo
){
saveOrderVoStepOne
(
tyyOrderVo
,
tyyOrderMixVo
,
tyyOrderbackVoList
);
}
/*pd_order_status*/
if
(
null
!=
tyyOrderVo
||
null
!=
tyyOrderMixVo
){
saveOrderStatusVoStepOne
(
tyyOrderVo
,
tyyOrderMixVo
);
}
/*pd_order_extend*/
if
(
null
!=
tyyOrderVo
||
null
!=
tyyOrderMixVo
){
saveOrderExtendVoStepOne
(
tyyOrderVo
,
tyyOrderMixVo
);
}
/*pd_discount_detail*/
if
(
null
!=
tyyOrderVo
||
null
!=
tyyOrderMixVo
){
saveDiscountDetailVoStepOne
(
tyyOrderVo
,
tyyOrderMixVo
);
}
/*pd_order_ticket_detail*/
if
((
null
!=
tyyOrderVo
||
null
!=
tyyOrderMixVo
)
&&
null
!=
tyyOrderdetailsVo
){
saveOrderTicketDetailVoStepOne
(
tyyOrderVo
,
tyyOrderMixVo
,
tyyOrderdetailsVo
);
}
/*pd_order_refund*/
if
(
null
!=
tyyOrderbackVoList
){
saveOrderRefundVoStepOne
(
tyyOrderbackVoList
);
}
/*OrderTouristVo表*/
if
(
null
!=
tyyTouristVo
){
saveOrderTouristVoStepOne
(
tyyTouristVo
);
}
}
private
void
saveOrderTouristVoStepOne
(
TyyTouristVo
tyyTouristVo
)
{
...
...
@@ -523,11 +553,13 @@ public class DataServiceImpl implements DataService {
}
else
{
orderTicketDetailVo
.
setTicket_status
(
Integer
.
parseInt
(
tyyOrderdetailsVo
.
getCodestatus
()));
}
if
(
null
!=
tyyOrderdetailsVo
.
getCodestatus
()){
if
(
"1"
.
equals
(
tyyOrderdetailsVo
.
getCodestatus
())){
orderTicketDetailVo
.
setTime
(
tyyOrderdetailsVo
.
getChecktime
());
}
else
if
(
"2"
.
equals
(
tyyOrderdetailsVo
.
getCodestatus
())){
orderTicketDetailVo
.
setTime
(
tyyOrderdetailsVo
.
getRefundtime
());
}
}
orderTicketDetailVo
.
setTicket_code
(
tyyOrderdetailsVo
.
getLinkid
());
orderTicketDetailVo
.
setCode_url
(
tyyOrderdetailsVo
.
getPicUrl
());
/*若存在则修改,不存在则添加*/
...
...
@@ -628,11 +660,13 @@ public class DataServiceImpl implements DataService {
orderStatusVo
.
setPay_type
(
tyyOrderVo
.
getPay_type
());
orderStatusVo
.
setPay_third_id
(
tyyOrderVo
.
getPay_type_id
());
orderStatusVo
.
setPayment_time
(
tyyOrderVo
.
getPay_date
());
if
(
null
!=
tyyOrderVo
.
getPay_status
()){
if
(
tyyOrderVo
.
getPay_status
()
==
0
){
orderStatusVo
.
setPayment_status
(
0
);
}
else
{
orderStatusVo
.
setPayment_status
(
1
);
}
}
orderStatusVo
.
setPayment_id
(
tyyOrderVo
.
getTongl_third_ordersn
());
orderStatusVo
.
setPay_tonglian_id
(
tyyOrderVo
.
getTongl_ordersn
());
}
else
if
(
null
!=
tyyOrderMixVo
){
...
...
@@ -654,11 +688,13 @@ public class DataServiceImpl implements DataService {
orderStatusVo
.
setOrder_status
(
Integer
.
parseInt
(
tyyOrderMixVo
.
getOrder_status
()));
}
orderStatusVo
.
setThird_order_id
(
tyyOrderMixVo
.
getPiaostorderid
());
if
(
null
!=
tyyOrderMixVo
.
getEmancipated
()){
if
(
"N"
.
equals
(
tyyOrderMixVo
.
getEmancipated
())){
orderStatusVo
.
setIs_summarize
(
0
);
}
else
{
orderStatusVo
.
setIs_summarize
(
1
);
}
}
orderStatusVo
.
setSummarize_time
(
tyyOrderMixVo
.
getEmancipated_date
());
if
(
null
==
tyyOrderMixVo
.
getProfit_checked
()){
orderStatusVo
.
setDivide_status
(
0
);
...
...
@@ -705,7 +741,9 @@ public class DataServiceImpl implements DataService {
orderVo
.
setPd_order_money
(
tyyOrderVo
.
getReal_price
());
orderVo
.
setCost_price
(
tyyOrderVo
.
getSettlement_price
());
orderVo
.
setCost_total_money
(
tyyOrderVo
.
getCost_price
());
if
(
null
!=
orderVo
.
getCost_total_money
()
&&
null
!=
tyyOrderVo
.
getDiscount_price
()){
orderVo
.
setOrder_money
(
orderVo
.
getCost_total_money
()-
tyyOrderVo
.
getDiscount_price
());
}
orderVo
.
setOrder_fee
(
tyyOrderVo
.
getOrder_poundage_price
());
orderVo
.
setRefund_num
(
tyyOrderVo
.
getReturn_num
());
orderVo
.
setRefund_money
(
tyyOrderVo
.
getReturn_money
());
...
...
@@ -725,7 +763,9 @@ public class DataServiceImpl implements DataService {
orderVo
.
setOrder_time
(
tyyOrderMixVo
.
getOrdertime
());
orderVo
.
setCost_price
(
tyyOrderMixVo
.
getPurchaseprice
());
orderVo
.
setCost_total_money
(
orderVo
.
getCost_price
()*
orderVo
.
getOrder_num
());
if
(
null
!=
orderVo
.
getCost_total_money
()
&&
null
!=
tyyOrderMixVo
.
getDiscountprice
()){
orderVo
.
setOrder_money
(
orderVo
.
getCost_total_money
()-
tyyOrderMixVo
.
getDiscountprice
());
}
if
(
null
==
tyyOrderMixVo
.
getSub_order_type
()){
orderVo
.
setSub_order_type
(
0
);
}
else
{
...
...
@@ -744,8 +784,10 @@ public class DataServiceImpl implements DataService {
}
double
refundFee
=
0
d
;
for
(
TyyOrderbackVo
tyyOrderbackVo:
tyyOrderbackVoList
)
{
if
(
null
!=
tyyOrderbackVo
){
refundFee
+=
tyyOrderbackVo
.
getRefundFee
();
}
}
orderVo
.
setRefund_fee
(
refundFee
);
/*若存在则修改,不存在则添加*/
OrderGetReqVo
orderGetReqVo
=
new
OrderGetReqVo
();
...
...
src/main/java/com/pangding/web/authority/service/impl/IndexServiceImpl.java
View file @
94413733
...
...
@@ -65,7 +65,7 @@ public class IndexServiceImpl implements IndexService {
@Override
public
Integer
getUserPrecipitation
(
UserPrecipitationReqVo
reqVo
)
{
WechatUserGetReqVo
getReqVo
=
new
WechatUserGetReqVo
();
getReqVo
.
setCompanyId
(
reqVo
.
getId
());
getReqVo
.
set
Source
CompanyId
(
reqVo
.
getId
());
List
<
WechatUserVo
>
wechatUserVoList
=
wechatUserDaoImpl
.
loadList
(
getReqVo
,
WechatUserVo
.
class
);
if
(
null
==
wechatUserVoList
||
wechatUserVoList
.
isEmpty
()){
return
0
;
...
...
@@ -119,7 +119,7 @@ public class IndexServiceImpl implements IndexService {
,
TimeConstant
.
DECEMBER_BEGIN
,
TimeConstant
.
YEAR_END
};
WechatUserGetReqVo
getReqVo
=
new
WechatUserGetReqVo
();
getReqVo
.
setCompanyId
(
reqVo
.
getId
());
getReqVo
.
set
Source
CompanyId
(
reqVo
.
getId
());
for
(
int
i
=
0
;
i
<
monthList
.
length
-
1
;
i
++)
{
getReqVo
.
setStart
(
monthList
[
i
]);
getReqVo
.
setEnd
(
monthList
[
i
+
1
]);
...
...
src/main/java/com/pangding/web/authority/service/impl/PangdingPartnerServiceImpl.java
View file @
94413733
...
...
@@ -196,7 +196,7 @@ public class PangdingPartnerServiceImpl implements PangdingPartnerService {
resVo
.
setCompanyId
(
reqVo
.
getCompanyId
());
/*今日沉淀量*/
WechatUserGetReqVo
todayGetReqVo
=
new
WechatUserGetReqVo
();
todayGetReqVo
.
setCompanyId
(
reqVo
.
getCompanyId
());
todayGetReqVo
.
set
Source
CompanyId
(
reqVo
.
getCompanyId
());
todayGetReqVo
.
setStart
(
DateHelper
.
getNow
().
substring
(
0
,
10
)+
" 00:00:00"
);
todayGetReqVo
.
setEnd
(
DateHelper
.
getNow
().
substring
(
0
,
10
)+
" 23:59:59"
);
List
<
Map
>
todayList
=
(
List
<
Map
>)
wechatUserDaoImpl
.
getUserNum
(
todayGetReqVo
);
...
...
@@ -204,13 +204,13 @@ public class PangdingPartnerServiceImpl implements PangdingPartnerService {
resVo
.
setTodayPrecipitation
(
today
);
/*总沉淀量*/
WechatUserGetReqVo
totalGetReqVo
=
new
WechatUserGetReqVo
();
totalGetReqVo
.
setCompanyId
(
reqVo
.
getCompanyId
());
totalGetReqVo
.
set
Source
CompanyId
(
reqVo
.
getCompanyId
());
List
<
Map
>
totalList
=
(
List
<
Map
>)
wechatUserDaoImpl
.
getUserNum
(
totalGetReqVo
);
Long
total
=
(
Long
)
totalList
.
get
(
0
).
get
(
"num"
);
resVo
.
setTotalPrecipitation
(
total
);
/*沉淀用户分页列表*/
WechatUserGetReqVo
userListGetReqVo
=
new
WechatUserGetReqVo
();
userListGetReqVo
.
setCompanyId
(
reqVo
.
getCompanyId
());
userListGetReqVo
.
set
Source
CompanyId
(
reqVo
.
getCompanyId
());
PageSizeData
<
WechatUserVo
>
wechatUserVoList
=
wechatUserDaoImpl
.
getUserList
(
reqVo
);
resVo
.
setWechatUserVoList
(
wechatUserVoList
);
return
resVo
;
...
...
src/main/java/com/pangding/web/authority/vo/WechatUserVo.java
View file @
94413733
...
...
@@ -12,32 +12,30 @@ import java.math.BigDecimal;
* @create 2019/5/29 16:25
*/
@TableAnnotation
(
"pd_wechat_user"
)
public
class
WechatUserVo
extends
BaseVo
implements
InitDao
{
public
class
WechatUserVo
extends
BaseVo
{
private
String
id
;
private
String
nickname
;
private
Integer
gender
;
private
String
unionid
;
private
String
openid
;
@TableAnnotation
(
"company_id"
)
private
String
companyId
;
private
String
nickname
;
private
String
integral
;
private
Integer
gender
;
private
BigDecimal
cash
;
private
String
age
;
@TableAnnotation
(
"head_portrait"
)
private
String
headPortrait
;
private
String
address
;
private
String
status
;
private
String
integral
;
private
BigDecimal
cash
;
private
String
age
;
@TableAnnotation
(
"subscribe_status"
)
private
Integer
subscribeStatus
;
@TableAnnotation
(
"subscribe_date"
)
private
String
subcribeDate
;
...
...
@@ -45,6 +43,23 @@ public class WechatUserVo extends BaseVo implements InitDao {
@TableAnnotation
(
"unsubscribe_date"
)
private
String
unSubcribeDate
;
@TableAnnotation
(
"create_date"
)
private
String
createDate
;
@TableAnnotation
(
"source_company_id"
)
private
String
sourceCompanyId
;
@TableAnnotation
(
"from_company_id"
)
private
String
fromCompanyId
;
@TableAnnotation
(
"from_company_pid"
)
private
String
fromCompanyPid
;
private
Integer
level
;
@TableAnnotation
(
"subscribe_scene"
)
private
String
subscribeScene
;
public
String
getId
()
{
return
id
;
}
...
...
@@ -85,14 +100,6 @@ public class WechatUserVo extends BaseVo implements InitDao {
this
.
openid
=
openid
;
}
public
String
getCompanyId
()
{
return
companyId
;
}
public
void
setCompanyId
(
String
companyId
)
{
this
.
companyId
=
companyId
;
}
public
String
getIntegral
()
{
return
integral
;
}
...
...
@@ -125,14 +132,6 @@ public class WechatUserVo extends BaseVo implements InitDao {
this
.
address
=
address
;
}
public
String
getStatus
()
{
return
status
;
}
public
void
setStatus
(
String
status
)
{
this
.
status
=
status
;
}
public
String
getAge
()
{
return
age
;
}
...
...
@@ -157,8 +156,59 @@ public class WechatUserVo extends BaseVo implements InitDao {
this
.
unSubcribeDate
=
unSubcribeDate
;
}
@Override
public
void
init
()
{
public
Integer
getSubscribeStatus
()
{
return
subscribeStatus
;
}
public
void
setSubscribeStatus
(
Integer
subscribeStatus
)
{
this
.
subscribeStatus
=
subscribeStatus
;
}
public
String
getCreateDate
()
{
return
createDate
;
}
public
void
setCreateDate
(
String
createDate
)
{
this
.
createDate
=
createDate
;
}
public
String
getSourceCompanyId
()
{
return
sourceCompanyId
;
}
public
void
setSourceCompanyId
(
String
sourceCompanyId
)
{
this
.
sourceCompanyId
=
sourceCompanyId
;
}
public
String
getFromCompanyId
()
{
return
fromCompanyId
;
}
public
void
setFromCompanyId
(
String
fromCompanyId
)
{
this
.
fromCompanyId
=
fromCompanyId
;
}
public
String
getFromCompanyPid
()
{
return
fromCompanyPid
;
}
public
void
setFromCompanyPid
(
String
fromCompanyPid
)
{
this
.
fromCompanyPid
=
fromCompanyPid
;
}
public
Integer
getLevel
()
{
return
level
;
}
public
void
setLevel
(
Integer
level
)
{
this
.
level
=
level
;
}
public
String
getSubscribeScene
()
{
return
subscribeScene
;
}
public
void
setSubscribeScene
(
String
subscribeScene
)
{
this
.
subscribeScene
=
subscribeScene
;
}
}
src/main/java/com/pangding/web/authority/vo/reqvo/WechatUserGetReqVo.java
View file @
94413733
...
...
@@ -7,7 +7,7 @@ package com.pangding.web.authority.vo.reqvo;
public
class
WechatUserGetReqVo
{
private
String
reqId
;
private
String
c
ompanyId
;
private
String
sourceC
ompanyId
;
private
String
start
;
...
...
@@ -37,11 +37,11 @@ public class WechatUserGetReqVo {
this
.
reqId
=
reqId
;
}
public
String
getCompanyId
()
{
return
c
ompanyId
;
public
String
get
Source
CompanyId
()
{
return
sourceC
ompanyId
;
}
public
void
set
CompanyId
(
String
c
ompanyId
)
{
this
.
companyId
=
c
ompanyId
;
public
void
set
SourceCompanyId
(
String
sourceC
ompanyId
)
{
this
.
sourceCompanyId
=
sourceC
ompanyId
;
}
}
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