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
8b51a7f2
Commit
8b51a7f2
authored
Nov 26, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
社群
parent
7fa96a8c
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
305 additions
and
249 deletions
+305
-249
HmLinkDTO.java
...main/java/com/gic/haoban/manage/api/dto/hm/HmLinkDTO.java
+19
-0
HmPageDTO.java
...main/java/com/gic/haoban/manage/api/dto/hm/HmPageDTO.java
+8
-0
HmPageQDTO.java
...ava/com/gic/haoban/manage/api/dto/qdto/hm/HmPageQDTO.java
+10
-0
TabHaobanHmPageMapper.java
...n/manage/service/dao/mapper/hm/TabHaobanHmPageMapper.java
+0
-5
TabHaobanHmPage.java
.../gic/haoban/manage/service/entity/hm/TabHaobanHmPage.java
+11
-0
TabHmLink.java
...va/com/gic/haoban/manage/service/entity/hm/TabHmLink.java
+10
-0
HmLinkBO.java
...va/com/gic/haoban/manage/service/pojo/bo/hm/HmLinkBO.java
+9
-0
HmPageTemplateQO.java
...m/gic/haoban/manage/service/pojo/qo/HmPageTemplateQO.java
+11
-0
HmLinkServiceImpl.java
...ban/manage/service/service/hm/impl/HmLinkServiceImpl.java
+25
-10
HmPageServiceImpl.java
...ban/manage/service/service/hm/impl/HmPageServiceImpl.java
+1
-1
HmLinkApiServiceImpl.java
...age/service/service/out/impl/hm/HmLinkApiServiceImpl.java
+133
-15
HmLinkMapper.xml
...ge3-service/src/main/resources/mapper/hm/HmLinkMapper.xml
+8
-4
TabHaobanHmPageMapper.xml
...ce/src/main/resources/mapper/hm/TabHaobanHmPageMapper.xml
+7
-159
HmLinkTest.java
haoban-manage3-service/src/test/java/HmLinkTest.java
+9
-41
HmLinkController.java
...gic/haoban/manage/web/controller/hm/HmLinkController.java
+22
-14
HmPageController.java
...gic/haoban/manage/web/controller/hm/HmPageController.java
+2
-0
HmPageListQO.java
...in/java/com/gic/haoban/manage/web/qo/hm/HmPageListQO.java
+10
-0
HmPageSettingReq.java
...ava/com/gic/haoban/manage/web/qo/hm/HmPageSettingReq.java
+10
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/hm/HmLinkDTO.java
View file @
8b51a7f2
...
...
@@ -41,7 +41,26 @@ public class HmLinkDTO implements Serializable {
/**0删除 1正常*/
private
Integer
statusFlag
;
private
String
shortCode
;
private
Long
otherChatHmId
;
private
List
<
HmLinkStoreDTO
>
storeList
;
// 群活码配置
private
List
<
HmLinkChatDTO
>
linkChatList
;
public
List
<
HmLinkChatDTO
>
getLinkChatList
()
{
return
linkChatList
;
}
public
void
setLinkChatList
(
List
<
HmLinkChatDTO
>
linkChatList
)
{
this
.
linkChatList
=
linkChatList
;
}
public
Long
getOtherChatHmId
()
{
return
otherChatHmId
;
}
public
void
setOtherChatHmId
(
Long
otherChatHmId
)
{
this
.
otherChatHmId
=
otherChatHmId
;
}
public
String
getShortCode
()
{
return
shortCode
;
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/hm/HmPageDTO.java
View file @
8b51a7f2
...
...
@@ -87,7 +87,15 @@ public class HmPageDTO implements Serializable {
private
Date
createTime
;
private
Date
updateTime
;
private
int
pageType
;
public
int
getPageType
()
{
return
pageType
;
}
public
void
setPageType
(
int
pageType
)
{
this
.
pageType
=
pageType
;
}
public
Long
getPageId
()
{
return
pageId
;
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/hm/HmPageQDTO.java
View file @
8b51a7f2
...
...
@@ -34,6 +34,16 @@ public class HmPageQDTO extends BasePageInfo {
* 微信企业id
*/
private
String
wxEnterpriseId
;
private
int
pageType
;
public
int
getPageType
()
{
return
pageType
;
}
public
void
setPageType
(
int
pageType
)
{
this
.
pageType
=
pageType
;
}
public
String
getPageSearchText
()
{
return
pageSearchText
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmPageMapper.java
View file @
8b51a7f2
...
...
@@ -6,18 +6,13 @@ import com.gic.haoban.manage.service.pojo.qo.HmPageTemplateQO;
import
java.util.List
;
public
interface
TabHaobanHmPageMapper
{
int
deleteByPrimaryKey
(
Long
templateId
);
int
insert
(
TabHaobanHmPage
record
);
int
insertSelective
(
TabHaobanHmPage
record
);
TabHaobanHmPage
selectByPrimaryKey
(
Long
templateId
);
int
updateByPrimaryKeySelective
(
TabHaobanHmPage
record
);
int
updateByPrimaryKey
(
TabHaobanHmPage
record
);
/**
* 条件查询 活码落地页模板
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/hm/TabHaobanHmPage.java
View file @
8b51a7f2
...
...
@@ -78,6 +78,17 @@ public class TabHaobanHmPage {
private
Date
createTime
;
private
Date
updateTime
;
private
int
pageType
;
public
int
getPageType
()
{
return
pageType
;
}
public
void
setPageType
(
int
pageType
)
{
this
.
pageType
=
pageType
;
}
public
Long
getPageId
()
{
return
pageId
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/hm/TabHmLink.java
View file @
8b51a7f2
...
...
@@ -40,6 +40,16 @@ public class TabHmLink implements Serializable {
private
String
memberLabelId
;
/**0删除 1正常*/
private
Integer
statusFlag
;
private
Long
otherChatHmId
;
public
Long
getOtherChatHmId
()
{
return
otherChatHmId
;
}
public
void
setOtherChatHmId
(
Long
otherChatHmId
)
{
this
.
otherChatHmId
=
otherChatHmId
;
}
public
String
getShortCode
()
{
return
shortCode
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/hm/HmLinkBO.java
View file @
8b51a7f2
...
...
@@ -40,6 +40,15 @@ public class HmLinkBO implements Serializable {
private
String
memberLabelId
;
/**0删除 1正常*/
private
Integer
statusFlag
;
private
Long
otherChatHmId
;
public
Long
getOtherChatHmId
()
{
return
otherChatHmId
;
}
public
void
setOtherChatHmId
(
Long
otherChatHmId
)
{
this
.
otherChatHmId
=
otherChatHmId
;
}
public
String
getShortCode
()
{
return
shortCode
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/qo/HmPageTemplateQO.java
View file @
8b51a7f2
...
...
@@ -41,6 +41,17 @@ public class HmPageTemplateQO extends BasePageInfo {
* @see HmPageStatus
*/
private
Integer
status
;
// 0:引流加人 1入群
private
int
pageType
;
public
int
getPageType
()
{
return
pageType
;
}
public
void
setPageType
(
int
pageType
)
{
this
.
pageType
=
pageType
;
}
public
String
getPageSearchText
()
{
return
pageSearchText
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmLinkServiceImpl.java
View file @
8b51a7f2
...
...
@@ -18,11 +18,13 @@ import com.gic.commons.util.UniqueIdUtils;
import
com.gic.haoban.manage.api.dto.hm.HmLinkDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO
;
import
com.gic.haoban.manage.api.enums.hm.HmLinkTypeEnum
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType
;
import
com.gic.haoban.manage.service.dao.mapper.hm.HmLinkMapper
;
import
com.gic.haoban.manage.service.entity.hm.TabHmLink
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmLinkBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmWelcomeRelationBO
;
import
com.gic.haoban.manage.service.service.hm.HmLinkChatService
;
import
com.gic.haoban.manage.service.service.hm.HmLinkService
;
import
com.gic.haoban.manage.service.service.hm.HmLinkStoreService
;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
...
...
@@ -45,6 +47,8 @@ public class HmLinkServiceImpl implements HmLinkService {
private
HmLinkStoreService
hmLinkStoreService
;
@Autowired
private
WelcomeRelationService
welcomeRelationService
;
@Autowired
private
HmLinkChatService
hmLinkChatService
;
@Override
public
HmLinkBO
getByLinkId
(
String
wxEnterpriseId
,
String
enterprieId
,
Long
linkId
)
{
...
...
@@ -113,10 +117,14 @@ public class HmLinkServiceImpl implements HmLinkService {
String
oldWelcomeId
=
null
;
if
(
null
==
linkId
)
{
linkId
=
UniqueIdUtils
.
uniqueLong
();
StringBuilder
sb
=
new
StringBuilder
(
"LJ"
).
append
(
"0"
).
append
(
dto
.
getLinkType
()).
append
(
linkId
);
StringBuilder
sb
=
new
StringBuilder
(
"LJ"
)
;
if
(
dto
.
getLinkType
()<
HmLinkTypeEnum
.
CHAT_HM_LINK_TYPE
.
getLinkType
())
{
sb
.
append
(
"0"
);
}
sb
.
append
(
dto
.
getLinkType
()).
append
(
linkId
);
dto
.
setLinkId
(
linkId
);
dto
.
setLinkCode
(
sb
.
toString
());
String
shortCode
=
shortCode
(
dto
.
getEnterpriseId
());
String
shortCode
=
this
.
shortCode
(
dto
.
getEnterpriseId
());
dto
.
setShortCode
(
shortCode
);
dto
.
setStatusFlag
(
1
);
TabHmLink
entity
=
EntityUtil
.
changeEntityByJSON
(
TabHmLink
.
class
,
dto
);
...
...
@@ -128,15 +136,22 @@ public class HmLinkServiceImpl implements HmLinkService {
TabHmLink
entity
=
EntityUtil
.
changeEntityByJSON
(
TabHmLink
.
class
,
dto
);
this
.
linkMapper
.
update
(
entity
);
}
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
storeList
.
forEach
(
item
->
{
item
.
setWxEnterpriseId
(
dto
.
getWxEnterpriseId
());
item
.
setEnterpriseId
(
dto
.
getEnterpriseId
());
});
// 单人活码
if
(
dto
.
getLinkType
()==
HmLinkTypeEnum
.
HM_LINK_TYPE_1
.
getLinkType
()
||
dto
.
getLinkType
()==
HmLinkTypeEnum
.
HM_LINK_TYPE_2
.
getLinkType
())
{
if
(
CollectionUtils
.
isNotEmpty
(
storeList
))
{
storeList
.
forEach
(
item
->
{
item
.
setWxEnterpriseId
(
dto
.
getWxEnterpriseId
());
item
.
setEnterpriseId
(
dto
.
getEnterpriseId
());
});
}
String
newWelcomeId
=
dto
.
getWelcomeId
();
this
.
saveWelcomeRelation
(
oldWelcomeId
,
newWelcomeId
,
dto
);
this
.
hmLinkStoreService
.
saveStore
(
linkId
,
storeList
);
}
// 群活码
if
(
dto
.
getLinkType
()==
HmLinkTypeEnum
.
CHAT_HM_LINK_TYPE
.
getLinkType
())
{
this
.
hmLinkChatService
.
save
(
linkId
,
dto
.
getLinkChatList
())
;
}
String
newWelcomeId
=
dto
.
getWelcomeId
();
this
.
saveWelcomeRelation
(
oldWelcomeId
,
newWelcomeId
,
dto
);
this
.
hmLinkStoreService
.
saveStore
(
linkId
,
storeList
);
return
dto
.
getLinkCode
();
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmPageServiceImpl.java
View file @
8b51a7f2
...
...
@@ -124,7 +124,7 @@ public class HmPageServiceImpl implements HmPageService {
haobanHmPage
.
setModifierName
(
pageDTO
.
getCreateorName
());
haobanHmPage
.
setUpdateTime
(
now
);
haobanHmPage
.
setStatus
(
HmPageStatus
.
ENABLE
.
getCode
());
haobanHmPageMapper
.
insert
Selective
(
haobanHmPage
);
haobanHmPageMapper
.
insert
(
haobanHmPage
);
return
haobanHmPage
.
getPageId
();
}
else
{
// update
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmLinkApiServiceImpl.java
View file @
8b51a7f2
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
hm
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Random
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.redisson.api.RRateLimiter
;
import
org.redisson.api.RateIntervalUnit
;
import
org.redisson.api.RateType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.BasePageInfo
;
...
...
@@ -14,14 +31,21 @@ import com.gic.enterprise.api.service.StoreService;
import
com.gic.haoban.common.utils.DingUtils
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseQwDTO
;
import
com.gic.haoban.manage.api.dto.hm.*
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkChatDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreSettingDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkWxaDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmPageDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO
;
import
com.gic.haoban.manage.api.enums.hm.HmLinkTypeEnum
;
import
com.gic.haoban.manage.api.service.hm.HmLinkApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanExternalClerkRelatedMapper
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.errorcode.HaoBanErrCode
;
import
com.gic.haoban.manage.service.pojo.bo.chat.GroupChatHmBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmLinkBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmPageBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmQrcodeBO
;
...
...
@@ -31,25 +55,27 @@ import com.gic.haoban.manage.service.service.KeyDataService;
import
com.gic.haoban.manage.service.service.MemberQueryService
;
import
com.gic.haoban.manage.service.service.StaffService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.service.hm.*
;
import
com.gic.haoban.manage.service.service.chat.GroupChatHmService
;
import
com.gic.haoban.manage.service.service.hm.HmLinkChatService
;
import
com.gic.haoban.manage.service.service.hm.HmLinkService
;
import
com.gic.haoban.manage.service.service.hm.HmLinkStoreService
;
import
com.gic.haoban.manage.service.service.hm.HmPageService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeService
;
import
com.gic.haoban.manage.service.service.hm.HmQrcodeTempService
;
import
com.gic.member.api.dto.es.MemberDataDTO
;
import
com.gic.member.api.dto.es.MemberStoreClerkDataDTO
;
import
com.gic.member.api.service.MemberService
;
import
com.gic.member.tag.api.dto.MemberExistDTO
;
import
com.gic.member.tag.api.service.MemberTagGroupApiService
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.search.engine.api.constant.OperateEnum
;
import
com.gic.search.engine.api.dto.ESResponseQueryBatch
;
import
com.gic.search.engine.api.dto.dynamic.DynamicSearchDTO
;
import
com.gic.search.engine.api.filter.NewNodeAddUtil
;
import
com.gic.search.engine.api.service.dynamic.ESDataDynamicOperationApiService
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactDTO
;
import
com.gic.wechat.api.dto.qywx.welcome.QywxExternalcontactResultDTO
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.redisson.api.RRateLimiter
;
import
org.redisson.api.RateIntervalUnit
;
import
org.redisson.api.RateType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.*
;
import
java.util.stream.Collectors
;
@Service
(
"hmLinkApiService"
)
public
class
HmLinkApiServiceImpl
implements
HmLinkApiService
{
...
...
@@ -86,6 +112,14 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
private
StoreService
storeService
;
@Autowired
private
StaffService
staffService
;
@Autowired
private
HmLinkChatService
hmLinkChatService
;
@Autowired
private
ESDataDynamicOperationApiService
esDataDynamicOperationApiService
;
@Autowired
private
MemberTagGroupApiService
memberTagGroupApiService
;
@Autowired
private
GroupChatHmService
groupChatHmService
;
@Override
public
ServiceResponse
<
String
>
getHmLinkUrl
()
{
...
...
@@ -97,9 +131,16 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
HmLinkBO
link
=
this
.
hmLinkService
.
getByLinkId
(
wxEnterpriseId
,
enterpriseId
,
linkId
);
if
(
null
!=
link
)
{
HmLinkDTO
dto
=
EntityUtil
.
changeEntityByJSON
(
HmLinkDTO
.
class
,
link
);
List
<
HmLinkStoreDTO
>
storeList
=
this
.
hmLinkStoreService
.
listByLinkId
(
dto
.
getWxEnterpriseId
(),
if
(
dto
.
getLinkType
()==
HmLinkTypeEnum
.
HM_LINK_TYPE_1
.
getLinkType
()
||
dto
.
getLinkType
()==
HmLinkTypeEnum
.
HM_LINK_TYPE_2
.
getLinkType
())
{
List
<
HmLinkStoreDTO
>
storeList
=
this
.
hmLinkStoreService
.
listByLinkId
(
dto
.
getWxEnterpriseId
(),
dto
.
getEnterpriseId
(),
linkId
);
dto
.
setStoreList
(
storeList
);
dto
.
setStoreList
(
storeList
);
}
if
(
dto
.
getLinkType
()==
HmLinkTypeEnum
.
CHAT_HM_LINK_TYPE
.
getLinkType
())
{
List
<
HmLinkChatDTO
>
linkChatList
=
this
.
hmLinkChatService
.
listByLinkId
(
dto
.
getWxEnterpriseId
(),
dto
.
getEnterpriseId
(),
linkId
);
dto
.
setLinkChatList
(
linkChatList
);
}
return
ServiceResponse
.
success
(
dto
);
}
return
ServiceResponse
.
failure
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
(),
"链接不存在"
);
...
...
@@ -136,6 +177,39 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
return
ServiceResponse
.
success
(
resultPage
);
}
// 群链接
private
ServiceResponse
<
HmLinkWxaDTO
>
getLinkChatHmFromWxa
(
String
wxEnterpriseId
,
String
enterpriseId
,
String
mixPhone
,
String
unionid
,
String
memberId
,
HmLinkBO
link
,
HmLinkWxaDTO
retDTO
)
{
Long
hmId
=
link
.
getOtherChatHmId
()
;
Long
linkId
=
link
.
getLinkId
()
;
List
<
HmLinkChatDTO
>
hmList
=
this
.
hmLinkChatService
.
listByLinkId
(
wxEnterpriseId
,
enterpriseId
,
linkId
)
;
if
(
StringUtils
.
isNotEmpty
(
mixPhone
))
{
String
mobile
=
this
.
keyDataService
.
getMobile
(
mixPhone
,
link
.
getShortCode
());
log
.
info
(
"查询手机号,mobile={},mixPhone={}"
,
mobile
,
mixPhone
);
String
mobileMemberId
=
this
.
memberService
.
getMemberIdByPhoneNumber
(
mobile
,
enterpriseId
);
if
(
StringUtils
.
isNotBlank
(
mobileMemberId
))
{
memberId
=
mobileMemberId
;
}
}
if
(
CollectionUtils
.
isNotEmpty
(
hmList
))
{
for
(
HmLinkChatDTO
item
:
hmList
)
{
boolean
flag
=
this
.
memberCondition
(
enterpriseId
,
memberId
,
item
)
;
if
(
flag
)
{
hmId
=
item
.
getChatHmId
()
;
break
;
}
}
}
GroupChatHmBO
hm
=
null
;
if
(
null
!=
hmId
)
{
hm
=
this
.
groupChatHmService
.
getById
(
hmId
)
;
}
if
(
null
==
hm
)
{
}
retDTO
.
setHmQrcode
(
hm
.
getWxQrCode
());
return
ServiceResponse
.
success
(
retDTO
);
}
@Override
public
ServiceResponse
<
HmLinkWxaDTO
>
getLinkHmFromWxa
(
String
enterpriseId
,
Integer
whitchStore
,
String
inStoreId
,
String
inClerkId
,
String
linkShortCode
,
String
mixPhone
,
String
unionid
,
String
memberId
)
{
...
...
@@ -168,6 +242,12 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
log
.
error
(
"未查询到微信企业,id={}"
,
wxEnterpriseId
);
return
ServiceResponse
.
failure
(
HaoBanErrCode
.
ERR_OTHER
.
getCode
(),
"未查到微信企业"
);
}
// 如果是社群链接
if
(
link
.
getLinkType
()
==
HmLinkTypeEnum
.
CHAT_HM_LINK_TYPE
.
getLinkType
())
{
return
this
.
getLinkChatHmFromWxa
(
wxEnterpriseId
,
enterpriseId
,
mixPhone
,
unionid
,
memberId
,
link
,
retDTO
);
}
// 判断导购是否有活码,如果没有返回错误
if
(
StringUtils
.
isNotBlank
(
inClerkId
))
{
hm
=
this
.
getHmFromClerk
(
inClerkId
,
wxEnterpriseId
,
memberId
,
enterpriseId
);
...
...
@@ -542,4 +622,42 @@ public class HmLinkApiServiceImpl implements HmLinkApiService {
MemberDataDTO
memberDataDTO
=
memberObj
.
toJavaObject
(
MemberDataDTO
.
class
);
return
memberDataDTO
;
}
private
boolean
memberCondition
(
String
enterpriseId
,
String
memberId
,
HmLinkChatDTO
dto
)
{
boolean
flag
=
true
;
int
memberType
=
dto
.
getMemberType
()
;
String
limitCondition
=
dto
.
getFilterJson
()
;
// 可见人群
if
(
0
==
memberType
)
{
JSONObject
search
=
JSON
.
parseObject
(
limitCondition
);
search
=
NewNodeAddUtil
.
addNewNodeForAnd
(
"memberId"
,
OperateEnum
.
OPERATE_CONTAIN
.
getValue
(),
memberId
,
search
);
search
.
put
(
"id"
,
memberId
);
DynamicSearchDTO
searchDTO
=
new
DynamicSearchDTO
();
searchDTO
.
setEnterpriseId
(
enterpriseId
);
searchDTO
.
setColumnCategoryCode
(
"member"
);
searchDTO
.
setSearchJson
(
search
);
log
.
info
(
"人群查询条件为:"
+
JSON
.
toJSONString
(
searchDTO
));
ESResponseQueryBatch
esRes
=
this
.
esDataDynamicOperationApiService
.
queryDataBatch
(
searchDTO
,
false
,
null
);
List
<
JSONObject
>
list
=
esRes
.
getRes
();
log
.
info
(
"人群查询结果为:"
+
list
.
size
());
return
list
.
size
()
>
0
;
}
//会员分组
if
(
1
==
memberType
)
{
String
[]
arr
=
limitCondition
.
split
(
","
);
List
<
String
>
memberLabelIds
=
new
ArrayList
<>();
for
(
int
i
=
0
;
i
<
arr
.
length
;
i
++)
{
if
(
StringUtils
.
isNotBlank
(
arr
[
i
]))
{
memberLabelIds
.
add
(
arr
[
i
]);
}
}
MemberExistDTO
memberExistDTO
=
new
MemberExistDTO
();
memberExistDTO
.
setMemberId
(
memberId
);
memberExistDTO
.
setEnterpriseId
(
enterpriseId
);
memberExistDTO
.
setMemberTagGroupIds
(
memberLabelIds
);
flag
=
this
.
memberTagGroupApiService
.
memberIsExistGroup
(
memberExistDTO
);
log
.
info
(
"分组-limitCondition={},mid={},返回={}"
,
limitCondition
,
memberId
,
flag
);
}
return
flag
;
}
}
haoban-manage3-service/src/main/resources/mapper/hm/HmLinkMapper.xml
View file @
8b51a7f2
...
...
@@ -22,6 +22,7 @@
<result
column=
"member_label_id"
property=
"memberLabelId"
/>
<result
column=
"status_flag"
property=
"statusFlag"
/>
<result
column=
"short_code"
property=
"shortCode"
/>
<result
column=
"other_chat_hm_id"
property=
"otherChatHmId"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
link_id,
...
...
@@ -42,7 +43,7 @@
store_rule_json,
custom_rule_json,
member_label_id,
status_flag,short_code
status_flag,short_code
, other_chat_hm_id
</sql>
<!-- ===================== 新增 ======================== -->
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabHmLink"
>
...
...
@@ -66,7 +67,7 @@
store_rule_json,
custom_rule_json,
member_label_id,
status_flag , short_code
status_flag , short_code
, other_chat_hm_id
)VALUES(
#{linkId,jdbcType=BIGINT},
#{linkCode,jdbcType=VARCHAR},
...
...
@@ -86,7 +87,7 @@
#{storeRuleJson,jdbcType=VARCHAR},
#{customRuleJson,jdbcType=VARCHAR},
#{memberLabelId,jdbcType=VARCHAR},
#{statusFlag,jdbcType=INTEGER} , #{shortCode}
#{statusFlag,jdbcType=INTEGER} , #{shortCode}
, #{otherChatHmId}
)
]]>
</insert>
...
...
@@ -104,7 +105,7 @@
update_time=now(),
store_rule_json=#{storeRuleJson,jdbcType=VARCHAR},
custom_rule_json=#{customRuleJson,jdbcType=VARCHAR},
member_label_id=#{memberLabelId,jdbcType=VARCHAR}
member_label_id=#{memberLabelId,jdbcType=VARCHAR}
, other_chat_hm_id = #{otherChatHmId}
WHERE link_id = #{linkId}
]]>
</update>
...
...
@@ -141,6 +142,9 @@
<if
test=
"null != searchParams"
>
and ( link_code like '%${searchParams}%' or creator_name like '%${searchParams}%' or name like '%${searchParams}%' )
</if>
<if
test=
"null == linkType"
>
and link_type in (1,2)
</if>
<if
test=
"null != linkType"
>
and link_type = #{linkType}
</if>
...
...
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmPageMapper.xml
View file @
8b51a7f2
...
...
@@ -20,13 +20,14 @@
<result
column=
"modifier_name"
property=
"modifierName"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"page_type"
property=
"pageType"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
page_id
, page_code, page_name, enterprise_id, wx_enterprise_id, status,
page_title, merchant_name, merchant_phone_number, merchant_logo, page_background_img,
guide_comment, createor_id, createor_name, modifier_id, modifier_name, create_time,
update_time
update_time
, page_type
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.Long"
>
select
...
...
@@ -34,18 +35,13 @@
from tab_haoban_hm_page
where page_id = #{pageId,jdbcType=BIGINT}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.Long"
>
delete
from tab_haoban_hm_page
where page_id = #{pageId,jdbcType=BIGINT}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabHaobanHmPage"
>
insert into tab_haoban_hm_page (page_id, page_code, page_name,
enterprise_id, wx_enterprise_id, status,
page_title, merchant_name, merchant_phone_number,
merchant_logo, page_background_img, guide_comment,
createor_id, createor_name, modifier_id,
modifier_name, create_time, update_time)
modifier_name, create_time, update_time
, page_type
)
values (#{pageId,jdbcType=BIGINT}, #{pageCode,jdbcType=CHAR}, #{pageName,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{pageTitle,jdbcType=VARCHAR}, #{merchantName,jdbcType=VARCHAR},
...
...
@@ -53,123 +49,9 @@
#{merchantLogo,jdbcType=VARCHAR}, #{pageBackgroundImg,jdbcType=VARCHAR},
#{guideComment,jdbcType=VARCHAR},
#{createorId,jdbcType=VARCHAR}, #{createorName,jdbcType=VARCHAR}, #{modifierId,jdbcType=VARCHAR},
#{modifierName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabHaobanHmPage"
>
insert into tab_haoban_hm_page
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"pageId != null"
>
page_id,
</if>
<if
test=
"pageCode != null"
>
page_code,
</if>
<if
test=
"pageName != null"
>
page_name,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"status != null"
>
status,
</if>
<if
test=
"pageTitle != null"
>
page_title,
</if>
<if
test=
"merchantName != null"
>
merchant_name,
</if>
<if
test=
"merchantPhoneNumber != null"
>
merchant_phone_number,
</if>
<if
test=
"merchantLogo != null"
>
merchant_logo,
</if>
<if
test=
"pageBackgroundImg != null"
>
page_background_img,
</if>
<if
test=
"guideComment != null"
>
guide_comment,
</if>
<if
test=
"createorId != null"
>
createor_id,
</if>
<if
test=
"createorName != null"
>
createor_name,
</if>
<if
test=
"modifierId != null"
>
modifier_id,
</if>
<if
test=
"modifierName != null"
>
modifier_name,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"pageId != null"
>
#{pageId,jdbcType=BIGINT},
</if>
<if
test=
"pageCode != null"
>
#{pageCode,jdbcType=CHAR},
</if>
<if
test=
"pageName != null"
>
#{pageName,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
#{status,jdbcType=INTEGER},
</if>
<if
test=
"pageTitle != null"
>
#{pageTitle,jdbcType=VARCHAR},
</if>
<if
test=
"merchantName != null"
>
#{merchantName,jdbcType=VARCHAR},
</if>
<if
test=
"merchantPhoneNumber != null"
>
#{merchantPhoneNumber,jdbcType=VARCHAR},
</if>
<if
test=
"merchantLogo != null"
>
#{merchantLogo,jdbcType=VARCHAR},
</if>
<if
test=
"pageBackgroundImg != null"
>
#{pageBackgroundImg,jdbcType=VARCHAR},
</if>
<if
test=
"guideComment != null"
>
#{guideComment,jdbcType=VARCHAR},
</if>
<if
test=
"createorId != null"
>
#{createorId,jdbcType=VARCHAR},
</if>
<if
test=
"createorName != null"
>
#{createorName,jdbcType=VARCHAR},
</if>
<if
test=
"modifierId != null"
>
#{modifierId,jdbcType=VARCHAR},
</if>
<if
test=
"modifierName != null"
>
#{modifierName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
#{modifierName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} , #{pageType})
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabHaobanHmPage"
>
update tab_haoban_hm_page
<set>
...
...
@@ -179,12 +61,6 @@
<if
test=
"pageName != null"
>
page_name = #{pageName,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"status != null"
>
status = #{status,jdbcType=INTEGER},
</if>
...
...
@@ -206,48 +82,19 @@
<if
test=
"guideComment != null"
>
guide_comment = #{guideComment,jdbcType=VARCHAR},
</if>
<if
test=
"createorId != null"
>
createor_id = #{createorId,jdbcType=VARCHAR},
</if>
<if
test=
"createorName != null"
>
createor_name = #{createorName,jdbcType=VARCHAR},
</if>
<if
test=
"modifierId != null"
>
modifier_id = #{modifierId,jdbcType=VARCHAR},
</if>
<if
test=
"modifierName != null"
>
modifier_name = #{modifierName,jdbcType=VARCHAR},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where page_id = #{pageId,jdbcType=BIGINT}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.hm.TabHaobanHmPage"
>
update tab_haoban_hm_page
set page_code = #{pageCode,jdbcType=CHAR},
page_name = #{pageName,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
page_title = #{pageTitle,jdbcType=VARCHAR},
merchant_name = #{merchantName,jdbcType=VARCHAR},
merchant_phone_number = #{merchantPhoneNumber,jdbcType=VARCHAR},
merchant_logo = #{merchantLogo,jdbcType=VARCHAR},
page_background_img = #{pageBackgroundImg,jdbcType=VARCHAR},
guide_comment = #{guideComment,jdbcType=VARCHAR},
createor_id = #{createorId,jdbcType=VARCHAR},
createor_name = #{createorName,jdbcType=VARCHAR},
modifier_id = #{modifierId,jdbcType=VARCHAR},
modifier_name = #{modifierName,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where page_id = #{pageId,jdbcType=BIGINT}
</update>
<select
id=
"queryHmPageTemplateList"
resultMap=
"BaseResultMap"
>
select
...
...
@@ -274,6 +121,7 @@
<if
test=
"endTime != null"
>
and #{endTime} >= create_time
</if>
and page_type = #{pageType}
</where>
order by page_id desc
</select>
...
...
haoban-manage3-service/src/test/java/HmLinkTest.java
View file @
8b51a7f2
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.redisson.api.RRateLimiter
;
import
org.redisson.api.RateIntervalUnit
;
import
org.redisson.api.RateType
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.haoban.
common.utils.DingUtils
;
import
com.gic.haoban.
manage.api.dto.ContentMaterialDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkStoreDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.service.KeyDataApiService
;
import
com.gic.haoban.manage.api.service.hm.HmLinkApiService
;
import
com.gic.haoban.manage.api.service.hm.HmLinkVisitLogApiService
;
import
com.gic.haoban.manage.
api.service.hm.HmQrcodeApi
Service
;
import
com.gic.haoban.manage.
service.service.QywxSend
Service
;
import
com.gic.haoban.manage.service.service.hm.HmLinkStoreService
;
import
com.gic.haoban.manage.service.util.QwFriendLimitCountUtil
;
import
com.gic.redis.data.util.RedisUtil
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
...
...
@@ -43,47 +37,21 @@ public class HmLinkTest {
@Autowired
private
HmLinkStoreService
hmLinkStoreService
;
@Autowired
private
HmQrcodeApiService
hmQrcodeApi
Service
;
private
QywxSendService
qywxSend
Service
;
volatile
int
x
=
0
;
@Test
public
void
test
()
throws
IOException
,
InterruptedException
{
List
<
ContentMaterialDTO
>
imageList
=
new
ArrayList
<>();
ContentMaterialDTO
d
=
new
ContentMaterialDTO
()
;
d
.
setImgUrl
(
"https://p.qlogo.cn/bizmail/hxlMR3pdsfnslruRxMXebKiabKrgOOpdmJ7shD0jUFbcUMoOh9I7AXw/0"
);
d
.
setMaterialType
(
2
);
imageList
.
add
(
d
)
;
this
.
qywxSendService
.
share
(
"ca66a01b79474c40b3e7c7f93daf1a3b"
,
Arrays
.
asList
(
"c6420c17febe426a9fb197dbd90bdc7b"
,
"4f2ae2fbfe594ad2a8ccdf9ab7b28713"
,
"fce45ed485e94d619b0124f2daf4b083"
),
"test"
,
imageList
);
for
(
int
i
=
0
;
i
<
100
;
i
++)
{
new
Thread
(
new
Runnable
()
{
@Override
public
void
run
()
{
// TODO Auto-generated method stub
while
(
true
)
{
String
ipKey
=
"hmadd:limit:ip"
;
int
ipLimitCount
=
300
;
RRateLimiter
rateLimiter
=
RedisUtil
.
getRedisClient
().
getRateLimiter
(
ipKey
);
rateLimiter
.
trySetRate
(
RateType
.
OVERALL
,
ipLimitCount
,
1
,
RateIntervalUnit
.
SECONDS
);
if
(
rateLimiter
.
tryAcquire
())
{
System
.
err
.
println
(
x
++);
}
else
{
System
.
err
.
println
(
"**************"
);
String
msg
=
"活码调用次数告警【ip】"
;
DingUtils
.
send
(
msg
,
false
);
}
try
{
Thread
.
sleep
(
10
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
}
}).
start
();
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmLinkController.java
View file @
8b51a7f2
...
...
@@ -3,7 +3,6 @@ package com.gic.haoban.manage.web.controller.hm;
import
java.text.ParseException
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.Calendar
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -39,6 +38,7 @@ import com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO;
import
com.gic.haoban.manage.api.dto.qdto.hm.WxUserAddLogSearchQDTO
;
import
com.gic.haoban.manage.api.dto.statistics.StatisticsDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO
;
import
com.gic.haoban.manage.api.enums.hm.HmLinkTypeEnum
;
import
com.gic.haoban.manage.api.service.hm.HmLinkApiService
;
import
com.gic.haoban.manage.api.service.hm.HmPageApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
...
...
@@ -87,7 +87,7 @@ public class HmLinkController {
private
WxUserAddLogApiService
wxUserAddLogApiService
;
@Autowired
private
HmQrcodeApiService
hmQrcodeApiService
;
@RequestMapping
(
"add"
)
@GicLogRecord
(
value
=
"${#logValue}"
,
category
=
GicLogRecordCategoryEnum
.
HUOMA
,
optType
=
GicLogRecordOptTypeEnum
.
HM_LINK_ADD
,
userFunc
=
LogRecordUserServiceImpl
.
class
,
optPage
=
"引流链接-新建链接"
)
public
RestResponse
<
Object
>
save
(
@RequestBody
HmLinkDTO
dto
)
{
...
...
@@ -105,11 +105,15 @@ public class HmLinkController {
dto
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
ServiceResponse
<
String
>
saveResp
=
this
.
hmLinkApiService
.
save
(
dto
);
if
(
saveResp
.
isSuccess
())
{
String
logContent
=
"新增引流链接【"
+
saveResp
.
getResult
()
+
"-"
+
dto
.
getName
()
+
"】"
;
logger
.
info
(
logContent
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logContent
);
GicLogRecordEvaluationContext
.
putOptTargetId
(
AuthWebRequestUtil
.
getLoginUser
().
getClerkId
());
return
RestResponse
.
successResult
();
if
(
dto
.
getLinkType
()==
HmLinkTypeEnum
.
CHAT_HM_LINK_TYPE
.
getLinkType
())
{
}
else
{
String
logContent
=
"新增引流链接【"
+
saveResp
.
getResult
()
+
"-"
+
dto
.
getName
()
+
"】"
;
logger
.
info
(
logContent
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logContent
);
GicLogRecordEvaluationContext
.
putOptTargetId
(
AuthWebRequestUtil
.
getLoginUser
().
getClerkId
());
return
RestResponse
.
successResult
();
}
}
return
RestResponse
.
failure
(
saveResp
.
getCode
(),
saveResp
.
getResult
());
}
...
...
@@ -135,14 +139,18 @@ public class HmLinkController {
dto
.
setModifierName
(
loginUser
.
getClerkName
());
ServiceResponse
<
String
>
saveResp
=
this
.
hmLinkApiService
.
save
(
dto
);
if
(
saveResp
.
isSuccess
())
{
String
logContent
=
this
.
getUpdateLog
(
oldDTO
,
dto
);
if
(
StringUtils
.
isBlank
(
logContent
))
{
GicLogRecordEvaluationContext
.
noWriteLog
();
if
(
dto
.
getLinkType
()==
HmLinkTypeEnum
.
CHAT_HM_LINK_TYPE
.
getLinkType
())
{
}
else
{
String
logContent
=
this
.
getUpdateLog
(
oldDTO
,
dto
);
if
(
StringUtils
.
isBlank
(
logContent
))
{
GicLogRecordEvaluationContext
.
noWriteLog
();
}
logger
.
info
(
logContent
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logContent
);
GicLogRecordEvaluationContext
.
putOptTargetId
(
AuthWebRequestUtil
.
getLoginUser
().
getClerkId
());
return
RestResponse
.
successResult
();
}
logger
.
info
(
logContent
);
GicLogRecordEvaluationContext
.
putAttribute
(
"logValue"
,
logContent
);
GicLogRecordEvaluationContext
.
putOptTargetId
(
AuthWebRequestUtil
.
getLoginUser
().
getClerkId
());
return
RestResponse
.
successResult
();
}
return
RestResponse
.
failure
(
saveResp
.
getCode
(),
saveResp
.
getResult
());
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmPageController.java
View file @
8b51a7f2
...
...
@@ -58,6 +58,7 @@ public class HmPageController {
pageDTO
.
setCreateorName
(
loginUser
.
getClerkName
());
pageDTO
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
pageDTO
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
pageDTO
.
setPageType
(
pageSettingReq
.
getPageType
());
ServiceResponse
<
Long
>
serviceResponse
=
pageApiService
.
saveOrUpdateHmPage
(
pageDTO
);
if
(
serviceResponse
.
isSuccess
()){
String
logContent
=
"新增落地页模板【MB01"
+
serviceResponse
.
getResult
()+
"-"
+
pageSettingReq
.
getPageName
()
+
"】"
;
...
...
@@ -157,6 +158,7 @@ public class HmPageController {
hmPageQDTO
.
setPageSearchText
(
pageListVO
.
getPageSearchText
());
hmPageQDTO
.
setStartTime
(
pageListVO
.
getStartTime
());
hmPageQDTO
.
setEndTime
(
pageListVO
.
getEndTime
());
hmPageQDTO
.
setPageType
(
pageListVO
.
getPageType
());
ServiceResponse
<
Page
<
HmPageDTO
>>
serviceResponse
=
pageApiService
.
queryPageList
(
hmPageQDTO
);
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/hm/HmPageListQO.java
View file @
8b51a7f2
...
...
@@ -22,6 +22,16 @@ public class HmPageListQO extends BasePageInfo {
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
endTime
;
private
int
pageType
;
public
int
getPageType
()
{
return
pageType
;
}
public
void
setPageType
(
int
pageType
)
{
this
.
pageType
=
pageType
;
}
public
String
getPageSearchText
()
{
return
pageSearchText
;
}
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/hm/HmPageSettingReq.java
View file @
8b51a7f2
...
...
@@ -52,6 +52,16 @@ public class HmPageSettingReq implements Serializable {
* 引导语
*/
private
String
guideComment
;
private
int
pageType
;
public
int
getPageType
()
{
return
pageType
;
}
public
void
setPageType
(
int
pageType
)
{
this
.
pageType
=
pageType
;
}
public
Long
getPageId
()
{
return
pageId
;
...
...
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