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
9a0f1222
Commit
9a0f1222
authored
Aug 03, 2022
by
徐高华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'developer' of
http://git.gicdev.com/haoban3.0/haoban-manage3.0.git
into developer
parents
a3eac062
5e76a33e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
6 deletions
+48
-6
WelcomeRelationQO.java
.../gic/haoban/manage/service/pojo/qo/WelcomeRelationQO.java
+12
-0
WelcomeRelationServiceImpl.java
...e/service/service/hm/impl/WelcomeRelationServiceImpl.java
+4
-1
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+9
-3
HmWelcomeRelationApiServiceImpl.java
.../service/out/impl/hm/HmWelcomeRelationApiServiceImpl.java
+16
-1
TabHaobanWelcomeTemplateRelationMapper.xml
...sources/mapper/TabHaobanWelcomeTemplateRelationMapper.xml
+6
-0
HmPageServiceTest.java
haoban-manage3-service/src/test/java/HmPageServiceTest.java
+1
-1
No files found.
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/qo/WelcomeRelationQO.java
View file @
9a0f1222
...
...
@@ -2,6 +2,8 @@ package com.gic.haoban.manage.service.pojo.qo;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
java.util.List
;
/**
* @Author MUSI
* @Date 2022/7/4 10:54 AM
...
...
@@ -17,6 +19,8 @@ public class WelcomeRelationQO extends BasePageInfo {
private
String
searchContent
;
private
List
<
Integer
>
statusList
;
public
String
getWelcomeId
()
{
return
welcomeId
;
}
...
...
@@ -40,4 +44,12 @@ public class WelcomeRelationQO extends BasePageInfo {
public
void
setSearchContent
(
String
searchContent
)
{
this
.
searchContent
=
searchContent
;
}
public
List
<
Integer
>
getStatusList
()
{
return
statusList
;
}
public
void
setStatusList
(
List
<
Integer
>
statusList
)
{
this
.
statusList
=
statusList
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/WelcomeRelationServiceImpl.java
View file @
9a0f1222
...
...
@@ -161,7 +161,10 @@ public class WelcomeRelationServiceImpl implements WelcomeRelationService {
return
Boolean
.
TRUE
;
}
welcomeTemplateRelation
.
setUpdateTime
(
new
Date
());
welcomeTemplateRelation
.
setStatus
(
WelcomeRelationStatusEnum
.
DISABLE
.
getCode
());
welcomeTemplateRelation
.
setStatus
(
hmWelcomeRelationBO
.
getStatus
());
if
(
welcomeTemplateRelation
.
getStatus
()
==
null
){
welcomeTemplateRelation
.
setStatus
(
WelcomeRelationStatusEnum
.
DISABLE
.
getCode
());
}
welcomeTemplateRelationMapper
.
updateByPrimaryKeySelective
(
welcomeTemplateRelation
);
// 定义
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
9a0f1222
...
...
@@ -24,6 +24,7 @@ import com.gic.haoban.manage.api.dto.qdto.hm.HmClerkRelationQDTO;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.enums.ChannelCodeEnum
;
import
com.gic.haoban.manage.api.enums.WelcomeRelationStatusEnum
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.service.config.Config
;
...
...
@@ -162,7 +163,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
int
saveResult
=
hmQrcodeService
.
insert
(
hmQrcodeQDTO
);
if
(
saveResult
==
1
)
{
// save welcome relation
this
.
updateWelcomeRelation
(
hmQrcodeQDTO
);
this
.
updateWelcomeRelation
(
hmQrcodeQDTO
,
null
);
}
return
ServiceResponse
.
success
();
...
...
@@ -314,7 +315,8 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
int
updateResult
=
hmQrcodeService
.
update
(
hmQrcodeQDTO
);
if
(
updateResult
==
1
)
{
// 更新欢迎语引用次数
this
.
updateWelcomeRelation
(
hmQrcodeQDTO
);
hmQrcodeQDTO
.
setHmCode
(
hmQrcodeBO
.
getHmCode
());
this
.
updateWelcomeRelation
(
hmQrcodeQDTO
,
null
);
}
return
ServiceResponse
.
success
();
}
...
...
@@ -423,7 +425,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
*
* @param hmQrcodeQDTO
*/
private
void
updateWelcomeRelation
(
HmQrcodeQDTO
hmQrcodeQDTO
)
{
private
void
updateWelcomeRelation
(
HmQrcodeQDTO
hmQrcodeQDTO
,
Integer
status
)
{
HmWelcomeRelationBO
welcomeRelationBo
=
new
HmWelcomeRelationBO
();
welcomeRelationBo
.
setEnterpriseId
(
hmQrcodeQDTO
.
getEnterpriseId
());
welcomeRelationBo
.
setWxEnterpriseId
(
hmQrcodeQDTO
.
getWxEnterpriseId
());
...
...
@@ -432,6 +434,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
welcomeRelationBo
.
setReferCode
(
hmQrcodeQDTO
.
getHmCode
());
welcomeRelationBo
.
setReferName
(
hmQrcodeQDTO
.
getName
());
welcomeRelationBo
.
setType
(
HmWelcomeReferType
.
HM
.
getCode
());
welcomeRelationBo
.
setStatus
(
status
);
welcomeRelationService
.
updateWelcomeRelation
(
welcomeRelationBo
);
}
...
...
@@ -645,6 +648,9 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
}
GicLogRecordEvaluationContext
.
putAttribute
(
"logContent"
,
logContent
);
hmQrcodeService
.
deleteById
(
hmId
);
HmQrcodeQDTO
hmQrcodeQDTO
=
new
HmQrcodeQDTO
();
hmQrcodeQDTO
.
setHmId
(
hmId
);
this
.
updateWelcomeRelation
(
hmQrcodeQDTO
,
WelcomeRelationStatusEnum
.
DEPRECATED
.
getCode
());
return
ServiceResponse
.
success
();
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmWelcomeRelationApiServiceImpl.java
View file @
9a0f1222
...
...
@@ -7,13 +7,18 @@ import com.gic.haoban.common.utils.PageUtil;
import
com.gic.haoban.manage.api.dto.hm.HmWelcomeRelationDTO
;
import
com.gic.haoban.manage.api.dto.welcome.qdto.QueryWelcomeRelationQDTO
;
import
com.gic.haoban.manage.api.enums.WelcomeRelationStatusEnum
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType
;
import
com.gic.haoban.manage.api.service.hm.HmWelcomeRelationApiService
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmWelcomeRelationBO
;
import
com.gic.haoban.manage.service.pojo.qo.WelcomeRelationQO
;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
java.util.Arrays
;
import
java.util.List
;
/**
* @Author MUSI
* @Date 2022/7/4 10:52 AM
...
...
@@ -39,12 +44,22 @@ public class HmWelcomeRelationApiServiceImpl implements HmWelcomeRelationApiServ
}
WelcomeRelationQO
welcomeRelationQo
=
new
WelcomeRelationQO
();
welcomeRelationQo
.
setWelcomeId
(
queryWelcomeRelationQdto
.
getWelcomeId
());
welcomeRelationQo
.
setStatus
(
WelcomeRelationStatusEnum
.
ENABLE
.
getCode
(
));
welcomeRelationQo
.
setStatus
List
(
Arrays
.
asList
(
WelcomeRelationStatusEnum
.
ENABLE
.
getCode
(),
WelcomeRelationStatusEnum
.
DEPRECATED
.
getCode
()
));
welcomeRelationQo
.
setSearchContent
(
queryWelcomeRelationQdto
.
getSearchContent
());
welcomeRelationQo
.
setPageNum
(
queryWelcomeRelationQdto
.
getPageNum
());
welcomeRelationQo
.
setPageSize
(
queryWelcomeRelationQdto
.
getPageSize
());
Page
<
HmWelcomeRelationBO
>
welcomeRelationPage
=
welcomeRelationService
.
queryWelcomeRelationPage
(
welcomeRelationQo
);
Page
<
HmWelcomeRelationDTO
>
welcomeRelationDTOPage
=
PageUtil
.
changeToCurrentPage
(
welcomeRelationPage
,
HmWelcomeRelationDTO
.
class
);
List
<
HmWelcomeRelationDTO
>
result
=
welcomeRelationDTOPage
.
getResult
();
if
(!
CollectionUtils
.
isEmpty
(
result
)){
for
(
HmWelcomeRelationDTO
welcomeRelationBO
:
result
)
{
if
(
HmWelcomeReferType
.
LINK
.
getCode
().
equals
(
welcomeRelationBO
.
getType
())){
// 链接状态不展示
welcomeRelationBO
.
setStatus
(
null
);
}
}
}
welcomeRelationDTOPage
.
setResult
(
result
);
return
ServiceResponse
.
success
(
welcomeRelationDTOPage
);
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanWelcomeTemplateRelationMapper.xml
View file @
9a0f1222
...
...
@@ -180,6 +180,12 @@
<if
test=
"searchContent != null and searchContent != ''"
>
and (refer_code = #{searchContent} or refer_name like CONCAT('%', #{searchContent}, '%') )
</if>
<if
test=
"statusList != null and statusList.size > 0"
>
and `status` in
<foreach
collection=
"statusList"
item=
"status"
open=
"("
close=
")"
separator=
","
>
#{status}
</foreach>
</if>
</where>
</select>
...
...
haoban-manage3-service/src/test/java/HmPageServiceTest.java
View file @
9a0f1222
...
...
@@ -129,7 +129,7 @@ public class HmPageServiceTest {
@Test
public
void
welcomeTest
(){
QueryWelcomeRelationQDTO
qdto
=
new
QueryWelcomeRelationQDTO
();
qdto
.
setWelcomeId
(
"
04af9e55515d4352be0b2a3119005ce9
"
);
qdto
.
setWelcomeId
(
"
7f12bdab4fb543e8977f96e30fc8eddb
"
);
//qdto.setSearchContent("测试");
ServiceResponse
<
Page
<
HmWelcomeRelationDTO
>>
serviceResponse
=
welcomeRelationApiService
.
queryWelcomeRelation
(
qdto
);
System
.
out
.
println
(
JSON
.
toJSONString
(
serviceResponse
));
...
...
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