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
2e11e971
Commit
2e11e971
authored
Apr 17, 2021
by
fudahua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
欢迎语
parent
58f7c168
Hide whitespace changes
Inline
Side-by-side
Showing
30 changed files
with
1367 additions
and
290 deletions
+1367
-290
ExternalClerkRelatedDTO.java
...om/gic/haoban/manage/api/dto/ExternalClerkRelatedDTO.java
+10
-0
MiniprogramSettingDTO.java
.../com/gic/haoban/manage/api/dto/MiniprogramSettingDTO.java
+294
-0
WxEnterpriseRelationDetailDTO.java
.../haoban/manage/api/dto/WxEnterpriseRelationDetailDTO.java
+9
-0
ExternalClerkRelatedApiService.java
...an/manage/api/service/ExternalClerkRelatedApiService.java
+22
-0
WxEnterpriseApiService.java
...gic/haoban/manage/api/service/WxEnterpriseApiService.java
+34
-4
WxEnterpriseRelatedApiService.java
...ban/manage/api/service/WxEnterpriseRelatedApiService.java
+3
-5
Config.java
...ain/java/com/gic/haoban/manage/service/config/Config.java
+11
-1
TabHaobanExternalClerkRelatedMapper.java
...rvice/dao/mapper/TabHaobanExternalClerkRelatedMapper.java
+22
-0
TabMiniprogramSettingMapper.java
...anage/service/dao/mapper/TabMiniprogramSettingMapper.java
+52
-0
TabHaobanExternalClerkRelated.java
.../manage/service/entity/TabHaobanExternalClerkRelated.java
+12
-0
TabMiniprogramSetting.java
...c/haoban/manage/service/entity/TabMiniprogramSetting.java
+294
-0
MiniprogramSettingService.java
...ban/manage/service/service/MiniprogramSettingService.java
+46
-0
WxEnterpriseRelatedService.java
...an/manage/service/service/WxEnterpriseRelatedService.java
+0
-2
WxEnterpriseRelatedServiceImpl.java
.../service/service/impl/WxEnterpriseRelatedServiceImpl.java
+0
-6
ExternalClerkRelatedApiServiceImpl.java
.../service/out/impl/ExternalClerkRelatedApiServiceImpl.java
+22
-1
MemberUnionidRelatedApiServiceImpl.java
.../service/out/impl/MemberUnionidRelatedApiServiceImpl.java
+19
-14
MessageApiServiceImpl.java
...anage/service/service/out/impl/MessageApiServiceImpl.java
+1
-81
MiniprogramSettingServiceImpl.java
...rvice/service/out/impl/MiniprogramSettingServiceImpl.java
+95
-0
StaffApiServiceImpl.java
.../manage/service/service/out/impl/StaffApiServiceImpl.java
+0
-85
WxEnterpriseApiServiceImpl.java
.../service/service/out/impl/WxEnterpriseApiServiceImpl.java
+30
-4
WxEnterpriseRelatedApiServiceImpl.java
...e/service/out/impl/WxEnterpriseRelatedApiServiceImpl.java
+11
-65
CommonUtil.java
...n/java/com/gic/haoban/manage/service/util/CommonUtil.java
+36
-0
TabHaobanExternalClerkRelatedMapper.xml
.../resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
+33
-4
TabMiniprogramSettingMapper.xml
...src/main/resources/mapper/TabMiniprogramSettingMapper.xml
+196
-0
LoginController.java
...com/gic/haoban/manage/web/controller/LoginController.java
+7
-4
StaffController.java
...com/gic/haoban/manage/web/controller/StaffController.java
+3
-3
WxEnterpriseController.java
.../haoban/manage/web/controller/WxEnterpriseController.java
+66
-2
ClerkController.java
...com/gic/haoban/manage/web/controller/ClerkController.java
+34
-0
InfoController.java
.../com/gic/haoban/manage/web/controller/InfoController.java
+1
-0
StoreController.java
...com/gic/haoban/manage/web/controller/StoreController.java
+4
-9
No files found.
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/ExternalClerkRelatedDTO.java
View file @
2e11e971
...
@@ -32,12 +32,22 @@ public class ExternalClerkRelatedDTO implements Serializable {
...
@@ -32,12 +32,22 @@ public class ExternalClerkRelatedDTO implements Serializable {
private
Integer
statusFlag
;
private
Integer
statusFlag
;
private
String
relationKey
;
private
Date
createTime
;
private
Date
createTime
;
private
Date
updateTime
;
private
Date
updateTime
;
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
String
getRelationKey
()
{
return
relationKey
;
}
public
void
setRelationKey
(
String
relationKey
)
{
this
.
relationKey
=
relationKey
;
}
public
String
getExternalClerkRelatedId
()
{
public
String
getExternalClerkRelatedId
()
{
return
externalClerkRelatedId
;
return
externalClerkRelatedId
;
}
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/MiniprogramSettingDTO.java
0 → 100644
View file @
2e11e971
package
com
.
gic
.
haoban
.
manage
.
api
.
dto
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 小程序配置
*
* @author fdh
*/
public
class
MiniprogramSettingDTO
implements
Serializable
{
/**
*
*/
private
String
miniprogramSettingId
;
/**
*
*/
private
String
wxEnterpriseId
;
/**
*
*/
private
String
enterpriseId
;
/**
*
*/
private
String
miniprogramName
;
/**
*
*/
private
String
title
;
/**
*
*/
private
String
appId
;
/**
* 封面
*/
private
String
imageUrl
;
/**
*
*/
private
String
mediaId
;
/**
*
*/
private
Date
mediaTime
;
/**
*
*/
private
Integer
statusFlag
;
/**
*
*/
private
Date
createTme
;
/**
*
*/
private
Date
updateTime
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.miniprogram_setting_id
*
* @return the value of tab_haoban_miniprogram_setting.miniprogram_setting_id
*/
public
String
getMiniprogramSettingId
()
{
return
miniprogramSettingId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.miniprogram_setting_id
*
* @param miniprogramSettingId the value for tab_haoban_miniprogram_setting.miniprogram_setting_id
*/
public
void
setMiniprogramSettingId
(
String
miniprogramSettingId
)
{
this
.
miniprogramSettingId
=
miniprogramSettingId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.wx_enterprise_id
*
* @return the value of tab_haoban_miniprogram_setting.wx_enterprise_id
*/
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.wx_enterprise_id
*
* @param wxEnterpriseId the value for tab_haoban_miniprogram_setting.wx_enterprise_id
*/
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.enterprise_id
*
* @return the value of tab_haoban_miniprogram_setting.enterprise_id
*/
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.enterprise_id
*
* @param enterpriseId the value for tab_haoban_miniprogram_setting.enterprise_id
*/
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.miniprogram_name
*
* @return the value of tab_haoban_miniprogram_setting.miniprogram_name
*/
public
String
getMiniprogramName
()
{
return
miniprogramName
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.miniprogram_name
*
* @param miniprogramName the value for tab_haoban_miniprogram_setting.miniprogram_name
*/
public
void
setMiniprogramName
(
String
miniprogramName
)
{
this
.
miniprogramName
=
miniprogramName
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.title
*
* @return the value of tab_haoban_miniprogram_setting.title
*/
public
String
getTitle
()
{
return
title
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.title
*
* @param title the value for tab_haoban_miniprogram_setting.title
*/
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.app_id
*
* @return the value of tab_haoban_miniprogram_setting.app_id
*/
public
String
getAppId
()
{
return
appId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.app_id
*
* @param appId the value for tab_haoban_miniprogram_setting.app_id
*/
public
void
setAppId
(
String
appId
)
{
this
.
appId
=
appId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.image_url
*
* @return the value of tab_haoban_miniprogram_setting.image_url
*/
public
String
getImageUrl
()
{
return
imageUrl
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.image_url
*
* @param imageUrl the value for tab_haoban_miniprogram_setting.image_url
*/
public
void
setImageUrl
(
String
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.media_id
*
* @return the value of tab_haoban_miniprogram_setting.media_id
*/
public
String
getMediaId
()
{
return
mediaId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.media_id
*
* @param mediaId the value for tab_haoban_miniprogram_setting.media_id
*/
public
void
setMediaId
(
String
mediaId
)
{
this
.
mediaId
=
mediaId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.media_time
*
* @return the value of tab_haoban_miniprogram_setting.media_time
*/
public
Date
getMediaTime
()
{
return
mediaTime
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.media_time
*
* @param mediaTime the value for tab_haoban_miniprogram_setting.media_time
*/
public
void
setMediaTime
(
Date
mediaTime
)
{
this
.
mediaTime
=
mediaTime
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.status_flag
*
* @return the value of tab_haoban_miniprogram_setting.status_flag
*/
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.status_flag
*
* @param statusFlag the value for tab_haoban_miniprogram_setting.status_flag
*/
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.create_tme
*
* @return the value of tab_haoban_miniprogram_setting.create_tme
*/
public
Date
getCreateTme
()
{
return
createTme
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.create_tme
*
* @param createTme the value for tab_haoban_miniprogram_setting.create_tme
*/
public
void
setCreateTme
(
Date
createTme
)
{
this
.
createTme
=
createTme
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.update_time
*
* @return the value of tab_haoban_miniprogram_setting.update_time
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.update_time
*
* @param updateTime the value for tab_haoban_miniprogram_setting.update_time
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/dto/WxEnterpriseRelationDetailDTO.java
View file @
2e11e971
...
@@ -9,6 +9,7 @@ import java.util.List;
...
@@ -9,6 +9,7 @@ import java.util.List;
* @author hua
* @author hua
*/
*/
public
class
WxEnterpriseRelationDetailDTO
implements
Serializable
{
public
class
WxEnterpriseRelationDetailDTO
implements
Serializable
{
private
String
wxEnterpriseRelatedId
;
private
String
wxEnterpriseId
;
private
String
wxEnterpriseId
;
private
String
enterpriseId
;
private
String
enterpriseId
;
private
String
enterpriseName
;
private
String
enterpriseName
;
...
@@ -19,6 +20,14 @@ public class WxEnterpriseRelationDetailDTO implements Serializable {
...
@@ -19,6 +20,14 @@ public class WxEnterpriseRelationDetailDTO implements Serializable {
private
int
memberOpenCardFlag
;
private
int
memberOpenCardFlag
;
private
List
<
StoreOrGroupInfoDTO
>
relations
;
private
List
<
StoreOrGroupInfoDTO
>
relations
;
public
String
getWxEnterpriseRelatedId
()
{
return
wxEnterpriseRelatedId
;
}
public
void
setWxEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
)
{
this
.
wxEnterpriseRelatedId
=
wxEnterpriseRelatedId
;
}
public
String
getEnterpriseName
()
{
public
String
getEnterpriseName
()
{
return
enterpriseName
;
return
enterpriseName
;
}
}
...
...
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/ExternalClerkRelatedApiService.java
View file @
2e11e971
...
@@ -24,4 +24,26 @@ public interface ExternalClerkRelatedApiService {
...
@@ -24,4 +24,26 @@ public interface ExternalClerkRelatedApiService {
List
<
ExternalClerkRelatedDTO
>
listByWxEnterpriseIdAndWxUserIds
(
List
<
String
>
userIdList
,
String
wxEnterpriseId
);
List
<
ExternalClerkRelatedDTO
>
listByWxEnterpriseIdAndWxUserIds
(
List
<
String
>
userIdList
,
String
wxEnterpriseId
);
/**
* 根据关联key查询待关联的记录-触达待完善记录
*
* @return
*/
ExternalClerkRelatedDTO
getExternalClerkByRelationKeyAndPre
(
String
relationKey
);
/**
* 根据关联key查询待关联的记录
*
* @return
*/
Page
<
ExternalClerkRelatedDTO
>
pageExternalClerk
(
String
wxEnterpriseId
,
String
wxUserId
,
Integer
statusFlag
,
BasePageInfo
pageInfo
);
/**
* 推送外部联系人 更新次数以及状态
*
* @param relationKey
* @return
*/
boolean
pushExternalByRelationKey
(
String
relationKey
);
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseApiService.java
View file @
2e11e971
...
@@ -4,10 +4,7 @@ import java.util.List;
...
@@ -4,10 +4,7 @@ import java.util.List;
import
java.util.Set
;
import
java.util.Set
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.manage.api.dto.QywxCorpInfoSimpleDTO
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.SecretSettingDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.YwWxEnterpriseDTO
;
public
interface
WxEnterpriseApiService
{
public
interface
WxEnterpriseApiService
{
...
@@ -70,4 +67,37 @@ public interface WxEnterpriseApiService {
...
@@ -70,4 +67,37 @@ public interface WxEnterpriseApiService {
* @return
* @return
*/
*/
public
boolean
delSecretSetting
(
String
secretId
);
public
boolean
delSecretSetting
(
String
secretId
);
/**
* 保存小程序配置
*
* @param miniprogramSettingDTO
* @return
*/
public
boolean
saveMiniprogramSetting
(
MiniprogramSettingDTO
miniprogramSettingDTO
);
/**
* 查询小程序配置列表
*
* @param wxEnterpriseId
* @return
*/
public
List
<
MiniprogramSettingDTO
>
listMiniprogramSetting
(
String
wxEnterpriseId
);
/**
* 获取单个小程序配置
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
public
MiniprogramSettingDTO
getMiniprogramSettingByEid
(
String
wxEnterpriseId
,
String
enterpriseId
);
/**
* 删除 小程序配置
*
* @return
*/
public
boolean
delMiniprogramSettingByEid
(
String
id
);
}
}
haoban-manage3-api/src/main/java/com/gic/haoban/manage/api/service/WxEnterpriseRelatedApiService.java
View file @
2e11e971
...
@@ -9,14 +9,14 @@ import com.gic.haoban.manage.api.dto.*;
...
@@ -9,14 +9,14 @@ import com.gic.haoban.manage.api.dto.*;
public
interface
WxEnterpriseRelatedApiService
{
public
interface
WxEnterpriseRelatedApiService
{
List
<
EnterpriseDetailDTO
>
listEnterpriseByWxEnterpriseId
(
String
wxEnterpriseId
);
List
<
EnterpriseDetailDTO
>
listEnterpriseByWxEnterpriseId
(
String
wxEnterpriseId
);
int
wxEnterpriseBind
(
String
enterpriseId
,
String
wxEnterpriseId
,
String
version
);
String
getGicEnterpriseIdByEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
);
String
getGicEnterpriseIdByEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
);
boolean
enterpriseUseNew
(
String
enterpriseId
);
boolean
enterpriseUseNew
(
String
enterpriseId
);
EnterpriseDetailDTO
getByEnterpriseId
(
String
enterpriseId
);
@Deprecated
EnterpriseDetailDTO
getByEnterpriseId
(
String
enterpriseId
);
List
<
EnterpriseDetailDTO
>
queryAllHasGicEnterpriseId
();
List
<
EnterpriseDetailDTO
>
queryAllHasGicEnterpriseId
();
...
@@ -28,8 +28,6 @@ public interface WxEnterpriseRelatedApiService {
...
@@ -28,8 +28,6 @@ public interface WxEnterpriseRelatedApiService {
*/
*/
List
<
EnterpriseDetailDTO
>
queryBindGicEnterpriseByTime
(
String
seqTime
);
List
<
EnterpriseDetailDTO
>
queryBindGicEnterpriseByTime
(
String
seqTime
);
@Deprecated
int
wxEnterpriseBind
(
String
enterpriseId
,
String
wxEnterpriseId
,
String
version
,
String
staffId
,
String
staffName
);
/**
/**
* 企业绑定
* 企业绑定
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/config/Config.java
View file @
2e11e971
...
@@ -20,7 +20,17 @@ public class Config {
...
@@ -20,7 +20,17 @@ public class Config {
private
String
wxSuiteid
;
private
String
wxSuiteid
;
@Value
(
"${appid}"
)
@Value
(
"${appid}"
)
private
String
appid
;
private
String
appid
;
@Value
(
"${memberOpenPage}}"
)
private
String
memberOpenPage
;
public
String
getMemberOpenPage
()
{
return
memberOpenPage
;
}
public
void
setMemberOpenPage
(
String
memberOpenPage
)
{
this
.
memberOpenPage
=
memberOpenPage
;
}
public
String
getAppid
()
{
public
String
getAppid
()
{
return
appid
;
return
appid
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabHaobanExternalClerkRelatedMapper.java
View file @
2e11e971
...
@@ -60,4 +60,25 @@ public interface TabHaobanExternalClerkRelatedMapper {
...
@@ -60,4 +60,25 @@ public interface TabHaobanExternalClerkRelatedMapper {
* @return
* @return
*/
*/
TabHaobanExternalClerkRelated
getByRelationKey
(
@Param
(
"relationKey"
)
String
relationKey
);
TabHaobanExternalClerkRelated
getByRelationKey
(
@Param
(
"relationKey"
)
String
relationKey
);
/**
* 列表数据 根据状态 时间倒序
*
* @param wxEnterpriseId
* @param wxUserId
* @param statusFlag
* @return
*/
List
<
TabHaobanExternalClerkRelated
>
listByWxEnterpriseIdAndWxUserIdAndStatus
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"wxUserId"
)
String
wxUserId
,
@Param
(
"statusFlag"
)
Integer
statusFlag
);
/**
* 触达会员 给会员发送
*
* @param relationKey
* @return
*/
TabHaobanExternalClerkRelated
pushExternalByRelationKey
(
@Param
(
"relationKey"
)
String
relationKey
);
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/dao/mapper/TabMiniprogramSettingMapper.java
0 → 100644
View file @
2e11e971
package
com
.
gic
.
haoban
.
manage
.
service
.
dao
.
mapper
;
import
com.gic.haoban.manage.service.entity.TabMiniprogramSetting
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
@Mapper
public
interface
TabMiniprogramSettingMapper
{
/**
*/
int
deleteByPrimaryKey
(
String
miniprogramSettingId
);
/**
*/
int
insert
(
TabMiniprogramSetting
record
);
/**
*/
int
insertSelective
(
TabMiniprogramSetting
record
);
/**
*/
TabMiniprogramSetting
selectByPrimaryKey
(
String
miniprogramSettingId
);
/**
*/
int
updateByPrimaryKeySelective
(
TabMiniprogramSetting
record
);
/**
*/
int
updateByPrimaryKey
(
TabMiniprogramSetting
record
);
/**
* 获取minprogramSetting
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
public
TabMiniprogramSetting
getMiniprogramSetting
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
,
@Param
(
"enterpriseId"
)
String
enterpriseId
);
/**
* 获取minprogramSetting 列表
*
* @param wxEnterpriseId
* @return
*/
public
List
<
TabMiniprogramSetting
>
listMiniprogramSetting
(
@Param
(
"wxEnterpriseId"
)
String
wxEnterpriseId
);
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabHaobanExternalClerkRelated.java
View file @
2e11e971
...
@@ -30,6 +30,10 @@ public class TabHaobanExternalClerkRelated implements Serializable {
...
@@ -30,6 +30,10 @@ public class TabHaobanExternalClerkRelated implements Serializable {
private
String
wxUserId
;
private
String
wxUserId
;
/**
/**
* 触达次数
*/
private
Integer
pushTimes
;
/**
* 校验的key,clerkid+externalUserId的md5
* 校验的key,clerkid+externalUserId的md5
*/
*/
private
String
relationKey
;
private
String
relationKey
;
...
@@ -42,6 +46,14 @@ public class TabHaobanExternalClerkRelated implements Serializable {
...
@@ -42,6 +46,14 @@ public class TabHaobanExternalClerkRelated implements Serializable {
private
static
final
long
serialVersionUID
=
1L
;
private
static
final
long
serialVersionUID
=
1L
;
public
Integer
getPushTimes
()
{
return
pushTimes
;
}
public
void
setPushTimes
(
Integer
pushTimes
)
{
this
.
pushTimes
=
pushTimes
;
}
public
String
getRelationKey
()
{
public
String
getRelationKey
()
{
return
relationKey
;
return
relationKey
;
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/entity/TabMiniprogramSetting.java
0 → 100644
View file @
2e11e971
package
com
.
gic
.
haoban
.
manage
.
service
.
entity
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
* Created By MBG-GUI-EXTENSION https://github.com/spawpaw/mybatis-generator-gui-extension
* Description:
* 小程序配置
*
* @author fdh
*/
public
class
TabMiniprogramSetting
implements
Serializable
{
/**
*
*/
private
String
miniprogramSettingId
;
/**
*
*/
private
String
wxEnterpriseId
;
/**
*
*/
private
String
enterpriseId
;
/**
*
*/
private
String
miniprogramName
;
/**
*
*/
private
String
title
;
/**
*
*/
private
String
appId
;
/**
* 封面
*/
private
String
imageUrl
;
/**
*
*/
private
String
mediaId
;
/**
*
*/
private
Date
mediaTime
;
/**
*
*/
private
Integer
statusFlag
;
/**
*
*/
private
Date
createTme
;
/**
*
*/
private
Date
updateTime
;
/**
*/
private
static
final
long
serialVersionUID
=
1L
;
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.miniprogram_setting_id
*
* @return the value of tab_haoban_miniprogram_setting.miniprogram_setting_id
*/
public
String
getMiniprogramSettingId
()
{
return
miniprogramSettingId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.miniprogram_setting_id
*
* @param miniprogramSettingId the value for tab_haoban_miniprogram_setting.miniprogram_setting_id
*/
public
void
setMiniprogramSettingId
(
String
miniprogramSettingId
)
{
this
.
miniprogramSettingId
=
miniprogramSettingId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.wx_enterprise_id
*
* @return the value of tab_haoban_miniprogram_setting.wx_enterprise_id
*/
public
String
getWxEnterpriseId
()
{
return
wxEnterpriseId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.wx_enterprise_id
*
* @param wxEnterpriseId the value for tab_haoban_miniprogram_setting.wx_enterprise_id
*/
public
void
setWxEnterpriseId
(
String
wxEnterpriseId
)
{
this
.
wxEnterpriseId
=
wxEnterpriseId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.enterprise_id
*
* @return the value of tab_haoban_miniprogram_setting.enterprise_id
*/
public
String
getEnterpriseId
()
{
return
enterpriseId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.enterprise_id
*
* @param enterpriseId the value for tab_haoban_miniprogram_setting.enterprise_id
*/
public
void
setEnterpriseId
(
String
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.miniprogram_name
*
* @return the value of tab_haoban_miniprogram_setting.miniprogram_name
*/
public
String
getMiniprogramName
()
{
return
miniprogramName
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.miniprogram_name
*
* @param miniprogramName the value for tab_haoban_miniprogram_setting.miniprogram_name
*/
public
void
setMiniprogramName
(
String
miniprogramName
)
{
this
.
miniprogramName
=
miniprogramName
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.title
*
* @return the value of tab_haoban_miniprogram_setting.title
*/
public
String
getTitle
()
{
return
title
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.title
*
* @param title the value for tab_haoban_miniprogram_setting.title
*/
public
void
setTitle
(
String
title
)
{
this
.
title
=
title
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.app_id
*
* @return the value of tab_haoban_miniprogram_setting.app_id
*/
public
String
getAppId
()
{
return
appId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.app_id
*
* @param appId the value for tab_haoban_miniprogram_setting.app_id
*/
public
void
setAppId
(
String
appId
)
{
this
.
appId
=
appId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.image_url
*
* @return the value of tab_haoban_miniprogram_setting.image_url
*/
public
String
getImageUrl
()
{
return
imageUrl
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.image_url
*
* @param imageUrl the value for tab_haoban_miniprogram_setting.image_url
*/
public
void
setImageUrl
(
String
imageUrl
)
{
this
.
imageUrl
=
imageUrl
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.media_id
*
* @return the value of tab_haoban_miniprogram_setting.media_id
*/
public
String
getMediaId
()
{
return
mediaId
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.media_id
*
* @param mediaId the value for tab_haoban_miniprogram_setting.media_id
*/
public
void
setMediaId
(
String
mediaId
)
{
this
.
mediaId
=
mediaId
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.media_time
*
* @return the value of tab_haoban_miniprogram_setting.media_time
*/
public
Date
getMediaTime
()
{
return
mediaTime
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.media_time
*
* @param mediaTime the value for tab_haoban_miniprogram_setting.media_time
*/
public
void
setMediaTime
(
Date
mediaTime
)
{
this
.
mediaTime
=
mediaTime
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.status_flag
*
* @return the value of tab_haoban_miniprogram_setting.status_flag
*/
public
Integer
getStatusFlag
()
{
return
statusFlag
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.status_flag
*
* @param statusFlag the value for tab_haoban_miniprogram_setting.status_flag
*/
public
void
setStatusFlag
(
Integer
statusFlag
)
{
this
.
statusFlag
=
statusFlag
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.create_tme
*
* @return the value of tab_haoban_miniprogram_setting.create_tme
*/
public
Date
getCreateTme
()
{
return
createTme
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.create_tme
*
* @param createTme the value for tab_haoban_miniprogram_setting.create_tme
*/
public
void
setCreateTme
(
Date
createTme
)
{
this
.
createTme
=
createTme
;
}
/**
* This method returns the value of the database column tab_haoban_miniprogram_setting.update_time
*
* @return the value of tab_haoban_miniprogram_setting.update_time
*/
public
Date
getUpdateTime
()
{
return
updateTime
;
}
/**
* This method sets the value of the database column tab_haoban_miniprogram_setting.update_time
*
* @param updateTime the value for tab_haoban_miniprogram_setting.update_time
*/
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
}
\ No newline at end of file
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/MiniprogramSettingService.java
0 → 100644
View file @
2e11e971
package
com
.
gic
.
haoban
.
manage
.
service
.
service
;
import
com.gic.haoban.manage.service.entity.TabMiniprogramSetting
;
import
java.util.List
;
/**
* Created 2021/4/16.
*
* @author hua
*/
public
interface
MiniprogramSettingService
{
/**
* 保存素材
*
* @param miniprogramSetting
*/
public
void
saveMiniprogramSetting
(
TabMiniprogramSetting
miniprogramSetting
);
/**
* 小程序列表
*
* @param wxEnterpriseId
* @return
*/
public
List
<
TabMiniprogramSetting
>
listMiniprogram
(
String
wxEnterpriseId
);
/**
* 获取单个配置信息
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
public
TabMiniprogramSetting
getMiniprogramSetting
(
String
wxEnterpriseId
,
String
enterpriseId
);
/**
* 删除
*
* @param id
* @return
*/
public
boolean
delMiniprogramSetting
(
String
id
);
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/WxEnterpriseRelatedService.java
View file @
2e11e971
...
@@ -9,8 +9,6 @@ public interface WxEnterpriseRelatedService {
...
@@ -9,8 +9,6 @@ public interface WxEnterpriseRelatedService {
TabHaobanWxEnterpriseRelated
getByGicEnterpriseIdByEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
);
TabHaobanWxEnterpriseRelated
getByGicEnterpriseIdByEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
);
@Deprecated
TabHaobanWxEnterpriseRelated
getEnterpriseByGicEnterpriseId
(
String
gicEnterpriseId
);
List
<
TabHaobanWxEnterpriseRelated
>
getByWxEnterpriseId
(
String
wxEnterpriseId
);
List
<
TabHaobanWxEnterpriseRelated
>
getByWxEnterpriseId
(
String
wxEnterpriseId
);
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/impl/WxEnterpriseRelatedServiceImpl.java
View file @
2e11e971
...
@@ -36,12 +36,6 @@ public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedServic
...
@@ -36,12 +36,6 @@ public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedServic
return
mapper
.
selectByPrimaryKey
(
wxEnterpriseRelatedId
);
return
mapper
.
selectByPrimaryKey
(
wxEnterpriseRelatedId
);
}
}
@Override
public
TabHaobanWxEnterpriseRelated
getEnterpriseByGicEnterpriseId
(
String
gicEnterpriseId
)
{
//todo 销售线索-不能根据eid查询微信企业 因为目前一对多 需要改
TabHaobanWxEnterpriseRelated
tab
=
mapper
.
findOneByEnterpriseId
(
gicEnterpriseId
);
return
tab
;
}
@Override
@Override
public
List
<
TabHaobanWxEnterpriseRelated
>
getByWxEnterpriseId
(
String
wxEnterpriseId
)
{
public
List
<
TabHaobanWxEnterpriseRelated
>
getByWxEnterpriseId
(
String
wxEnterpriseId
)
{
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/ExternalClerkRelatedApiServiceImpl.java
View file @
2e11e971
...
@@ -8,6 +8,8 @@ import com.gic.haoban.manage.api.dto.*;
...
@@ -8,6 +8,8 @@ import com.gic.haoban.manage.api.dto.*;
import
java.util.Collections
;
import
java.util.Collections
;
import
java.util.Date
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.List
;
import
com.github.pagehelper.PageInfo
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -50,5 +52,24 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
...
@@ -50,5 +52,24 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
}
}
return
EntityUtil
.
changeEntityListByJSON
(
ExternalClerkRelatedDTO
.
class
,
tabHaobanExternalClerkRelatedMapper
.
listByWxEnterpriseIdAndWxUserIds
(
userIdList
,
wxEnterpriseId
));
return
EntityUtil
.
changeEntityListByJSON
(
ExternalClerkRelatedDTO
.
class
,
tabHaobanExternalClerkRelatedMapper
.
listByWxEnterpriseIdAndWxUserIds
(
userIdList
,
wxEnterpriseId
));
}
}
@Override
public
ExternalClerkRelatedDTO
getExternalClerkByRelationKeyAndPre
(
String
relationKey
)
{
TabHaobanExternalClerkRelated
related
=
tabHaobanExternalClerkRelatedMapper
.
getByRelationKey
(
relationKey
);
return
EntityUtil
.
changeEntityNew
(
ExternalClerkRelatedDTO
.
class
,
related
);
}
@Override
public
Page
<
ExternalClerkRelatedDTO
>
pageExternalClerk
(
String
wxEnterpriseId
,
String
wxUserId
,
Integer
statusFlag
,
BasePageInfo
pageInfo
)
{
PageHelper
.
startPage
(
pageInfo
);
List
<
TabHaobanExternalClerkRelated
>
ret
=
tabHaobanExternalClerkRelatedMapper
.
listByWxEnterpriseIdAndWxUserIdAndStatus
(
wxEnterpriseId
,
wxUserId
,
statusFlag
);
PageUtil
.
changePageHelperToCurrentPage
(
new
PageInfo
<>(
ret
),
ExternalClerkRelatedDTO
.
class
);
return
null
;
}
@Override
public
boolean
pushExternalByRelationKey
(
String
relationKey
)
{
tabHaobanExternalClerkRelatedMapper
.
pushExternalByRelationKey
(
relationKey
);
return
true
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
View file @
2e11e971
...
@@ -15,6 +15,7 @@ import com.gic.enterprise.api.service.EnterpriseService;
...
@@ -15,6 +15,7 @@ import com.gic.enterprise.api.service.EnterpriseService;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.base.api.common.ServiceResponse
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.service.entity.*
;
import
com.gic.haoban.manage.service.exception.WxApiLimitException
;
import
com.gic.haoban.manage.service.exception.WxApiLimitException
;
import
com.gic.haoban.manage.service.pojo.DealQywxExternalUserPojo
;
import
com.gic.haoban.manage.service.pojo.DealQywxExternalUserPojo
;
import
com.gic.haoban.manage.service.service.*
;
import
com.gic.haoban.manage.service.service.*
;
...
@@ -52,13 +53,6 @@ import com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService;
...
@@ -52,13 +53,6 @@ import com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper
;
import
com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper
;
import
com.gic.haoban.manage.service.entity.MemberUnionidRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaff
;
import
com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise
;
import
com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated
;
import
com.gic.haoban.manage.service.pojo.ExternalUserPojo
;
import
com.gic.haoban.manage.service.pojo.ExternalUserPojo
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.haoban.manage.service.util.EmojiFilterUtil
;
import
com.gic.member.api.dto.MemberDTO
;
import
com.gic.member.api.dto.MemberDTO
;
...
@@ -133,6 +127,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -133,6 +127,9 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
@Autowired
@Autowired
private
EnterpriseService
enterpriseService
;
private
EnterpriseService
enterpriseService
;
@Autowired
private
MiniprogramSettingService
miniprogramSettingService
;
@Override
@Override
public
void
dealQywxExternalUser
(
String
params
)
{
public
void
dealQywxExternalUser
(
String
params
)
{
log
.
info
(
"回调:{}"
,
params
);
log
.
info
(
"回调:{}"
,
params
);
...
@@ -418,6 +415,10 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -418,6 +415,10 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
addFriendByWelcome
(
dto
,
staffClerkRelationDTO
);
addFriendByWelcome
(
dto
,
staffClerkRelationDTO
);
return
;
return
;
}
else
{
}
else
{
if
(
unionId
==
null
)
{
log
.
info
(
"unionid 不存在"
);
return
;
}
//新增导购和外部联系人关系
//新增导购和外部联系人关系
String
clerkCode
=
staffClerkRelationDTO
.
getClerkCode
();
String
clerkCode
=
staffClerkRelationDTO
.
getClerkCode
();
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkCode
(
staffClerkRelationDTO
.
getEnterpriseId
(),
clerkCode
);
ClerkDTO
clerk
=
clerkService
.
getClerkByClerkCode
(
staffClerkRelationDTO
.
getEnterpriseId
(),
clerkCode
);
...
@@ -484,15 +485,19 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -484,15 +485,19 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
*/
*/
private
void
addFriendByWelcome
(
MemberUnionidRelatedDTO
dto
,
StaffClerkRelationDTO
staffClerkRelationDTO
)
{
private
void
addFriendByWelcome
(
MemberUnionidRelatedDTO
dto
,
StaffClerkRelationDTO
staffClerkRelationDTO
)
{
String
relationKey
=
SecureUtil
.
md5
(
staffClerkRelationDTO
.
getClerkId
()
+
dto
.
getExternalUserid
());
String
relationKey
=
SecureUtil
.
md5
(
staffClerkRelationDTO
.
getClerkId
()
+
dto
.
getExternalUserid
());
EnterpriseDTO
enterpriseDTO
=
enterpriseService
.
getEnterpriseById
(
staffClerkRelationDTO
.
getEnterpriseId
());
TabMiniprogramSetting
miniprogramSetting
=
miniprogramSettingService
.
getMiniprogramSetting
(
staffClerkRelationDTO
.
getWxEnterpriseId
(),
staffClerkRelationDTO
.
getEnterpriseId
());
if
(
null
==
miniprogramSetting
)
{
log
.
info
(
"需要配置小程序配置:{}"
,
dto
.
getWxEnterpriseId
(),
staffClerkRelationDTO
.
getEnterpriseId
());
return
;
}
QywxWelcomeMsgDTO
qywxWelcomeMsgDTO
=
new
QywxWelcomeMsgDTO
();
QywxWelcomeMsgDTO
qywxWelcomeMsgDTO
=
new
QywxWelcomeMsgDTO
();
qywxWelcomeMsgDTO
.
setText
(
"测试欢迎"
);
qywxWelcomeMsgDTO
.
setText
(
"测试欢迎"
);
QywxMiniprogramExternalBaseDTO
messageBaseDTO
=
new
QywxMiniprogramExternalBaseDTO
();
QywxMiniprogramExternalBaseDTO
messageBaseDTO
=
new
QywxMiniprogramExternalBaseDTO
();
messageBaseDTO
.
setAppid
(
enterpriseDTO
.
getMallMiniprogramAppid
());
messageBaseDTO
.
setAppid
(
miniprogramSetting
.
getAppId
());
String
mediaId
=
materialApiService
.
reUpdalodMetail
(
"41528646ad0e44aa8b479fb7da1ece92"
);
messageBaseDTO
.
setPicMediaId
(
miniprogramSetting
.
getMediaId
());
messageBaseDTO
.
setPicMediaId
(
mediaId
);
messageBaseDTO
.
setTitle
(
miniprogramSetting
.
getTitle
());
messageBaseDTO
.
setTitle
(
"ces"
);
messageBaseDTO
.
setPage
(
config
.
getMemberOpenPage
()
+
relationKey
);
messageBaseDTO
.
setPage
(
"/pages/mall/mall-index/mall-index?friendKey="
+
relationKey
);
qywxWelcomeMsgDTO
.
setAttachments
(
new
ArrayList
<>());
qywxWelcomeMsgDTO
.
setAttachments
(
new
ArrayList
<>());
qywxWelcomeMsgDTO
.
getAttachments
().
add
(
messageBaseDTO
);
qywxWelcomeMsgDTO
.
getAttachments
().
add
(
messageBaseDTO
);
qywxWelcomeMsgDTO
.
setWelcomeCode
(
dto
.
getWelcomeCode
());
qywxWelcomeMsgDTO
.
setWelcomeCode
(
dto
.
getWelcomeCode
());
...
@@ -516,7 +521,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
...
@@ -516,7 +521,7 @@ public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedA
related
.
setMemberUnionidRelatedId
(
dto
.
getMemberUnionidRelatedId
());
related
.
setMemberUnionidRelatedId
(
dto
.
getMemberUnionidRelatedId
());
related
.
setStoreId
(
staffClerkRelationDTO
.
getStoreId
());
related
.
setStoreId
(
staffClerkRelationDTO
.
getStoreId
());
related
.
setRelationKey
(
relationKey
);
related
.
setRelationKey
(
relationKey
);
related
.
setStatusFlag
(
3
);
related
.
setStatusFlag
(
4
);
// related.setUnionid(unionId);
// related.setUnionid(unionId);
related
.
setWxEnterpriseId
(
staffClerkRelationDTO
.
getWxEnterpriseId
());
related
.
setWxEnterpriseId
(
staffClerkRelationDTO
.
getWxEnterpriseId
());
related
.
setWxUserId
(
dto
.
getWxUserId
());
related
.
setWxUserId
(
dto
.
getWxUserId
());
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MessageApiServiceImpl.java
View file @
2e11e971
...
@@ -137,87 +137,7 @@ public class MessageApiServiceImpl implements MessageApiService {
...
@@ -137,87 +137,7 @@ public class MessageApiServiceImpl implements MessageApiService {
@Override
@Override
public
void
dealGicMessage
(
String
param
)
{
public
void
dealGicMessage
(
String
param
)
{
if
(
true
)
{
return
;
return
;
}
GicMessageDTO
dto
=
JSON
.
parseObject
(
param
,
GicMessageDTO
.
class
);
TabHaobanWxEnterpriseRelated
enterprise
=
this
.
wxEnterpriseRelatedService
.
getEnterpriseByGicEnterpriseId
(
dto
.
getEnterpriseId
());
if
(
enterprise
!=
null
){
DepartmentDTO
departmentDTO
=
new
DepartmentDTO
();
departmentDTO
.
setDepartmentName
(
dto
.
getName
());
departmentDTO
.
setIsStore
(
dto
.
getType
()
!=
GicDataType
.
STORE
.
getCode
()
?
0
:
1
);
departmentDTO
.
setRelatedId
(
dto
.
getId
());
log
.
info
(
"【部门同步】dto={}"
,
JSON
.
toJSONString
(
dto
));
DepartmentDTO
parentDepartment
=
this
.
getParentDepartment
(
dto
.
getParentChain
(),
dto
.
getType
(),
enterprise
.
getWxEnterpriseId
());
if
(
parentDepartment
==
null
&&
(
dto
.
getChangeType
()
==
GicEditType
.
ADD
.
getCode
()
||
dto
.
getChangeType
()
==
GicEditType
.
UPDATE
.
getCode
())){
if
(
dto
.
getChangeType
()
==
GicEditType
.
UPDATE
.
getCode
()){
String
departmentId
=
dto
.
getId
();
DepartmentDTO
exsit
=
departmentApiService
.
selectByRelatedId
(
departmentId
);
if
(
exsit
==
null
){
log
.
info
(
"【部门同步】父部门为空"
);
return
;
}
else
{
parentDepartment
=
departmentApiService
.
selectById
(
exsit
.
getParentDepartmentId
());
}
}
if
(
parentDepartment
==
null
){
log
.
info
(
"【部门同步】父部门为空"
);
return
;
}
}
if
(
parentDepartment
!=
null
){
departmentDTO
.
setParentDepartmentId
(
parentDepartment
.
getDepartmentId
());
departmentDTO
.
setChainId
(
parentDepartment
.
getChainId
()+
Constant
.
ID_SEPARATOR
+
parentDepartment
.
getDepartmentId
());
departmentDTO
.
setChainName
(
parentDepartment
.
getChainName
()
+
Constant
.
NAME_SEPARATOR
+
parentDepartment
.
getChainName
());
departmentDTO
.
setLevel
(
parentDepartment
.
getLevel
()
+
1
);
}
departmentDTO
.
setWxEnterpriseId
(
enterprise
.
getWxEnterpriseId
());
if
(
dto
.
getChangeType
()
==
GicEditType
.
ADD
.
getCode
()){
Integer
isStore
=
departmentDTO
.
getIsStore
();
if
(
isStore
==
1
){
//不是线上门店 不新增
StoreDTO
store
=
storeService
.
getStore
(
departmentDTO
.
getRelatedId
());
if
(
store
==
null
||
store
.
getStatus
()
!=
2
){
return
;
}
}
ServiceResponse
response
=
this
.
departmentApiService
.
add
(
departmentDTO
);
GicClerkDTO
gicClerkDTO
=
dto
.
getGicClerkDTO
();
if
(
gicClerkDTO
!=
null
){
gicClerkDTO
.
setPostionName
(
"店长"
);
staffApiService
.
addGicClerk
(
gicClerkDTO
);
}
log
.
info
(
"添加结果:{}"
,
JSON
.
toJSONString
(
response
));
}
else
if
(
dto
.
getChangeType
()
==
GicEditType
.
UPDATE
.
getCode
()){
TabHaobanDepartment
department
=
this
.
departmentService
.
selectByRelatedId
(
dto
.
getId
());
if
(
department
==
null
){
Integer
isStore
=
departmentDTO
.
getIsStore
();
if
(
isStore
==
1
){
//不是线上门店 不新增
StoreDTO
store
=
storeService
.
getStore
(
departmentDTO
.
getRelatedId
());
if
(
store
==
null
||
store
.
getStatus
()
!=
2
){
return
;
}
}
ServiceResponse
response
=
this
.
departmentApiService
.
add
(
departmentDTO
);
log
.
info
(
"添加结果:{}"
,
JSON
.
toJSONString
(
response
));
}
else
{
departmentDTO
.
setDepartmentId
(
department
.
getDepartmentId
());
this
.
departmentApiService
.
edit
(
departmentDTO
);
log
.
info
(
"gic同步更新完成"
);
}
}
else
{
TabHaobanDepartment
department
=
this
.
departmentService
.
selectByRelatedId
(
dto
.
getId
());
if
(
department
!=
null
){
this
.
departmentApiService
.
gicDel
(
department
.
getDepartmentId
());
log
.
info
(
"gic同步删除完成"
);
}
else
{
log
.
info
(
"gic同步删除不存在"
);
}
}
}
}
}
@Override
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MiniprogramSettingServiceImpl.java
0 → 100644
View file @
2e11e971
package
com
.
gic
.
haoban
.
manage
.
service
.
service
.
out
.
impl
;
import
com.gic.api.base.commons.JSONResponse
;
import
com.gic.commons.util.ToolUtil
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.service.config.Config
;
import
com.gic.haoban.manage.service.dao.mapper.TabMiniprogramSettingMapper
;
import
com.gic.haoban.manage.service.entity.TabMiniprogramSetting
;
import
com.gic.haoban.manage.service.service.MiniprogramSettingService
;
import
com.gic.haoban.manage.service.service.WxEnterpriseService
;
import
com.gic.haoban.manage.service.util.CommonUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.wechat.api.enums.QywxMediaTypeEnum
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.time.DateUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created 2021/4/16.
*
* @author hua
*/
@Service
public
class
MiniprogramSettingServiceImpl
implements
MiniprogramSettingService
{
@Autowired
private
TabMiniprogramSettingMapper
tabMiniprogramSettingMapper
;
@Autowired
private
QywxSuiteApiService
qywxSuiteApiService
;
@Autowired
private
Config
config
;
@Autowired
private
WxEnterpriseService
wxEnterpriseService
;
@Override
public
void
saveMiniprogramSetting
(
TabMiniprogramSetting
miniprogramSetting
)
{
if
(
null
==
miniprogramSetting
.
getMiniprogramSettingId
())
{
miniprogramSetting
.
setMiniprogramSettingId
(
ToolUtil
.
randomUUID
());
miniprogramSetting
.
setUpdateTime
(
new
Date
());
miniprogramSetting
.
setCreateTme
(
new
Date
());
tabMiniprogramSettingMapper
.
insert
(
miniprogramSetting
);
}
else
{
//减掉时间重新配置
Date
date
=
DateUtils
.
addDays
(
new
Date
(),
-
5
);
miniprogramSetting
.
setMediaTime
(
date
);
miniprogramSetting
.
setUpdateTime
(
new
Date
());
tabMiniprogramSettingMapper
.
updateByPrimaryKeySelective
(
miniprogramSetting
);
}
}
@Override
public
List
<
TabMiniprogramSetting
>
listMiniprogram
(
String
wxEnterpriseId
)
{
return
null
;
}
@Override
public
TabMiniprogramSetting
getMiniprogramSetting
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
TabMiniprogramSetting
miniprogramSetting
=
tabMiniprogramSettingMapper
.
getMiniprogramSetting
(
wxEnterpriseId
,
enterpriseId
);
if
(
miniprogramSetting
==
null
)
{
return
null
;
}
Date
date
=
new
Date
();
Date
compareDate
=
DateUtils
.
addDays
(
date
,
-
3
);
if
(
miniprogramSetting
.
getCreateTme
()
!=
null
&&
miniprogramSetting
.
getCreateTme
().
after
(
compareDate
)
&&
StringUtils
.
isNotBlank
(
miniprogramSetting
.
getMediaId
()))
{
return
miniprogramSetting
;
}
String
[]
arr
=
miniprogramSetting
.
getImageUrl
().
split
(
"/"
);
WxEnterpriseDTO
wxEnterpriseDTO
=
wxEnterpriseService
.
selectById
(
wxEnterpriseId
);
Date
createTme
=
miniprogramSetting
.
getCreateTme
();
JSONResponse
jp
=
qywxSuiteApiService
.
uploadMedia
(
wxEnterpriseDTO
.
getCorpid
(),
config
.
getWxSuiteid
(),
CommonUtil
.
getFileByte
(
miniprogramSetting
.
getImageUrl
()),
arr
[
arr
.
length
-
1
],
QywxMediaTypeEnum
.
IMAGE
.
getCode
());
if
(
jp
.
getErrorCode
()
==
0
)
{
miniprogramSetting
.
setMediaTime
(
date
);
miniprogramSetting
.
setMediaId
(
jp
.
getResult
().
toString
());
miniprogramSetting
.
setUpdateTime
(
new
Date
());
tabMiniprogramSettingMapper
.
updateByPrimaryKeySelective
(
miniprogramSetting
);
}
else
{
throw
new
RuntimeException
(
"处理素材异常"
);
}
return
miniprogramSetting
;
}
@Override
public
boolean
delMiniprogramSetting
(
String
id
)
{
tabMiniprogramSettingMapper
.
deleteByPrimaryKey
(
id
);
return
true
;
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/StaffApiServiceImpl.java
View file @
2e11e971
...
@@ -910,91 +910,6 @@ public class StaffApiServiceImpl implements StaffApiService {
...
@@ -910,91 +910,6 @@ public class StaffApiServiceImpl implements StaffApiService {
return
;
return
;
}
}
GicClerkDTO
clerkMid
=
new
GicClerkDTO
();
for
(
SyncJsonColumnDTO
syncJsonColumnDTO
:
fieldList
)
{
String
name
=
StringUtil
.
camelName
(
syncJsonColumnDTO
.
getName
());
String
value
=
syncJsonColumnDTO
.
getValue
();
if
(
"enterpriseId"
.
equals
(
name
))
{
if
(
StringUtils
.
isBlank
(
value
))
{
return
;
}
clerkMid
.
setEnterpriseId
(
value
);
continue
;
}
if
(
"storeId"
.
equals
(
name
))
{
if
(
StringUtils
.
isBlank
(
value
))
{
return
;
}
clerkMid
.
setStoreId
(
value
);
continue
;
}
if
(
"clerkName"
.
equals
(
name
))
{
clerkMid
.
setClerkName
(
value
);
continue
;
}
if
(
"clerkCode"
.
equals
(
name
))
{
clerkMid
.
setClerkCode
(
value
);
continue
;
}
if
(
"clerkGender"
.
equals
(
name
))
{
try
{
clerkMid
.
setClerkGender
((
value
==
null
?
null
:
Integer
.
parseInt
(
value
)));
}
catch
(
Exception
e
)
{
// TODO: handle exception
}
continue
;
}
if
(
"status"
.
equals
(
name
))
{
clerkMid
.
setStatus
((
value
==
null
?
null
:
Integer
.
parseInt
(
value
)));
continue
;
}
if
(
"headImgUrl"
.
equals
(
name
))
{
clerkMid
.
setHeadImgUrl
(
value
);
continue
;
}
if
(
"phoneNumber"
.
equals
(
name
))
{
clerkMid
.
setPhoneNumber
(
value
);
continue
;
}
if
(
"positionName"
.
equals
(
name
))
{
clerkMid
.
setPostionName
(
value
);
continue
;
}
if
(
"nationcode"
.
equals
(
name
))
{
if
(
StringUtils
.
isNotBlank
(
value
)
&&
value
.
startsWith
(
"+"
)){
value
=
value
.
replace
(
"+"
,
""
);
}
clerkMid
.
setNationcode
((
StringUtils
.
isBlank
(
value
)
?
"86"
:
value
));
continue
;
}
}
if
(
StringUtils
.
isBlank
(
clerkMid
.
getPhoneNumber
())
||
"--"
.
equals
(
clerkMid
.
getPhoneNumber
())){
return
;
}
if
(
wxEnterpriseRelatedApiService
.
enterpriseUseNew
(
clerkMid
.
getEnterpriseId
())){
try
{
addClerkByGic
(
clerkMid
);
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
else
{
throw
new
RuntimeException
(
"使用好办2.0"
);
}
}
}
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseApiServiceImpl.java
View file @
2e11e971
...
@@ -7,8 +7,10 @@ import com.alibaba.fastjson.JSON;
...
@@ -7,8 +7,10 @@ import com.alibaba.fastjson.JSON;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.manage.api.dto.
SecretSettingDTO
;
import
com.gic.haoban.manage.api.dto.
*
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.api.enums.SecretTypeEnum
;
import
com.gic.haoban.manage.service.entity.TabMiniprogramSetting
;
import
com.gic.haoban.manage.service.service.MiniprogramSettingService
;
import
com.gic.haoban.manage.service.service.SecretSettingService
;
import
com.gic.haoban.manage.service.service.SecretSettingService
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
...
@@ -20,9 +22,6 @@ import org.springframework.stereotype.Service;
...
@@ -20,9 +22,6 @@ import org.springframework.stereotype.Service;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.dto.EnterpriseDTO
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.haoban.manage.api.dto.QywxCorpInfoSimpleDTO
;
import
com.gic.haoban.manage.api.dto.WxEnterpriseDTO
;
import
com.gic.haoban.manage.api.dto.YwWxEnterpriseDTO
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.StaffApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.api.service.WxEnterpriseApiService
;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper
;
import
com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper
;
...
@@ -50,6 +49,9 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -50,6 +49,9 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
@Autowired
@Autowired
private
SecretSettingService
secretSettingService
;
private
SecretSettingService
secretSettingService
;
@Autowired
private
MiniprogramSettingService
miniprogramSettingService
;
@Override
@Override
public
void
callbackReviceEnterprise
(
QywxCorpInfoSimpleDTO
dto
)
{
public
void
callbackReviceEnterprise
(
QywxCorpInfoSimpleDTO
dto
)
{
...
@@ -170,4 +172,28 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
...
@@ -170,4 +172,28 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
public
boolean
delSecretSetting
(
String
secretId
)
{
public
boolean
delSecretSetting
(
String
secretId
)
{
return
secretSettingService
.
delSecretSetting
(
secretId
);
return
secretSettingService
.
delSecretSetting
(
secretId
);
}
}
@Override
public
boolean
saveMiniprogramSetting
(
MiniprogramSettingDTO
miniprogramSettingDTO
)
{
miniprogramSettingService
.
saveMiniprogramSetting
(
EntityUtil
.
changeEntityNew
(
TabMiniprogramSetting
.
class
,
miniprogramSettingDTO
));
return
true
;
}
@Override
public
List
<
MiniprogramSettingDTO
>
listMiniprogramSetting
(
String
wxEnterpriseId
)
{
List
<
TabMiniprogramSetting
>
ret
=
miniprogramSettingService
.
listMiniprogram
(
wxEnterpriseId
);
return
EntityUtil
.
changeEntityListNew
(
MiniprogramSettingDTO
.
class
,
ret
);
}
@Override
public
MiniprogramSettingDTO
getMiniprogramSettingByEid
(
String
wxEnterpriseId
,
String
enterpriseId
)
{
TabMiniprogramSetting
miniprogramSetting
=
miniprogramSettingService
.
getMiniprogramSetting
(
wxEnterpriseId
,
enterpriseId
);
return
EntityUtil
.
changeEntityNew
(
MiniprogramSettingDTO
.
class
,
miniprogramSetting
);
}
@Override
public
boolean
delMiniprogramSettingByEid
(
String
id
)
{
miniprogramSettingService
.
delMiniprogramSetting
(
id
);
return
true
;
}
}
}
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/WxEnterpriseRelatedApiServiceImpl.java
View file @
2e11e971
...
@@ -112,35 +112,7 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
...
@@ -112,35 +112,7 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
// return nodeCount;
// return nodeCount;
//
//
// }
// }
@Override
public
int
wxEnterpriseBind
(
String
enterpriseId
,
String
wxEnterpriseId
,
String
version
)
{
TabHaobanWxEnterpriseRelated
tab
=
wxEnterpriseRelatedMapper
.
findOneByEnterpriseId
(
enterpriseId
);
if
(
tab
!=
null
){
logger
.
info
(
"该gicEnterpriseId已经绑定过了"
);
return
1
;
}
else
{
tab
=
new
TabHaobanWxEnterpriseRelated
();
tab
.
setEnterpriseId
(
enterpriseId
);
tab
.
setWxEnterpriseId
(
wxEnterpriseId
);
tab
.
setStatusFlag
(
1
);
tab
.
setVersion
(
version
);
tab
.
setCreateTime
(
new
Date
());
tab
.
setUpdateTime
(
new
Date
());
tab
.
setWxEnterpriseRelatedId
(
UuidUtil
.
randomUUID
());
wxEnterpriseRelatedMapper
.
insertSelective
(
tab
);
TabHaobanStaff
sStaff
=
staffMapper
.
selectSuperByWxEnterpriseId
(
wxEnterpriseId
);
if
(
sStaff
==
null
){
TabHaobanStaff
staff
=
new
TabHaobanStaff
();
staff
.
setStaffName
(
"超级管理员"
);
staff
.
setWxEnterpriseId
(
wxEnterpriseId
);
staff
.
setSuperManagerFlag
(
1
);
staffService
.
add
(
staff
);
}
}
return
0
;
}
@Override
@Override
public
String
getGicEnterpriseIdByEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
)
{
public
String
getGicEnterpriseIdByEnterpriseRelatedId
(
String
wxEnterpriseRelatedId
)
{
TabHaobanWxEnterpriseRelated
tab
=
wxEnterpriseRelatedService
.
getByGicEnterpriseIdByEnterpriseRelatedId
(
wxEnterpriseRelatedId
);
TabHaobanWxEnterpriseRelated
tab
=
wxEnterpriseRelatedService
.
getByGicEnterpriseIdByEnterpriseRelatedId
(
wxEnterpriseRelatedId
);
...
@@ -153,9 +125,14 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
...
@@ -153,9 +125,14 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
@Override
@Override
public
boolean
enterpriseUseNew
(
String
enterpriseId
)
{
public
boolean
enterpriseUseNew
(
String
enterpriseId
)
{
TabHaobanWxEnterpriseRelated
tab
=
wxEnterpriseRelatedMapper
.
findOneByEnterpriseId
(
enterpriseId
);
if
(
null
==
enterpriseId
)
{
if
(
tab
==
null
){
return
false
;
return
false
;
}
List
<
String
>
eids
=
new
ArrayList
<>();
eids
.
add
(
enterpriseId
);
List
<
TabHaobanWxEnterpriseRelated
>
retList
=
wxEnterpriseRelatedMapper
.
listEnterpriseByEnterpriseIds
(
eids
);
if
(
CollectionUtils
.
isEmpty
(
retList
))
{
return
false
;
}
}
return
true
;
return
true
;
}
}
...
@@ -196,38 +173,6 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
...
@@ -196,38 +173,6 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
return
details
;
return
details
;
}
}
@Override
public
int
wxEnterpriseBind
(
String
enterpriseId
,
String
wxEnterpriseId
,
String
version
,
String
staffId
,
String
staffName
)
{
TabHaobanWxEnterpriseRelated
tab
=
wxEnterpriseRelatedMapper
.
findOneByEnterpriseId
(
enterpriseId
);
if
(
tab
!=
null
){
logger
.
info
(
"该gicEnterpriseId已经绑定过了"
);
return
1
;
}
else
{
tab
=
new
TabHaobanWxEnterpriseRelated
();
tab
.
setEnterpriseId
(
enterpriseId
);
tab
.
setWxEnterpriseId
(
wxEnterpriseId
);
tab
.
setStatusFlag
(
1
);
tab
.
setVersion
(
version
);
tab
.
setStaffId
(
staffId
);
tab
.
setStaffName
(
staffName
);
tab
.
setCreateTime
(
new
Date
());
tab
.
setUpdateTime
(
new
Date
());
tab
.
setWxEnterpriseRelatedId
(
UuidUtil
.
randomUUID
());
wxEnterpriseRelatedMapper
.
insertSelective
(
tab
);
TabHaobanStaff
sStaff
=
staffMapper
.
selectSuperByWxEnterpriseId
(
wxEnterpriseId
);
if
(
sStaff
==
null
){
TabHaobanStaff
staff
=
new
TabHaobanStaff
();
staff
.
setStaffName
(
"超级管理员"
);
staff
.
setWxEnterpriseId
(
wxEnterpriseId
);
staff
.
setSuperManagerFlag
(
1
);
staffService
.
add
(
staff
);
}
}
return
0
;
}
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Transactional
(
rollbackFor
=
Exception
.
class
)
@Override
@Override
public
int
wxEnterpriseBind
(
WxEnterpriseRelationDetailDTO
detailDTO
)
{
public
int
wxEnterpriseBind
(
WxEnterpriseRelationDetailDTO
detailDTO
)
{
...
@@ -352,7 +297,8 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
...
@@ -352,7 +297,8 @@ public class WxEnterpriseRelatedApiServiceImpl implements WxEnterpriseRelatedApi
}
}
detailDTO
.
setMemberOpenCardFlag
(
wxEnterpriseRelated
.
getMemberOpenCardFlag
());
detailDTO
.
setMemberOpenCardFlag
(
wxEnterpriseRelated
.
getMemberOpenCardFlag
());
detailDTO
.
setWxEnterpriseType
(
wxEnterpriseRelated
.
getWxEnterpriseType
());
detailDTO
.
setWxEnterpriseType
(
wxEnterpriseRelated
.
getWxEnterpriseType
());
return
detailDTO
;
detailDTO
.
setWxEnterpriseRelatedId
(
wxEnterpriseRelated
.
getWxEnterpriseRelatedId
());
return
detailDTO
;
}
}
@Override
@Override
...
...
haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/util/CommonUtil.java
0 → 100644
View file @
2e11e971
package
com
.
gic
.
haoban
.
manage
.
service
.
util
;
import
org.apache.commons.io.IOUtils
;
import
org.slf4j.Logger
;
import
java.io.InputStream
;
import
java.net.URL
;
import
static
org
.
slf4j
.
LoggerFactory
.
getLogger
;
/**
* Created 2021/4/16.
*
* @author hua
*/
public
class
CommonUtil
{
private
static
final
Logger
logger
=
getLogger
(
CommonUtil
.
class
);
/**
* 获取字符串
*
* @param url
* @return
*/
public
static
byte
[]
getFileByte
(
String
url
)
{
try
{
InputStream
in
=
new
URL
(
url
).
openStream
();
byte
[]
data
=
IOUtils
.
toByteArray
(
in
);
return
data
;
}
catch
(
Exception
e
)
{
logger
.
info
(
"【异常】"
+
e
.
getMessage
(),
e
);
}
return
null
;
}
}
haoban-manage3-service/src/main/resources/mapper/TabHaobanExternalClerkRelatedMapper.xml
View file @
2e11e971
...
@@ -15,14 +15,15 @@
...
@@ -15,14 +15,15 @@
<result
column=
"clerk_id"
property=
"clerkId"
jdbcType=
"VARCHAR"
/>
<result
column=
"clerk_id"
property=
"clerkId"
jdbcType=
"VARCHAR"
/>
<result
column=
"staff_id"
property=
"staffId"
jdbcType=
"VARCHAR"
/>
<result
column=
"staff_id"
property=
"staffId"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_user_id"
property=
"wxUserId"
jdbcType=
"VARCHAR"
/>
<result
column=
"wx_user_id"
property=
"wxUserId"
jdbcType=
"VARCHAR"
/>
<result
column=
"relation_key"
property=
"relationKey"
jdbcType=
"VARCHAR"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"status_flag"
property=
"statusFlag"
jdbcType=
"INTEGER"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
<result
column=
"update_time"
property=
"updateTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
</resultMap>
<sql
id=
"Base_Column_List"
>
<sql
id=
"Base_Column_List"
>
external_clerk_related_id, wx_enterprise_id, enterprise_id, store_id, member_id,
external_clerk_related_id, wx_enterprise_id, enterprise_id, store_id, member_id,
unionid, external_name, add_create_time, member_unionid_related_id, clerk_id, staff_id,
unionid, external_name, add_create_time, member_unionid_related_id, clerk_id, staff_id,
wx_user_id, status_flag, create_time, update_time,external_user_id
wx_user_id,
relation_key,
status_flag, create_time, update_time,external_user_id
</sql>
</sql>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
<select
id=
"selectByPrimaryKey"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
select
...
@@ -90,8 +91,11 @@
...
@@ -90,8 +91,11 @@
<if
test=
"wxUserId != null"
>
<if
test=
"wxUserId != null"
>
wx_user_id,
wx_user_id,
</if>
</if>
<if
test=
"pushTimes != null"
>
push_times,
</if>
<if
test=
"relationKey != null"
>
<if
test=
"relationKey != null"
>
relation_key,
,
relation_key,
</if>
</if>
<if
test=
"statusFlag != null"
>
<if
test=
"statusFlag != null"
>
status_flag,
status_flag,
...
@@ -143,6 +147,9 @@
...
@@ -143,6 +147,9 @@
<if
test=
"wxUserId != null"
>
<if
test=
"wxUserId != null"
>
#{wxUserId,jdbcType=VARCHAR},
#{wxUserId,jdbcType=VARCHAR},
</if>
</if>
<if
test=
"pushTimes != null"
>
#{pushTimes,jdbcType=VARCHAR},
</if>
<if
test=
"relationKey != null"
>
<if
test=
"relationKey != null"
>
#{relationKey,jdbcType=VARCHAR},
#{relationKey,jdbcType=VARCHAR},
</if>
</if>
...
@@ -384,6 +391,27 @@
...
@@ -384,6 +391,27 @@
from tab_haoban_external_clerk_related
from tab_haoban_external_clerk_related
where
where
and relation_key = #{relationKey}
and relation_key = #{relationKey}
and status_flag =
3
and status_flag =
4
</select>
</select>
<select
id=
"listByWxEnterpriseIdAndWxUserIdAndStatus"
resultMap=
"BaseResultMap"
parameterType=
"java.lang.String"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_external_clerk_related
where wx_user_id = #{wxUserId,jdbcType=VARCHAR}
and wx_enterprise_id = #{wxEnterpriseId}
and status_flag = #{statusFlag}
order by update_time desc
</select>
<update
id=
"pushExternalByRelationKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabHaobanExternalClerkRelated"
>
update tab_haoban_external_clerk_related
set
status_flag = 4,
push_times += 1,
update_time = now()
where relation_key = #{relationKey,jdbcType=VARCHAR}
and status_flag in(3,4)
</update>
</mapper>
</mapper>
\ No newline at end of file
haoban-manage3-service/src/main/resources/mapper/TabMiniprogramSettingMapper.xml
0 → 100644
View file @
2e11e971
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.haoban.manage.service.dao.mapper.TabMiniprogramSettingMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
<id
column=
"miniprogram_setting_id"
jdbcType=
"VARCHAR"
property=
"miniprogramSettingId"
/>
<result
column=
"wx_enterprise_id"
jdbcType=
"VARCHAR"
property=
"wxEnterpriseId"
/>
<result
column=
"enterprise_id"
jdbcType=
"VARCHAR"
property=
"enterpriseId"
/>
<result
column=
"miniprogram_name"
jdbcType=
"VARCHAR"
property=
"miniprogramName"
/>
<result
column=
"title"
jdbcType=
"VARCHAR"
property=
"title"
/>
<result
column=
"app_id"
jdbcType=
"VARCHAR"
property=
"appId"
/>
<result
column=
"image_url"
jdbcType=
"VARCHAR"
property=
"imageUrl"
/>
<result
column=
"media_id"
jdbcType=
"VARCHAR"
property=
"mediaId"
/>
<result
column=
"media_time"
jdbcType=
"TIMESTAMP"
property=
"mediaTime"
/>
<result
column=
"status_flag"
jdbcType=
"INTEGER"
property=
"statusFlag"
/>
<result
column=
"create_tme"
jdbcType=
"TIMESTAMP"
property=
"createTme"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
miniprogram_setting_id, wx_enterprise_id, enterprise_id, miniprogram_name, title,
app_id, image_url, media_id, media_time, status_flag, create_tme, update_time
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</select>
<delete
id=
"deleteByPrimaryKey"
parameterType=
"java.lang.String"
>
update tab_haoban_miniprogram_setting
set status_flag=0,update_time=now()
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</delete>
<insert
id=
"insert"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
insert into tab_haoban_miniprogram_setting (miniprogram_setting_id, wx_enterprise_id,
enterprise_id, miniprogram_name, title,
app_id, image_url, media_id,
media_time, status_flag, create_tme,
update_time)
values (#{miniprogramSettingId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=VARCHAR}, #{miniprogramName,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{appId,jdbcType=VARCHAR}, #{imageUrl,jdbcType=VARCHAR}, #{mediaId,jdbcType=VARCHAR},
#{mediaTime,jdbcType=TIMESTAMP}, #{statusFlag,jdbcType=INTEGER}, #{createTme,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
insert into tab_haoban_miniprogram_setting
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"miniprogramSettingId != null"
>
miniprogram_setting_id,
</if>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"miniprogramName != null"
>
miniprogram_name,
</if>
<if
test=
"title != null"
>
title,
</if>
<if
test=
"appId != null"
>
app_id,
</if>
<if
test=
"imageUrl != null"
>
image_url,
</if>
<if
test=
"mediaId != null"
>
media_id,
</if>
<if
test=
"mediaTime != null"
>
media_time,
</if>
<if
test=
"statusFlag != null"
>
status_flag,
</if>
<if
test=
"createTme != null"
>
create_tme,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"miniprogramSettingId != null"
>
#{miniprogramSettingId,jdbcType=VARCHAR},
</if>
<if
test=
"wxEnterpriseId != null"
>
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"miniprogramName != null"
>
#{miniprogramName,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
#{title,jdbcType=VARCHAR},
</if>
<if
test=
"appId != null"
>
#{appId,jdbcType=VARCHAR},
</if>
<if
test=
"imageUrl != null"
>
#{imageUrl,jdbcType=VARCHAR},
</if>
<if
test=
"mediaId != null"
>
#{mediaId,jdbcType=VARCHAR},
</if>
<if
test=
"mediaTime != null"
>
#{mediaTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"statusFlag != null"
>
#{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTme != null"
>
#{createTme,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
update tab_haoban_miniprogram_setting
<set>
<if
test=
"wxEnterpriseId != null"
>
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
</if>
<if
test=
"miniprogramName != null"
>
miniprogram_name = #{miniprogramName,jdbcType=VARCHAR},
</if>
<if
test=
"title != null"
>
title = #{title,jdbcType=VARCHAR},
</if>
<if
test=
"appId != null"
>
app_id = #{appId,jdbcType=VARCHAR},
</if>
<if
test=
"imageUrl != null"
>
image_url = #{imageUrl,jdbcType=VARCHAR},
</if>
<if
test=
"mediaId != null"
>
media_id = #{mediaId,jdbcType=VARCHAR},
</if>
<if
test=
"mediaTime != null"
>
media_time = #{mediaTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"statusFlag != null"
>
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if
test=
"createTme != null"
>
create_tme = #{createTme,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.haoban.manage.service.entity.TabMiniprogramSetting"
>
update tab_haoban_miniprogram_setting
set wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=VARCHAR},
miniprogram_name = #{miniprogramName,jdbcType=VARCHAR},
title = #{title,jdbcType=VARCHAR},
app_id = #{appId,jdbcType=VARCHAR},
image_url = #{imageUrl,jdbcType=VARCHAR},
media_id = #{mediaId,jdbcType=VARCHAR},
media_time = #{mediaTime,jdbcType=TIMESTAMP},
status_flag = #{statusFlag,jdbcType=INTEGER},
create_tme = #{createTme,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where miniprogram_setting_id = #{miniprogramSettingId,jdbcType=VARCHAR}
</update>
<select
id=
"getMiniprogramSetting"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and enterprise_id=#{enterpriseId}
and status_flag=1
</select>
<select
id=
"listMiniprogramSetting"
parameterType=
"java.lang.String"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_haoban_miniprogram_setting
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
</mapper>
\ No newline at end of file
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/LoginController.java
View file @
2e11e971
...
@@ -26,6 +26,7 @@ import com.gic.wechat.api.dto.qywx.UserDTO;
...
@@ -26,6 +26,7 @@ import com.gic.wechat.api.dto.qywx.UserDTO;
import
com.gic.wechat.api.service.qywx.QywxCorpApiService
;
import
com.gic.wechat.api.service.qywx.QywxCorpApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
com.gic.wechat.api.service.qywx.QywxSuiteApiService
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -201,13 +202,15 @@ public class LoginController extends WebBaseController{
...
@@ -201,13 +202,15 @@ public class LoginController extends WebBaseController{
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
o
);
JSONObject
jsonObject
=
JSONObject
.
parseObject
(
o
);
String
gicEnterpriseId
=
jsonObject
.
getString
(
"enterpriseId"
);
String
gicEnterpriseId
=
jsonObject
.
getString
(
"enterpriseId"
);
String
loginPhoneNumber
=
jsonObject
.
getString
(
"phoneNumber"
);
String
loginPhoneNumber
=
jsonObject
.
getString
(
"phoneNumber"
);
EnterpriseDetailDTO
detailDTO
=
wxEnterpriseRelatedApiService
.
getByEnterpriseI
d
(
gicEnterpriseId
);
List
<
WxEnterpriseDTO
>
enterpriseDTOList
=
wxEnterpriseRelatedApiService
.
listWxEnterpriseByEi
d
(
gicEnterpriseId
);
if
(
null
==
detailDTO
)
{
if
(
CollectionUtils
.
isEmpty
(
enterpriseDTOList
)
)
{
logger
.
info
(
"登录失败,不存在对应企业:{}"
,
o
);
logger
.
info
(
"登录失败,不存在对应企业:{}"
,
o
);
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
ModelAndView
model
=
new
ModelAndView
(
new
RedirectView
(
"/haoban-3/#/gic-error"
,
false
,
false
));
return
model
;
return
model
;
}
}
//TODO 获取超级管理员账号接口
//TODO 销售线索 多个选择
WxEnterpriseDTO
detailDTO
=
enterpriseDTOList
.
get
(
0
);
StaffDTO
staff
=
staffApiService
.
selectByNationcodeAndPhoneNumber
(
detailDTO
.
getWxEnterpriseId
(),
"86"
,
loginPhoneNumber
);
StaffDTO
staff
=
staffApiService
.
selectByNationcodeAndPhoneNumber
(
detailDTO
.
getWxEnterpriseId
(),
"86"
,
loginPhoneNumber
);
if
(
null
==
staff
)
{
if
(
null
==
staff
)
{
logger
.
info
(
"登录用户手机号不存在!{}"
,
o
);
logger
.
info
(
"登录用户手机号不存在!{}"
,
o
);
...
...
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/StaffController.java
View file @
2e11e971
...
@@ -83,7 +83,8 @@ public class StaffController extends WebBaseController{
...
@@ -83,7 +83,8 @@ public class StaffController extends WebBaseController{
@Autowired
@Autowired
private
EnterpriseService
enterpriseService
;
private
EnterpriseService
enterpriseService
;
@RequestMapping
(
"staff-add"
)
@RequestMapping
(
"staff-add"
)
public
HaobanResponse
staffAdd
(
StaffDTO
staffDTO
,
String
departmentIds
){
public
HaobanResponse
staffAdd
(
StaffDTO
staffDTO
,
String
departmentIds
){
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
...
@@ -563,6 +564,5 @@ public class StaffController extends WebBaseController{
...
@@ -563,6 +564,5 @@ public class StaffController extends WebBaseController{
}
}
}
}
}
}
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/WxEnterpriseController.java
View file @
2e11e971
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
package
com
.
gic
.
haoban
.
manage
.
web
.
controller
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.druid.util.StringUtils
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
...
@@ -34,8 +33,8 @@ import com.gic.wechat.api.dto.qywx.UserDTO;
...
@@ -34,8 +33,8 @@ import com.gic.wechat.api.dto.qywx.UserDTO;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.api.service.qywx.QywxUserApiService
;
import
com.gic.wechat.token.api.dto.QywxCorpInfoDTO
;
import
com.gic.wechat.token.api.dto.QywxCorpInfoDTO
;
import
com.gic.wechat.token.api.service.QywxTokenManageService
;
import
com.gic.wechat.token.api.service.QywxTokenManageService
;
import
net.sf.json.JSONArray
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
@@ -624,4 +623,69 @@ public class WxEnterpriseController extends WebBaseController{
...
@@ -624,4 +623,69 @@ public class WxEnterpriseController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
/**
* 绑定小程序配置列表
*
* @return
*/
@IgnoreLogin
@RequestMapping
(
"list-miniprogram-setting"
)
public
HaobanResponse
miniprogramList
()
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
wxEnterpriseApiService
.
listMiniprogramSetting
(
wxEnterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 绑定小程序配置列表
*
* @return
*/
@IgnoreLogin
@RequestMapping
(
"save-miniprogram-setting"
)
public
HaobanResponse
saveMiniprogram
(
MiniprogramSettingDTO
settingDTO
)
{
if
(
StringUtils
.
isAnyBlank
(
settingDTO
.
getAppId
(),
settingDTO
.
getEnterpriseId
()
,
settingDTO
.
getImageUrl
(),
settingDTO
.
getMiniprogramName
(),
settingDTO
.
getTitle
()))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
settingDTO
.
setWxEnterpriseId
(
wxEnterpriseId
);
wxEnterpriseApiService
.
saveMiniprogramSetting
(
settingDTO
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
/**
* 绑定小程序配置列表
*
* @return
*/
@IgnoreLogin
@RequestMapping
(
"get-miniprogram-setting"
)
public
HaobanResponse
getMiniprogram
(
String
enterpriseId
)
{
if
(
StringUtils
.
isEmpty
(
enterpriseId
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
String
wxEnterpriseId
=
login
.
getWxEnterpriseId
();
MiniprogramSettingDTO
settingDTO
=
wxEnterpriseApiService
.
getMiniprogramSettingByEid
(
wxEnterpriseId
,
enterpriseId
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
settingDTO
);
}
/**
* 绑定小程序配置列表
*
* @return
*/
@IgnoreLogin
@RequestMapping
(
"del-miniprogram-setting"
)
public
HaobanResponse
delMiniprogram
(
String
id
)
{
if
(
StringUtils
.
isEmpty
(
id
))
{
return
resultResponse
(
HaoBanErrCode
.
ERR_2
);
}
wxEnterpriseApiService
.
delMiniprogramSettingByEid
(
id
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/ClerkController.java
View file @
2e11e971
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.web.controller;
...
@@ -3,6 +3,7 @@ package com.gic.haoban.manage.web.controller;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkDTO
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.dto.ClerkListDTO
;
import
com.gic.clerk.api.service.ClerkNewService
;
import
com.gic.clerk.api.service.ClerkNewService
;
...
@@ -14,8 +15,11 @@ import com.gic.enterprise.api.dto.StoreDTO;
...
@@ -14,8 +15,11 @@ import com.gic.enterprise.api.dto.StoreDTO;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.EnterpriseService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.enterprise.api.service.StoreService
;
import
com.gic.haoban.app.customer.service.api.service.DistributeApiService
;
import
com.gic.haoban.app.customer.service.api.service.DistributeApiService
;
import
com.gic.haoban.base.api.common.BasePageInfo
;
import
com.gic.haoban.base.api.common.PageResult2
;
import
com.gic.haoban.common.utils.GooglePhoneNumberUtil
;
import
com.gic.haoban.common.utils.GooglePhoneNumberUtil
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.PageUtil
;
import
com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi
;
import
com.gic.haoban.communicate.api.service.SyncHaobanToGicServiceApi
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.dto.*
;
import
com.gic.haoban.manage.api.enums.*
;
import
com.gic.haoban.manage.api.enums.*
;
...
@@ -73,6 +77,9 @@ public class ClerkController extends WebBaseController{
...
@@ -73,6 +77,9 @@ public class ClerkController extends WebBaseController{
private
AuditSettingApiService
auditSettingApiService
;
private
AuditSettingApiService
auditSettingApiService
;
@Autowired
@Autowired
private
DealSyncOperationApiService
dealSyncOperationApiService
;
private
DealSyncOperationApiService
dealSyncOperationApiService
;
@Autowired
private
ExternalClerkRelatedApiService
externalClerkRelatedApiService
;
//选择成员列表
//选择成员列表
@RequestMapping
(
"/staff-list"
)
@RequestMapping
(
"/staff-list"
)
public
HaobanResponse
staffList
(
String
storeId
)
{
public
HaobanResponse
staffList
(
String
storeId
)
{
...
@@ -856,4 +863,31 @@ public class ClerkController extends WebBaseController{
...
@@ -856,4 +863,31 @@ public class ClerkController extends WebBaseController{
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
res
,
null
,
res
);
return
resultResponse
(
HaoBanErrCode
.
ERR_0
,
res
,
null
,
res
);
}
}
/**
* 外部联系人需要发送的好友
*
* @param staffId
* @param status
* @param pageInfo
* @return
*/
@RequestMapping
(
"external-friend-list"
)
public
HaobanResponse
friendList
(
String
staffId
,
Integer
status
,
BasePageInfo
pageInfo
)
{
StaffDTO
staff
=
staffApiService
.
selectById
(
staffId
);
Page
<
ExternalClerkRelatedDTO
>
page
=
externalClerkRelatedApiService
.
pageExternalClerk
(
staff
.
getWxEnterpriseId
(),
staff
.
getWxUserId
(),
status
,
pageInfo
);
PageResult2
retPage
=
PageUtil
.
getPageInfo
(
page
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
,
retPage
);
}
/**
* 外部联系人需要发送的好友
*
* @return
*/
@RequestMapping
(
"push-friend"
)
public
HaobanResponse
friendList
(
String
relationKey
)
{
externalClerkRelatedApiService
.
pushExternalByRelationKey
(
relationKey
);
return
resultResponse
(
HaoBanErrCode
.
ERR_1
);
}
}
}
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/InfoController.java
View file @
2e11e971
...
@@ -181,6 +181,7 @@ public class InfoController extends WebBaseController{
...
@@ -181,6 +181,7 @@ public class InfoController extends WebBaseController{
@RequestMapping
(
"get-user-by-member-code"
)
@RequestMapping
(
"get-user-by-member-code"
)
public
HaobanResponse
getInfoByMemberCode
(
GetUserByMemberCodeQo
qo
)
{
public
HaobanResponse
getInfoByMemberCode
(
GetUserByMemberCodeQo
qo
)
{
//todo 销售线索 获取当前wxEnterpriseId
EnterpriseDetailDTO
enterpriseDetailDTO
=
wxEnterpriseRelatedApiService
.
getByEnterpriseId
(
qo
.
getGicEnterpriseId
());
EnterpriseDetailDTO
enterpriseDetailDTO
=
wxEnterpriseRelatedApiService
.
getByEnterpriseId
(
qo
.
getGicEnterpriseId
());
if
(
enterpriseDetailDTO
==
null
)
{
if
(
enterpriseDetailDTO
==
null
)
{
logger
.
info
(
"改企业没有关系好办:{}"
,
qo
.
getGicEnterpriseId
());
logger
.
info
(
"改企业没有关系好办:{}"
,
qo
.
getGicEnterpriseId
());
...
...
haoban-manage3-wx/src/main/java/com/gic/haoban/manage/web/controller/StoreController.java
View file @
2e11e971
...
@@ -10,6 +10,7 @@ import java.util.Map;
...
@@ -10,6 +10,7 @@ import java.util.Map;
import
java.util.Set
;
import
java.util.Set
;
import
java.util.stream.Collectors
;
import
java.util.stream.Collectors
;
import
com.gic.haoban.manage.api.dto.*
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
...
@@ -36,13 +37,6 @@ import com.gic.enterprise.api.service.StoreService;
...
@@ -36,13 +37,6 @@ import com.gic.enterprise.api.service.StoreService;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.data.api.dto.HaobanDataDTO
;
import
com.gic.haoban.data.api.dto.HaobanDataDTO
;
import
com.gic.haoban.data.api.service.HaobanDataApiService
;
import
com.gic.haoban.data.api.service.HaobanDataApiService
;
import
com.gic.haoban.manage.api.dto.AuditDTO
;
import
com.gic.haoban.manage.api.dto.AuditSettingDTO
;
import
com.gic.haoban.manage.api.dto.ClerkMainStoreRelatedDTO
;
import
com.gic.haoban.manage.api.dto.DepartmentDTO
;
import
com.gic.haoban.manage.api.dto.EnterpriseDetailDTO
;
import
com.gic.haoban.manage.api.dto.StaffClerkRelationDTO
;
import
com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO
;
import
com.gic.haoban.manage.api.enums.StoreFieldEnum
;
import
com.gic.haoban.manage.api.enums.StoreFieldEnum
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.AuditApiService
;
import
com.gic.haoban.manage.api.service.AuditSettingApiService
;
import
com.gic.haoban.manage.api.service.AuditSettingApiService
;
...
@@ -192,8 +186,9 @@ public class StoreController extends WebBaseController{
...
@@ -192,8 +186,9 @@ public class StoreController extends WebBaseController{
//查gic门店
//查gic门店
StoreDTO
storeDTO
=
storeService
.
getStore
(
VO
.
getStoreId
());
StoreDTO
storeDTO
=
storeService
.
getStore
(
VO
.
getStoreId
());
List
<
StorePhotoDTO
>
imgList
=
storeService
.
getStoreImages
(
VO
.
getStoreId
());
List
<
StorePhotoDTO
>
imgList
=
storeService
.
getStoreImages
(
VO
.
getStoreId
());
EnterpriseDetailDTO
detail
=
wxEnterpriseRelatedApiService
.
getByEnterpriseId
(
storeDTO
.
getEnterpriseId
());
//TODO 销售线索 权限的门店
VO
.
setWxEnterpriseRelatedId
(
detail
.
getWxEnterpriseRelatedId
());
WxEnterpriseRelationDetailDTO
detail
=
wxEnterpriseRelatedApiService
.
getEnterpriseBindInfo
(
wxEnterpriseId
,
storeDTO
.
getEnterpriseId
());
VO
.
setWxEnterpriseRelatedId
(
detail
.
getWxEnterpriseRelatedId
());
//已经绑定的门店
//已经绑定的门店
if
(
VO
.
getBindFlag
()==
1
){
if
(
VO
.
getBindFlag
()==
1
){
String
clerkCode
=
VO
.
getClerkCode
();
String
clerkCode
=
VO
.
getClerkCode
();
...
...
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