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
08c1d755
Commit
08c1d755
authored
Mar 17, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取最近一条有效建联记录
parent
191eaec9
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
254 additions
and
0 deletions
+254
-0
ContactLogDTO.java
.../com/gic/haoban/manage/api/dto/contact/ContactLogDTO.java
+172
-0
ContactLogApiService.java
...oban/manage/api/service/contact/ContactLogApiService.java
+15
-0
ContactLogService.java
...ban/manage/service/service/contact/ContactLogService.java
+8
-0
ContactLogServiceImpl.java
...e/service/service/contact/impl/ContactLogServiceImpl.java
+31
-0
ContactLogApiServiceImpl.java
...ce/service/out/impl/contact/ContactLogApiServiceImpl.java
+27
-0
dubbo-haoban-manage-service.xml
...ervice/src/main/resources/dubbo-haoban-manage-service.xml
+1
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/contact/ContactLogDTO.java
0 → 100644
View file @
08c1d755
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
contact
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* 建联日志表(TabContactLog)实体类
*
* @author TONGYI Lingma
* @since 2024-09-27 16:09:38
*/
public
class
ContactLogDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
973688857967269973L
;
/**
* 主键id
*/
private
Long
logId
;
/**
* 会员id
*/
private
String
memberId
;
/**
* 导购id
*/
private
String
clerkId
;
/**
* 导购code
*/
private
String
clerkCode
;
/**
* 导购名称
*/
private
String
clerkName
;
/**
* 门店id
*/
private
String
storeId
;
/**
* 门店code
*/
private
String
storeCode
;
/**
* 建联状态 1是0否
*/
private
Integer
contactStatus
;
/**
* 建联时间
*/
private
Date
contactTime
;
/**
* 建联周期
*/
private
Integer
contactCycle
;
/**
* 是否周期内首次建联1是0否
*/
private
Integer
contactCycleFirst
;
/**
* 成为潜客时间
*/
private
Date
potentialTime
;
/**
* 企业id
*/
private
String
enterpriseId
;
public
Long
getLogId
()
{
return
logId
;
}
public
void
setLogId
(
Long
logId
)
{
this
.
logId
=
logId
;
}
public
String
getMemberId
()
{
return
memberId
;
}
public
void
setMemberId
(
String
memberId
)
{
this
.
memberId
=
memberId
;
}
public
String
getClerkId
()
{
return
clerkId
;
}
public
void
setClerkId
(
String
clerkId
)
{
this
.
clerkId
=
clerkId
;
}
public
String
getClerkCode
()
{
return
clerkCode
;
}
public
void
setClerkCode
(
String
clerkCode
)
{
this
.
clerkCode
=
clerkCode
;
}
public
String
getClerkName
()
{
return
clerkName
;
}
public
void
setClerkName
(
String
clerkName
)
{
this
.
clerkName
=
clerkName
;
}
public
String
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
public
String
getStoreCode
()
{
return
storeCode
;
}
public
void
setStoreCode
(
String
storeCode
)
{
this
.
storeCode
=
storeCode
;
}
public
Integer
getContactStatus
()
{
return
contactStatus
;
}
public
void
setContactStatus
(
Integer
contactStatus
)
{
this
.
contactStatus
=
contactStatus
;
}
public
Date
getContactTime
()
{
return
contactTime
;
}
public
void
setContactTime
(
Date
contactTime
)
{
this
.
contactTime
=
contactTime
;
}
public
Integer
getContactCycle
()
{
return
contactCycle
;
}
public
void
setContactCycle
(
Integer
contactCycle
)
{
this
.
contactCycle
=
contactCycle
;
}
public
Integer
getContactCycleFirst
()
{
return
contactCycleFirst
;
}
public
void
setContactCycleFirst
(
Integer
contactCycleFirst
)
{
this
.
contactCycleFirst
=
contactCycleFirst
;
}
public
Date
getPotentialTime
()
{
return
potentialTime
;
}
public
void
setPotentialTime
(
Date
potentialTime
)
{
this
.
potentialTime
=
potentialTime
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/contact/ContactLogApiService.java
0 → 100644
View file @
08c1d755
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
contact
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.contact.ContactLogDTO
;
public
interface
ContactLogApiService
{
/**
* 获取最近一条有效建联记录
* @param memberId
* @return
*/
ServiceResponse
<
ContactLogDTO
>
getClerkContactTime
(
String
memberId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/ContactLogService.java
View file @
08c1d755
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
contact
;
import
com.gic.haoban.manage.api.qdto.contact.ContactLogQDTO
;
import
com.gic.haoban.manage.service.entity.contact.TabContactLog
;
public
interface
ContactLogService
{
...
...
@@ -17,4 +18,11 @@ public interface ContactLogService {
* @param clearType 1 消费清除 2 换绑主导购
*/
void
clearContactLog
(
String
memberId
,
Integer
clearType
);
/**
* 获取最近一条有效建联记录
* @param memberId
* @return
*/
TabContactLog
getClerkContactTime
(
String
memberId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/impl/ContactLogServiceImpl.java
View file @
08c1d755
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
contact
.
impl
;
import
cn.hutool.core.date.DateField
;
import
cn.hutool.core.date.DateTime
;
import
cn.hutool.core.date.DateUnit
;
import
cn.hutool.core.date.DateUtil
;
...
...
@@ -16,6 +17,8 @@ import com.gic.haoban.manage.service.dao.mapper.contact.TabContactLogMapper;
import
com.gic.haoban.manage.service.entity.contact.TabContactLog
;
import
com.gic.haoban.manage.service.service.contact.ContactFollowService
;
import
com.gic.haoban.manage.service.service.contact.ContactLogService
;
import
com.gic.member.api.dto.MemberStoreClerkDTO
;
import
com.gic.member.api.service.MemberService
;
import
com.gic.store.goods.service.StoreGoodsService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
...
...
@@ -39,6 +42,8 @@ public class ContactLogServiceImpl implements ContactLogService {
private
ClerkService
clerkService
;
@Autowired
private
StoreService
storeService
;
@Autowired
private
MemberService
memberService
;
@Override
...
...
@@ -109,4 +114,30 @@ public class ContactLogServiceImpl implements ContactLogService {
}
// todo 清除es建联时间 -1
}
@Override
public
TabContactLog
getClerkContactTime
(
String
memberId
)
{
TabContactLog
lastContactLog
=
contactLogMapper
.
queryLastLog
(
memberId
,
null
);
if
(
lastContactLog
==
null
)
{
return
null
;
}
Integer
contactStatus
=
lastContactLog
.
getContactStatus
();
if
(
Objects
.
equals
(
contactStatus
,
Constant
.
FLAG_FALSE
))
{
return
null
;
}
String
clerkId
=
lastContactLog
.
getClerkId
();
Date
contactTime
=
lastContactLog
.
getContactTime
();
MemberStoreClerkDTO
memberStoreClerk
=
memberService
.
getMemberStoreClerk
(
memberId
);
if
(
memberStoreClerk
==
null
)
{
return
null
;
}
logger
.
info
(
"建联导购id:{},专属导购id:{}"
,
clerkId
,
memberStoreClerk
.
getClerkId
());
if
(!
Objects
.
equals
(
clerkId
,
memberStoreClerk
.
getClerkId
()))
{
return
null
;
}
if
(
DateUtil
.
compare
(
contactTime
,
DateUtil
.
date
().
offset
(
DateField
.
DAY_OF_MONTH
,
-
14
))
<
0
)
{
return
null
;
}
return
lastContactLog
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/contact/ContactLogApiServiceImpl.java
0 → 100644
View file @
08c1d755
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
contact
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.haoban.manage.api.dto.contact.ContactLogDTO
;
import
com.gic.haoban.manage.api.service.contact.ContactLogApiService
;
import
com.gic.haoban.manage.service.entity.contact.TabContactLog
;
import
com.gic.haoban.manage.service.service.contact.ContactLogService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
/**
* Created by wangzubo on 2022/11/1.
*/
@Service
(
"contactLogApiService"
)
public
class
ContactLogApiServiceImpl
implements
ContactLogApiService
{
@Autowired
private
ContactLogService
contactLogService
;
@Override
public
ServiceResponse
<
ContactLogDTO
>
getClerkContactTime
(
String
memberId
)
{
TabContactLog
contactLog
=
contactLogService
.
getClerkContactTime
(
memberId
);
ContactLogDTO
contactLogDTO
=
EntityUtil
.
changeEntityNew
(
ContactLogDTO
.
class
,
contactLog
);
return
ServiceResponse
.
success
(
contactLogDTO
);
}
}
haoban-manage3-service/src/main/resources/dubbo-haoban-manage-service.xml
View file @
08c1d755
...
...
@@ -144,6 +144,7 @@
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.role.HaobanMenuApiService"
ref=
"haobanMenuApiServiceImpl"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.role.HaobanRoleApiService"
ref=
"haobanRoleApiServiceImpl"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.contact.ContactFollowApiService"
ref=
"contactFollowApiService"
/>
<dubbo:service
interface=
"com.gic.haoban.manage.api.service.contact.ContactLogApiService"
ref=
"contactLogApiService"
/>
<dubbo:reference
interface=
"com.gic.enterprise.api.service.DepartmentService"
id=
"gicDepartmentService"
/>
<dubbo:reference
interface=
"com.gic.wechat.api.service.qywx.QywxDepartmentApiService"
...
...
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