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
0872f0ff
Commit
0872f0ff
authored
Apr 05, 2023
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:客户触达明细增加门店id
parent
c56a7264
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
177 additions
and
125 deletions
+177
-125
ClerkShareMaterialLogDTO.java
.../manage/api/dto/content/log/ClerkShareMaterialLogDTO.java
+13
-0
TabHaobanClerkShareLog.java
...manage/service/entity/content/TabHaobanClerkShareLog.java
+9
-90
TabHaobanTriggerCustomerDetail.java
...ervice/entity/content/TabHaobanTriggerCustomerDetail.java
+14
-0
ClerkShareLogBO.java
...aoban/manage/service/pojo/bo/content/ClerkShareLogBO.java
+10
-0
TriggerCustomerDetailBO.java
...nage/service/pojo/bo/content/TriggerCustomerDetailBO.java
+13
-0
MaterialDataAdaptor.java
.../service/service/content/adaptor/MaterialDataAdaptor.java
+6
-3
GroupMessageServiceImpl.java
...service/service/content/impl/GroupMessageServiceImpl.java
+1
-0
InteractRecordMessageListener.java
...ervice/content/message/InteractRecordMessageListener.java
+26
-0
applicationContext-conf.xml
...e3-service/src/main/resources/applicationContext-conf.xml
+2
-0
kafka-setting-data.xml
...manage3-service/src/main/resources/kafka-setting-data.xml
+53
-0
TabHaobanClerkShareLogDao.xml
...in/resources/mapper/content/TabHaobanClerkShareLogDao.xml
+6
-4
TabHaobanTriggerCustomerDetailMapper.xml
...s/mapper/content/TabHaobanTriggerCustomerDetailMapper.xml
+16
-18
MaterialReportServiceTest.java
...age3-service/src/test/java/MaterialReportServiceTest.java
+1
-1
ClerkMaterialShareController.java
.../web/controller/content/ClerkMaterialShareController.java
+1
-0
MaterialDataAdaptor.java
...e/web/controller/content/adaptor/MaterialDataAdaptor.java
+6
-9
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/content/log/ClerkShareMaterialLogDTO.java
View file @
0872f0ff
...
@@ -50,6 +50,11 @@ public class ClerkShareMaterialLogDTO implements Serializable {
...
@@ -50,6 +50,11 @@ public class ClerkShareMaterialLogDTO implements Serializable {
*/
*/
private
Integer
bizType
;
private
Integer
bizType
;
/**
* 门店id
*/
private
String
storeId
;
public
String
getEnterpriseId
()
{
public
String
getEnterpriseId
()
{
return
enterpriseId
;
return
enterpriseId
;
}
}
...
@@ -105,4 +110,12 @@ public class ClerkShareMaterialLogDTO implements Serializable {
...
@@ -105,4 +110,12 @@ public class ClerkShareMaterialLogDTO implements Serializable {
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/content/TabHaobanClerkShareLog.java
View file @
0872f0ff
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
.
content
;
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
.
content
;
import
java.util.Date
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
/**
* 导购分享记录(TabHaobanClerkShareLog)实体类
* 导购分享记录(TabHaobanClerkShareLog)实体类
...
@@ -9,6 +11,7 @@ import java.io.Serializable;
...
@@ -9,6 +11,7 @@ import java.io.Serializable;
* @author makejava
* @author makejava
* @since 2023-03-18 20:54:23
* @since 2023-03-18 20:54:23
*/
*/
@Data
public
class
TabHaobanClerkShareLog
implements
Serializable
{
public
class
TabHaobanClerkShareLog
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
18857713225396709L
;
private
static
final
long
serialVersionUID
=
-
18857713225396709L
;
...
@@ -31,6 +34,11 @@ public class TabHaobanClerkShareLog implements Serializable {
...
@@ -31,6 +34,11 @@ public class TabHaobanClerkShareLog implements Serializable {
* 成员id
* 成员id
*/
*/
private
String
staffId
;
private
String
staffId
;
/**
* 门店id
*/
private
String
storeId
;
/**
/**
* 分享类型 1分享朋友圈; 2 群发给客户; 3 群发到群
* 分享类型 1分享朋友圈; 2 群发给客户; 3 群发到群
*/
*/
...
@@ -55,94 +63,5 @@ public class TabHaobanClerkShareLog implements Serializable {
...
@@ -55,94 +63,5 @@ public class TabHaobanClerkShareLog implements Serializable {
* 更新时间
* 更新时间
*/
*/
private
Date
updateTime
;
private
Date
updateTime
;
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
String
getStaffId
()
{
return
staffId
;
}
public
void
setStaffId
(
String
staffId
)
{
this
.
staffId
=
staffId
;
}
public
Integer
getShareType
()
{
return
shareType
;
}
public
void
setShareType
(
Integer
shareType
)
{
this
.
shareType
=
shareType
;
}
public
String
getBizId
()
{
return
bizId
;
}
public
void
setBizId
(
String
bizId
)
{
this
.
bizId
=
bizId
;
}
public
Integer
getBizType
()
{
return
bizType
;
}
public
void
setBizType
(
Integer
bizType
)
{
this
.
bizType
=
bizType
;
}
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
void
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/content/TabHaobanTriggerCustomerDetail.java
View file @
0872f0ff
...
@@ -39,6 +39,12 @@ public class TabHaobanTriggerCustomerDetail implements Serializable {
...
@@ -39,6 +39,12 @@ public class TabHaobanTriggerCustomerDetail implements Serializable {
* 成员id
* 成员id
*/
*/
private
String
staffId
;
private
String
staffId
;
/**
* 门店id
*/
private
String
storeId
;
/**
/**
* 渠道类型 1朋友圈; 2客户群; 3 对话框; 4 复制文案; 5 下载素材
* 渠道类型 1朋友圈; 2客户群; 3 对话框; 4 复制文案; 5 下载素材
*/
*/
...
@@ -156,5 +162,13 @@ public class TabHaobanTriggerCustomerDetail implements Serializable {
...
@@ -156,5 +162,13 @@ public class TabHaobanTriggerCustomerDetail implements Serializable {
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/ClerkShareLogBO.java
View file @
0872f0ff
...
@@ -54,6 +54,8 @@ public class ClerkShareLogBO {
...
@@ -54,6 +54,8 @@ public class ClerkShareLogBO {
*/
*/
private
Date
createTime
;
private
Date
createTime
;
private
String
storeId
;
public
String
getEnterpriseId
()
{
public
String
getEnterpriseId
()
{
return
enterpriseId
;
return
enterpriseId
;
}
}
...
@@ -125,4 +127,12 @@ public class ClerkShareLogBO {
...
@@ -125,4 +127,12 @@ public class ClerkShareLogBO {
public
void
setId
(
Long
id
)
{
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/content/TriggerCustomerDetailBO.java
View file @
0872f0ff
...
@@ -38,6 +38,11 @@ public class TriggerCustomerDetailBO implements Serializable {
...
@@ -38,6 +38,11 @@ public class TriggerCustomerDetailBO implements Serializable {
* 成员id
* 成员id
*/
*/
private
String
staffId
;
private
String
staffId
;
/**
* 门店id
*/
private
String
storeId
;
/**
/**
* 渠道类型 1朋友圈; 2客户群; 3 对话框; 4 复制文案; 5 下载素材
* 渠道类型 1朋友圈; 2客户群; 3 对话框; 4 复制文案; 5 下载素材
*/
*/
...
@@ -155,5 +160,13 @@ public class TriggerCustomerDetailBO implements Serializable {
...
@@ -155,5 +160,13 @@ public class TriggerCustomerDetailBO implements Serializable {
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/adaptor/MaterialDataAdaptor.java
View file @
0872f0ff
...
@@ -87,15 +87,19 @@ public class MaterialDataAdaptor {
...
@@ -87,15 +87,19 @@ public class MaterialDataAdaptor {
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
clerkId
))
{
if
(
org
.
apache
.
commons
.
lang3
.
StringUtils
.
isNotBlank
(
clerkId
))
{
inlineParams
.
put
(
"clerkId"
,
clerkId
);
inlineParams
.
put
(
"clerkId"
,
clerkId
);
}
}
inlineParams
.
put
(
"enterpr
si
eId"
,
enterpriseId
);
inlineParams
.
put
(
"enterpr
is
eId"
,
enterpriseId
);
inlineParams
.
put
(
"bizDate"
,
bizDate
);
inlineParams
.
put
(
"bizDate"
,
bizDate
);
inlineParams
.
put
(
"storeId"
,
storeId
);
inlineParams
.
put
(
"storeId"
,
storeId
);
inlineParams
.
put
(
"orderByField"
,
"storeId asc"
);
Map
<
String
,
Object
>
result
=
this
.
doHttp
(
JSON
.
toJSONString
(
params
),
apolloKey
);
Map
<
String
,
Object
>
result
=
this
.
doHttp
(
JSON
.
toJSONString
(
params
),
apolloKey
);
if
(
result
.
get
(
"data"
)
==
null
)
{
if
(
result
.
get
(
"data"
)
==
null
)
{
return
null
;
return
null
;
}
}
List
<
JSONObject
>
jsonObjects
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
result
.
get
(
"data"
)),
JSONObject
.
class
);
List
<
JSONObject
>
jsonObjects
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
result
.
get
(
"data"
)),
JSONObject
.
class
);
if
(
CollectionUtils
.
isEmpty
(
jsonObjects
))
{
return
null
;
}
JSONObject
jsonObject
=
jsonObjects
.
get
(
0
);
JSONObject
jsonObject
=
jsonObjects
.
get
(
0
);
int
useMatlNum
=
jsonObject
.
getIntValue
(
"useMatlNum"
);
int
useMatlNum
=
jsonObject
.
getIntValue
(
"useMatlNum"
);
BigDecimal
convSalesAmt
=
Optional
.
ofNullable
(
jsonObject
.
getBigDecimal
(
"convSalesAmt"
)).
orElse
(
BigDecimal
.
ZERO
);
BigDecimal
convSalesAmt
=
Optional
.
ofNullable
(
jsonObject
.
getBigDecimal
(
"convSalesAmt"
)).
orElse
(
BigDecimal
.
ZERO
);
...
@@ -138,15 +142,14 @@ public class MaterialDataAdaptor {
...
@@ -138,15 +142,14 @@ public class MaterialDataAdaptor {
}
}
inlineParams
.
put
(
"enterpriseId"
,
enterpriseId
);
inlineParams
.
put
(
"enterpriseId"
,
enterpriseId
);
inlineParams
.
put
(
"bizDate"
,
bizDate
);
inlineParams
.
put
(
"bizDate"
,
bizDate
);
inlineParams
.
put
(
"orderByField"
,
"clerkId asc"
);
if
(
CollectionUtils
.
isNotEmpty
(
storeIds
))
{
if
(
CollectionUtils
.
isNotEmpty
(
storeIds
))
{
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
}
}
Map
<
String
,
Object
>
result
=
this
.
doHttp
(
JSON
.
toJSONString
(
params
),
apolloKey
);
Map
<
String
,
Object
>
result
=
this
.
doHttp
(
JSON
.
toJSONString
(
params
),
apolloKey
);
if
(
result
.
get
(
"data"
)
==
null
)
{
if
(
result
.
get
(
"data"
)
==
null
)
{
return
null
;
return
null
;
}
}
List
<
JSONObject
>
jsonObjects
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
result
.
get
(
"data"
)),
JSONObject
.
class
);
List
<
JSONObject
>
jsonObjects
=
JSON
.
parseArray
(
JSON
.
toJSONString
(
result
.
get
(
"data"
)),
JSONObject
.
class
);
if
(
CollectionUtils
.
isEmpty
(
jsonObjects
))
{
if
(
CollectionUtils
.
isEmpty
(
jsonObjects
))
{
return
null
;
return
null
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/impl/GroupMessageServiceImpl.java
View file @
0872f0ff
...
@@ -489,6 +489,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
...
@@ -489,6 +489,7 @@ public class GroupMessageServiceImpl implements GroupMessageService {
temp
.
setBizType
(
clerkShareLogBO
.
getBizType
());
temp
.
setBizType
(
clerkShareLogBO
.
getBizType
());
temp
.
setClerkId
(
clerkShareLogBO
.
getClerkId
());
temp
.
setClerkId
(
clerkShareLogBO
.
getClerkId
());
temp
.
setStaffId
(
clerkShareLogBO
.
getStaffId
());
temp
.
setStaffId
(
clerkShareLogBO
.
getStaffId
());
temp
.
setStoreId
(
clerkShareLogBO
.
getStoreId
());
temp
.
setChannelType
(
clerkShareLogBO
.
getShareType
());
temp
.
setChannelType
(
clerkShareLogBO
.
getShareType
());
temp
.
setCustomerId
(
externalUserId
);
temp
.
setCustomerId
(
externalUserId
);
temp
.
setCreateTime
(
new
Date
());
temp
.
setCreateTime
(
new
Date
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/content/message/InteractRecordMessageListener.java
0 → 100644
View file @
0872f0ff
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
content
.
message
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.kafka.clients.consumer.ConsumerRecord
;
import
org.springframework.kafka.listener.MessageListener
;
import
org.springframework.stereotype.Component
;
/**
* @Author MUSI
* @Date 2023/4/5 9:49 PM
* @Description
* @Version
**/
@Slf4j
public
class
InteractRecordMessageListener
implements
MessageListener
<
String
,
String
>
{
/**
* Invoked with data from kafka.
*
* @param data the data to be processed.
*/
@Override
public
void
onMessage
(
ConsumerRecord
<
String
,
String
>
data
)
{
}
}
haoban-manage3-service/src/main/resources/applicationContext-conf.xml
View file @
0872f0ff
...
@@ -11,4 +11,5 @@
...
@@ -11,4 +11,5 @@
<import
resource=
"classpath:jdbc-haoban-manage-service.xml"
/>
<import
resource=
"classpath:jdbc-haoban-manage-service.xml"
/>
<!-- <import resource="classpath*:jdbc-haoban-manage-service-sharding.xml" />-->
<!-- <import resource="classpath*:jdbc-haoban-manage-service-sharding.xml" />-->
<import
resource=
"classpath*:log-record-init.xml"
/>
<import
resource=
"classpath*:log-record-init.xml"
/>
<import
resource=
"classpath*:kafka-setting-data.xml"
/>
</beans>
</beans>
\ No newline at end of file
haoban-manage3-service/src/main/resources/kafka-setting-data.xml
0 → 100644
View file @
0872f0ff
<?xml version="1.0" encoding="UTF-8"?>
<beans
xmlns=
"http://www.springframework.org/schema/beans"
xmlns:xsi=
"http://www.w3.org/2001/XMLSchema-instance"
xmlns:apollo=
"http://www.ctrip.com/schema/apollo"
xsi:schemaLocation=
"http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.ctrip.com/schema/apollo
http://www.ctrip.com/schema/apollo.xsd"
>
<apollo:config/>
<bean
id=
"consumerProperties-data"
class=
"java.util.HashMap"
>
<constructor-arg>
<map>
<entry
key=
"bootstrap.servers"
value=
"${kafka.service}"
/>
<entry
key=
"group.id"
value=
"haoban-3-sync"
/>
<entry
key=
"key.deserializer"
value=
"org.apache.kafka.common.serialization.StringDeserializer"
/>
<entry
key=
"value.deserializer"
value=
"org.apache.kafka.common.serialization.StringDeserializer"
/>
</map>
</constructor-arg>
</bean>
<!-- 2.创建consumerFactory bean -->
<bean
id=
"consumerFactoryData"
class=
"org.springframework.kafka.core.DefaultKafkaConsumerFactory"
>
<constructor-arg>
<ref
bean=
"consumerProperties-data"
/>
</constructor-arg>
</bean>
<!-- 3.定义消费实现类 -->
<bean
id=
"interactRecordMessageListener"
class=
"com.gic.haoban.manage.service.service.content.message.InteractRecordMessageListener"
/>
<!-- 4.消费者容器配置信息 -->
<bean
id=
"containerPropertiesData"
class=
"org.springframework.kafka.listener.config.ContainerProperties"
>
<!-- topic -->
<constructor-arg
name=
"topics"
>
<list>
<!-- <value>${interact_record_topic}</value>-->
<value>
cms_mbr_bury_point
</value>
</list>
</constructor-arg>
<property
name=
"messageListener"
ref=
"interactRecordMessageListener"
/>
</bean>
<!-- 5.消费者并发消息监听容器,执行doStart()方法 -->
<bean
id=
"messageListenerContainerData"
class=
"org.springframework.kafka.listener.ConcurrentMessageListenerContainer"
init-method=
"doStart"
>
<constructor-arg
ref=
"consumerFactoryData"
/>
<constructor-arg
ref=
"containerPropertiesData"
/>
<property
name=
"concurrency"
value=
"3"
/>
</bean>
</beans>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/content/TabHaobanClerkShareLogDao.xml
View file @
0872f0ff
...
@@ -9,6 +9,7 @@
...
@@ -9,6 +9,7 @@
<result
property=
"wxEnterpriseId"
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"wxEnterpriseId"
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"clerkId"
column=
"clerk_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"clerkId"
column=
"clerk_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"staffId"
column=
"staff_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"staffId"
column=
"staff_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"storeId"
column=
"store_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"shareType"
column=
"share_type"
jdbcType=
"INTEGER"
/>
<result
property=
"shareType"
column=
"share_type"
jdbcType=
"INTEGER"
/>
<result
property=
"bizId"
column=
"biz_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"bizId"
column=
"biz_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"bizType"
column=
"biz_type"
jdbcType=
"INTEGER"
/>
<result
property=
"bizType"
column=
"biz_type"
jdbcType=
"INTEGER"
/>
...
@@ -19,7 +20,7 @@
...
@@ -19,7 +20,7 @@
<sql
id=
"baseSql"
>
<sql
id=
"baseSql"
>
id
id
, enterprise_id, wx_enterprise_id, clerk_id, staff_id, share_type, biz_id, biz_type, delete_flag, create_time, update_time
, enterprise_id, wx_enterprise_id, clerk_id, staff_id, s
tore_id, s
hare_type, biz_id, biz_type, delete_flag, create_time, update_time
</sql>
</sql>
<!--查询单个-->
<!--查询单个-->
<select
id=
"queryById"
resultMap=
"TabHaobanClerkShareLogMap"
>
<select
id=
"queryById"
resultMap=
"TabHaobanClerkShareLogMap"
>
...
@@ -28,6 +29,7 @@
...
@@ -28,6 +29,7 @@
wx_enterprise_id,
wx_enterprise_id,
clerk_id,
clerk_id,
staff_id,
staff_id,
store_id,
share_type,
share_type,
biz_id,
biz_id,
biz_type,
biz_type,
...
@@ -41,7 +43,7 @@
...
@@ -41,7 +43,7 @@
<!--查询指定行数据-->
<!--查询指定行数据-->
<select
id=
"queryWithCondition"
resultMap=
"TabHaobanClerkShareLogMap"
>
<select
id=
"queryWithCondition"
resultMap=
"TabHaobanClerkShareLogMap"
>
select
select
id, enterprise_id, wx_enterprise_id, clerk_id, staff_id, share_type, biz_id, biz_type, delete_flag, create_time,
id, enterprise_id, wx_enterprise_id, clerk_id, staff_id, s
tore_id, s
hare_type, biz_id, biz_type, delete_flag, create_time,
update_time
update_time
from tab_haoban_clerk_share_log
from tab_haoban_clerk_share_log
<where>
<where>
...
@@ -107,10 +109,10 @@
...
@@ -107,10 +109,10 @@
<!--新增所有列-->
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into tab_haoban_clerk_share_log(id, enterprise_id, wx_enterprise_id, clerk_id, staff_id, share_type,
insert into tab_haoban_clerk_share_log(id, enterprise_id, wx_enterprise_id, clerk_id, staff_id, s
tore_id, s
hare_type,
biz_id, biz_type,
biz_id, biz_type,
delete_flag, create_time, update_time)
delete_flag, create_time, update_time)
values (#{id}, #{enterpriseId}, #{wxEnterpriseId}, #{clerkId}, #{staffId}, #{shareType}, #{bizId}, #{bizType},
values (#{id}, #{enterpriseId}, #{wxEnterpriseId}, #{clerkId}, #{staffId}, #{s
toreId}, #{s
hareType}, #{bizId}, #{bizType},
#{deleteFlag},
#{deleteFlag},
#{createTime}, #{updateTime})
#{createTime}, #{updateTime})
</insert>
</insert>
...
...
haoban-manage3-service/src/main/resources/mapper/content/TabHaobanTriggerCustomerDetailMapper.xml
View file @
0872f0ff
...
@@ -11,6 +11,7 @@
...
@@ -11,6 +11,7 @@
<result
property=
"bizType"
column=
"biz_type"
jdbcType=
"INTEGER"
/>
<result
property=
"bizType"
column=
"biz_type"
jdbcType=
"INTEGER"
/>
<result
property=
"clerkId"
column=
"clerk_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"clerkId"
column=
"clerk_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"staffId"
column=
"staff_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"staffId"
column=
"staff_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"storeId"
column=
"store_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"channelType"
column=
"channel_type"
jdbcType=
"INTEGER"
/>
<result
property=
"channelType"
column=
"channel_type"
jdbcType=
"INTEGER"
/>
<result
property=
"customerId"
column=
"customer_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"customerId"
column=
"customer_id"
jdbcType=
"VARCHAR"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
...
@@ -25,6 +26,7 @@
...
@@ -25,6 +26,7 @@
biz_type,
biz_type,
clerk_id,
clerk_id,
staff_id,
staff_id,
store_id,
channel_type,
channel_type,
customer_id,
customer_id,
create_time,
create_time,
...
@@ -34,18 +36,7 @@
...
@@ -34,18 +36,7 @@
<!--查询单个-->
<!--查询单个-->
<select
id=
"queryById"
resultMap=
"TabHaobanTriggerCustomerDetailMap"
>
<select
id=
"queryById"
resultMap=
"TabHaobanTriggerCustomerDetailMap"
>
select id,
select
<include
refid=
"baseSql"
/>
enterprise_id,
wx_enterprise_id,
biz_id,
biz_type,
clerk_id,
staff_id,
channel_type,
customer_id,
create_time,
update_time,
delete_flag
from tab_haoban_trigger_customer_detail
from tab_haoban_trigger_customer_detail
where id = #{id}
where id = #{id}
</select>
</select>
...
@@ -125,29 +116,35 @@
...
@@ -125,29 +116,35 @@
<!--新增所有列-->
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into tab_haoban_trigger_customer_detail(enterprise_id, wx_enterprise_id, biz_id, biz_type, clerk_id, staff_id,
insert into tab_haoban_trigger_customer_detail(enterprise_id, wx_enterprise_id, biz_id, biz_type, clerk_id,
staff_id,
channel_type, customer_id, create_time, update_time, delete_flag)
channel_type, customer_id, create_time, update_time, delete_flag)
values (#{enterpriseId}, #{wxEnterpriseId}, #{bizId}, #{bizType}, #{clerkId}, #{staffId}, #{channelType}, #{customerId},
values (#{enterpriseId}, #{wxEnterpriseId}, #{bizId}, #{bizType}, #{clerkId}, #{staffId}, #{channelType},
#{customerId},
#{createTime}, #{updateTime}, #{deleteFlag})
#{createTime}, #{updateTime}, #{deleteFlag})
</insert>
</insert>
<insert
id=
"insertBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insertBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into tab_haoban_trigger_customer_detail(id, enterprise_id, wx_enterprise_id, biz_id, biz_type, clerk_id, staff_id,
insert into tab_haoban_trigger_customer_detail(id, enterprise_id, wx_enterprise_id, biz_id, biz_type, clerk_id,
staff_id,store_id,
channel_type, customer_id, create_time, update_time, delete_flag)
channel_type, customer_id, create_time, update_time, delete_flag)
values
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.id}, #{entity.enterpriseId}, #{entity.wxEnterpriseId}, #{entity.bizId}, #{entity.bizType}, #{entity.clerkId}, #{entity.staffId},
(#{entity.id}, #{entity.enterpriseId}, #{entity.wxEnterpriseId}, #{entity.bizId}, #{entity.bizType},
#{entity.clerkId}, #{entity.staffId}, #{entity.storeId},
#{entity.channelType}, #{entity.customerId}, #{entity.createTime}, #{entity.updateTime},
#{entity.channelType}, #{entity.customerId}, #{entity.createTime}, #{entity.updateTime},
#{entity.deleteFlag})
#{entity.deleteFlag})
</foreach>
</foreach>
</insert>
</insert>
<insert
id=
"insertOrUpdateBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insertOrUpdateBatch"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into tab_haoban_trigger_customer_detail(enterprise_id, wx_enterprise_id, biz_id, biz_type, clerk_id, staff_id,
insert into tab_haoban_trigger_customer_detail(enterprise_id, wx_enterprise_id, biz_id, biz_type, clerk_id,
staff_id, store_id,
channel_type, customer_id, create_time, update_time, delete_flag)
channel_type, customer_id, create_time, update_time, delete_flag)
values
values
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
<foreach
collection=
"entities"
item=
"entity"
separator=
","
>
(#{entity.enterpriseId}, #{entity.wxEnterpriseId}, #{entity.bizId}, #{entity.bizType}, #{entity.clerkId}, #{entity.staffId},
(#{entity.enterpriseId}, #{entity.wxEnterpriseId}, #{entity.bizId}, #{entity.bizType}, #{entity.clerkId},
#{entity.staffId}, #{entity.storeId},
#{entity.channelType}, #{entity.customerId}, #{entity.createTime}, #{entity.updateTime},
#{entity.channelType}, #{entity.customerId}, #{entity.createTime}, #{entity.updateTime},
#{entity.deleteFlag})
#{entity.deleteFlag})
</foreach>
</foreach>
...
@@ -157,6 +154,7 @@
...
@@ -157,6 +154,7 @@
biz_type = values(biz_type),
biz_type = values(biz_type),
clerk_id = values(clerk_id),
clerk_id = values(clerk_id),
staff_id = values(staff_id),
staff_id = values(staff_id),
store_id = values(store_id),
channel_type = values(channel_type),
channel_type = values(channel_type),
customer_id = values(customer_id),
customer_id = values(customer_id),
create_time = values(create_time),
create_time = values(create_time),
...
...
haoban-manage3-service/src/test/java/MaterialReportServiceTest.java
View file @
0872f0ff
...
@@ -101,7 +101,7 @@ public class MaterialReportServiceTest {
...
@@ -101,7 +101,7 @@ public class MaterialReportServiceTest {
@Test
@Test
public
void
queryData
(){
public
void
queryData
(){
MaterialDataAdaptor
.
MaterialDataResult
materialDataResult
=
materialDataAdaptor
.
query
AreaReportData
(
eid
,
clerkId
,
Collections
.
singletonList
(
storeId
)
,
MaterialReportType
.
MONTH
.
getCode
());
MaterialDataAdaptor
.
MaterialDataResult
materialDataResult
=
materialDataAdaptor
.
query
ClerkReportData
(
eid
,
clerkId
,
storeId
,
MaterialReportType
.
MONTH
.
getCode
());
System
.
out
.
println
(
JSON
.
toJSONString
(
materialDataResult
));
System
.
out
.
println
(
JSON
.
toJSONString
(
materialDataResult
));
}
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/ClerkMaterialShareController.java
View file @
0872f0ff
...
@@ -64,6 +64,7 @@ public class ClerkMaterialShareController {
...
@@ -64,6 +64,7 @@ public class ClerkMaterialShareController {
temp
.
setShareType
(
materialShareLogQo
.
getShareType
());
temp
.
setShareType
(
materialShareLogQo
.
getShareType
());
temp
.
setBizId
(
materialShareLogQo
.
getContentMaterialId
()
+
""
);
temp
.
setBizId
(
materialShareLogQo
.
getContentMaterialId
()
+
""
);
temp
.
setBizType
(
ShareBizType
.
MATERIAL
.
getCode
());
temp
.
setBizType
(
ShareBizType
.
MATERIAL
.
getCode
());
temp
.
setStoreId
(
materialShareLogQo
.
getStoreId
());
ServiceResponse
<
Long
>
serviceResponse
=
materialShareLogApiService
.
saveClerkShareMaterialLog
(
temp
);
ServiceResponse
<
Long
>
serviceResponse
=
materialShareLogApiService
.
saveClerkShareMaterialLog
(
temp
);
if
(
serviceResponse
.
isSuccess
())
{
if
(
serviceResponse
.
isSuccess
())
{
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/adaptor/MaterialDataAdaptor.java
View file @
0872f0ff
...
@@ -16,7 +16,6 @@ import com.gic.haoban.manage.web.vo.content.statistics.report.MaterialPersonalUs
...
@@ -16,7 +16,6 @@ import com.gic.haoban.manage.web.vo.content.statistics.report.MaterialPersonalUs
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.Collections
;
import
java.util.Collections
;
...
@@ -36,8 +35,6 @@ import java.util.stream.Collectors;
...
@@ -36,8 +35,6 @@ import java.util.stream.Collectors;
@Component
@Component
public
class
MaterialDataAdaptor
{
public
class
MaterialDataAdaptor
{
@Autowired
private
ClerkStoreAdaptor
clerkStoreAdaptor
;
/**
/**
* 素材首页数据统计
* 素材首页数据统计
...
@@ -99,7 +96,7 @@ public class MaterialDataAdaptor {
...
@@ -99,7 +96,7 @@ public class MaterialDataAdaptor {
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
params
.
put
(
"inFields"
,
inlineParams
);
params
.
put
(
"inFields"
,
inlineParams
);
inlineParams
.
put
(
"enterpr
si
eId"
,
enterpriseId
);
inlineParams
.
put
(
"enterpr
is
eId"
,
enterpriseId
);
if
(
CollectionUtil
.
isNotEmpty
(
storeIds
))
{
if
(
CollectionUtil
.
isNotEmpty
(
storeIds
))
{
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
}
}
...
@@ -125,7 +122,7 @@ public class MaterialDataAdaptor {
...
@@ -125,7 +122,7 @@ public class MaterialDataAdaptor {
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
params
.
put
(
"inFields"
,
inlineParams
);
params
.
put
(
"inFields"
,
inlineParams
);
inlineParams
.
put
(
"enterpr
si
eId"
,
enterpriseId
);
inlineParams
.
put
(
"enterpr
is
eId"
,
enterpriseId
);
inlineParams
.
put
(
"fixedDateDiff"
,
fixedDateDiff
);
inlineParams
.
put
(
"fixedDateDiff"
,
fixedDateDiff
);
if
(
CollectionUtil
.
isNotEmpty
(
storeIds
))
{
if
(
CollectionUtil
.
isNotEmpty
(
storeIds
))
{
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
inlineParams
.
put
(
"storeId"
,
StringUtils
.
join
(
storeIds
,
","
));
...
@@ -154,7 +151,7 @@ public class MaterialDataAdaptor {
...
@@ -154,7 +151,7 @@ public class MaterialDataAdaptor {
params
.
put
(
"pageNo"
,
pageNo
);
params
.
put
(
"pageNo"
,
pageNo
);
params
.
put
(
"pageSize"
,
pageSize
);
params
.
put
(
"pageSize"
,
pageSize
);
params
.
put
(
"inFields"
,
inlineParams
);
params
.
put
(
"inFields"
,
inlineParams
);
inlineParams
.
put
(
"enterpr
si
eId"
,
enterpriseId
);
inlineParams
.
put
(
"enterpr
is
eId"
,
enterpriseId
);
inlineParams
.
put
(
"fixedDateDiff"
,
fixedDateDiff
);
inlineParams
.
put
(
"fixedDateDiff"
,
fixedDateDiff
);
if
(
StringUtils
.
isNotBlank
(
orderField
))
{
if
(
StringUtils
.
isNotBlank
(
orderField
))
{
String
orderStr
=
new
Integer
(
1
).
equals
(
order
)
?
" asc "
:
" desc "
;
String
orderStr
=
new
Integer
(
1
).
equals
(
order
)
?
" asc "
:
" desc "
;
...
@@ -192,7 +189,7 @@ public class MaterialDataAdaptor {
...
@@ -192,7 +189,7 @@ public class MaterialDataAdaptor {
params
.
put
(
"pageSize"
,
pageSize
);
params
.
put
(
"pageSize"
,
pageSize
);
params
.
put
(
"inFields"
,
inlineParams
);
params
.
put
(
"inFields"
,
inlineParams
);
inlineParams
.
put
(
"enterpr
si
eId"
,
enterpriseId
);
inlineParams
.
put
(
"enterpr
is
eId"
,
enterpriseId
);
inlineParams
.
put
(
"fixedDateDiff"
,
fixedDateDiff
);
inlineParams
.
put
(
"fixedDateDiff"
,
fixedDateDiff
);
if
(
StringUtils
.
isNotBlank
(
orderField
))
{
if
(
StringUtils
.
isNotBlank
(
orderField
))
{
String
orderStr
=
new
Integer
(
1
).
equals
(
order
)
?
" asc "
:
" desc "
;
String
orderStr
=
new
Integer
(
1
).
equals
(
order
)
?
" asc "
:
" desc "
;
...
@@ -358,7 +355,7 @@ public class MaterialDataAdaptor {
...
@@ -358,7 +355,7 @@ public class MaterialDataAdaptor {
DateTime
startTime
=
null
;
DateTime
startTime
=
null
;
DateTime
endTime
=
null
;
DateTime
endTime
=
null
;
int
bizDate
=
0
;
int
bizDate
=
0
;
String
apolloKey
=
MATERIAL_
STORE
_WEEK_DATA
;
String
apolloKey
=
MATERIAL_
AREA
_WEEK_DATA
;
if
(
MaterialReportType
.
WEEK
.
getCode
().
equals
(
reportType
))
{
if
(
MaterialReportType
.
WEEK
.
getCode
().
equals
(
reportType
))
{
// 周报
// 周报
startTime
=
DateUtil
.
beginOfWeek
(
DateUtil
.
lastWeek
());
startTime
=
DateUtil
.
beginOfWeek
(
DateUtil
.
lastWeek
());
...
@@ -368,7 +365,7 @@ public class MaterialDataAdaptor {
...
@@ -368,7 +365,7 @@ public class MaterialDataAdaptor {
startTime
=
DateUtil
.
beginOfMonth
(
DateUtil
.
lastWeek
());
startTime
=
DateUtil
.
beginOfMonth
(
DateUtil
.
lastWeek
());
endTime
=
DateUtil
.
endOfMonth
(
DateUtil
.
lastWeek
());
endTime
=
DateUtil
.
endOfMonth
(
DateUtil
.
lastWeek
());
bizDate
=
DateUtil
.
month
(
DateUtil
.
lastMonth
());
bizDate
=
DateUtil
.
month
(
DateUtil
.
lastMonth
());
apolloKey
=
MATERIAL_
STORE
_MONTH_DATA
;
apolloKey
=
MATERIAL_
AREA
_MONTH_DATA
;
}
}
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
params
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
Map
<
String
,
Object
>
inlineParams
=
new
HashMap
<>();
...
...
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