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
0aea9811
Commit
0aea9811
authored
Mar 18, 2025
by
王祖波
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
保存建联记录
parent
029274e2
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
115 additions
and
4 deletions
+115
-4
MemberLastInteractDTO.java
.../haoban/manage/api/dto/content/MemberLastInteractDTO.java
+2
-1
ContactLogApiService.java
...oban/manage/api/service/contact/ContactLogApiService.java
+8
-0
ContactLogService.java
...ban/manage/service/service/contact/ContactLogService.java
+2
-1
ContactLogServiceImpl.java
...e/service/service/contact/impl/ContactLogServiceImpl.java
+13
-2
ContactLogApiServiceImpl.java
...ce/service/out/impl/contact/ContactLogApiServiceImpl.java
+13
-0
ContactController.java
...oban/manage/web/controller/contact/ContactController.java
+21
-0
ContactLogQO.java
...va/com/gic/haoban/manage/web/qo/contact/ContactLogQO.java
+56
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/content/MemberLastInteractDTO.java
View file @
0aea9811
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
content
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* Created by wangzubo on 2025/3/15.
*/
public
class
MemberLastInteractDTO
{
public
class
MemberLastInteractDTO
implements
Serializable
{
/**
* 会员id
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/contact/ContactLogApiService.java
View file @
0aea9811
...
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.api.service.contact;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.contact.ContactLogDTO
;
import
com.gic.haoban.manage.api.qdto.contact.ContactLogQDTO
;
public
interface
ContactLogApiService
{
...
...
@@ -12,4 +13,11 @@ public interface ContactLogApiService {
*/
ServiceResponse
<
ContactLogDTO
>
getClerkContactTime
(
String
memberId
);
/**
* 保存建联记录
* @param qdto
* @return
*/
ServiceResponse
<
Void
>
saveContactLog
(
ContactLogQDTO
qdto
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/ContactLogService.java
View file @
0aea9811
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
contact
;
import
com.gic.api.base.commons.BusinessException
;
import
com.gic.haoban.manage.api.qdto.contact.ContactLogQDTO
;
import
com.gic.haoban.manage.service.entity.contact.TabContactLog
;
...
...
@@ -13,7 +14,7 @@ public interface ContactLogService {
*
* @param qdto
*/
void
saveContactLog
(
ContactLogQDTO
qdto
);
void
saveContactLog
(
ContactLogQDTO
qdto
)
throws
BusinessException
;
/**
* 清除建联状态
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/contact/impl/ContactLogServiceImpl.java
View file @
0aea9811
...
...
@@ -5,6 +5,7 @@ import cn.hutool.core.date.DateTime;
import
cn.hutool.core.date.DateUnit
;
import
cn.hutool.core.date.DateUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BusinessException
;
import
com.gic.api.base.commons.Constant
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
...
...
@@ -18,6 +19,7 @@ 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.dto.MemberStoreDTO
;
import
com.gic.member.api.service.MemberService
;
import
com.gic.store.goods.service.StoreGoodsService
;
import
org.apache.commons.lang3.StringUtils
;
...
...
@@ -47,14 +49,23 @@ public class ContactLogServiceImpl implements ContactLogService {
@Override
public
void
saveContactLog
(
ContactLogQDTO
qdto
)
{
public
void
saveContactLog
(
ContactLogQDTO
qdto
)
throws
BusinessException
{
logger
.
info
(
"保存建联记录:{}"
,
JSON
.
toJSONString
(
qdto
));
String
enterpriseId
=
qdto
.
getEnterpriseId
();
String
storeId
=
qdto
.
getStoreId
();
String
clerkId
=
qdto
.
getClerkId
();
String
memberId
=
qdto
.
getMemberId
();
DateTime
date
=
DateUtil
.
date
();
MemberStoreClerkDTO
memberStoreClerk
=
memberService
.
getMemberStoreClerk
(
memberId
);
if
(
memberStoreClerk
==
null
)
{
logger
.
info
(
"无专属导购无法建联"
);
throw
new
BusinessException
(
"-1"
,
"无专属导购无法建联"
);
}
String
mainClerkId
=
memberStoreClerk
.
getClerkId
();
if
(!
Objects
.
equals
(
mainClerkId
,
clerkId
))
{
logger
.
info
(
"非专属导购无法建联"
);
throw
new
BusinessException
(
"-1"
,
"非专属导购无法建联"
);
}
// 是否周期内首次建联 同周期内是否有记录
Integer
contactCycle
=
1
;
// 建联周期 14天内同周期/14天以上周期+1
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/contact/ContactLogApiServiceImpl.java
View file @
0aea9811
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
contact
;
import
com.gic.api.base.commons.BusinessException
;
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.qdto.contact.ContactLogQDTO
;
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
;
...
...
@@ -24,4 +26,15 @@ public class ContactLogApiServiceImpl implements ContactLogApiService {
ContactLogDTO
contactLogDTO
=
EntityUtil
.
changeEntityNew
(
ContactLogDTO
.
class
,
contactLog
);
return
ServiceResponse
.
success
(
contactLogDTO
);
}
@Override
public
ServiceResponse
<
Void
>
saveContactLog
(
ContactLogQDTO
qdto
)
{
try
{
contactLogService
.
saveContactLog
(
qdto
);
}
catch
(
BusinessException
e
)
{
return
ServiceResponse
.
failure
(
e
.
getCode
(),
e
.
getMessage
());
}
return
ServiceResponse
.
success
();
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/contact/ContactController.java
View file @
0aea9811
...
...
@@ -9,9 +9,12 @@ import com.gic.commons.webapi.reponse.RestResponse;
import
com.gic.haoban.manage.api.dto.contact.ContactFollowDTO
;
import
com.gic.haoban.manage.api.qdto.contact.ContactFollowQDTO
;
import
com.gic.haoban.manage.api.qdto.contact.ContactFollowSearchQDTO
;
import
com.gic.haoban.manage.api.qdto.contact.ContactLogQDTO
;
import
com.gic.haoban.manage.api.service.contact.ContactFollowApiService
;
import
com.gic.haoban.manage.api.service.contact.ContactLogApiService
;
import
com.gic.haoban.manage.web.qo.contact.ContactFollowPageQO
;
import
com.gic.haoban.manage.web.qo.contact.ContactFollowQO
;
import
com.gic.haoban.manage.web.qo.contact.ContactLogQO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
...
@@ -26,6 +29,8 @@ public class ContactController {
@Autowired
private
ContactFollowApiService
contactFollowApiService
;
@Autowired
private
ContactLogApiService
contactLogApiService
;
/**
* 添加跟进记录
...
...
@@ -63,4 +68,20 @@ public class ContactController {
}
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
/**
* 建联
* @param contactLogQO
* @return
*/
@RequestMapping
(
path
=
"/log"
)
public
RestResponse
<
Void
>
saveLog
(
@RequestBody
ContactLogQO
contactLogQO
)
{
ContactLogQDTO
logQDTO
=
EntityUtil
.
changeEntityNew
(
ContactLogQDTO
.
class
,
contactLogQO
);
ServiceResponse
<
Void
>
serviceResponse
=
contactLogApiService
.
saveContactLog
(
logQDTO
);
if
(!
serviceResponse
.
isSuccess
())
{
return
RestResponse
.
failure
(
serviceResponse
.
getCode
(),
serviceResponse
.
getMessage
());
}
return
RestResponse
.
successResult
();
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/contact/ContactLogQO.java
0 → 100644
View file @
0aea9811
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
contact
;
import
java.io.Serializable
;
public
class
ContactLogQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
973688857967269973L
;
/**
* 会员id
*/
private
String
memberId
;
/**
* 导购id
*/
private
String
clerkId
;
/**
* 门店id
*/
private
String
storeId
;
/**
* 企业id
*/
private
String
enterpriseId
;
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
getStoreId
()
{
return
storeId
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
}
\ No newline at end of file
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