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
5675fffb
Commit
5675fffb
authored
Jul 13, 2022
by
墨竹
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:新增活码查看记录接口
parent
02a4fce8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
92 additions
and
112 deletions
+92
-112
HmQrcodeListQDTO.java
...m/gic/haoban/manage/api/dto/qdto/hm/HmQrcodeListQDTO.java
+47
-67
WxUserAddLogSearchQDTO.java
...haoban/manage/api/dto/qdto/hm/WxUserAddLogSearchQDTO.java
+3
-1
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+0
-14
HmQrcodeServiceImpl.java
...n/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
+5
-0
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+4
-10
HmLinkTest.java
haoban-manage3-service/src/test/java/HmLinkTest.java
+9
-15
ServiceTest.java
haoban-manage3-service/src/test/java/ServiceTest.java
+0
-0
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+24
-5
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/hm/HmQrcodeListQDTO.java
View file @
5675fffb
...
@@ -21,38 +21,34 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
...
@@ -21,38 +21,34 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
/**
/**
* 1单人 2多人
* 1单人 2多人
*/
*/
private
Integer
hmType
;
private
Integer
hmType
Int
;
private
String
wxEnterpriseId
;
private
String
wxEnterpriseId
;
private
String
enterpriseId
;
private
String
enterpriseId
;
private
String
keyword
;
private
String
hmSelect
;
private
String
storeSe
arch
;
private
String
storeSe
lect
;
private
Date
createTimeStart
;
private
String
clerkSelect
;
private
Date
startTime
;
private
Date
createTimeEnd
;
private
Date
endTime
;
/**
/**
* 0删除 1正常 2作废 3待生效
* 0删除 1正常 2作废 3待生效
*/
*/
private
Integer
statusFlag
;
private
Integer
statusFlagInt
;
private
String
storeId
;
private
String
orderByField
;
private
String
clerkId
;
private
String
clerkName
;
private
String
clerkCode
;
/**
/**
* 活码分组
* 活码分组
*/
*/
private
Long
hmGroupId
;
private
Long
hmGroupId
;
private
List
<
String
>
storeId
List
;
private
List
<
String
>
storeId
;
public
Long
getHmId
()
{
public
Long
getHmId
()
{
return
hmId
;
return
hmId
;
...
@@ -62,12 +58,12 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
...
@@ -62,12 +58,12 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
this
.
hmId
=
hmId
;
this
.
hmId
=
hmId
;
}
}
public
Integer
getHmType
()
{
public
Integer
getHmType
Int
()
{
return
hmType
;
return
hmType
Int
;
}
}
public
void
setHmType
(
Integer
hmType
)
{
public
void
setHmType
Int
(
Integer
hmTypeInt
)
{
this
.
hmType
=
hmType
;
this
.
hmType
Int
=
hmTypeInt
;
}
}
public
String
getWxEnterpriseId
()
{
public
String
getWxEnterpriseId
()
{
...
@@ -86,76 +82,60 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
...
@@ -86,76 +82,60 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
this
.
enterpriseId
=
enterpriseId
;
this
.
enterpriseId
=
enterpriseId
;
}
}
public
String
getKeyword
()
{
public
String
getHmSelect
()
{
return
keyword
;
return
hmSelect
;
}
public
void
setKeyword
(
String
keyword
)
{
this
.
keyword
=
keyword
;
}
public
Date
getCreateTimeStart
()
{
return
createTimeStart
;
}
}
public
void
set
CreateTimeStart
(
Date
createTimeStar
t
)
{
public
void
set
HmSelect
(
String
hmSelec
t
)
{
this
.
createTimeStart
=
createTimeStar
t
;
this
.
hmSelect
=
hmSelec
t
;
}
}
public
Date
getCreateTimeEnd
()
{
public
String
getStoreSelect
()
{
return
createTimeEnd
;
return
storeSelect
;
}
}
public
void
set
CreateTimeEnd
(
Date
createTimeEnd
)
{
public
void
set
StoreSelect
(
String
storeSelect
)
{
this
.
createTimeEnd
=
createTimeEnd
;
this
.
storeSelect
=
storeSelect
;
}
}
public
Integer
getStatusFlag
()
{
public
String
getClerkSelect
()
{
return
statusFlag
;
return
clerkSelect
;
}
}
public
void
set
StatusFlag
(
Integer
statusFlag
)
{
public
void
set
ClerkSelect
(
String
clerkSelect
)
{
this
.
statusFlag
=
statusFlag
;
this
.
clerkSelect
=
clerkSelect
;
}
}
public
String
getStoreId
()
{
public
Date
getStartTime
()
{
return
storeId
;
return
startTime
;
}
public
void
setStoreId
(
String
storeId
)
{
this
.
storeId
=
storeId
;
}
}
public
String
getStoreSearch
(
)
{
public
void
setStartTime
(
Date
startTime
)
{
return
storeSearch
;
this
.
startTime
=
startTime
;
}
}
public
void
setStoreSearch
(
String
storeSearch
)
{
public
Date
getEndTime
(
)
{
this
.
storeSearch
=
storeSearch
;
return
endTime
;
}
}
public
String
getClerkId
(
)
{
public
void
setEndTime
(
Date
endTime
)
{
return
clerkId
;
this
.
endTime
=
endTime
;
}
}
public
void
setClerkId
(
String
clerkId
)
{
public
Integer
getStatusFlagInt
(
)
{
this
.
clerkId
=
clerkId
;
return
statusFlagInt
;
}
}
public
String
getClerkName
(
)
{
public
void
setStatusFlagInt
(
Integer
statusFlagInt
)
{
return
clerkName
;
this
.
statusFlagInt
=
statusFlagInt
;
}
}
public
void
setClerkName
(
String
clerkName
)
{
public
String
getOrderByField
(
)
{
this
.
clerkName
=
clerkName
;
return
orderByField
;
}
}
public
String
getClerkCode
()
{
public
void
setOrderByField
(
String
orderByField
)
{
return
clerkCode
;
this
.
orderByField
=
orderByField
;
}
public
void
setClerkCode
(
String
clerkCode
)
{
this
.
clerkCode
=
clerkCode
;
}
}
public
Long
getHmGroupId
()
{
public
Long
getHmGroupId
()
{
...
@@ -166,12 +146,12 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
...
@@ -166,12 +146,12 @@ public class HmQrcodeListQDTO extends BasePageInfo implements Serializable {
this
.
hmGroupId
=
hmGroupId
;
this
.
hmGroupId
=
hmGroupId
;
}
}
public
List
<
String
>
getStoreId
List
()
{
public
List
<
String
>
getStoreId
()
{
return
storeId
List
;
return
storeId
;
}
}
public
void
setStoreId
List
(
List
<
String
>
storeIdList
)
{
public
void
setStoreId
(
List
<
String
>
storeId
)
{
this
.
storeId
List
=
storeIdList
;
this
.
storeId
=
storeId
;
}
}
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/qdto/hm/WxUserAddLogSearchQDTO.java
View file @
5675fffb
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
qdto
.
hm
;
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
.
qdto
.
hm
;
import
com.gic.api.base.commons.BasePageInfo
;
import
java.io.Serializable
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.Date
;
public
class
WxUserAddLogSearchQDTO
implements
Serializable
{
public
class
WxUserAddLogSearchQDTO
extends
BasePageInfo
implements
Serializable
{
/**
/**
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
* @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么)
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
5675fffb
package
com
.
gic
.
haoban
.
manage
.
api
.
service
.
hm
;
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.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.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeListDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
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.dto.qdto.hm.HmQrcodeQDTO
;
import
java.util.List
;
import
java.util.List
;
...
@@ -39,16 +35,6 @@ public interface HmQrcodeApiService {
...
@@ -39,16 +35,6 @@ public interface HmQrcodeApiService {
int
update
(
HmQrcodeQDTO
hmQrcodeQDTO
);
int
update
(
HmQrcodeQDTO
hmQrcodeQDTO
);
/**
/**
* 查询列表页面
*
* @param hmQrcodeListQDTO hm qrcode qdto列表
* @return {@link PageResult2 }<{@link HmQrcodeDTO }>
* @author mozhu
* @date 2022-07-05 10:59:01
*/
Page
<
HmQrcodeListDTO
>
queryListByPage
(
HmQrcodeListQDTO
hmQrcodeListQDTO
);
/**
* 查询详情
* 查询详情
*
*
* @param hmId hb id
* @param hmId hb id
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/hm/impl/HmQrcodeServiceImpl.java
View file @
5675fffb
...
@@ -46,6 +46,10 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -46,6 +46,10 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
public
int
insert
(
HmQrcodeQDTO
hmQrcodeQDTO
)
{
public
int
insert
(
HmQrcodeQDTO
hmQrcodeQDTO
)
{
hmQrcodeQDTO
.
setCreateTime
(
new
Date
());
hmQrcodeQDTO
.
setCreateTime
(
new
Date
());
hmQrcodeQDTO
.
setUpdateTime
(
new
Date
());
hmQrcodeQDTO
.
setUpdateTime
(
new
Date
());
hmQrcodeQDTO
.
setPassFlag
(
1
);
hmQrcodeQDTO
.
setOverFlag
(
0
);
hmQrcodeQDTO
.
setAddNum
(
0
);
hmQrcodeQDTO
.
setStatusFlag
(
1
);
return
this
.
tabHaobanHmQrcodeMapper
.
insert
(
EntityUtil
.
changeEntity
(
TabHaobanHmQrcode
.
class
,
hmQrcodeQDTO
));
return
this
.
tabHaobanHmQrcodeMapper
.
insert
(
EntityUtil
.
changeEntity
(
TabHaobanHmQrcode
.
class
,
hmQrcodeQDTO
));
}
}
...
@@ -116,6 +120,7 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
...
@@ -116,6 +120,7 @@ public class HmQrcodeServiceImpl implements HmQrcodeService {
return
tabHaobanHmQrcodeMapper
.
getTotalByEnterpriseId
(
enterpriseId
);
return
tabHaobanHmQrcodeMapper
.
getTotalByEnterpriseId
(
enterpriseId
);
}
}
@Override
public
int
batchUpdateQrcodeGroup
(
List
<
Long
>
hmIds
,
Long
groupId
){
public
int
batchUpdateQrcodeGroup
(
List
<
Long
>
hmIds
,
Long
groupId
){
return
tabHaobanHmQrcodeMapper
.
batchUpdateQrCodeGroup
(
hmIds
,
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 @
5675fffb
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
hm
;
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
.
hm
;
import
com.
gic.api.base.commons.Page
;
import
com.
alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.service.ClerkService
;
import
com.gic.clerk.api.service.ClerkService
;
...
@@ -9,15 +9,12 @@ import com.gic.commons.util.UniqueIdUtils;
...
@@ -9,15 +9,12 @@ import com.gic.commons.util.UniqueIdUtils;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.dto.StoreDTO
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.base.api.common.errCode.HaoBanErrCodeCommon
;
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.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeListDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeStoreDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmClerkRelationQDTO
;
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.dto.qdto.hm.HmQrcodeQDTO
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType
;
import
com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
...
@@ -114,7 +111,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -114,7 +111,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
wxEnterpriseDTO
==
null
)
{
if
(
wxEnterpriseDTO
==
null
)
{
logger
.
error
(
"未查询到微信企业"
);
logger
.
error
(
"未查询到微信企业"
);
return
0
;
return
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()
;
}
}
hmQrcodeQDTO
.
setHmId
(
UniqueIdUtils
.
uniqueLong
());
hmQrcodeQDTO
.
setHmId
(
UniqueIdUtils
.
uniqueLong
());
...
@@ -137,6 +134,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -137,6 +134,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
qywxExternalcontactDTO
.
setState
(
"HM"
+
hmId
);
qywxExternalcontactDTO
.
setState
(
"HM"
+
hmId
);
List
<
String
>
userIds
=
staffClerkRelationService
.
listWxUserIdByClerkIds
(
clerkIdList
,
wxEnterpriseId
);
List
<
String
>
userIds
=
staffClerkRelationService
.
listWxUserIdByClerkIds
(
clerkIdList
,
wxEnterpriseId
);
qywxExternalcontactDTO
.
setUser
(
userIds
);
qywxExternalcontactDTO
.
setUser
(
userIds
);
logger
.
info
(
"新增活码参数:{}"
,
JSON
.
toJSONString
(
qywxExternalcontactDTO
));
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
QywxExternalcontactResultDTO
qywxExternalcontactResultDTO
=
qywxUserApiService
.
addContactWay
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
qywxExternalcontactDTO
);
if
(
qywxExternalcontactResultDTO
!=
null
&&
"0"
.
equals
(
qywxExternalcontactResultDTO
.
getErrcode
()))
{
if
(
qywxExternalcontactResultDTO
!=
null
&&
"0"
.
equals
(
qywxExternalcontactResultDTO
.
getErrcode
()))
{
hmQrcodeQDTO
.
setWxQrcode
(
qywxExternalcontactResultDTO
.
getQr_code
());
hmQrcodeQDTO
.
setWxQrcode
(
qywxExternalcontactResultDTO
.
getQr_code
());
...
@@ -357,6 +355,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -357,6 +355,7 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
TabHaobanStaff
tabHaobanStaff
=
staffService
.
selectById
(
staffClerkRelationDTO
.
getStaffId
());
TabHaobanStaff
tabHaobanStaff
=
staffService
.
selectById
(
staffClerkRelationDTO
.
getStaffId
());
if
(
tabHaobanStaff
!=
null
)
{
if
(
tabHaobanStaff
!=
null
)
{
hmQrcodeQDTO
.
setStaffName
(
tabHaobanStaff
.
getStaffName
());
hmQrcodeQDTO
.
setStaffName
(
tabHaobanStaff
.
getStaffName
());
hmQrcodeQDTO
.
setWxUserId
(
tabHaobanStaff
.
getWxUserId
());
}
}
}
}
}
}
...
@@ -404,11 +403,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -404,11 +403,6 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
hmClerkRelationService
.
insertBatch
(
clerkRelationQDTOS
);
hmClerkRelationService
.
insertBatch
(
clerkRelationQDTOS
);
}
}
@Override
public
Page
<
HmQrcodeListDTO
>
queryListByPage
(
HmQrcodeListQDTO
hmQrcodeListQDTO
)
{
Page
<
HmQrcodeBO
>
hmQrcodeBOPage
=
hmQrcodeService
.
queryByPage
(
hmQrcodeListQDTO
);
return
PageUtil
.
changePageToCurrentPage
(
hmQrcodeBOPage
,
HmQrcodeListDTO
.
class
);
}
@Override
@Override
public
HmQrcodeDTO
queryById
(
Long
hmId
)
{
public
HmQrcodeDTO
queryById
(
Long
hmId
)
{
...
...
haoban-manage3-service/src/test/java/HmLinkTest.java
View file @
5675fffb
import
java.util.ArrayList
;
import
java.util.List
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
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.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.api.base.commons.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.hm.HmLinkDTO
;
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.HmLinkStoreDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmLinkSearchQDTO
;
import
com.gic.haoban.manage.api.enums.KeyDataEnum
;
import
com.gic.haoban.manage.api.service.KeyDataApiService
;
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.HmLinkApiService
;
import
com.gic.haoban.manage.api.service.hm.HmLinkVisitLogApiService
;
import
com.gic.haoban.manage.api.service.hm.HmLinkVisitLogApiService
;
import
com.gic.haoban.manage.service.service.hm.HmLinkStoreService
;
import
com.gic.haoban.manage.service.service.hm.HmLinkStoreService
;
import
com.gic.haoban.manage.service.util.QwFriendLimitCountUtil
;
import
com.gic.haoban.manage.service.util.QwFriendLimitCountUtil
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.test.context.ContextConfiguration
;
import
org.springframework.test.context.junit4.SpringJUnit4ClassRunner
;
import
java.util.ArrayList
;
import
java.util.List
;
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@RunWith
(
SpringJUnit4ClassRunner
.
class
)
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
@ContextConfiguration
(
locations
=
{
"classpath:applicationContext-conf.xml"
})
...
@@ -34,11 +32,7 @@ public class HmLinkTest {
...
@@ -34,11 +32,7 @@ public class HmLinkTest {
@Autowired
@Autowired
private
HmLinkStoreService
hmLinkStoreService
;
private
HmLinkStoreService
hmLinkStoreService
;
@Test
public
void
getLinkHmFromWxa
(){
this
.
hmLinkApiService
.
getLinkHmFromWxa
(
"ff8080815dacd3a2015dacd3ef5c0000"
,
null
,
null
,
null
,
"417109414906961921"
,
"ubkCBFK"
,
null
)
;
}
@Test
@Test
public
void
saveLinkStore
()
{
public
void
saveLinkStore
()
{
HmLinkStoreDTO
dto
=
new
HmLinkStoreDTO
();
HmLinkStoreDTO
dto
=
new
HmLinkStoreDTO
();
...
...
haoban-manage3-service/src/test/java/ServiceTest.java
View file @
5675fffb
This diff is collapsed.
Click to expand it.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
5675fffb
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller.hm;
...
@@ -2,6 +2,7 @@ package com.gic.haoban.manage.web.controller.hm;
import
cn.hutool.core.convert.Convert
;
import
cn.hutool.core.convert.Convert
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.gic.api.base.commons.BasePageInfo
;
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
;
...
@@ -11,12 +12,14 @@ import com.gic.haoban.common.utils.AuthWebRequestUtil;
...
@@ -11,12 +12,14 @@ import com.gic.haoban.common.utils.AuthWebRequestUtil;
import
com.gic.haoban.manage.api.constants.StatisticsApolloKeyConstant
;
import
com.gic.haoban.manage.api.constants.StatisticsApolloKeyConstant
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.HmQrcodeDTO
;
import
com.gic.haoban.manage.api.dto.hm.
HmQrcodeList
DTO
;
import
com.gic.haoban.manage.api.dto.hm.
WxUserAddLog
DTO
;
import
com.gic.haoban.manage.api.dto.qdto.hm.HmQrcodeListQDTO
;
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.dto.qdto.hm.HmQrcodeQDTO
;
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.statistics.StatisticsDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.api.service.hm.HmQrcodeApiService
;
import
com.gic.haoban.manage.api.service.hm.WxUserAddLogApiService
;
import
com.gic.haoban.manage.api.util.DataHttpUtil
;
import
com.gic.haoban.manage.api.util.DataHttpUtil
;
import
com.gic.haoban.manage.web.dto.HmOverviewDTO
;
import
com.gic.haoban.manage.web.dto.HmOverviewDTO
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
...
@@ -49,6 +52,8 @@ public class HmQrcodeController {
...
@@ -49,6 +52,8 @@ public class HmQrcodeController {
private
HmQrcodeApiService
hmQrcodeApiService
;
private
HmQrcodeApiService
hmQrcodeApiService
;
@Autowired
@Autowired
private
StaffApiService
staffApiService
;
private
StaffApiService
staffApiService
;
@Autowired
private
WxUserAddLogApiService
wxUserAddLogApiService
;
/**
/**
* 新增
* 新增
...
@@ -92,16 +97,18 @@ public class HmQrcodeController {
...
@@ -92,16 +97,18 @@ public class HmQrcodeController {
* @return
* @return
*/
*/
@RequestMapping
(
value
=
"list"
,
method
=
RequestMethod
.
POST
)
@RequestMapping
(
value
=
"list"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
<
Page
<
HmQrcodeListDTO
>
>
list
(
@RequestBody
HmQrcodeListQDTO
hmQrcodeListQDTO
)
{
public
RestResponse
<
StatisticsDTO
>
list
(
@RequestBody
HmQrcodeListQDTO
hmQrcodeListQDTO
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
hmQrcodeListQDTO
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
List
<
String
>
storeList
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
loginUser
.
getClerkId
(),
loginUser
.
getWxEnterpriseId
());
List
<
String
>
storeList
=
staffApiService
.
getHaoBanStoreIdsRolesByClerkId
(
loginUser
.
getClerkId
(),
loginUser
.
getWxEnterpriseId
());
if
(
CollectionUtils
.
isEmpty
(
storeList
))
{
if
(
CollectionUtils
.
isEmpty
(
storeList
))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_100007
.
getCode
()),
HaoBanErrCode
.
ERR_100007
.
getMsg
());
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_100007
.
getCode
()),
HaoBanErrCode
.
ERR_100007
.
getMsg
());
}
}
if
(!
storeList
.
contains
(
"-1"
))
{
if
(!
storeList
.
contains
(
"-1"
))
{
hmQrcodeListQDTO
.
setStoreId
List
(
storeList
);
hmQrcodeListQDTO
.
setStoreId
(
storeList
);
}
}
return
RestResponse
.
successResult
(
this
.
hmQrcodeApiService
.
queryListByPage
(
hmQrcodeListQDTO
));
StatisticsDTO
statisticsDTO
=
DataHttpUtil
.
post
(
StatisticsApolloKeyConstant
.
data_haoban_hm_list
,
hmQrcodeListQDTO
);
return
RestResponse
.
successResult
(
statisticsDTO
);
}
}
/**
/**
...
@@ -212,6 +219,18 @@ public class HmQrcodeController {
...
@@ -212,6 +219,18 @@ public class HmQrcodeController {
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
return
RestResponse
.
successResult
(
serviceResponse
.
getResult
());
}
}
/**
* 详情-查看记录
* @param qdto
* @return
*/
@RequestMapping
(
path
=
"/wxUserAddLog/list"
)
public
RestResponse
<?>
wxUserAddLogList
(
@RequestBody
WxUserAddLogSearchQDTO
qdto
){
BasePageInfo
pageInfo
=
new
BasePageInfo
();
pageInfo
.
setPageNum
(
qdto
.
getPageNum
());
pageInfo
.
setPageSize
(
qdto
.
getPageSize
());
ServiceResponse
<
Page
<
WxUserAddLogDTO
>>
page
=
wxUserAddLogApiService
.
page
(
qdto
,
pageInfo
);
return
RestResponse
.
successResult
(
page
.
getResult
());
}
}
}
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