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
01764cd3
Commit
01764cd3
authored
Jul 13, 2022
by
songyinghui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: 活码批量分组
parent
bc4f3641
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
119 additions
and
0 deletions
+119
-0
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+10
-0
TabHaobanHmQrcodeMapper.java
...manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
+8
-0
HmQrcodeService.java
...gic/haoban/manage/service/service/hm/HmQrcodeService.java
+8
-0
HmQrcodeServiceImpl.java
...n/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
+4
-0
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+18
-0
TabHaobanHmQrcodeMapper.xml
.../src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
+11
-0
HmPageServiceTest.java
haoban-manage3-service/src/test/java/HmPageServiceTest.java
+17
-0
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+9
-0
HmQrcodeUpdateQO.java
...ava/com/gic/haoban/manage/web/qo/hm/HmQrcodeUpdateQO.java
+34
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
01764cd3
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
hm
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
...
...
@@ -132,4 +133,13 @@ public interface HmQrcodeApiService {
* @date 2022-07-13 17:09:56
*/
List
<
HmClerkRelationDTO
>
getHmClerkByHmId
(
Long
hmId
);
/**
* 批量修改活码分组
* @param hmIds
* @param groupId
* @return
*/
ServiceResponse
<
Boolean
>
batchUpdateHmQrcodeGroup
(
List
<
Long
>
hmIds
,
Long
groupId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/hm/TabHaobanHmQrcodeMapper.java
View file @
01764cd3
...
...
@@ -177,5 +177,13 @@ public interface TabHaobanHmQrcodeMapper {
* @date 2022-07-12 15:10:09
*/
int
getTotalByEnterpriseId
(
@Param
(
"enterpriseId"
)
String
enterpriseId
);
/**
* 批量修改 活码所属分组
* @param ids
* @param groupId
* @return
*/
int
batchUpdateQrCodeGroup
(
@Param
(
"ids"
)
List
<
Long
>
ids
,
@Param
(
"groupId"
)
Long
groupId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/HmQrcodeService.java
View file @
01764cd3
...
...
@@ -166,4 +166,12 @@ public interface HmQrcodeService {
* @date 2022-07-12 15:08:35
*/
int
getTotalByEnterpriseId
(
String
enterpriseId
);
/**
* 批量修改活码分组
* @param hmIds
* @param groupId
* @return
*/
int
batchUpdateQrcodeGroup
(
List
<
Long
>
hmIds
,
Long
groupId
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
View file @
01764cd3
...
...
@@ -115,4 +115,8 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
public
int
getTotalByEnterpriseId
(
String
enterpriseId
)
{
return
tabHaobanHmQrcodeMapper
.
getTotalByEnterpriseId
(
enterpriseId
);
}
public
int
batchUpdateQrcodeGroup
(
List
<
Long
>
hmIds
,
Long
groupId
){
return
tabHaobanHmQrcodeMapper
.
batchUpdateQrCodeGroup
(
hmIds
,
groupId
);
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
01764cd3
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
hm
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.UniqueIdUtils
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.errCode.HaoBanErrCodeCommon
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
...
...
@@ -570,4 +572,20 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
public
List
<
HmClerkRelationDTO
>
getHmClerkByHmId
(
Long
hmId
)
{
return
EntityUtil
.
changeEntityListNew
(
HmClerkRelationDTO
.
class
,
hmClerkRelationService
.
getHmClerkByHmId
(
hmId
));
}
/**
* 批量修改活码分组
*
* @param hmIds
* @param groupId
* @return
*/
@Override
public
ServiceResponse
<
Boolean
>
batchUpdateHmQrcodeGroup
(
List
<
Long
>
hmIds
,
Long
groupId
)
{
if
(
CollectionUtils
.
isEmpty
(
hmIds
)
||
groupId
==
null
){
return
ServiceResponse
.
failure
(
HaoBanErrCodeCommon
.
ERR_2
.
getCode
()+
""
,
HaoBanErrCodeCommon
.
ERR_2
.
getMsg
());
}
int
updateCount
=
hmQrcodeService
.
batchUpdateQrcodeGroup
(
hmIds
,
groupId
);
return
ServiceResponse
.
success
(
updateCount
>
0
);
}
}
haoban-manage3-service/src/main/resources/mapper/hm/TabHaobanHmQrcodeMapper.xml
View file @
01764cd3
...
...
@@ -344,5 +344,16 @@
where status_flag != 0
and enterprise_id = #{enterpriseId}
</select>
<update
id=
"batchUpdateQrCodeGroup"
>
update tab_haoban_hm_qrcode
set hm_group_id = #{groupId},
update_time = now()
where hm_id in
<foreach
collection=
"ids"
open=
"("
close=
")"
item=
"id"
separator=
","
>
#{id}
</foreach>
</update>
</mapper>
haoban-manage3-service/src/test/java/HmPageServiceTest.java
View file @
01764cd3
...
...
@@ -12,6 +12,7 @@ import com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType;
import
com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService
;
import
com.gic.haoban.manage.api.service.hm.HmGroupApiService
;
import
com.gic.haoban.manage.api.service.hm.HmPageApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmWelcomeRelationBO
;
import
com.gic.haoban.manage.service.service.hm.WelcomeRelationService
;
import
org.junit.Test
;
...
...
@@ -20,6 +21,9 @@ import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
java.util.Arrays
;
import
java.util.List
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
public
class
HmPageServiceTest
{
...
...
@@ -101,4 +105,17 @@ public class HmPageServiceTest {
welcomeRelationService
.
updateWelcomeRelation
(
welcomeRelationBo
);
}
@Autowired
private
HmQrcodeApiService
qrcodeApiService
;
@Test
public
void
batchUpdateQrcode
(){
List
<
Long
>
ids
=
Arrays
.
asList
(
418494104339988481L
,
418494104339988482L
);
long
grouoId
=
420219621589671937L
;
ServiceResponse
<
Boolean
>
booleanServiceResponse
=
qrcodeApiService
.
batchUpdateHmQrcodeGroup
(
ids
,
grouoId
);
System
.
out
.
println
(
JSON
.
toJSONString
(
booleanServiceResponse
));
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
01764cd3
...
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.web.controller.hm;
import
cn.hutool.core.convert.Convert
;
import
com.alibaba.fastjson.JSON
;
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.haoban.base.api.common.pojo.dto.WebLoginDTO
;
...
...
@@ -19,6 +20,7 @@ import com.gic.haoban.manage.api.service.hm.HmQrcodeApiService;
import
com.gic.haoban.manage.api.util.DataHttpUtil
;
import
com.gic.haoban.manage.web.dto.HmOverviewDTO
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.qo.hm.HmQrcodeUpdateQO
;
import
com.gic.haoban.manage.web.qo.hm.data.HmDetailClerkListQO
;
import
com.gic.haoban.manage.web.qo.hm.data.HmTrendQO
;
import
com.gic.haoban.manage.web.vo.hm.HmDetailClerkListVO
;
...
...
@@ -201,5 +203,12 @@ public class HmQrcodeController {
}
@RequestMapping
(
path
=
"/update/qrcode/group"
)
public
RestResponse
<?>
batchUpdateQrcodeGroup
(
@RequestBody
HmQrcodeUpdateQO
qrcodeUpdateQo
){
ServiceResponse
<
Boolean
>
serviceResponse
=
hmQrcodeApiService
.
batchUpdateHmQrcodeGroup
(
qrcodeUpdateQo
.
getHmIds
(),
qrcodeUpdateQo
.
getGroupId
());
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/qo/hm/HmQrcodeUpdateQO.java
0 → 100644
View file @
01764cd3
package
com
.
gic
.
haoban
.
manage
.
web
.
qo
.
hm
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* @Author MUSI
* @Date 2022/7/13 6:54 PM
* @Description
* @Version
**/
public
class
HmQrcodeUpdateQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
1636719509633485056L
;
private
List
<
Long
>
hmIds
;
private
Long
groupId
;
public
List
<
Long
>
getHmIds
()
{
return
hmIds
;
}
public
void
setHmIds
(
List
<
Long
>
hmIds
)
{
this
.
hmIds
=
hmIds
;
}
public
Long
getGroupId
()
{
return
groupId
;
}
public
void
setGroupId
(
Long
groupId
)
{
this
.
groupId
=
groupId
;
}
}
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