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
cf5a5158
Commit
cf5a5158
authored
Jul 15, 2022
by
guojx
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/developer' into developer
parents
d7977023
91143804
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
103 additions
and
5 deletions
+103
-5
HmQrcodeDTO.java
...in/java/com/gic/haoban/manage/api/dto/hm/HmQrcodeDTO.java
+17
-0
HmQrcodeApiService.java
.../gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
+11
-0
HmQrcodeBO.java
.../com/gic/haoban/manage/service/pojo/bo/hm/HmQrcodeBO.java
+18
-1
HmQrcodeApiServiceImpl.java
...e/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
+41
-4
HmQrcodeController.java
...c/haoban/manage/web/controller/hm/HmQrcodeController.java
+16
-0
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/hm/HmQrcodeDTO.java
View file @
cf5a5158
...
@@ -90,6 +90,8 @@ public class HmQrcodeDTO implements Serializable {
...
@@ -90,6 +90,8 @@ public class HmQrcodeDTO implements Serializable {
*/
*/
private
Long
hmGroupId
;
private
Long
hmGroupId
;
private
String
memberLabelName
;
private
String
hmGroupName
;
public
Long
getHmId
()
{
public
Long
getHmId
()
{
return
hmId
;
return
hmId
;
...
@@ -323,5 +325,20 @@ public class HmQrcodeDTO implements Serializable {
...
@@ -323,5 +325,20 @@ public class HmQrcodeDTO implements Serializable {
this
.
hmGroupId
=
hmGroupId
;
this
.
hmGroupId
=
hmGroupId
;
}
}
public
String
getMemberLabelName
()
{
return
memberLabelName
;
}
public
void
setMemberLabelName
(
String
memberLabelName
)
{
this
.
memberLabelName
=
memberLabelName
;
}
public
String
getHmGroupName
()
{
return
hmGroupName
;
}
public
void
setHmGroupName
(
String
hmGroupName
)
{
this
.
hmGroupName
=
hmGroupName
;
}
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/hm/HmQrcodeApiService.java
View file @
cf5a5158
...
@@ -24,6 +24,17 @@ public interface HmQrcodeApiService {
...
@@ -24,6 +24,17 @@ public interface HmQrcodeApiService {
*/
*/
ServiceResponse
add
(
HmQrcodeQDTO
hmQrcodeQDTO
);
ServiceResponse
add
(
HmQrcodeQDTO
hmQrcodeQDTO
);
/**
* 批量创建单人码
*
* @param hmQrcodeQDTO hm qrcode qdto
* @return {@link ServiceResponse }
* @author mozhu
* @date 2022-07-15 13:48:15
*/
ServiceResponse
addList
(
HmQrcodeQDTO
hmQrcodeQDTO
);
/**
/**
* 更新
* 更新
*
*
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/pojo/bo/hm/HmQrcodeBO.java
View file @
cf5a5158
...
@@ -91,7 +91,8 @@ public class HmQrcodeBO implements Serializable {
...
@@ -91,7 +91,8 @@ public class HmQrcodeBO implements Serializable {
private
Long
hmGroupId
;
private
Long
hmGroupId
;
private
String
staffId
;
private
String
staffId
;
private
String
staffName
;
private
String
staffName
;
private
String
memberLabelName
;
private
String
hmGroupName
;
public
Long
getHmId
()
{
public
Long
getHmId
()
{
return
hmId
;
return
hmId
;
...
@@ -340,5 +341,21 @@ public class HmQrcodeBO implements Serializable {
...
@@ -340,5 +341,21 @@ public class HmQrcodeBO implements Serializable {
public
void
setStaffName
(
String
staffName
)
{
public
void
setStaffName
(
String
staffName
)
{
this
.
staffName
=
staffName
;
this
.
staffName
=
staffName
;
}
}
public
String
getMemberLabelName
()
{
return
memberLabelName
;
}
public
void
setMemberLabelName
(
String
memberLabelName
)
{
this
.
memberLabelName
=
memberLabelName
;
}
public
String
getHmGroupName
()
{
return
hmGroupName
;
}
public
void
setHmGroupName
(
String
hmGroupName
)
{
this
.
hmGroupName
=
hmGroupName
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/hm/HmQrcodeApiServiceImpl.java
View file @
cf5a5158
...
@@ -21,6 +21,7 @@ import com.gic.haoban.manage.api.enums.hm.HmWelcomeReferType;
...
@@ -21,6 +21,7 @@ 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
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffClerkRelation
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmClerkRelationBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmClerkRelationBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmGroupSettingBO
;
import
com.gic.haoban.manage.service.pojo.bo.hm.HmGroupSettingBO
;
...
@@ -61,6 +62,7 @@ import java.util.Arrays;
...
@@ -61,6 +62,7 @@ import java.util.Arrays;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
import
java.util.stream.Collectors
;
/**
/**
* @author mozhu
* @author mozhu
...
@@ -144,10 +146,11 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -144,10 +146,11 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
qywxExternalcontactDTO
.
setUser
(
userIds
);
qywxExternalcontactDTO
.
setUser
(
userIds
);
logger
.
info
(
"新增活码参数:{}"
,
JSON
.
toJSONString
(
qywxExternalcontactDTO
));
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
.
getErrcode
()
!=
0
)
{
hmQrcodeQDTO
.
setWxQrcode
(
qywxExternalcontactResultDTO
.
getQr_code
());
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_0
.
getCode
()),
"创建活码失败:"
+
qywxExternalcontactResultDTO
.
getErrmsg
());
hmQrcodeQDTO
.
setWxConfigId
(
qywxExternalcontactResultDTO
.
getConfig_id
());
}
}
hmQrcodeQDTO
.
setWxQrcode
(
qywxExternalcontactResultDTO
.
getQr_code
());
hmQrcodeQDTO
.
setWxConfigId
(
qywxExternalcontactResultDTO
.
getConfig_id
());
int
saveResult
=
hmQrcodeService
.
insert
(
hmQrcodeQDTO
);
int
saveResult
=
hmQrcodeService
.
insert
(
hmQrcodeQDTO
);
if
(
saveResult
==
1
)
{
if
(
saveResult
==
1
)
{
// save welcome relation
// save welcome relation
...
@@ -158,6 +161,29 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -158,6 +161,29 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
return
ServiceResponse
.
success
();
return
ServiceResponse
.
success
();
}
}
@Override
public
ServiceResponse
addList
(
HmQrcodeQDTO
hmQrcodeQDTO
)
{
String
wxEnterpriseId
=
hmQrcodeQDTO
.
getWxEnterpriseId
();
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
if
(
wxEnterpriseDTO
==
null
)
{
logger
.
error
(
"未查询到微信企业"
);
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_8
.
getCode
()),
"微信企业不存在"
);
}
List
<
String
>
clerkIdList
=
hmQrcodeQDTO
.
getClerkIdList
();
if
(
CollectionUtils
.
isEmpty
(
clerkIdList
))
{
return
ServiceResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCodeCommon
.
ERR_5
.
getCode
()),
"导购不允许为空"
);
}
if
(
clerkIdList
.
contains
(
"-1"
))
{
List
<
TabHaobanStaffClerkRelation
>
tabHaobanStaffClerkRelations
=
staffClerkRelationService
.
listByWxEnterpriseId
(
wxEnterpriseId
);
clerkIdList
=
tabHaobanStaffClerkRelations
.
stream
().
map
(
TabHaobanStaffClerkRelation:
:
getClerkId
).
collect
(
Collectors
.
toList
());
}
for
(
String
clerkId
:
clerkIdList
)
{
hmQrcodeQDTO
.
setClerkIdList
(
Collections
.
singletonList
(
clerkId
));
add
(
hmQrcodeQDTO
);
}
return
ServiceResponse
.
success
();
}
/**
/**
* 设置日志记录器上下文
* 设置日志记录器上下文
* 日志
* 日志
...
@@ -410,7 +436,18 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
...
@@ -410,7 +436,18 @@ public class HmQrcodeApiServiceImpl implements HmQrcodeApiService {
@Override
@Override
public
HmQrcodeDTO
queryById
(
Long
hmId
)
{
public
HmQrcodeDTO
queryById
(
Long
hmId
)
{
return
EntityUtil
.
changeEntityNew
(
HmQrcodeDTO
.
class
,
hmQrcodeService
.
queryById
(
hmId
));
HmQrcodeBO
hmQrcodeBO
=
hmQrcodeService
.
queryById
(
hmId
);
if
(
hmQrcodeBO
!=
null
)
{
HmGroupSettingBO
hmGroupSettingBO
=
hmGroupService
.
queryGroupSettingDetail
(
hmQrcodeBO
.
getHmGroupId
());
if
(
hmGroupSettingBO
!=
null
)
{
hmQrcodeBO
.
setHmGroupName
(
hmGroupSettingBO
.
getGroupName
());
}
MemberTagDTO
memberTagDTO
=
memberTagApiService
.
getMemberTagById
(
hmQrcodeBO
.
getMemberLabelId
());
if
(
memberTagDTO
!=
null
)
{
hmQrcodeBO
.
setMemberLabelName
(
memberTagDTO
.
getTagName
());
}
}
return
EntityUtil
.
changeEntityNew
(
HmQrcodeDTO
.
class
,
hmQrcodeBO
);
}
}
@GicLogRecord
(
value
=
"废弃员工活码-${#logContent}"
,
@GicLogRecord
(
value
=
"废弃员工活码-${#logContent}"
,
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/hm/HmQrcodeController.java
View file @
cf5a5158
...
@@ -76,6 +76,22 @@ public class HmQrcodeController {
...
@@ -76,6 +76,22 @@ public class HmQrcodeController {
return
RestResponse
.
successResult
();
return
RestResponse
.
successResult
();
}
}
@RequestMapping
(
value
=
"addList"
,
method
=
RequestMethod
.
POST
)
public
RestResponse
addList
(
@RequestBody
HmQrcodeQDTO
hmQrcodeQDTO
)
{
WebLoginDTO
loginUser
=
AuthWebRequestUtil
.
getLoginUser
();
hmQrcodeQDTO
.
setCreatorId
(
loginUser
.
getClerkId
());
hmQrcodeQDTO
.
setCreatorName
(
loginUser
.
getClerkName
());
hmQrcodeQDTO
.
setModifierId
(
loginUser
.
getClerkId
());
hmQrcodeQDTO
.
setModifierName
(
loginUser
.
getClerkName
());
hmQrcodeQDTO
.
setWxEnterpriseId
(
loginUser
.
getWxEnterpriseId
());
hmQrcodeQDTO
.
setEnterpriseId
(
loginUser
.
getEnterpriseId
());
ServiceResponse
serviceResponse
=
this
.
hmQrcodeApiService
.
addList
(
hmQrcodeQDTO
);
if
(!
"0000"
.
equals
(
serviceResponse
.
getCode
()))
{
return
RestResponse
.
failure
(
Convert
.
toStr
(
HaoBanErrCode
.
ERR_0
.
getCode
()),
serviceResponse
.
getMessage
());
}
return
RestResponse
.
successResult
();
}
/**
/**
* 修改
* 修改
* @param hmQrcodeQDTO
* @param hmQrcodeQDTO
...
...
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