Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
Overview
Overview
Details
Activity
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
haoban3.0
haoban-manage3.0
Commits
5ad6b319
Commit
5ad6b319
authored
May 14, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
建联转化增加潜客分
parent
cff5f4dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
9 deletions
+31
-9
TabContactOrder.java
...haoban/manage/service/entity/contact/TabContactOrder.java
+12
-0
ContactOrderServiceImpl.java
...service/service/contact/impl/ContactOrderServiceImpl.java
+14
-6
TabContactOrderMapper.xml
...c/main/resources/mapper/contact/TabContactOrderMapper.xml
+5
-3
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/contact/TabContactOrder.java
View file @
5ad6b319
...
@@ -84,6 +84,10 @@ public class TabContactOrder implements Serializable {
...
@@ -84,6 +84,10 @@ public class TabContactOrder implements Serializable {
*/
*/
private
Date
potentialTime
;
private
Date
potentialTime
;
/**
/**
* 潜客分值
*/
private
Integer
potentialScore
;
/**
* 是否删除
* 是否删除
*/
*/
private
Integer
deleteFlag
;
private
Integer
deleteFlag
;
...
@@ -244,6 +248,14 @@ public class TabContactOrder implements Serializable {
...
@@ -244,6 +248,14 @@ public class TabContactOrder implements Serializable {
this
.
potentialTime
=
potentialTime
;
this
.
potentialTime
=
potentialTime
;
}
}
public
Integer
getPotentialScore
()
{
return
potentialScore
;
}
public
void
setPotentialScore
(
Integer
potentialScore
)
{
this
.
potentialScore
=
potentialScore
;
}
public
Integer
getDeleteFlag
()
{
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
return
deleteFlag
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/impl/ContactOrderServiceImpl.java
View file @
5ad6b319
...
@@ -60,16 +60,19 @@ public class ContactOrderServiceImpl implements ContactOrderService {
...
@@ -60,16 +60,19 @@ public class ContactOrderServiceImpl implements ContactOrderService {
if
(
platformChannelEnum
==
null
)
{
if
(
platformChannelEnum
==
null
)
{
return
false
;
return
false
;
}
}
TabContactOrder
oldContactOrder
=
contactOrderMapper
.
queryByOrderId
(
orderInfoResp
.
getOrderId
());
String
orderId
=
orderInfoResp
.
getOrderId
();
TabContactOrder
oldContactOrder
=
contactOrderMapper
.
queryByOrderId
(
orderId
);
if
(
oldContactOrder
!=
null
)
{
if
(
oldContactOrder
!=
null
)
{
logger
.
info
(
"订单已处理,订单id:{}"
,
orderI
nfoResp
.
getOrderId
()
);
logger
.
info
(
"订单已处理,订单id:{}"
,
orderI
d
);
return
false
;
return
false
;
}
}
if
(
orderInfoResp
.
getOrderStatus
()
==
null
||
orderInfoResp
.
getOrderStatus
()
!=
1
)
{
if
(
orderInfoResp
.
getOrderStatus
()
==
null
||
orderInfoResp
.
getOrderStatus
()
!=
1
)
{
logger
.
info
(
"订单不是销售单"
);
logger
.
info
(
"订单不是销售单"
);
return
false
;
return
false
;
}
}
logger
.
info
(
"建联处理订单:{}"
,
orderInfoResp
.
getOrderId
());
String
enterpriseId
=
orderInfoResp
.
getEnterpriseId
();
String
memberId
=
orderInfoResp
.
getMemberId
();
logger
.
info
(
"建联处理订单:{},memberId:{}"
,
orderId
,
memberId
);
Date
receiptsDate
=
orderInfoResp
.
getReceiptsDate
();
Date
receiptsDate
=
orderInfoResp
.
getReceiptsDate
();
Date
contactBeginTime
=
null
;
Date
contactBeginTime
=
null
;
String
channelCode
=
platformChannelEnum
.
getChannelCode
();
String
channelCode
=
platformChannelEnum
.
getChannelCode
();
...
@@ -83,14 +86,14 @@ public class ContactOrderServiceImpl implements ContactOrderService {
...
@@ -83,14 +86,14 @@ public class ContactOrderServiceImpl implements ContactOrderService {
contactBeginTime
=
DateUtil
.
offsetDay
(
receiptsDate
,
-
1
);
contactBeginTime
=
DateUtil
.
offsetDay
(
receiptsDate
,
-
1
);
}
}
TabContactLog
lastContactLog
=
contactLogService
.
getLastByTime
(
orderInfoResp
.
getMemberId
()
,
contactBeginTime
,
receiptsDate
);
TabContactLog
lastContactLog
=
contactLogService
.
getLastByTime
(
memberId
,
contactBeginTime
,
receiptsDate
);
if
(
lastContactLog
==
null
)
{
if
(
lastContactLog
==
null
)
{
return
false
;
return
false
;
}
}
logger
.
info
(
"建联转化订单建联信息:{}"
,
JSON
.
toJSONString
(
lastContactLog
));
logger
.
info
(
"建联转化订单建联信息:{}"
,
JSON
.
toJSONString
(
lastContactLog
));
TabContactOrder
contactOrder
=
new
TabContactOrder
();
TabContactOrder
contactOrder
=
new
TabContactOrder
();
contactOrder
.
setOrderId
(
orderI
nfoResp
.
getOrderId
()
);
contactOrder
.
setOrderId
(
orderI
d
);
contactOrder
.
setMemberId
(
orderInfoResp
.
getMemberId
()
);
contactOrder
.
setMemberId
(
memberId
);
contactOrder
.
setOrderNumber
(
orderInfoResp
.
getOrderNo
());
contactOrder
.
setOrderNumber
(
orderInfoResp
.
getOrderNo
());
Double
paidAmount
=
orderInfoResp
.
getPayAmount
();
Double
paidAmount
=
orderInfoResp
.
getPayAmount
();
if
(
Objects
.
equals
(
PlatformChannelEnum
.
C_WECHAT_MINI
.
getChannelCode
(),
channelCode
))
{
if
(
Objects
.
equals
(
PlatformChannelEnum
.
C_WECHAT_MINI
.
getChannelCode
(),
channelCode
))
{
...
@@ -115,6 +118,11 @@ public class ContactOrderServiceImpl implements ContactOrderService {
...
@@ -115,6 +118,11 @@ public class ContactOrderServiceImpl implements ContactOrderService {
contactOrder
.
setContactTime
(
lastContactLog
.
getContactTime
());
contactOrder
.
setContactTime
(
lastContactLog
.
getContactTime
());
contactOrder
.
setPotentialTime
(
lastContactLog
.
getPotentialTime
());
contactOrder
.
setPotentialTime
(
lastContactLog
.
getPotentialTime
());
contactOrder
.
setEnterpriseId
(
lastContactLog
.
getEnterpriseId
());
contactOrder
.
setEnterpriseId
(
lastContactLog
.
getEnterpriseId
());
JSONObject
jsonObject
=
esMemberInfoService
.
queryDataSingle
(
enterpriseId
,
memberId
,
"potentialScore"
);
if
(
jsonObject
!=
null
&&
jsonObject
.
getInteger
(
"potentialScore"
)
!=
null
)
{
contactOrder
.
setPotentialScore
(
jsonObject
.
getInteger
(
"potentialScore"
));
}
contactOrderMapper
.
insert
(
contactOrder
);
contactOrderMapper
.
insert
(
contactOrder
);
return
true
;
return
true
;
}
}
...
...
haoban-manage3-service/src/main/resources/mapper/contact/TabContactOrderMapper.xml
View file @
5ad6b319
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
<result
column=
"contact_log_id"
property=
"contactLogId"
/>
<result
column=
"contact_log_id"
property=
"contactLogId"
/>
<result
column=
"contact_time"
property=
"contactTime"
/>
<result
column=
"contact_time"
property=
"contactTime"
/>
<result
column=
"potential_time"
property=
"potentialTime"
/>
<result
column=
"potential_time"
property=
"potentialTime"
/>
<result
column=
"potential_score"
property=
"potentialScore"
/>
<result
column=
"delete_flag"
property=
"deleteFlag"
/>
<result
column=
"delete_flag"
property=
"deleteFlag"
/>
<result
column=
"enterprise_id"
property=
"enterpriseId"
/>
<result
column=
"enterprise_id"
property=
"enterpriseId"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
...
@@ -30,7 +31,7 @@
...
@@ -30,7 +31,7 @@
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
id, order_id, member_id, order_number, paid_amount, product_count, goods_info, pay_time, receipts_date, channel_code, channel_type, clerk_id, clerk_code,clerk_name, store_id, contact_log_id, contact_time, potential_time, delete_flag, enterprise_id, create_time, update_time
id, order_id, member_id, order_number, paid_amount, product_count, goods_info, pay_time, receipts_date, channel_code, channel_type, clerk_id, clerk_code,clerk_name, store_id, contact_log_id, contact_time, potential_time,
potential_score,
delete_flag, enterprise_id, create_time, update_time
</sql>
</sql>
<select
id=
"queryById"
resultMap=
"BaseResultMap"
>
<select
id=
"queryById"
resultMap=
"BaseResultMap"
>
...
@@ -108,8 +109,8 @@
...
@@ -108,8 +109,8 @@
</select>
</select>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
<insert
id=
"insert"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
INSERT INTO tab_contact_order (order_id, member_id, order_number, paid_amount, product_count, goods_info, pay_time, receipts_date, channel_code, channel_type, clerk_id, clerk_code,clerk_name, store_id, contact_log_id, contact_time, potential_time, enterprise_id)
INSERT INTO tab_contact_order (order_id, member_id, order_number, paid_amount, product_count, goods_info, pay_time, receipts_date, channel_code, channel_type, clerk_id, clerk_code,clerk_name, store_id, contact_log_id, contact_time, potential_time,
potential_score,
enterprise_id)
VALUES (#{orderId}, #{memberId}, #{orderNumber}, #{paidAmount}, #{productCount}, #{goodsInfo}, #{payTime}, #{receiptsDate}, #{channelCode}, #{channelType}, #{clerkId}, #{clerkCode},#{clerkName}, #{storeId}, #{contactLogId}, #{contactTime}, #{potentialTime}, #{enterpriseId})
VALUES (#{orderId}, #{memberId}, #{orderNumber}, #{paidAmount}, #{productCount}, #{goodsInfo}, #{payTime}, #{receiptsDate}, #{channelCode}, #{channelType}, #{clerkId}, #{clerkCode},#{clerkName}, #{storeId}, #{contactLogId}, #{contactTime}, #{potentialTime}, #{
potentialScore}, #{
enterpriseId})
</insert>
</insert>
<update
id=
"update"
>
<update
id=
"update"
>
...
@@ -131,6 +132,7 @@
...
@@ -131,6 +132,7 @@
<if
test=
"contactLogId != null"
>
contact_log_id = #{contactLogId},
</if>
<if
test=
"contactLogId != null"
>
contact_log_id = #{contactLogId},
</if>
<if
test=
"contactTime != null"
>
contact_time = #{contactTime},
</if>
<if
test=
"contactTime != null"
>
contact_time = #{contactTime},
</if>
<if
test=
"potentialTime != null"
>
potential_time = #{potentialTime},
</if>
<if
test=
"potentialTime != null"
>
potential_time = #{potentialTime},
</if>
<if
test=
"potentialScore != null"
>
potential_score = #{potentialScore},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId},
</if>
update_time = #{updateTime}
update_time = #{updateTime}
...
...
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