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
235eaee8
Commit
235eaee8
authored
Sep 25, 2023
by
王祖波
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/feature-content4-3' into feature-content4-3
parents
a120ff7c
8988211d
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
433 additions
and
5 deletions
+433
-5
HaobanClerkTypeEnum.java
.../com/gic/haoban/manage/api/enums/HaobanClerkTypeEnum.java
+6
-4
WxEnterpriseRelatedApiService.java
...ban/manage/api/service/WxEnterpriseRelatedApiService.java
+2
-0
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+3
-0
WxEnterpriseRelatedApiServiceImpl.java
...e/service/out/impl/WxEnterpriseRelatedApiServiceImpl.java
+5
-0
AppOrderApiServiceImpl.java
...vice/service/out/impl/licence/AppOrderApiServiceImpl.java
+4
-0
HaobanRoleApiServiceImpl.java
...rvice/service/out/impl/role/HaobanRoleApiServiceImpl.java
+1
-1
CommentController.java
...oban/manage/web/controller/content/CommentController.java
+141
-0
CommentCountQO.java
.../haoban/manage/web/qo/content/comment/CommentCountQO.java
+31
-0
CommentInfoVO.java
...c/haoban/manage/web/qo/content/comment/CommentInfoVO.java
+84
-0
SaveCommentQO.java
...c/haoban/manage/web/qo/content/comment/SaveCommentQO.java
+53
-0
SonCommentInfoVO.java
...aoban/manage/web/qo/content/comment/SonCommentInfoVO.java
+101
-0
dubbo-haoban-manage-wx.xml
...ge3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
+2
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/enums/HaobanClerkTypeEnum.java
View file @
235eaee8
...
...
@@ -9,20 +9,22 @@ package com.gic.haoban.manage.api.enums;
**/
public
enum
HaobanClerkTypeEnum
{
;
CLERK
(
0
,
"导购/店员"
),
STORE_MANAGER
(
1
,
"店长"
),
AREA_MANAGER
(
2
,
"区经"
);
HaobanClerkTypeEnum
(
Integer
type
,
String
desc
){
this
.
code
=
type
;
this
.
desc
=
desc
;
}
private
int
code
;
private
Integer
code
;
private
String
desc
;
public
int
getCode
()
{
public
Integer
getCode
()
{
return
code
;
}
public
void
setCode
(
int
code
)
{
public
void
setCode
(
Integer
code
)
{
this
.
code
=
code
;
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseRelatedApiService.java
View file @
235eaee8
...
...
@@ -170,4 +170,6 @@ public interface WxEnterpriseRelatedApiService {
public
int
getRelationCount
(
String
enterpriseId
)
;
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Integer
>
getEnterprieseQwType
(
String
enterpriseId
)
;
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
235eaee8
...
...
@@ -498,6 +498,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
private
void
addToMq2Mark
(
String
wxEnterpriseId
)
{
String
key
=
"qwadd:count2:"
+
wxEnterpriseId
;
if
(
null
!=
RedisUtil
.
getCache
(
"qwadd:count:"
+
wxEnterpriseId
))
{
RedisUtil
.
delCache
(
"qwadd:count:"
+
wxEnterpriseId
)
;
}
RedisUtil
.
setCache
(
key
,
1
,
600L
);
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseRelatedApiServiceImpl.java
View file @
235eaee8
...
...
@@ -730,4 +730,9 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
public
int
getRelationCount
(
String
enterpriseId
)
{
return
this
.
wxEnterpriseRelatedService
.
getRelationCount
(
enterpriseId
);
}
@Override
public
com
.
gic
.
api
.
base
.
commons
.
ServiceResponse
<
Integer
>
getEnterprieseQwType
(
String
enterpriseId
)
{
return
this
.
wxEnterpriseRelatedService
.
getEnterprieseQwType
(
enterpriseId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/licence/AppOrderApiServiceImpl.java
View file @
235eaee8
...
...
@@ -304,6 +304,10 @@ public class AppOrderApiServiceImpl implements AppOrderApiService {
appOrderEndTime
=
now
;
}
logger
.
info
(
"已购买付费应用的到期时间:{},合同到期时间:{}"
,
DateUtil
.
dateToStr
(
appOrderEndTime
,
DateUtil
.
FORMAT_DATETIME_19
),
DateUtil
.
dateToStr
(
endTime
,
DateUtil
.
FORMAT_DATETIME_19
));
//如果过期时间小于当前时间,取当前时间
if
(
now
.
after
(
appOrderEndTime
)){
appOrderEndTime
=
now
;
}
int
i
=
DateUtil
.
daysBetween
(
appOrderEndTime
,
endTime
);
if
(
i
<
0
){
i
=
0
;
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/role/HaobanRoleApiServiceImpl.java
View file @
235eaee8
...
...
@@ -636,7 +636,7 @@ public class HaobanRoleApiServiceImpl implements HaobanRoleApiService {
// 查询企微下 导购、店长、区经 的role_id
String
wxEnterpriseId
=
wxEnterpris
.
getWxEnterpriseId
();
// 处理商户权限
// 运维
+ 好办后台
// 运维
List
<
HaobanRoleBO
>
haobanRoleBOS
=
haobanRoleService
.
getListByWxEnterpriseId
(
wxEnterpriseId
,
null
);
if
(
CollectionUtils
.
isEmpty
(
haobanRoleBOS
))
{
logger
.
info
(
"【flushRightOneTime】企业{} 企微 {} 下没有角色 "
,
contentMaterialROleInitQDTO
.
getEnterpriseId
(),
wxEnterpriseId
);
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/content/CommentController.java
0 → 100644
View file @
235eaee8
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
.
content
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.content.api.dto.comment.ListCommentDTO
;
import
com.gic.content.api.dto.comment.ListSonCommentDTO
;
import
com.gic.content.api.enums.UserTypeEnum
;
import
com.gic.content.api.qdto.comment.ListMobileCommentQDTO
;
import
com.gic.content.api.qdto.comment.SaveCommentQDTO
;
import
com.gic.content.api.service.ContentMaterialCommentApiService
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.enums.HaobanClerkTypeEnum
;
import
com.gic.haoban.manage.api.service.StaffClerkRelationApiService
;
import
com.gic.haoban.manage.web.qo.content.comment.CommentCountQO
;
import
com.gic.haoban.manage.web.qo.content.comment.CommentInfoVO
;
import
com.gic.haoban.manage.web.qo.content.comment.SaveCommentQO
;
import
com.gic.haoban.manage.web.qo.content.comment.SonCommentInfoVO
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.ArrayList
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
/**
* 好办-知识库-评论
* @Author MUSI
* @Date 2023/9/19 3:16 PM
* @Description
* @Version
**/
@RestController
@RequestMapping
(
path
=
"/comment"
)
public
class
CommentController
{
@Autowired
private
ContentMaterialCommentApiService
contentMaterialCommentApiService
;
@Autowired
private
StaffClerkRelationApiService
staffClerkRelationApiService
;
/**
* 评论总数(包含子评论)
* @return
*/
@RequestMapping
(
path
=
"/count-comment"
)
public
RestResponse
<
Integer
>
countContentComment
(
CommentCountQO
commentCountQO
)
{
ListMobileCommentQDTO
mobileCommentQDTO
=
new
ListMobileCommentQDTO
();
mobileCommentQDTO
.
setEnterpriseId
(
commentCountQO
.
getEnterpriseId
());
mobileCommentQDTO
.
setContentMaterialCommentId
(
commentCountQO
.
getContentMaterialId
());
mobileCommentQDTO
.
setMemberId
(
commentCountQO
.
getClerkId
());
mobileCommentQDTO
.
setMaterialPurpose
(
3
);
ServiceResponse
<
Integer
>
serviceResponse
=
contentMaterialCommentApiService
.
countCommentForWechat
(
mobileCommentQDTO
);
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
/**
* 评论列表
* @param commentCountQO
* @return
*/
@RequestMapping
(
path
=
"/list-comment"
)
public
RestResponse
<
Page
<
CommentInfoVO
>>
listCommentInfoVo
(
CommentCountQO
commentCountQO
)
{
ListMobileCommentQDTO
mobileCommentQDTO
=
new
ListMobileCommentQDTO
();
mobileCommentQDTO
.
setEnterpriseId
(
commentCountQO
.
getEnterpriseId
());
mobileCommentQDTO
.
setContentMaterialCommentId
(
commentCountQO
.
getContentMaterialId
());
mobileCommentQDTO
.
setMemberId
(
commentCountQO
.
getClerkId
());
mobileCommentQDTO
.
setMaterialPurpose
(
3
);
ServiceResponse
<
Page
<
ListCommentDTO
>>
serviceResponse
=
contentMaterialCommentApiService
.
listComment
(
mobileCommentQDTO
);
return
RestResponse
.
successResult
();
}
/**
* 子评论列表
* @return
*/
@RequestMapping
(
path
=
"/list-son-comment"
)
public
RestResponse
<
Page
<
SonCommentInfoVO
>>
listSonComment
(
CommentCountQO
commentCountQO
)
{
return
RestResponse
.
successResult
();
}
/**
* 添加评论
* @param saveCommentQO
* @return
*/
@RequestMapping
(
path
=
"/save-comment"
)
public
RestResponse
<
SonCommentInfoVO
>
saveComment
(
SaveCommentQO
saveCommentQO
)
{
SaveCommentQDTO
saveCommentQDTO
=
EntityUtil
.
changeEntityByJSON
(
SaveCommentQDTO
.
class
,
saveCommentQO
);
saveCommentQDTO
.
setMemberId
(
saveCommentQO
.
getClerkId
());
saveCommentQDTO
.
setReplyMemberId
(
saveCommentQO
.
getReplyClerkId
());
List
<
String
>
clerkIds
=
new
ArrayList
<>();
clerkIds
.
add
(
saveCommentQO
.
getClerkId
());
if
(
StringUtils
.
isNotBlank
(
saveCommentQO
.
getReplyClerkId
()))
{
clerkIds
.
add
(
saveCommentQO
.
getReplyClerkId
());
}
Map
<
String
,
StaffClerkRelationDTO
>
clerkInfoMap
=
this
.
getClerkInfoMap
(
saveCommentQO
.
getWxEnterpriseId
(),
clerkIds
);
StaffClerkRelationDTO
staffClerkRelationDTO
=
clerkInfoMap
.
get
(
saveCommentQO
.
getClerkId
());
if
(
staffClerkRelationDTO
!=
null
)
{
saveCommentQDTO
.
setUserCode
(
staffClerkRelationDTO
.
getClerkCode
());
if
(
HaobanClerkTypeEnum
.
AREA_MANAGER
.
getCode
().
equals
(
staffClerkRelationDTO
.
getClerkType
()))
{
saveCommentQDTO
.
setUserType
(
UserTypeEnum
.
AREA_MANAGER
.
value
);
}
else
{
saveCommentQDTO
.
setUserType
(
UserTypeEnum
.
CLERK
.
value
);
}
}
staffClerkRelationDTO
=
clerkInfoMap
.
get
(
saveCommentQO
.
getReplyClerkId
());
if
(
staffClerkRelationDTO
!=
null
)
{
saveCommentQDTO
.
setReplyUserCode
(
staffClerkRelationDTO
.
getClerkCode
());
if
(
HaobanClerkTypeEnum
.
AREA_MANAGER
.
getCode
().
equals
(
staffClerkRelationDTO
.
getClerkType
()))
{
saveCommentQDTO
.
setReplyUserType
(
UserTypeEnum
.
AREA_MANAGER
.
value
);
}
else
{
saveCommentQDTO
.
setReplyUserType
(
UserTypeEnum
.
CLERK
.
value
);
}
}
ServiceResponse
<
ListSonCommentDTO
>
serviceResponse
=
contentMaterialCommentApiService
.
saveComment
(
saveCommentQDTO
);
SonCommentInfoVO
sonCommentInfoVO
=
EntityUtil
.
changeEntityByJSON
(
SonCommentInfoVO
.
class
,
serviceResponse
.
getResult
());
return
RestResponse
.
successResult
(
sonCommentInfoVO
);
}
public
Map
<
String
,
StaffClerkRelationDTO
>
getClerkInfoMap
(
String
wxEnterpriseId
,
List
<
String
>
clerkIds
)
{
List
<
StaffClerkRelationDTO
>
staffClerkRelations
=
staffClerkRelationApiService
.
listByClerkIdsWxEnterpriseId
(
clerkIds
,
wxEnterpriseId
);
if
(
CollectionUtils
.
isEmpty
(
staffClerkRelations
))
{
return
Collections
.
emptyMap
();
}
return
staffClerkRelations
.
stream
()
.
collect
(
Collectors
.
toMap
(
StaffClerkRelationDTO:
:
getClerkId
,
Function
.
identity
(),
(
v1
,
v2
)
->
v1
));
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/comment/CommentCountQO.java
0 → 100644
View file @
235eaee8
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
content
.
comment
;
import
com.gic.api.base.commons.BasePageInfo
;
import
lombok.Data
;
/**
* @Author MUSI
* @Date 2023/9/19 3:25 PM
* @Description
* @Version
**/
@Data
public
class
CommentCountQO
extends
BasePageInfo
{
private
static
final
long
serialVersionUID
=
-
4989542424690624006L
;
/**
* 企业ID
*/
private
String
enterpriseId
;
/**
* 素材ID
*/
private
Long
contentMaterialId
;
/**
* 导购id
*/
private
String
clerkId
;
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/comment/CommentInfoVO.java
0 → 100644
View file @
235eaee8
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
content
.
comment
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* @Author MUSI
* @Date 2023/9/19 4:41 PM
* @Description
* @Version
**/
@Data
public
class
CommentInfoVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
8820263048755899343L
;
/**
* 素材评论id
*/
private
Long
contentMaterialCommentId
;
/**
* 素材id
*/
private
Long
contentMaterialId
;
/**
* 评论内容
*/
private
String
commentContent
;
/**
* 审核状态0未审核1未通过2已通过
*/
private
Integer
auditStatus
;
/**
* 是否置顶0不置顶1置顶
*/
private
Integer
topFlag
;
/**
* 是否公开展示0隐藏1公开
*/
private
Integer
showFlag
;
/**
* 会员ID
*/
private
String
memberId
;
/**
* 会员昵称
*/
private
String
memberNick
;
/**
* 会员头像
*/
private
String
memberHeadImage
;
/**
* 会员删除标记 0:未删除 1:已删除
*/
private
Integer
memberDeleteFlag
=
0
;
/**
* 子评论
*/
private
List
<
SonCommentInfoVO
>
sonComments
;
/**
* 子评论数量(已经减去了展示的子评论)
*/
private
Integer
sonCommentNum
;
/**
* 创建时间
*/
private
Date
createTime
;
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/comment/SaveCommentQO.java
0 → 100644
View file @
235eaee8
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
content
.
comment
;
import
lombok.Data
;
import
java.io.Serializable
;
/**
* @Author MUSI
* @Date 2023/9/19 5:00 PM
* @Description
* @Version
**/
@Data
public
class
SaveCommentQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1584226631161349430L
;
/**
* 微信信息
*/
private
String
wxEnterpriseId
;
/**
* 父级素材评论id
*/
private
Long
parentContentMaterialCommentId
;
/**
* 素材id
*/
private
Long
contentMaterialId
;
/**
* 评论内容
*/
private
String
commentContent
;
/**
* 回复的导购ID
*/
private
String
replyClerkId
;
/**
* 导购ID
*/
private
String
clerkId
;
/**
* 企业ID
*/
private
String
enterpriseId
;
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/qo/content/comment/SonCommentInfoVO.java
0 → 100644
View file @
235eaee8
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
content
.
comment
;
import
lombok.Data
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* @Author MUSI
* @Date 2023/9/19 4:42 PM
* @Description
* @Version
**/
@Data
public
class
SonCommentInfoVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2419520239887917983L
;
/**
* 素材评论id
*/
private
Long
contentMaterialCommentId
;
/**
* 父级素材评论id
*/
private
Long
parentContentMaterialCommentId
;
/**
* 素材id
*/
private
Long
contentMaterialId
;
/**
* 评论内容
*/
private
String
commentContent
;
/**
* 审核状态0未审核1未通过2已通过
*/
private
Integer
auditStatus
;
/**
* 是否置顶0不置顶1置顶
*/
private
Integer
topFlag
;
/**
* 是否公开展示0隐藏1公开
*/
private
Integer
showFlag
;
/**
* 会员ID
*/
private
String
memberId
;
/**
* 会员昵称
*/
private
String
memberNick
;
/**
* 会员删除标记 0:未删除 1:已删除
*/
private
Integer
memberDeleteFlag
=
0
;
/**
* 会员头像
*/
private
String
memberHeadImage
;
/**
* 回复的会员ID
*/
private
String
replyMemberId
;
/**
* 回复的会员昵称
*/
private
String
replyMemberNick
;
/**
* 回复的会员头像
*/
private
String
replyMemberHeadImage
;
/**
* 会员删除标记 0:未删除 1:已删除
*/
private
Integer
replyMemberDeleteFlag
=
0
;
private
Boolean
isMainComment
=
false
;
/**
* 创建时间
*/
private
Date
createTime
;
}
haoban-manage3-wx/src/main/webapp/WEB-INF/dubbo-haoban-manage-wx.xml
View file @
235eaee8
...
...
@@ -149,5 +149,7 @@
id=
"goodsCenterApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.haoban.commission.api.service.local.CommissionSettleDetailApiService"
id=
"commissionSettleDetailApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
<dubbo:reference
interface=
"com.gic.content.api.service.ContentMaterialCommentApiService"
id=
"contentMaterialCommentApiService"
timeout=
"10000"
retries=
"0"
check=
"false"
/>
</beans>
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