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
43184165
Commit
43184165
authored
Jul 08, 2022
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 欢迎语相关
parent
fa417e17
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
138 additions
and
8 deletions
+138
-8
WelcomeRemoveDTO.java
...c/haoban/manage/api/dto/welcome/dto/WelcomeRemoveDTO.java
+39
-0
QueryWelcomeRelationQDTO.java
...manage/api/dto/welcome/qdto/QueryWelcomeRelationQDTO.java
+3
-3
WelcomeApiService.java
.../gic/haoban/manage/api/service/out/WelcomeApiService.java
+8
-0
WelcomeRelationQO.java
.../gic/haoban/manage/service/pojo/qo/WelcomeRelationQO.java
+3
-3
WelcomeService.java
...com/gic/haoban/manage/service/service/WelcomeService.java
+8
-0
WelcomeRelationService.java
...ban/manage/service/service/hm/WelcomeRelationService.java
+10
-0
WelcomeRelationServiceImpl.java
...e/service/service/hm/impl/WelcomeRelationServiceImpl.java
+14
-0
WelcomeServiceImpl.java
...aoban/manage/service/service/impl/WelcomeServiceImpl.java
+41
-0
WelcomeApiServiceImpl.java
...anage/service/service/out/impl/WelcomeApiServiceImpl.java
+12
-2
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/welcome/dto/WelcomeRemoveDTO.java
0 → 100644
View file @
43184165
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
welcome
.
dto
;
import
java.io.Serializable
;
/**
* @Author MUSI
* @Date 2022/7/8 9:07 AM
* @Description
* @Version
* 活码删除失败时返回对象
**/
public
class
WelcomeRemoveDTO
implements
Serializable
{
/**
* 活码引用数量
*/
private
Integer
qrCodeReferNum
;
/**
* 链接引用次数
*/
private
Integer
linkReferNum
;
public
Integer
getQrCodeReferNum
()
{
return
qrCodeReferNum
;
}
public
void
setQrCodeReferNum
(
Integer
qrCodeReferNum
)
{
this
.
qrCodeReferNum
=
qrCodeReferNum
;
}
public
Integer
getLinkReferNum
()
{
return
linkReferNum
;
}
public
void
setLinkReferNum
(
Integer
linkReferNum
)
{
this
.
linkReferNum
=
linkReferNum
;
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/welcome/qdto/QueryWelcomeRelationQDTO.java
View file @
43184165
...
@@ -10,13 +10,13 @@ import com.gic.haoban.base.api.common.BasePageInfo;
...
@@ -10,13 +10,13 @@ import com.gic.haoban.base.api.common.BasePageInfo;
**/
**/
public
class
QueryWelcomeRelationQDTO
extends
BasePageInfo
{
public
class
QueryWelcomeRelationQDTO
extends
BasePageInfo
{
private
Lo
ng
welcomeId
;
private
Stri
ng
welcomeId
;
public
Lo
ng
getWelcomeId
()
{
public
Stri
ng
getWelcomeId
()
{
return
welcomeId
;
return
welcomeId
;
}
}
public
void
setWelcomeId
(
Lo
ng
welcomeId
)
{
public
void
setWelcomeId
(
Stri
ng
welcomeId
)
{
this
.
welcomeId
=
welcomeId
;
this
.
welcomeId
=
welcomeId
;
}
}
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/out/WelcomeApiService.java
View file @
43184165
...
@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
...
@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import
com.gic.haoban.manage.api.dto.welcome.dto.FriendSettingDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.FriendSettingDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeListDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeListDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeRemoveDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.SaveFriendSettingQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.SaveFriendSettingQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.SaveWelcomeQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.SaveWelcomeQDTO
;
...
@@ -117,4 +118,11 @@ public interface WelcomeApiService {
...
@@ -117,4 +118,11 @@ public interface WelcomeApiService {
*/
*/
ServiceResponse
<
Page
<
WelcomeListDTO
>>
listWelcomeWithCondition
(
QueryWelcomeQDTO
queryWelcomeQDTO
);
ServiceResponse
<
Page
<
WelcomeListDTO
>>
listWelcomeWithCondition
(
QueryWelcomeQDTO
queryWelcomeQDTO
);
/**
* 删除欢迎语,带欢迎语校验
* @param welcomeId
* @return
*/
ServiceResponse
<
WelcomeRemoveDTO
>
removeWelcomeWithErrorInfo
(
String
welcomeId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/qo/WelcomeRelationQO.java
View file @
43184165
...
@@ -10,13 +10,13 @@ import com.gic.haoban.base.api.common.BasePageInfo;
...
@@ -10,13 +10,13 @@ import com.gic.haoban.base.api.common.BasePageInfo;
**/
**/
public
class
WelcomeRelationQO
extends
BasePageInfo
{
public
class
WelcomeRelationQO
extends
BasePageInfo
{
private
Lo
ng
welcomeId
;
private
Stri
ng
welcomeId
;
public
Lo
ng
getWelcomeId
()
{
public
Stri
ng
getWelcomeId
()
{
return
welcomeId
;
return
welcomeId
;
}
}
public
void
setWelcomeId
(
Lo
ng
welcomeId
)
{
public
void
setWelcomeId
(
Stri
ng
welcomeId
)
{
this
.
welcomeId
=
welcomeId
;
this
.
welcomeId
=
welcomeId
;
}
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WelcomeService.java
View file @
43184165
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.service.service;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeRemoveDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeQDTO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.*
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.*
;
...
@@ -135,4 +136,11 @@ public interface WelcomeService {
...
@@ -135,4 +136,11 @@ public interface WelcomeService {
* @return
* @return
*/
*/
WelcomeDetailBO
getMatchWelcomeWithReferId
(
String
staffId
,
String
wxEnterpriseId
,
String
referId
);
WelcomeDetailBO
getMatchWelcomeWithReferId
(
String
staffId
,
String
wxEnterpriseId
,
String
referId
);
/**
* 删除欢迎语
* @param welcomeId
* @return
*/
WelcomeRemoveDTO
removeWithErrorInfo
(
String
welcomeId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/WelcomeRelationService.java
View file @
43184165
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
hm
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
hm
;
import
com.gic.haoban.manage.service.entity.hm.TabHaobanWelcomeTemplateRelation
;
import
com.gic.haoban.manage.service.entity.hm.TabHaobanWelcomeTemplateRelation
;
import
com.gic.haoban.manage.service.pojo.qo.WelcomeRelationQO
;
import
java.util.List
;
/**
/**
* @Author MUSI
* @Author MUSI
...
@@ -17,4 +20,11 @@ public interface WelcomeRelationService {
...
@@ -17,4 +20,11 @@ public interface WelcomeRelationService {
* @return
* @return
*/
*/
TabHaobanWelcomeTemplateRelation
queryWelcomeRelation
(
String
referId
,
Integer
status
);
TabHaobanWelcomeTemplateRelation
queryWelcomeRelation
(
String
referId
,
Integer
status
);
/**
* 条件查询 欢迎语引用列表
* @param welcomeRelationQo
* @return
*/
List
<
TabHaobanWelcomeTemplateRelation
>
queryWelcomeRelationList
(
WelcomeRelationQO
welcomeRelationQo
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/WelcomeRelationServiceImpl.java
View file @
43184165
...
@@ -2,10 +2,13 @@ package com.gic.haoban.manage.service.service.hm.impl;
...
@@ -2,10 +2,13 @@ package com.gic.haoban.manage.service.service.hm.impl;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanWelcomeTemplateRelationMapper
;
import
com.gic.haoban.manage.service.dao.mapper.TabHaobanWelcomeTemplateRelationMapper
;
import
com.gic.haoban.manage.service.entity.hm.TabHaobanWelcomeTemplateRelation
;
import
com.gic.haoban.manage.service.entity.hm.TabHaobanWelcomeTemplateRelation
;
import
com.gic.haoban.manage.service.pojo.qo.WelcomeRelationQO
;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
/**
/**
* @Author MUSI
* @Author MUSI
* @Date 2022/7/4 5:50 PM
* @Date 2022/7/4 5:50 PM
...
@@ -29,4 +32,15 @@ public class WelcomeRelationServiceImpl implements WelcomeRelationService {
...
@@ -29,4 +32,15 @@ public class WelcomeRelationServiceImpl implements WelcomeRelationService {
public
TabHaobanWelcomeTemplateRelation
queryWelcomeRelation
(
String
referId
,
Integer
status
)
{
public
TabHaobanWelcomeTemplateRelation
queryWelcomeRelation
(
String
referId
,
Integer
status
)
{
return
welcomeTemplateRelationMapper
.
queryWelTemplateRelation
(
null
,
referId
,
status
);
return
welcomeTemplateRelationMapper
.
queryWelTemplateRelation
(
null
,
referId
,
status
);
}
}
/**
* 条件查询 欢迎语引用列表
*
* @param welcomeRelationQo
* @return
*/
@Override
public
List
<
TabHaobanWelcomeTemplateRelation
>
queryWelcomeRelationList
(
WelcomeRelationQO
welcomeRelationQo
)
{
return
welcomeTemplateRelationMapper
.
queryWelcomeTemplate
(
welcomeRelationQo
);
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WelcomeServiceImpl.java
View file @
43184165
...
@@ -3,17 +3,20 @@ package com.gic.haoban.manage.service.service.impl;
...
@@ -3,17 +3,20 @@ package com.gic.haoban.manage.service.service.impl;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.common.utils.StringUtil
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeRemoveDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeQDTO
;
import
com.gic.haoban.manage.api.enums.FriendSettingTypeEnum
;
import
com.gic.haoban.manage.api.enums.FriendSettingTypeEnum
;
import
com.gic.haoban.manage.api.enums.WelcomeMediaTypeEnum
;
import
com.gic.haoban.manage.api.enums.WelcomeMediaTypeEnum
;
import
com.gic.haoban.manage.api.enums.WelcomeRelationStatusEnum
;
import
com.gic.haoban.manage.api.enums.WelcomeRelationStatusEnum
;
import
com.gic.haoban.manage.api.enums.WelcomeSuitTypeEnum
;
import
com.gic.haoban.manage.api.enums.WelcomeSuitTypeEnum
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeType
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeType
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.dao.mapper.*
;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.entity.hm.TabHaobanWelcomeTemplateRelation
;
import
com.gic.haoban.manage.service.entity.hm.TabHaobanWelcomeTemplateRelation
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.*
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.*
;
import
com.gic.haoban.manage.service.pojo.qo.WelcomeInfoQO
;
import
com.gic.haoban.manage.service.pojo.qo.WelcomeInfoQO
;
import
com.gic.haoban.manage.service.pojo.qo.WelcomeRelationQO
;
import
com.gic.haoban.manage.service.service.WelcomeService
;
import
com.gic.haoban.manage.service.service.WelcomeService
;
import
com.gic.haoban.manage.service.service.WelcomeSuitRangService
;
import
com.gic.haoban.manage.service.service.WelcomeSuitRangService
;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
...
@@ -643,4 +646,42 @@ public class WelcomeServiceImpl implements WelcomeService {
...
@@ -643,4 +646,42 @@ public class WelcomeServiceImpl implements WelcomeService {
return
convertWelcomeToBo
(
tabWelcome
);
return
convertWelcomeToBo
(
tabWelcome
);
}
}
/**
* 删除欢迎语
*
* @param welcomeId
* @return
* 删除成功时 直接return null
* 不可删除时 返回具体的关联数量
*/
@Override
public
WelcomeRemoveDTO
removeWithErrorInfo
(
String
welcomeId
)
{
// 1、查询欢迎语
// 2、根据欢迎语类型 区分
// 3、特殊类型 查询欢迎语引用的数量
// 4、判断是否可删除
TabWelcome
tabWelcome
=
welcomeMapper
.
selectByPrimaryKey
(
welcomeId
);
if
(
tabWelcome
==
null
){
return
null
;
}
if
(
HmWelcomeType
.
NORMAL
.
getCode
().
equals
(
tabWelcome
.
getType
())){
this
.
removeWelcome
(
welcomeId
);
return
null
;
}
WelcomeRelationQO
welcomeRelationQo
=
new
WelcomeRelationQO
();
welcomeRelationQo
.
setWelcomeId
(
welcomeId
);
List
<
TabHaobanWelcomeTemplateRelation
>
tabHaobanWelcomeTemplateRelations
=
welcomeRelationService
.
queryWelcomeRelationList
(
welcomeRelationQo
);
if
(
CollectionUtils
.
isEmpty
(
tabHaobanWelcomeTemplateRelations
)){
this
.
removeWelcome
(
welcomeId
);
return
null
;
}
Map
<
Integer
,
List
<
TabHaobanWelcomeTemplateRelation
>>
welcomeGroupByType
=
tabHaobanWelcomeTemplateRelations
.
stream
()
.
collect
(
Collectors
.
groupingBy
(
TabHaobanWelcomeTemplateRelation:
:
getType
));
WelcomeRemoveDTO
welcomeRemoveDTO
=
new
WelcomeRemoveDTO
();
welcomeRemoveDTO
.
setQrCodeReferNum
(
Optional
.
ofNullable
(
welcomeGroupByType
.
get
(
HmWelcomeReferType
.
HM
.
getCode
()))
.
map
(
List:
:
size
).
orElse
(
0
));
welcomeRemoveDTO
.
setLinkReferNum
(
Optional
.
ofNullable
(
welcomeGroupByType
.
get
(
HmWelcomeReferType
.
LINK
.
getCode
()))
.
map
(
List:
:
size
).
orElse
(
0
));
return
welcomeRemoveDTO
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WelcomeApiServiceImpl.java
View file @
43184165
...
@@ -3,16 +3,15 @@ package com.gic.haoban.manage.service.service.out.impl;
...
@@ -3,16 +3,15 @@ package com.gic.haoban.manage.service.service.out.impl;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.haoban.manage.api.dto.welcome.dto.FriendSettingDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.FriendSettingDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeDetailDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeListDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeListDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeMediaDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeMediaDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeRemoveDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeSuitDepartmentDTO
;
import
com.gic.haoban.manage.api.dto.welcome.dto.WelcomeSuitDepartmentDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.SaveFriendSettingQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.SaveFriendSettingQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.SaveWelcomeQDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.SaveWelcomeQDTO
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeType
;
import
com.gic.haoban.manage.api.service.out.WelcomeApiService
;
import
com.gic.haoban.manage.api.service.out.WelcomeApiService
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.FriendSettingDetailBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.FriendSettingDetailBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.SaveFriendSettingBO
;
import
com.gic.haoban.manage.service.pojo.bo.welcome.SaveFriendSettingBO
;
...
@@ -182,4 +181,15 @@ public class WelcomeApiServiceImpl implements WelcomeApiService {
...
@@ -182,4 +181,15 @@ public class WelcomeApiServiceImpl implements WelcomeApiService {
serviceResponse
.
setResult
(
page
);
serviceResponse
.
setResult
(
page
);
return
serviceResponse
;
return
serviceResponse
;
}
}
/**
* 删除欢迎语,带欢迎语校验
*
* @param welcomeId
* @return
*/
@Override
public
ServiceResponse
<
WelcomeRemoveDTO
>
removeWelcomeWithErrorInfo
(
String
welcomeId
)
{
return
ServiceResponse
.
success
(
welcomeService
.
removeWithErrorInfo
(
welcomeId
));
}
}
}
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