Commit 4cbc004d by fudahua

Merge branch 'developer'

# Conflicts:
#	haoban-manage3-service/src/main/java/com/gic/haoban/manage/service/service/out/impl/MemberUnionidRelatedApiServiceImpl.java
parents 05bee5a6 33defa75
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
import java.util.Date;
/**
* Created by tgs on 2020/2/9.
*/
public class AgentEnterpriseDTO implements Serializable {
/**
*
*/
private static final long serialVersionUID = 1L;
private String wxEnterpriseRelatedId;
private String enterpriseName;
private String wxEnterpriseId;
private String enterpriseId;
private String version;
private int nodeCount;
private String enterpriseLogo;
private String staffId;
private String staffName;
private Date createTime;
private String brandName;
private Integer wxEnterpriseType;
private Integer memberOpenCardFlag;
private Integer bindFlag;
public Integer getBindFlag() {
return bindFlag;
}
public void setBindFlag(Integer bindFlag) {
this.bindFlag = bindFlag;
}
public Integer getWxEnterpriseType() {
return wxEnterpriseType;
}
public void setWxEnterpriseType(Integer wxEnterpriseType) {
this.wxEnterpriseType = wxEnterpriseType;
}
public Integer getMemberOpenCardFlag() {
return memberOpenCardFlag;
}
public void setMemberOpenCardFlag(Integer memberOpenCardFlag) {
this.memberOpenCardFlag = memberOpenCardFlag;
}
public String getWxEnterpriseRelatedId() {
return wxEnterpriseRelatedId;
}
public void setWxEnterpriseRelatedId(String wxEnterpriseRelatedId) {
this.wxEnterpriseRelatedId = wxEnterpriseRelatedId;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public int getNodeCount() {
return nodeCount;
}
public void setNodeCount(int nodeCount) {
this.nodeCount = nodeCount;
}
public String getEnterpriseLogo() {
return enterpriseLogo;
}
public void setEnterpriseLogo(String enterpriseLogo) {
this.enterpriseLogo = enterpriseLogo;
}
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getBrandName() {
return brandName;
}
public void setBrandName(String brandName) {
this.brandName = brandName;
}
}
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
import java.util.Date;
/**
* Created 2021/4/14.
*
* @author hua
*/
public class BindStoreInfoDTO implements Serializable {
private String storeId;
private String storeCode;
private String enterpriseId;
private String storeName;
private String storeGroupName;
private String storeGroupId;
private Date createTime;
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getStoreCode() {
return storeCode;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
public String getStoreGroupName() {
return storeGroupName;
}
public void setStoreGroupName(String storeGroupName) {
this.storeGroupName = storeGroupName;
}
public String getStoreGroupId() {
return storeGroupId;
}
public void setStoreGroupId(String storeGroupId) {
this.storeGroupId = storeGroupId;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
...@@ -22,6 +22,25 @@ public class EnterpriseDetailDTO implements Serializable{ ...@@ -22,6 +22,25 @@ public class EnterpriseDetailDTO implements Serializable{
private String staffName; private String staffName;
private Date createTime; private Date createTime;
private String brandName; private String brandName;
private Integer wxEnterpriseType;
private Integer memberOpenCardFlag;
public Integer getWxEnterpriseType() {
return wxEnterpriseType;
}
public void setWxEnterpriseType(Integer wxEnterpriseType) {
this.wxEnterpriseType = wxEnterpriseType;
}
public Integer getMemberOpenCardFlag() {
return memberOpenCardFlag;
}
public void setMemberOpenCardFlag(Integer memberOpenCardFlag) {
this.memberOpenCardFlag = memberOpenCardFlag;
}
public String getWxEnterpriseRelatedId() { public String getWxEnterpriseRelatedId() {
return wxEnterpriseRelatedId; return wxEnterpriseRelatedId;
} }
......
...@@ -15,6 +15,8 @@ public class ExternalClerkRelatedDTO implements Serializable { ...@@ -15,6 +15,8 @@ public class ExternalClerkRelatedDTO implements Serializable {
private String memberId; private String memberId;
private String unionid; private String unionid;
private String headUrl;
private String externalUserId; private String externalUserId;
...@@ -32,12 +34,30 @@ public class ExternalClerkRelatedDTO implements Serializable { ...@@ -32,12 +34,30 @@ 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 getHeadUrl() {
return headUrl;
}
public void setHeadUrl(String headUrl) {
this.headUrl = headUrl;
}
public String getRelationKey() {
return relationKey;
}
public void setRelationKey(String relationKey) {
this.relationKey = relationKey;
}
public String getExternalClerkRelatedId() { public String getExternalClerkRelatedId() {
return externalClerkRelatedId; return externalClerkRelatedId;
} }
......
...@@ -27,7 +27,16 @@ public class ExternalUserDTO implements Serializable{ ...@@ -27,7 +27,16 @@ public class ExternalUserDTO implements Serializable{
private String clerkId; private String clerkId;
private String staffId; private String staffId;
private String selfExternalUserId;
public String getSelfExternalUserId() {
return selfExternalUserId;
}
public void setSelfExternalUserId(String selfExternalUserId) {
this.selfExternalUserId = selfExternalUserId;
}
public String getWxEnterpriseId() { public String getWxEnterpriseId() {
return wxEnterpriseId; return wxEnterpriseId;
......
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
/**
* Created 2021/4/24.
*
* @author hua
*/
public class FlushStoreMqDTO implements Serializable {
private String enterpriseId;
private String wxEnterpriseId;
private String optStaffId;
private int channalCode;
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getOptStaffId() {
return optStaffId;
}
public void setOptStaffId(String optStaffId) {
this.optStaffId = optStaffId;
}
public int getChannalCode() {
return channalCode;
}
public void setChannalCode(int channalCode) {
this.channalCode = channalCode;
}
}
package com.gic.haoban.manage.web.vo; package com.gic.haoban.manage.api.dto;
import java.io.Serializable; import java.io.Serializable;
import com.gic.haoban.manage.api.dto.StaffDTO; public class LoginDTO implements Serializable {
public class LoginVO implements Serializable{ /**
/**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -15,6 +13,16 @@ public class LoginVO implements Serializable{ ...@@ -15,6 +13,16 @@ public class LoginVO implements Serializable{
private String wxEnterpriseId; private String wxEnterpriseId;
private Integer wxEnterpriseType;
public Integer getWxEnterpriseType() {
return wxEnterpriseType;
}
public void setWxEnterpriseType(Integer wxEnterpriseType) {
this.wxEnterpriseType = wxEnterpriseType;
}
public StaffDTO getStaffDTO() { public StaffDTO getStaffDTO() {
return staffDTO; return staffDTO;
} }
......
...@@ -41,8 +41,18 @@ public class MaterialDTO implements Serializable{ ...@@ -41,8 +41,18 @@ public class MaterialDTO implements Serializable{
private Date updateTime; private Date updateTime;
private String fromMaterialId = "-1";
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getFromMaterialId() {
return fromMaterialId;
}
public void setFromMaterialId(String fromMaterialId) {
this.fromMaterialId = fromMaterialId;
}
public String getMaterialId() { public String getMaterialId() {
return materialId; return materialId;
} }
...@@ -171,14 +181,6 @@ public class MaterialDTO implements Serializable{ ...@@ -171,14 +181,6 @@ public class MaterialDTO implements Serializable{
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public String getMediaid() {
return mediaId;
}
public void setMediaid(String mediaid) {
this.mediaid = mediaid;
}
public String getWxImgUrl() { public String getWxImgUrl() {
return wxImgUrl; return wxImgUrl;
} }
......
...@@ -37,8 +37,18 @@ public class MemberUnionidRelatedDTO implements Serializable{ ...@@ -37,8 +37,18 @@ public class MemberUnionidRelatedDTO implements Serializable{
private String avatar; private String avatar;
private String welcomeCode;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getWelcomeCode() {
return welcomeCode;
}
public void setWelcomeCode(String welcomeCode) {
this.welcomeCode = welcomeCode;
}
public String getMemberUnionidRelatedId() { public String getMemberUnionidRelatedId() {
return memberUnionidRelatedId; return memberUnionidRelatedId;
} }
......
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 createTime;
/**
*
*/
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;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 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
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
/**
* Created 2021/4/13.
*
* @author hua
*/
public class StoreOrGroupInfoDTO implements Serializable {
private String relationId;
private int relationType;
private String relationName;
public String getRelationId() {
return relationId;
}
public void setRelationId(String relationId) {
this.relationId = relationId;
}
public int getRelationType() {
return relationType;
}
public void setRelationType(int relationType) {
this.relationType = relationType;
}
public String getRelationName() {
return relationName;
}
public void setRelationName(String relationName) {
this.relationName = relationName;
}
}
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 StoreRangeInfoDTO implements Serializable {
/**
*
*/
private String wxEnterpriseId;
/**
* 企业名称
*/
private String wxEnterpriseName;
/**
* 关联id 默认0
*/
private String relationId;
/**
* 0所有门店 1分组 2门店
*/
private Integer relationType;
public String getWxEnterpriseName() {
return wxEnterpriseName;
}
public void setWxEnterpriseName(String wxEnterpriseName) {
this.wxEnterpriseName = wxEnterpriseName;
}
/**
*/
private static final long serialVersionUID = 1L;
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getRelationId() {
return relationId;
}
public void setRelationId(String relationId) {
this.relationId = relationId;
}
public Integer getRelationType() {
return relationType;
}
public void setRelationType(Integer relationType) {
this.relationType = relationType;
}
}
\ No newline at end of file
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 WelcomeDTO implements Serializable {
/**
*
*/
private String welcomeId;
/**
*
*/
private String wxEnterpriseId;
/**
*
*/
private String title;
/**
* 内容
*/
private String welcomeContent;
/**
* 0删除 1正常
*/
private Integer openFlag;
/**
* 0删除 1正常
*/
private Integer statusFlag;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*/
private static final long serialVersionUID = 1L;
public Integer getOpenFlag() {
return openFlag;
}
public void setOpenFlag(Integer openFlag) {
this.openFlag = openFlag;
}
/**
* This method returns the value of the database column tab_haoban_welcome.welcome_id
*
* @return the value of tab_haoban_welcome.welcome_id
*/
public String getWelcomeId() {
return welcomeId;
}
/**
* This method sets the value of the database column tab_haoban_welcome.welcome_id
*
* @param welcomeId the value for tab_haoban_welcome.welcome_id
*/
public void setWelcomeId(String welcomeId) {
this.welcomeId = welcomeId;
}
/**
* This method returns the value of the database column tab_haoban_welcome.wx_enterprise_id
*
* @return the value of tab_haoban_welcome.wx_enterprise_id
*/
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_welcome.wx_enterprise_id
*
* @param wxEnterpriseId the value for tab_haoban_welcome.wx_enterprise_id
*/
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_welcome.title
*
* @return the value of tab_haoban_welcome.title
*/
public String getTitle() {
return title;
}
/**
* This method sets the value of the database column tab_haoban_welcome.title
*
* @param title the value for tab_haoban_welcome.title
*/
public void setTitle(String title) {
this.title = title;
}
/**
* This method returns the value of the database column tab_haoban_welcome.welcome_content
*
* @return the value of tab_haoban_welcome.welcome_content
*/
public String getWelcomeContent() {
return welcomeContent;
}
/**
* This method sets the value of the database column tab_haoban_welcome.welcome_content
*
* @param welcomeContent the value for tab_haoban_welcome.welcome_content
*/
public void setWelcomeContent(String welcomeContent) {
this.welcomeContent = welcomeContent;
}
/**
* This method returns the value of the database column tab_haoban_welcome.status_flag
*
* @return the value of tab_haoban_welcome.status_flag
*/
public Integer getStatusFlag() {
return statusFlag;
}
/**
* This method sets the value of the database column tab_haoban_welcome.status_flag
*
* @param statusFlag the value for tab_haoban_welcome.status_flag
*/
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
/**
* This method returns the value of the database column tab_haoban_welcome.create_time
*
* @return the value of tab_haoban_welcome.create_time
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method sets the value of the database column tab_haoban_welcome.create_time
*
* @param createTime the value for tab_haoban_welcome.create_time
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method returns the value of the database column tab_haoban_welcome.update_time
*
* @return the value of tab_haoban_welcome.update_time
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method sets the value of the database column tab_haoban_welcome.update_time
*
* @param updateTime the value for tab_haoban_welcome.update_time
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
import java.util.List;
/**
* Created 2021/4/13.
*
* @author hua
*/
public class WxEnterpriseRelationDetailDTO implements Serializable {
private String wxEnterpriseRelatedId;
private String wxEnterpriseId;
private String enterpriseId;
private String enterpriseName;
private String version;
private String staffId;
private String staffName;
private int wxEnterpriseType;
private int memberOpenCardFlag;
private List<StoreOrGroupInfoDTO> relations;
public String getWxEnterpriseRelatedId() {
return wxEnterpriseRelatedId;
}
public void setWxEnterpriseRelatedId(String wxEnterpriseRelatedId) {
this.wxEnterpriseRelatedId = wxEnterpriseRelatedId;
}
public String getEnterpriseName() {
return enterpriseName;
}
public void setEnterpriseName(String enterpriseName) {
this.enterpriseName = enterpriseName;
}
public List<StoreOrGroupInfoDTO> getRelations() {
return relations;
}
public void setRelations(List<StoreOrGroupInfoDTO> relations) {
this.relations = relations;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public String getVersion() {
return version;
}
public void setVersion(String version) {
this.version = version;
}
public String getStaffId() {
return staffId;
}
public void setStaffId(String staffId) {
this.staffId = staffId;
}
public String getStaffName() {
return staffName;
}
public void setStaffName(String staffName) {
this.staffName = staffName;
}
public int getWxEnterpriseType() {
return wxEnterpriseType;
}
public void setWxEnterpriseType(int wxEnterpriseType) {
this.wxEnterpriseType = wxEnterpriseType;
}
public int getMemberOpenCardFlag() {
return memberOpenCardFlag;
}
public void setMemberOpenCardFlag(int memberOpenCardFlag) {
this.memberOpenCardFlag = memberOpenCardFlag;
}
}
...@@ -33,7 +33,9 @@ public enum AppPageType { ...@@ -33,7 +33,9 @@ public enum AppPageType {
//人脸到店 //人脸到店
FACE_ARRIVAL(14, "hbapp_customer_bind_faceId"), FACE_ARRIVAL(14, "hbapp_customer_bind_faceId"),
//完善标签 //完善标签
PERFECT_TAG(15, "hbapp_customer_edit_tag"); PERFECT_TAG(15, "hbapp_customer_edit_tag"),
//销售线索任务列表
MARKET_CLUE_TASK(16, "hbapp_sales_lead_main");
AppPageType(int type, String desc){ AppPageType(int type, String desc){
......
...@@ -13,6 +13,9 @@ public enum ChannelCodeEnum { ...@@ -13,6 +13,9 @@ public enum ChannelCodeEnum {
SYNC_UNBIND(2003,"GIC同步解绑"), SYNC_UNBIND(2003,"GIC同步解绑"),
WEIXIN_DEL(2004,"微信删除解绑"), WEIXIN_DEL(2004,"微信删除解绑"),
AUDIT_UNBIND(2005,"审核解绑"), AUDIT_UNBIND(2005,"审核解绑"),
RIGHT_CHANGE_UNBIND(2006, "权限变更解绑"),
STORE_CHANGE_UNBIND(2007, "门店变更解绑"),
// CHANGR_RIGHT_UNBIND(2005,"审核解绑"),
; ;
private int code; private int code;
private String name; private String name;
......
...@@ -5,6 +5,7 @@ import java.util.List; ...@@ -5,6 +5,7 @@ import java.util.List;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.AuditDTO; import com.gic.haoban.manage.api.dto.AuditDTO;
import com.gic.haoban.manage.api.dto.BatchAuditLogDTO; import com.gic.haoban.manage.api.dto.BatchAuditLogDTO;
import com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO; import com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO;
...@@ -24,4 +25,49 @@ public interface ExternalClerkRelatedApiService { ...@@ -24,4 +25,49 @@ 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, List<Integer> statusFlags, BasePageInfo pageInfo);
/**
* 推送外部联系人 更新次数以及状态
*
* @param relationKey
* @return
*/
boolean pushExternalByRelationKey(String relationKey);
/**
* 推送外部联系人 更新次数以及状态
*
* @param relationKey
* @return
*/
ServiceResponse<ExternalClerkRelatedDTO> bindMemberIdExternalByRelationKey(String relationKey, String enterpriseId, String memberId, String unionid);
/**
* 查询clerk与union好友关系
*
* @param enterpriseId
* @return
*/
ExternalClerkRelatedDTO getClerkFriendByUnionid(String enterpriseId, String clerkId, String unionid);
/**
* 获取企业下的关联关系列表
*
* @return
*/
List<ExternalClerkRelatedDTO> listExternalClerkByWxUserIdAncExternalUserId(String wxEnterpriseId, String wxUserId, String enterpriseId, String externalUserId);
} }
...@@ -4,6 +4,7 @@ import java.util.List; ...@@ -4,6 +4,7 @@ import java.util.List;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.MaterialCategoryDTO; import com.gic.haoban.manage.api.dto.MaterialCategoryDTO;
import com.gic.haoban.manage.api.dto.MaterialDTO; import com.gic.haoban.manage.api.dto.MaterialDTO;
...@@ -25,6 +26,8 @@ public interface MaterialApiService { ...@@ -25,6 +26,8 @@ public interface MaterialApiService {
MaterialDTO selectMaterialById(String materialId); MaterialDTO selectMaterialById(String materialId);
List<MaterialDTO> listMaterialByIds(List<String> materialIds);
void editMaterial(MaterialDTO materialDTO); void editMaterial(MaterialDTO materialDTO);
Page<MaterialDTO> listMaterial(String wxEnterpriseId, String keyword, String categoryId, Integer materialType,BasePageInfo pageInfo); Page<MaterialDTO> listMaterial(String wxEnterpriseId, String keyword, String categoryId, Integer materialType,BasePageInfo pageInfo);
...@@ -33,4 +36,27 @@ public interface MaterialApiService { ...@@ -33,4 +36,27 @@ public interface MaterialApiService {
List<MaterialCategoryDTO> listByParentCategory(String categoryId); List<MaterialCategoryDTO> listByParentCategory(String categoryId);
/**
* 分析素材
*
* @param toWxEnterpriseId
* @param wxEnterpriseId
* @param materialId
*/
ServiceResponse<Void> shareMaterial(String wxEnterpriseId, String toWxEnterpriseId, String materialId);
/**
* 素材关联的已分配企业
*
* @param materialId
*/
List<MaterialDTO> listByFromMaterialId(String materialId);
/**
* 删除
*
* @param ids
*/
void delMaterial(List<String> ids);
} }
...@@ -11,10 +11,19 @@ import com.gic.haoban.manage.api.dto.*; ...@@ -11,10 +11,19 @@ import com.gic.haoban.manage.api.dto.*;
public interface MemberUnionidRelatedApiService { public interface MemberUnionidRelatedApiService {
/**
* 根据导购导购微信id和会员id查询关联关系
*
* @param wxUserId : 导购微信id
* @param memberId : 会员id
* @return : 返回导购与会员关联关系
*/
ExternalClerkRelatedDTO getByWxUserIdMemberId(String wxUserId, String memberId);
MemberUnionidRelatedDTO getByUnionId(String staffId, String memberId); MemberUnionidRelatedDTO getByUnionId(String staffId, String memberId);
String addMemberUnionidRelated(MemberUnionidRelatedDTO dto); String addMemberUnionidRelated(MemberUnionidRelatedDTO dto);
void delMemberUnionidRelated(MemberUnionidRelatedDTO dto); void delMemberUnionidRelated(MemberUnionidRelatedDTO dto);
/** /**
...@@ -27,7 +36,7 @@ public interface MemberUnionidRelatedApiService { ...@@ -27,7 +36,7 @@ public interface MemberUnionidRelatedApiService {
ExternalClerkRelatedDTO getByMemberId(String staffId, String memberId); ExternalClerkRelatedDTO getByMemberId(String staffId, String memberId);
List<MemberUnionidRelatedDTO> getByWxUserIdAndWxEnterpriseId(String wxUserId, String wxEnterpriseId); List<MemberUnionidRelatedDTO> getByWxUserIdAndWxEnterpriseId(String wxUserId, String wxEnterpriseId);
List<MemberUnionidRelatedDTO> listByEnterpriseIdAndDate(String enterpriseId,Date date); List<MemberUnionidRelatedDTO> listByEnterpriseIdAndDate(String enterpriseId,Date date);
List<MemberStoreDTO> listByExTernalUseridAndWxUserId(String externalUserid, String wxUserId); List<MemberStoreDTO> listByExTernalUseridAndWxUserId(String externalUserid, String wxUserId);
...@@ -50,9 +59,9 @@ public interface MemberUnionidRelatedApiService { ...@@ -50,9 +59,9 @@ public interface MemberUnionidRelatedApiService {
String addMemberUnionidRelatedNew(MemberUnionidRelatedDTO dto); String addMemberUnionidRelatedNew(MemberUnionidRelatedDTO dto);
void mqFreshWxFrend(String res); void mqFreshWxFrend(String res);
void cleanNoExsitFriend(String wxEnterpriseId,String wxUserId,String resWes); void cleanNoExsitFriend(String wxEnterpriseId,String wxUserId,String resWes);
List<String> listSelfExterialList(String wxEnterpriseId,String wxUserId); List<String> listSelfExterialList(String wxEnterpriseId,String wxUserId);
List<String> listExterialList(String wxEnterpriseId, String wxUserId); List<String> listExterialList(String wxEnterpriseId, String wxUserId);
...@@ -61,6 +70,8 @@ public interface MemberUnionidRelatedApiService { ...@@ -61,6 +70,8 @@ public interface MemberUnionidRelatedApiService {
String addExternal(ExternalUserDTO dto); String addExternal(ExternalUserDTO dto);
String addFriendExternal(ExternalUserDTO dto);
ExternalUserDTO getExternalUseridInfo(String wxEnterpriseId, String wxUserId, String externalUserId); ExternalUserDTO getExternalUseridInfo(String wxEnterpriseId, String wxUserId, String externalUserId);
/** /**
...@@ -81,4 +92,14 @@ public interface MemberUnionidRelatedApiService { ...@@ -81,4 +92,14 @@ public interface MemberUnionidRelatedApiService {
*/ */
ServiceResponse<List<FriendStoreInfoDTO>> listFriendClerkByMemberUnionid(String enterpriseId, String unionId); ServiceResponse<List<FriendStoreInfoDTO>> listFriendClerkByMemberUnionid(String enterpriseId, String unionId);
/**
* 根据企业内部外部联系人id 获取关联关系
*
* @param wxEnterpriseId
* @param wxUserId
* @param selfExternalUserId
* @return
*/
MemberUnionidRelatedDTO getExternalUseridInfoBySelfExternalUserId(String wxEnterpriseId, String wxUserId, String selfExternalUserId);
} }
...@@ -36,6 +36,18 @@ public interface StaffDepartmentRelatedApiService { ...@@ -36,6 +36,18 @@ public interface StaffDepartmentRelatedApiService {
//发送消息,单人发送 //发送消息,单人发送
boolean sendSingleMessage(String clerkId,String title,String content,String pageUrl); boolean sendSingleMessage(String clerkId,String title,String content,String pageUrl);
/**
* 单人消息发送通用方法
*
* @param clerkId : 接收人id
* @param title : 通知标题
* @param contentMap : 时间集合, key 为类型, value : 内容(例如 接收事件 : 事件内容)
* @param pageUrl : 跳转地址
* @return : 返回是否发送成功
*/
Boolean sendSingleMessage(String clerkId, String title, Map<String, String> contentMap, String pageUrl);
//发送消息,带审核理由 //发送消息,带审核理由
public boolean sendAuditMessage(String clerkId, String title,String content, String pageUrl,int auditStatus, String auditReason); public boolean sendAuditMessage(String clerkId, String title,String content, String pageUrl,int auditStatus, String auditReason);
......
...@@ -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,67 @@ public interface WxEnterpriseApiService { ...@@ -70,4 +67,67 @@ 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);
/**
* @param dto
* @return
*/
public boolean saveWelcome(WelcomeDTO dto);
/**
* 获取欢迎语
*
* @param wxEnterpriseId
* @return
*/
public WelcomeDTO getWelcome(String wxEnterpriseId);
/**
* 获取欢迎语
*
* @param wxEnterpriseId
* @return
*/
public boolean setWelcome(String wxEnterpriseId, Integer openFlag);
/**
* 获取欢迎语
*
* @param wxEnterpriseId
* @return
*/
public boolean delWelcome(String wxEnterpriseId);
} }
...@@ -3,18 +3,28 @@ package com.gic.haoban.manage.api.service; ...@@ -3,18 +3,28 @@ package com.gic.haoban.manage.api.service;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO; import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.manage.api.dto.*;
public interface WxEnterpriseRelatedApiService { public interface WxEnterpriseRelatedApiService {
/**
* 查询好办所有的企业id
* @return : 返回好办关联的所有企业id
*/
List<String> findAllEnterpriseId();
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();
...@@ -26,6 +36,102 @@ public interface WxEnterpriseRelatedApiService { ...@@ -26,6 +36,102 @@ public interface WxEnterpriseRelatedApiService {
*/ */
List<EnterpriseDetailDTO> queryBindGicEnterpriseByTime(String seqTime); List<EnterpriseDetailDTO> queryBindGicEnterpriseByTime(String seqTime);
int wxEnterpriseBind(String enterpriseId, String wxEnterpriseId, String version, String staffId, String staffName);
/**
* 企业绑定
*
* @param detailDTO
* @return
*/
ServiceResponse wxEnterpriseBind(WxEnterpriseRelationDetailDTO detailDTO);
/**
* 异步刷新门店
*
* @param message
*/
public void flushBindStoreByDelayMq(String message);
/**
* 刷新门店绑定到延迟队列
*
* @param enterpriseId
*/
public void flushBindStoreToDelayMq(String enterpriseId, FlushStoreMqDTO mqDTO);
/**
* 刷新企业门店
*
* @param enterpriseId
* @param wxEnterpriseId
* @param optStaffId
* @param channalCode
* @return
*/
public ServiceResponse flushBindStoreByEnterpriseId(String enterpriseId, String wxEnterpriseId, String optStaffId, int channalCode);
/**
* 获取企业绑定详情
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
public WxEnterpriseRelationDetailDTO getEnterpriseBindInfo(String wxEnterpriseId, String enterpriseId);
/**
* 根据商户id 获取关联的微信企业列表
*
* @param enterpriseId
* @return
*/
public List<WxEnterpriseDTO> listWxEnterpriseByEid(String enterpriseId);
/**
* 根据商户id 获取所有被绑定分组
*
* @param enterpriseId
* @return
*/
public List<StoreRangeInfoDTO> listAllBindStoreOrGroup(String enterpriseId);
/**
* @param enterpriseId
* @param search
* @param pageInfo
* @return
*/
public Page<BindStoreInfoDTO> pageBindStoreByEnterpriseId(String wxEnterpriseId, String enterpriseId, String search, BasePageInfo pageInfo);
/**
* 查询绑定得门店id
*
* @param wxEnterpriseId
* @return
*/
public List<String> listStoreIdByWxEnterpriseId(String wxEnterpriseId);
/**
* 查询绑定得门店id
*
* @param wxEnterpriseId
* @return
*/
public List<String> listStoreIdByEnterpriseId(String wxEnterpriseId, String enterpriseId);
/**
* 查询绑定得门店id
*
* @param wxEnterpriseId
* @return
*/
public List<StoreOrGroupInfoDTO> listStoreRelationByEnterpriseId(String wxEnterpriseId, String enterpriseId, String search);
/**
* 初始化历史门店数据
*
* @return
*/
public boolean initHistoryEnterprise(String wxEnterpriseId);
} }
...@@ -4,9 +4,9 @@ import java.io.Serializable; ...@@ -4,9 +4,9 @@ import java.io.Serializable;
import com.gic.haoban.manage.api.dto.StaffDTO; import com.gic.haoban.manage.api.dto.StaffDTO;
public class LoginVO implements Serializable{ public class LoginDTO implements Serializable {
/** /**
* *
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
......
...@@ -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;
} }
......
...@@ -47,4 +47,14 @@ public interface MemberUnionidRelatedMapper { ...@@ -47,4 +47,14 @@ public interface MemberUnionidRelatedMapper {
List<MemberUnionidRelated> getByWxUserIdListAndWxEnterpriseId(@Param("userIdList")List<String> userIdList, @Param("wxEnterpriseId")String wxEnterpriseId); List<MemberUnionidRelated> getByWxUserIdListAndWxEnterpriseId(@Param("userIdList")List<String> userIdList, @Param("wxEnterpriseId")String wxEnterpriseId);
void cleanStaffRelated(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("staffIds")List<String> staffIds); void cleanStaffRelated(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("staffIds")List<String> staffIds);
/**
* 根据应用内的外部联系人获取信息
*
* @param wxUserId
* @param wxEnterpriseId
* @param selfExternalUserId
* @return
*/
MemberUnionidRelated getBySelfExternalUserId(@Param("wxUserId") String wxUserId, @Param("wxEnterpriseId") String wxEnterpriseId, @Param("selfExternalUserId") String selfExternalUserId);
} }
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper; package com.gic.haoban.manage.service.dao.mapper;
import java.util.List; import java.util.List;
import java.util.Set;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -22,4 +23,21 @@ public interface TabHaobanClerkMainStoreRelatedMapper { ...@@ -22,4 +23,21 @@ public interface TabHaobanClerkMainStoreRelatedMapper {
TabHaobanClerkMainStoreRelated selectByWxEnterpriseIdAndStoreId(@Param("staffId")String staffId, @Param("wxEnterpriseId")String wxEnterpriseId); TabHaobanClerkMainStoreRelated selectByWxEnterpriseIdAndStoreId(@Param("staffId")String staffId, @Param("wxEnterpriseId")String wxEnterpriseId);
List<TabHaobanClerkMainStoreRelated> listByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId); List<TabHaobanClerkMainStoreRelated> listByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId);
/**
* 删除主门店
*
* @param staffId
* @param storeId
* @param wxEnterpriseId
*/
void delMainStore(@Param("staffId") String staffId, @Param("storeId") String storeId, @Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 删除门店
*
* @param storeIds
* @return
*/
int delByStoreIds(@Param("storeIds") Set<String> storeIds);
} }
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper; package com.gic.haoban.manage.service.dao.mapper;
import java.util.Collection;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -29,13 +30,19 @@ public interface TabHaobanExternalClerkRelatedMapper { ...@@ -29,13 +30,19 @@ public interface TabHaobanExternalClerkRelatedMapper {
void delByClerkIdAndStaffId(@Param("clerkId")String clerkId, @Param("staffId")String staffId); void delByClerkIdAndStaffId(@Param("clerkId")String clerkId, @Param("staffId")String staffId);
void delByStoreIdAndStaffId(@Param("storeId") String storeId, @Param("staffId") String staffId);
int delByStoreIds(@Param("storeIds") Collection<String> storeIds);
void cleanStaffRelated(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("staffIds")List<String> staffIds); void cleanStaffRelated(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("staffIds")List<String> staffIds);
TabHaobanExternalClerkRelated getByParams(@Param("userId")String userId, @Param("wxEnterpriseId")String wxEnterpriseId, @Param("name")String name, @Param("createTime")String createTime); TabHaobanExternalClerkRelated getByParams(@Param("userId")String userId, @Param("wxEnterpriseId")String wxEnterpriseId, @Param("name")String name, @Param("createTime")String createTime);
List<TabHaobanExternalClerkRelated> listByExTernalUseridAndWxUserId(@Param("externalUserid")String externalUserid, @Param("userId")String wxUserId); List<TabHaobanExternalClerkRelated> listByExTernalUseridAndWxUserId(@Param("externalUserid")String externalUserid, @Param("userId")String wxUserId);
List<TabHaobanExternalClerkRelated> listByEnterpriseIdAndDate(@Param("enterpriseId")String enterpriseId,@Param("date")Date date); List<TabHaobanExternalClerkRelated> listByExTernalUseridAndWxUserIdAllStatus(@Param("externalUserid") String externalUserid, @Param("userId") String wxUserId);
List<TabHaobanExternalClerkRelated> listByEnterpriseIdAndDate(@Param("enterpriseId")String enterpriseId,@Param("date")Date date);
Page<TabHaobanExternalClerkRelated> pageMemberUnionByParams(@Param("userIdList")List<String> userIdList, @Param("sendMemberIds")List<String> sendMemberIds, Page<TabHaobanExternalClerkRelated> pageMemberUnionByParams(@Param("userIdList")List<String> userIdList, @Param("sendMemberIds")List<String> sendMemberIds,
@Param("enterpriseId")String enterpriseId); @Param("enterpriseId")String enterpriseId);
...@@ -54,4 +61,53 @@ public interface TabHaobanExternalClerkRelatedMapper { ...@@ -54,4 +61,53 @@ public interface TabHaobanExternalClerkRelatedMapper {
* @return * @return
*/ */
List<TabHaobanExternalClerkRelated> listExternalByUnionId(@Param("enterpriseId") String enterpriseId, @Param("unionId") String unionId); List<TabHaobanExternalClerkRelated> listExternalByUnionId(@Param("enterpriseId") String enterpriseId, @Param("unionId") String unionId);
/**
* 外部联系人的unionid
*
* @param enterpriseId
* @param unionId
* @return
*/
TabHaobanExternalClerkRelated getClerkExternalByUnionId(@Param("enterpriseId") String enterpriseId, @Param("clerkId") String clerkId, @Param("unionId") String unionId);
/**
* @param relationKey
* @return
*/
TabHaobanExternalClerkRelated getByRelationKey(@Param("relationKey") String relationKey);
/**
* 列表数据 根据状态 时间倒序
*
* @param wxEnterpriseId
* @param wxUserId
* @param statusFlags
* @return
*/
List<TabHaobanExternalClerkRelated> listByWxEnterpriseIdAndWxUserIdAndStatus(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("wxUserId") String wxUserId, @Param("statusFlags") List<Integer> statusFlags);
/**
* 触达会员 给会员发送
*
* @param relationKey
* @return
*/
int pushExternalByRelationKey(@Param("relationKey") String relationKey);
/**
* 获取企业下的关联关系列表
*
* @param wxEnterpriseId
* @param wxUserId
* @param enterpriseId
* @param externalUserId
* @return
*/
List<TabHaobanExternalClerkRelated> listExternalClerkByWxUserIdAncExternalUserId(
@Param("wxEnterpriseId") String wxEnterpriseId, @Param("wxUserId") String wxUserId,
@Param("enterpriseId") String enterpriseId, @Param("externalUserId") String externalUserId);
} }
\ No newline at end of file
...@@ -16,6 +16,8 @@ public interface TabHaobanMaterialMapper { ...@@ -16,6 +16,8 @@ public interface TabHaobanMaterialMapper {
TabHaobanMaterial selectByPrimaryKey(String materialId); TabHaobanMaterial selectByPrimaryKey(String materialId);
List<TabHaobanMaterial> listByids(@Param("materialIds") List<String> materialIds);
int updateByPrimaryKeySelective(TabHaobanMaterial record); int updateByPrimaryKeySelective(TabHaobanMaterial record);
int updateByPrimaryKey(TabHaobanMaterial record); int updateByPrimaryKey(TabHaobanMaterial record);
...@@ -23,4 +25,16 @@ public interface TabHaobanMaterialMapper { ...@@ -23,4 +25,16 @@ public interface TabHaobanMaterialMapper {
List<TabHaobanMaterial> listMaterialByCategoryId(String categoryId); List<TabHaobanMaterial> listMaterialByCategoryId(String categoryId);
Page<TabHaobanMaterial> listMaterial(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("keyword")String keyword, @Param("categoryId")String categoryId, @Param("materialType")Integer materialType); Page<TabHaobanMaterial> listMaterial(@Param("wxEnterpriseId")String wxEnterpriseId, @Param("keyword")String keyword, @Param("categoryId")String categoryId, @Param("materialType")Integer materialType);
TabHaobanMaterial selectByfromMaterialId(@Param("fromMaterialId") String fromMaterialId, @Param("wxEnterpriseId") String wxEnterpriseId);
List<TabHaobanMaterial> listByfromMaterialId(@Param("fromMaterialId") String fromMaterialId);
/**
* 删除
*
* @param ids
* @return
*/
int delMaterialByIds(@Param("ids") List<String> ids);
} }
\ No newline at end of file
...@@ -89,4 +89,35 @@ public interface TabHaobanStaffClerkRelationMapper { ...@@ -89,4 +89,35 @@ public interface TabHaobanStaffClerkRelationMapper {
List<TabHaobanStaffClerkRelation> pageByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId); List<TabHaobanStaffClerkRelation> pageByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId);
List<TabHaobanStaffClerkRelation> listBindByStoreId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("storeId") String storeId); List<TabHaobanStaffClerkRelation> listBindByStoreId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("storeId") String storeId);
/**
* 授权绑定的列表
*
* @param wxEnterpriseId
* @param storeIds
* @return
*/
List<TabHaobanStaffClerkRelation> listBindByStoreIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("storeIds") Set<String> storeIds);
/**
* 授权绑定的列表
*
* @param wxEnterpriseId
* @param storeIds
* @return
*/
List<TabHaobanStaffClerkRelation> listBindNotInStoreIds(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId, @Param("storeIds") Set<String> storeIds);
/**
* 删除绑定根据门店
*
* @param storeIds
*/
void delByStoreIds(@Param("storeIds") Set<String> storeIds);
/**
* 已使用的门店id列表
* @param enterpriseId
*/
List<TabHaobanStaffClerkRelation> listBindStoreIdByEnterpriseId(String enterpriseId);
} }
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabStoreRange;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface TabHaobanStoreRangeMapper {
/**
*/
int deleteByPrimaryKey(String storeRangeId);
/**
*/
int insert(TabStoreRange record);
/**
*/
int insertSelective(TabStoreRange record);
/**
*/
TabStoreRange selectByPrimaryKey(String storeRangeId);
/**
*/
int updateByPrimaryKeySelective(TabStoreRange record);
/**
*/
int updateByPrimaryKey(TabStoreRange record);
/**
* 查询关联的所有分组信息
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
List<TabStoreRange> queryByEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId);
/**
* 删除关联关系
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
int deleteByEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId);
/**
* 删除关联关系
*
* @param relationId
* @param enterpriseId
* @return
*/
int delStoreRangeByRelationId(@Param("relationId") String relationId, @Param("enterpriseId") String enterpriseId);
/**
* 批量插入
*/
int insertBatch(@Param("list") List<TabStoreRange> list);
/**
* 查询关联关系
*
* @param relationIds
* @param enterpriseId
* @return
*/
List<TabStoreRange> listStoreRangeByRelationId(@Param("relationIds") List<String> relationIds, @Param("enterpriseId") String enterpriseId);
}
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabStoreRelation;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface TabHaobanStoreRelationMapper {
/**
*/
int deleteByPrimaryKey(String storeRelationId);
/**
*/
int insert(TabStoreRelation record);
/**
*/
int insertSelective(TabStoreRelation record);
/**
*/
int insertBatch(@Param("list") List<TabStoreRelation> list);
/**
*/
TabStoreRelation selectByPrimaryKey(String storeRelationId);
/**
*/
int updateByPrimaryKeySelective(TabStoreRelation record);
/**
*/
int updateByPrimaryKey(TabStoreRelation record);
/**
* 删除门店
*
* @param enterpriseId
* @param storeId
* @return
*/
public int deleteStoreRalation(@Param("enterpriseId") String enterpriseId, @Param("storeId") String storeId);
/**
* 门店搜索
*/
List<TabStoreRelation> searchStoreRange(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId, @Param("search") String search);
/**
* 门店搜索
*/
List<TabStoreRelation> listStoreRange(@Param("enterpriseId") String enterpriseId);
/**
* 删除门店
*
* @param enterpriseId
* @return
*/
public int deleteAllStoreRalation(@Param("enterpriseId") String enterpriseId);
/**
* 所有门店id
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
List<String> listStoreIdByWxEnterpriseId(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("enterpriseId") String enterpriseId);
}
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabWelcome;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface TabHaobanWelcomeMapper {
/**
*/
int deleteByPrimaryKey(String welcomeId);
/**
*/
int insert(TabWelcome record);
/**
*/
int insertSelective(TabWelcome record);
/**
*/
TabWelcome selectByPrimaryKey(String welcomeId);
/**
*/
int updateByPrimaryKeySelective(TabWelcome record);
/**
*/
int updateByPrimaryKey(TabWelcome record);
/**
*/
TabWelcome selectByWxEnterpriseId(String wxEnterpriseId);
}
\ No newline at end of file
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
...@@ -30,7 +30,7 @@ public interface WxEnterpriseMapper { ...@@ -30,7 +30,7 @@ public interface WxEnterpriseMapper {
List<TabHaobanWxEnterprise> listAll(); List<TabHaobanWxEnterprise> listAll();
List<TabHaobanWxEnterprise> listByIds(@Param("enterpriseIds")Set<String> enterpriseIds); List<TabHaobanWxEnterprise> listByIds(@Param("enterpriseIds") Set<String> wxEnterpriseIds);
List<TabHaobanWxEnterprise> getEnterpriseBycorpIdNoStatus(@Param("corpId")String corpId); List<TabHaobanWxEnterprise> getEnterpriseBycorpIdNoStatus(@Param("corpId")String corpId);
} }
\ No newline at end of file
...@@ -21,7 +21,8 @@ public interface WxEnterpriseRelatedMapper { ...@@ -21,7 +21,8 @@ public interface WxEnterpriseRelatedMapper {
int updateByPrimaryKey(TabHaobanWxEnterpriseRelated record); int updateByPrimaryKey(TabHaobanWxEnterpriseRelated record);
List<TabHaobanWxEnterpriseRelated> listByWxenterpriseId(String wxEnterpriseId); List<TabHaobanWxEnterpriseRelated> listByWxenterpriseId(String wxEnterpriseId);
@Deprecated
TabHaobanWxEnterpriseRelated findOneByEnterpriseId(String enterpriseId); TabHaobanWxEnterpriseRelated findOneByEnterpriseId(String enterpriseId);
List<TabHaobanWxEnterpriseRelated> queryAllHasGicEnterpriseId(); List<TabHaobanWxEnterpriseRelated> queryAllHasGicEnterpriseId();
...@@ -29,4 +30,27 @@ public interface WxEnterpriseRelatedMapper { ...@@ -29,4 +30,27 @@ public interface WxEnterpriseRelatedMapper {
List<TabHaobanWxEnterpriseRelated> listEnterpriseByEnterpriseIds(@Param("enterpriseIds")List<String> enterpriseIds); List<TabHaobanWxEnterpriseRelated> listEnterpriseByEnterpriseIds(@Param("enterpriseIds")List<String> enterpriseIds);
List<TabHaobanWxEnterpriseRelated> listEnterpriseByTime(@Param("time")String time); List<TabHaobanWxEnterpriseRelated> listEnterpriseByTime(@Param("time")String time);
/**
* 查询企业下唯一商户
*
* @param enterpriseId
* @param wxEnterpriseId
* @return
*/
TabHaobanWxEnterpriseRelated findOneByEIdAndWxEid(@Param("enterpriseId") String enterpriseId, @Param("wxEnterpriseId") String wxEnterpriseId);
/**
* 查询企业下唯一商户 总部企业
*
* @param enterpriseId
* @return
*/
TabHaobanWxEnterpriseRelated findRootWxEnterpriseByEnterpriseId(@Param("enterpriseId") String enterpriseId);
/**
* 查询好办所有的企业id
* @return : 返回好办关联的所有企业id
*/
List<String> findAllEnterpriseId();
} }
\ No newline at end of file
...@@ -15,6 +15,8 @@ public class TabHaobanExternalClerkRelated implements Serializable { ...@@ -15,6 +15,8 @@ public class TabHaobanExternalClerkRelated implements Serializable {
private String memberId; private String memberId;
private String unionid; private String unionid;
private String headUrl;
private String externalUserId; private String externalUserId;
...@@ -29,6 +31,14 @@ public class TabHaobanExternalClerkRelated implements Serializable { ...@@ -29,6 +31,14 @@ public class TabHaobanExternalClerkRelated implements Serializable {
private String staffId; private String staffId;
private String wxUserId; private String wxUserId;
/**
* 触达次数
*/
private Integer pushTimes;
/**
* 校验的key,clerkid+externalUserId的md5
*/
private String relationKey;
private Integer statusFlag; private Integer statusFlag;
...@@ -36,8 +46,32 @@ public class TabHaobanExternalClerkRelated implements Serializable { ...@@ -36,8 +46,32 @@ public class TabHaobanExternalClerkRelated implements Serializable {
private Date updateTime; private Date updateTime;
public String getHeadUrl() {
return headUrl;
}
public void setHeadUrl(String headUrl) {
this.headUrl = headUrl;
}
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() {
return relationKey;
}
public void setRelationKey(String relationKey) {
this.relationKey = relationKey;
}
public String getExternalClerkRelatedId() { public String getExternalClerkRelatedId() {
return externalClerkRelatedId; return externalClerkRelatedId;
} }
......
...@@ -38,6 +38,16 @@ public class TabHaobanMaterial implements Serializable { ...@@ -38,6 +38,16 @@ public class TabHaobanMaterial implements Serializable {
private Date updateTime; private Date updateTime;
private String fromMaterialId;
public String getFromMaterialId() {
return fromMaterialId;
}
public void setFromMaterialId(String fromMaterialId) {
this.fromMaterialId = fromMaterialId;
}
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public String getMaterialId() { public String getMaterialId() {
......
...@@ -22,8 +22,40 @@ public class TabHaobanWxEnterpriseRelated implements Serializable { ...@@ -22,8 +22,40 @@ public class TabHaobanWxEnterpriseRelated implements Serializable {
private String staffName; private String staffName;
private Integer wxEnterpriseType;
private Integer memberOpenCardFlag;
private Integer rangeType;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public Integer getRangeType() {
return rangeType;
}
public void setRangeType(Integer rangeType) {
this.rangeType = rangeType;
}
public Integer getWxEnterpriseType() {
return wxEnterpriseType;
}
public void setWxEnterpriseType(Integer wxEnterpriseType) {
this.wxEnterpriseType = wxEnterpriseType;
}
public Integer getMemberOpenCardFlag() {
return memberOpenCardFlag;
}
public void setMemberOpenCardFlag(Integer memberOpenCardFlag) {
this.memberOpenCardFlag = memberOpenCardFlag;
}
public String getWxEnterpriseRelatedId() { public String getWxEnterpriseRelatedId() {
return wxEnterpriseRelatedId; return wxEnterpriseRelatedId;
} }
......
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 createTime;
/**
*
*/
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;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* 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
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 TabStoreRange implements Serializable {
/**
*
*/
private String storeRangeId;
/**
*
*/
private String wxEnterpriseId;
/**
* 商户id
*/
private String enterpriseId;
/**
* 关联id 默认0
*/
private String relationId;
/**
* 0所有门店 1分组 2门店
*/
private Integer relationType;
/**
* 0删除 1正常
*/
private Integer statusFlag;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
*/
private static final long serialVersionUID = 1L;
/**
* This method returns the value of the database column tab_haoban_store_range.store_range_id
*
* @return the value of tab_haoban_store_range.store_range_id
*/
public String getStoreRangeId() {
return storeRangeId;
}
/**
* This method sets the value of the database column tab_haoban_store_range.store_range_id
*
* @param storeRangeId the value for tab_haoban_store_range.store_range_id
*/
public void setStoreRangeId(String storeRangeId) {
this.storeRangeId = storeRangeId;
}
/**
* This method returns the value of the database column tab_haoban_store_range.wx_enterprise_id
*
* @return the value of tab_haoban_store_range.wx_enterprise_id
*/
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_store_range.wx_enterprise_id
*
* @param wxEnterpriseId the value for tab_haoban_store_range.wx_enterprise_id
*/
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_store_range.enterprise_id
*
* @return the value of tab_haoban_store_range.enterprise_id
*/
public String getEnterpriseId() {
return enterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_store_range.enterprise_id
*
* @param enterpriseId the value for tab_haoban_store_range.enterprise_id
*/
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_store_range.relation_id
*
* @return the value of tab_haoban_store_range.relation_id
*/
public String getRelationId() {
return relationId;
}
/**
* This method sets the value of the database column tab_haoban_store_range.relation_id
*
* @param relationId the value for tab_haoban_store_range.relation_id
*/
public void setRelationId(String relationId) {
this.relationId = relationId;
}
/**
* This method returns the value of the database column tab_haoban_store_range.relation_type
*
* @return the value of tab_haoban_store_range.relation_type
*/
public Integer getRelationType() {
return relationType;
}
/**
* This method sets the value of the database column tab_haoban_store_range.relation_type
*
* @param relationType the value for tab_haoban_store_range.relation_type
*/
public void setRelationType(Integer relationType) {
this.relationType = relationType;
}
/**
* This method returns the value of the database column tab_haoban_store_range.status_flag
*
* @return the value of tab_haoban_store_range.status_flag
*/
public Integer getStatusFlag() {
return statusFlag;
}
/**
* This method sets the value of the database column tab_haoban_store_range.status_flag
*
* @param statusFlag the value for tab_haoban_store_range.status_flag
*/
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
/**
* This method returns the value of the database column tab_haoban_store_range.create_time
*
* @return the value of tab_haoban_store_range.create_time
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method sets the value of the database column tab_haoban_store_range.create_time
*
* @param createTime the value for tab_haoban_store_range.create_time
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method returns the value of the database column tab_haoban_store_range.update_time
*
* @return the value of tab_haoban_store_range.update_time
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method sets the value of the database column tab_haoban_store_range.update_time
*
* @param updateTime the value for tab_haoban_store_range.update_time
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
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 TabStoreRelation implements Serializable {
/**
* 关联id
*/
private String storeRelationId;
/**
* 企业id
*/
private String wxEnterpriseId;
/**
* 门店id
*/
private String storeId;
/**
* 门店名称
*/
private String storeName;
/**
* 分组id
*/
private String storeGroupId;
/**
* 企业id
*/
private String enterpriseId;
/**
* 0删除 1正常
*/
private Integer statusFlag;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
*/
private static final long serialVersionUID = 1L;
public String getStoreName() {
return storeName;
}
public void setStoreName(String storeName) {
this.storeName = storeName;
}
/**
* This method returns the value of the database column tab_haoban_store_relation.store_relation_id
*
* @return the value of tab_haoban_store_relation.store_relation_id
*/
public String getStoreRelationId() {
return storeRelationId;
}
/**
* This method sets the value of the database column tab_haoban_store_relation.store_relation_id
*
* @param storeRelationId the value for tab_haoban_store_relation.store_relation_id
*/
public void setStoreRelationId(String storeRelationId) {
this.storeRelationId = storeRelationId;
}
/**
* This method returns the value of the database column tab_haoban_store_relation.wx_enterprise_id
*
* @return the value of tab_haoban_store_relation.wx_enterprise_id
*/
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_store_relation.wx_enterprise_id
*
* @param wxEnterpriseId the value for tab_haoban_store_relation.wx_enterprise_id
*/
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_store_relation.store_id
*
* @return the value of tab_haoban_store_relation.store_id
*/
public String getStoreId() {
return storeId;
}
/**
* This method sets the value of the database column tab_haoban_store_relation.store_id
*
* @param storeId the value for tab_haoban_store_relation.store_id
*/
public void setStoreId(String storeId) {
this.storeId = storeId;
}
/**
* This method returns the value of the database column tab_haoban_store_relation.store_group_id
*
* @return the value of tab_haoban_store_relation.store_group_id
*/
public String getStoreGroupId() {
return storeGroupId;
}
/**
* This method sets the value of the database column tab_haoban_store_relation.store_group_id
*
* @param storeGroupId the value for tab_haoban_store_relation.store_group_id
*/
public void setStoreGroupId(String storeGroupId) {
this.storeGroupId = storeGroupId;
}
/**
* This method returns the value of the database column tab_haoban_store_relation.enterprise_id
*
* @return the value of tab_haoban_store_relation.enterprise_id
*/
public String getEnterpriseId() {
return enterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_store_relation.enterprise_id
*
* @param enterpriseId the value for tab_haoban_store_relation.enterprise_id
*/
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_store_relation.status_flag
*
* @return the value of tab_haoban_store_relation.status_flag
*/
public Integer getStatusFlag() {
return statusFlag;
}
/**
* This method sets the value of the database column tab_haoban_store_relation.status_flag
*
* @param statusFlag the value for tab_haoban_store_relation.status_flag
*/
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
/**
* This method returns the value of the database column tab_haoban_store_relation.create_time
*
* @return the value of tab_haoban_store_relation.create_time
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method sets the value of the database column tab_haoban_store_relation.create_time
*
* @param createTime the value for tab_haoban_store_relation.create_time
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method returns the value of the database column tab_haoban_store_relation.update_time
*
* @return the value of tab_haoban_store_relation.update_time
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method sets the value of the database column tab_haoban_store_relation.update_time
*
* @param updateTime the value for tab_haoban_store_relation.update_time
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
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 TabWelcome implements Serializable {
/**
*
*/
private String welcomeId;
/**
*
*/
private String wxEnterpriseId;
/**
*
*/
private String title;
/**
* 内容
*/
private String welcomeContent;
/**
* 0删除 1正常
*/
private Integer openFlag;
/**
* 0删除 1正常
*/
private Integer statusFlag;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
/**
*/
private static final long serialVersionUID = 1L;
public Integer getOpenFlag() {
return openFlag;
}
public void setOpenFlag(Integer openFlag) {
this.openFlag = openFlag;
}
/**
* This method returns the value of the database column tab_haoban_welcome.welcome_id
*
* @return the value of tab_haoban_welcome.welcome_id
*/
public String getWelcomeId() {
return welcomeId;
}
/**
* This method sets the value of the database column tab_haoban_welcome.welcome_id
*
* @param welcomeId the value for tab_haoban_welcome.welcome_id
*/
public void setWelcomeId(String welcomeId) {
this.welcomeId = welcomeId;
}
/**
* This method returns the value of the database column tab_haoban_welcome.wx_enterprise_id
*
* @return the value of tab_haoban_welcome.wx_enterprise_id
*/
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
/**
* This method sets the value of the database column tab_haoban_welcome.wx_enterprise_id
*
* @param wxEnterpriseId the value for tab_haoban_welcome.wx_enterprise_id
*/
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
/**
* This method returns the value of the database column tab_haoban_welcome.title
*
* @return the value of tab_haoban_welcome.title
*/
public String getTitle() {
return title;
}
/**
* This method sets the value of the database column tab_haoban_welcome.title
*
* @param title the value for tab_haoban_welcome.title
*/
public void setTitle(String title) {
this.title = title;
}
/**
* This method returns the value of the database column tab_haoban_welcome.welcome_content
*
* @return the value of tab_haoban_welcome.welcome_content
*/
public String getWelcomeContent() {
return welcomeContent;
}
/**
* This method sets the value of the database column tab_haoban_welcome.welcome_content
*
* @param welcomeContent the value for tab_haoban_welcome.welcome_content
*/
public void setWelcomeContent(String welcomeContent) {
this.welcomeContent = welcomeContent;
}
/**
* This method returns the value of the database column tab_haoban_welcome.status_flag
*
* @return the value of tab_haoban_welcome.status_flag
*/
public Integer getStatusFlag() {
return statusFlag;
}
/**
* This method sets the value of the database column tab_haoban_welcome.status_flag
*
* @param statusFlag the value for tab_haoban_welcome.status_flag
*/
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
/**
* This method returns the value of the database column tab_haoban_welcome.create_time
*
* @return the value of tab_haoban_welcome.create_time
*/
public Date getCreateTime() {
return createTime;
}
/**
* This method sets the value of the database column tab_haoban_welcome.create_time
*
* @param createTime the value for tab_haoban_welcome.create_time
*/
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
/**
* This method returns the value of the database column tab_haoban_welcome.update_time
*
* @return the value of tab_haoban_welcome.update_time
*/
public Date getUpdateTime() {
return updateTime;
}
/**
* This method sets the value of the database column tab_haoban_welcome.update_time
*
* @param updateTime the value for tab_haoban_welcome.update_time
*/
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.haoban.manage.service.pojo;
import com.alibaba.fastjson.annotation.JSONField;
/**
* Created 2020/5/27.
*
* @author hua
*/
public class GroupSyncPojo extends BinlogBasePojo {
@JSONField(name = "store_group_chain")
private String storeGroupChain;
@JSONField(name = "store_group_id")
private String storeGroupId;
@JSONField(name = "enterprise_id")
private String enterpriseId;
private Integer status;
private Integer oldStatus;
public String getStoreGroupChain() {
return storeGroupChain;
}
public void setStoreGroupChain(String storeGroupChain) {
this.storeGroupChain = storeGroupChain;
}
public String getStoreGroupId() {
return storeGroupId;
}
public void setStoreGroupId(String storeGroupId) {
this.storeGroupId = storeGroupId;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getOldStatus() {
return oldStatus;
}
public void setOldStatus(Integer oldStatus) {
this.oldStatus = oldStatus;
}
}
package com.gic.haoban.manage.service.pojo;
import com.alibaba.fastjson.annotation.JSONField;
/**
* Created 2020/5/27.
*
* @author hua
*/
public class StoreSyncPojo extends BinlogBasePojo {
@JSONField(name = "store_group_id")
private String storeGroupId;
@JSONField(name = "old_store_group_id")
private String oldStoreGroupId;
@JSONField(name = "storeId")
private String storeId;
@JSONField(name = "store_code")
private String storeCode;
@JSONField(name = "enterprise_id")
private String enterpriseId;
private Integer status;
private Integer oldStatus;
public String getOldStoreGroupId() {
return oldStoreGroupId;
}
public void setOldStoreGroupId(String oldStoreGroupId) {
this.oldStoreGroupId = oldStoreGroupId;
}
public String getStoreGroupId() {
return storeGroupId;
}
public void setStoreGroupId(String storeGroupId) {
this.storeGroupId = storeGroupId;
}
public String getStoreId() {
return storeId;
}
public void setStoreId(String storeId) {
this.storeId = storeId;
}
public String getStoreCode() {
return storeCode;
}
public void setStoreCode(String storeCode) {
this.storeCode = storeCode;
}
public String getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(String enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Integer getOldStatus() {
return oldStatus;
}
public void setOldStatus(Integer oldStatus) {
this.oldStatus = oldStatus;
}
}
package com.gic.haoban.manage.service.service; package com.gic.haoban.manage.service.service;
import java.util.List; import java.util.List;
import java.util.Set;
import com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated; import com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated;
...@@ -10,6 +11,31 @@ public interface ClerkMainStoreRelatedService { ...@@ -10,6 +11,31 @@ public interface ClerkMainStoreRelatedService {
TabHaobanClerkMainStoreRelated selectByWxEnterpriseIdAndStoreId(String staffId, String wxEnterpriseId); TabHaobanClerkMainStoreRelated selectByWxEnterpriseIdAndStoreId(String staffId, String wxEnterpriseId);
/**
* 获取主门店 如果没有主门店设置主门店
*
* @param staffId
* @param wxEnterpriseId
* @return
*/
TabHaobanClerkMainStoreRelated getMainStoreByStaffId(String staffId, String wxEnterpriseId);
/**
* 删除主门店 并删除主门店好友 设置新主门店
*
* @param staffId
* @param storeId
* @param wxEnterpriseId
*/
void delMainStore(String staffId, String storeId, String wxEnterpriseId);
/**
* 根据门店列表 删除主门店
*
* @param storeIds
*/
void delMainStoreByStoreIds(Set<String> storeIds);
void update(TabHaobanClerkMainStoreRelated r); void update(TabHaobanClerkMainStoreRelated r);
List<TabHaobanClerkMainStoreRelated> listByWxEnterpriseId(String wxEnterpriseId); List<TabHaobanClerkMainStoreRelated> listByWxEnterpriseId(String wxEnterpriseId);
......
package com.gic.haoban.manage.service.service; package com.gic.haoban.manage.service.service;
import java.util.Collection;
import java.util.List; import java.util.List;
import com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO; import com.gic.haoban.manage.api.dto.ExternalClerkRelatedDTO;
...@@ -23,6 +24,10 @@ public interface ExternalClerkRelatedService { ...@@ -23,6 +24,10 @@ public interface ExternalClerkRelatedService {
void delByClerkIdAndStaffId(String clerkId, String staffId); void delByClerkIdAndStaffId(String clerkId, String staffId);
void delByStoreIdAndStaffId(String storeId, String staffId);
void delByStoreIds(Collection<String> storeIds);
void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds); void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds);
void update(TabHaobanExternalClerkRelated exsitDTO); void update(TabHaobanExternalClerkRelated exsitDTO);
...@@ -31,6 +36,8 @@ public interface ExternalClerkRelatedService { ...@@ -31,6 +36,8 @@ public interface ExternalClerkRelatedService {
List<TabHaobanExternalClerkRelated> listByExTernalUseridAndWxUserId(String externalUserid, String wxUserId); List<TabHaobanExternalClerkRelated> listByExTernalUseridAndWxUserId(String externalUserid, String wxUserId);
List<TabHaobanExternalClerkRelated> listByExTernalUseridAndWxUserIdAllStatus(String externalUserid, String wxUserId);
ExternalClerkRelatedDTO getByMemberId(String wxUserId, String memberId); ExternalClerkRelatedDTO getByMemberId(String wxUserId, String memberId);
/** /**
......
...@@ -12,9 +12,28 @@ public interface MaterialService { ...@@ -12,9 +12,28 @@ public interface MaterialService {
MaterialDTO selectMaterialById(String materialId); MaterialDTO selectMaterialById(String materialId);
List<MaterialDTO> listMaterialByIds(List<String> materialIds);
void edit(MaterialDTO materialDTO); void edit(MaterialDTO materialDTO);
com.github.pagehelper.Page listMaterial(String wxEnterpriseId, String keyword, String categoryId, com.github.pagehelper.Page listMaterial(String wxEnterpriseId, String keyword, String categoryId,
Integer materialType); Integer materialType);
MaterialDTO getMaterialByFromMaterialId(String fromMaterialId, String wxEnterpriseId);
/**
* 素材列表
*
* @param fromMaterialId
* @return
*/
List<MaterialDTO> listMaterialByFromMateralId(String fromMaterialId);
/**
* 删除
*
* @param ids
*/
void delmaterialByIds(List<String> ids);
} }
...@@ -36,4 +36,14 @@ public interface MemberUnionRelatedService { ...@@ -36,4 +36,14 @@ public interface MemberUnionRelatedService {
String enterpriseId); String enterpriseId);
void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds); void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds);
/**
* 根据应用内的外部联系人id 获取信息
*
* @param wxUserId
* @param wxEnterpriseId
* @param selfExternalUserId
* @return
*/
MemberUnionidRelatedDTO getBySelfExternalUserId(String wxUserId, String wxEnterpriseId, String selfExternalUserId);
} }
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);
/**
* 获取单个配置信息 无需操作企业微信media
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
public TabMiniprogramSetting getMiniprogramSettingNoMedia(String wxEnterpriseId, String enterpriseId);
/**
* 删除
*
* @param id
* @return
*/
public boolean delMiniprogramSetting(String id);
}
...@@ -30,6 +30,16 @@ public interface StaffClerkBindLogService { ...@@ -30,6 +30,16 @@ public interface StaffClerkBindLogService {
public void pushToMq(String staffId,String optStaffId,int optType,int channelCode,String relationId); public void pushToMq(String staffId,String optStaffId,int optType,int channelCode,String relationId);
/** /**
* 插入日志到mq
*
* @param optStaffId
* @param optType
* @param channelCode
* @param relationIds
*/
public void pushToMqBatch(String optStaffId, int optType, int channelCode, List<String> relationIds);
/**
* *
* @return * @return
*/ */
......
...@@ -26,6 +26,25 @@ public interface StaffClerkRelationService { ...@@ -26,6 +26,25 @@ public interface StaffClerkRelationService {
public boolean delBind(String clerkId,String optStaffId,int chanelCode); public boolean delBind(String clerkId,String optStaffId,int chanelCode);
/** /**
* 删除绑定
*
* @param wxEnterpriseId 可以不传
* @param storeIds
* @return
*/
public boolean delBindByStoreIds(String wxEnterpriseId, Set<String> storeIds, String optStaffId, int chanelCode);
/**
* 删除绑定
*
* @param wxEnterpriseId 可以不传
* @param enterpriseId
* @param storeIds 解除除了这些门店之外的绑定的门店
* @return
*/
public boolean delBindNotInStoreIds(String wxEnterpriseId, String enterpriseId, Set<String> storeIds, String optStaffId, int chanelCode);
/**
* 绑定 * 绑定
* @param dto * @param dto
* @return * @return
...@@ -94,5 +113,13 @@ public interface StaffClerkRelationService { ...@@ -94,5 +113,13 @@ public interface StaffClerkRelationService {
*/ */
List<StaffClerkRelationDTO> listBindByStoreId(String wxEnterpriseId, String storeId); List<StaffClerkRelationDTO> listBindByStoreId(String wxEnterpriseId, String storeId);
/**
* 查询门店列表
*
* @param enterpriseId
* @return
*/
List<StaffClerkRelationDTO> listBindStoreIdByEnterpriseId(String enterpriseId);
} }
package com.gic.haoban.manage.service.service;
import com.gic.api.base.commons.Page;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.manage.api.dto.StoreOrGroupInfoDTO;
import com.gic.haoban.manage.service.entity.TabStoreRange;
import com.gic.haoban.manage.service.entity.TabStoreRelation;
import java.util.List;
/**
* Created 2021/4/9.
*
* @author hua
*/
public interface StoreRangeService {
/**
* 保存企业的关联关系
*
* @param relations
* @param enterpriseId
* @param wxEnterpriseId
* @return
*/
public boolean saveStoreRange(List<StoreOrGroupInfoDTO> relations, String enterpriseId, String wxEnterpriseId);
/**
* 绑定列表
*
* @param enterpriseId
* @param wxEnterpriseId
* @return
*/
public List<StoreOrGroupInfoDTO> queryBindStoreRange(String enterpriseId, String wxEnterpriseId);
/**
* 获取商户所有绑定列表
*
* @param enterpriseId
* @return
*/
public List<TabStoreRange> queryAllBindRangeByEnterpriseId(String enterpriseId);
/**
* 删除分组id
*
* @param enterpriseId
* @param relationId
* @return
*/
public boolean delStoreRangeByRelationId(String enterpriseId, String relationId);
/**
* 删除门店
*
* @param enterpriseId
* @param storeId
* @return
*/
public boolean delStoreRelationByStoreId(String enterpriseId, String storeId);
/**
* 获取商户所有绑定列表 搜索
*
* @param enterpriseId
* @param wxEnterpriseId
* @param search
* @param pageInfo
* @return
*/
public Page<TabStoreRelation> pageStoreRelation(String enterpriseId, String wxEnterpriseId, String search, BasePageInfo pageInfo);
/**
* 保存门店的绑定关联关系
*
* @param list
* @return
*/
public boolean saveStoreRelations(List<TabStoreRelation> list, String optStaffId, int channelCode);
/**
* 删除分组id
*
* @param enterpriseId
* @param relationIds
* @return
*/
public List<TabStoreRange> queryStoreRangeByRelationId(String enterpriseId, List<String> relationIds);
/**
* 列表
*
* @param wxEnterpriseId
* @param enterpriseId
* @return
*/
public List<String> listStoreIdByWxEnterpriseId(String wxEnterpriseId, String enterpriseId);
}
package com.gic.haoban.manage.service.service; package com.gic.haoban.manage.service.service;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated; import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated;
import java.util.List; import java.util.List;
...@@ -8,7 +9,22 @@ public interface WxEnterpriseRelatedService { ...@@ -8,7 +9,22 @@ public interface WxEnterpriseRelatedService {
TabHaobanWxEnterpriseRelated getByGicEnterpriseIdByEnterpriseRelatedId(String wxEnterpriseRelatedId); TabHaobanWxEnterpriseRelated getByGicEnterpriseIdByEnterpriseRelatedId(String wxEnterpriseRelatedId);
TabHaobanWxEnterpriseRelated getEnterpriseByGicEnterpriseId(String gicEnterpriseId);
List<TabHaobanWxEnterpriseRelated> getByWxEnterpriseId(String wxEnterpriseId); List<TabHaobanWxEnterpriseRelated> getByWxEnterpriseId(String wxEnterpriseId);
/**
* 获取企业关联列表 根据商户id
*
* @param enterpriseId
* @return
*/
List<TabHaobanWxEnterprise> listByEnterpriseId(String enterpriseId);
/**
* 获取企业关联列表 根据商户id
*
* @param enterpriseId
* @return
*/
TabHaobanWxEnterpriseRelated getByEnterpriseId(String wxEnterpriseId, String enterpriseId);
} }
...@@ -2,7 +2,13 @@ package com.gic.haoban.manage.service.service.impl; ...@@ -2,7 +2,13 @@ package com.gic.haoban.manage.service.service.impl;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.service.service.ExternalClerkRelatedService;
import com.gic.haoban.manage.service.service.StaffClerkRelationService;
import com.gic.redis.data.util.RedisUtil;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -16,6 +22,12 @@ public class ClerkMainStoreRelatedServiceImpl implements ClerkMainStoreRelatedSe ...@@ -16,6 +22,12 @@ public class ClerkMainStoreRelatedServiceImpl implements ClerkMainStoreRelatedSe
@Autowired @Autowired
private TabHaobanClerkMainStoreRelatedMapper mapper; private TabHaobanClerkMainStoreRelatedMapper mapper;
@Autowired
private StaffClerkRelationService staffClerkRelationService;
@Autowired
private ExternalClerkRelatedService externalClerkRelatedService;
@Override @Override
public void setMainStore(String staffId, String storeId, String wxEnterpriseId) { public void setMainStore(String staffId, String storeId, String wxEnterpriseId) {
String uuId = com.gic.haoban.common.utils.StringUtil.randomUUID(); String uuId = com.gic.haoban.common.utils.StringUtil.randomUUID();
...@@ -38,6 +50,57 @@ public class ClerkMainStoreRelatedServiceImpl implements ClerkMainStoreRelatedSe ...@@ -38,6 +50,57 @@ public class ClerkMainStoreRelatedServiceImpl implements ClerkMainStoreRelatedSe
} }
@Override @Override
public TabHaobanClerkMainStoreRelated getMainStoreByStaffId(String staffId, String wxEnterpriseId) {
TabHaobanClerkMainStoreRelated mainStoreRelated = mapper.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId);
if (null != mainStoreRelated) {
return mainStoreRelated;
}
return setStaffMainStore(staffId, wxEnterpriseId);
}
/**
* 随机设置主门店
*
* @param staffId
* @param wxEnterpriseId
* @return
*/
private TabHaobanClerkMainStoreRelated setStaffMainStore(String staffId, String wxEnterpriseId) {
List<StaffClerkRelationDTO> clerkRelationDTOS = staffClerkRelationService.lisByStaffId(wxEnterpriseId, staffId);
if (CollectionUtils.isEmpty(clerkRelationDTOS)) {
return null;
}
StaffClerkRelationDTO staffClerkRelationDTO = clerkRelationDTOS.get(0);
String lockKey = "set-main-store:" + staffId;
RedisUtil.lock(lockKey, 3L);
TabHaobanClerkMainStoreRelated mainStoreRelated = mapper.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId);
if (null == mainStoreRelated) {
this.setMainStore(staffId, staffClerkRelationDTO.getStoreId(), wxEnterpriseId);
mainStoreRelated = mapper.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId);
}
RedisUtil.unlock(lockKey);
return mainStoreRelated;
}
@Override
public void delMainStore(String staffId, String storeId, String wxEnterpriseId) {
//删除主门店
mapper.delMainStore(staffId, storeId, wxEnterpriseId);
//删除主门店外部联系人 好友
externalClerkRelatedService.delByStoreIdAndStaffId(storeId, staffId);
//设置主门店
this.setStaffMainStore(staffId, wxEnterpriseId);
}
@Override
public void delMainStoreByStoreIds(Set<String> storeIds) {
//删除主门店
mapper.delByStoreIds(storeIds);
//删除外部联系人
externalClerkRelatedService.delByStoreIds(storeIds);
}
@Override
public void update(TabHaobanClerkMainStoreRelated r) { public void update(TabHaobanClerkMainStoreRelated r) {
r.setUpdateTime(new Date()); r.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(r); mapper.updateByPrimaryKeySelective(r);
......
package com.gic.haoban.manage.service.service.impl; package com.gic.haoban.manage.service.service.impl;
import java.util.Collection;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Set;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -27,7 +29,7 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ ...@@ -27,7 +29,7 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ
TabHaobanExternalClerkRelated tab = mapper.selectByClerkIdAndExternalUserId(clerkId,externalUserId); TabHaobanExternalClerkRelated tab = mapper.selectByClerkIdAndExternalUserId(clerkId,externalUserId);
if(tab == null){ if(tab == null){
String uuId = StringUtil.randomUUID(); String uuId = StringUtil.randomUUID();
related.setStatusFlag(1); related.setStatusFlag(related.getStatusFlag() != null ? related.getStatusFlag() : 1);
related.setExternalClerkRelatedId(uuId); related.setExternalClerkRelatedId(uuId);
related.setCreateTime(new Date()); related.setCreateTime(new Date());
related.setUpdateTime(new Date()); related.setUpdateTime(new Date());
...@@ -54,11 +56,21 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ ...@@ -54,11 +56,21 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ
} }
@Override @Override
public void delByStoreIdAndStaffId(String storeId, String staffId) {
mapper.delByStoreIdAndStaffId(storeId, staffId);
}
@Override
public void delByStoreIds(Collection<String> storeIds) {
mapper.delByStoreIds(storeIds);
}
@Override
public void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds) { public void cleanStaffRelated(String wxEnterpriseId, List<String> staffIds) {
if(staffIds != null && !staffIds.isEmpty()){ if(staffIds != null && !staffIds.isEmpty()){
mapper.cleanStaffRelated(wxEnterpriseId,staffIds); mapper.cleanStaffRelated(wxEnterpriseId,staffIds);
} }
} }
@Override @Override
...@@ -80,6 +92,11 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ ...@@ -80,6 +92,11 @@ public class ExternalClerkRelatedServiceImpl implements ExternalClerkRelatedServ
} }
@Override @Override
public List<TabHaobanExternalClerkRelated> listByExTernalUseridAndWxUserIdAllStatus(String externalUserid, String wxUserId) {
return mapper.listByExTernalUseridAndWxUserIdAllStatus(externalUserid, wxUserId);
}
@Override
public ExternalClerkRelatedDTO getByMemberId(String wxUserId, String memberId) { public ExternalClerkRelatedDTO getByMemberId(String wxUserId, String memberId) {
return EntityUtil.changeEntityByJSON(ExternalClerkRelatedDTO.class, mapper.getByMemberId(wxUserId,memberId)); return EntityUtil.changeEntityByJSON(ExternalClerkRelatedDTO.class, mapper.getByMemberId(wxUserId,memberId));
} }
......
...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.impl; ...@@ -3,6 +3,7 @@ package com.gic.haoban.manage.service.service.impl;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -41,14 +42,42 @@ public class MaterialServiceImpl implements MaterialService { ...@@ -41,14 +42,42 @@ public class MaterialServiceImpl implements MaterialService {
} }
@Override @Override
public void edit(MaterialDTO materialDTO) { public List<MaterialDTO> listMaterialByIds(List<String> materialIds) {
materialDTO.setUpdateTime(new Date()); return EntityUtil.changeEntityListByOrika(MaterialDTO.class, mapper.listByids(materialIds));
mapper.updateByPrimaryKeySelective(EntityUtil.changeEntityByJSON(TabHaobanMaterial.class, materialDTO)); }
}
@Override
public void edit(MaterialDTO materialDTO) {
materialDTO.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(EntityUtil.changeEntityByJSON(TabHaobanMaterial.class, materialDTO));
//
// List<TabHaobanMaterial> materials = mapper.listByfromMaterialId(materialDTO.getMaterialId());
// if (CollectionUtils.isEmpty(materials)) {
//
// return;
// }
}
@Override @Override
public Page<TabHaobanMaterial> listMaterial(String wxEnterpriseId, String keyword, String categoryId, Integer materialType) { public Page<TabHaobanMaterial> listMaterial(String wxEnterpriseId, String keyword, String categoryId, Integer materialType) {
return mapper.listMaterial(wxEnterpriseId,keyword,categoryId,materialType); return mapper.listMaterial(wxEnterpriseId,keyword,categoryId,materialType);
} }
@Override
public MaterialDTO getMaterialByFromMaterialId(String fromMaterialId, String wxEnterpriseId) {
TabHaobanMaterial tabHaobanMaterial = mapper.selectByfromMaterialId(fromMaterialId, wxEnterpriseId);
return EntityUtil.changeEntityByJSON(MaterialDTO.class, tabHaobanMaterial);
}
@Override
public List<MaterialDTO> listMaterialByFromMateralId(String fromMaterialId) {
List<TabHaobanMaterial> list = mapper.listByfromMaterialId(fromMaterialId);
return EntityUtil.changeEntityListByOrika(MaterialDTO.class, list);
}
@Override
public void delmaterialByIds(List<String> ids) {
mapper.delMaterialByIds(ids);
}
} }
...@@ -81,6 +81,12 @@ public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService ...@@ -81,6 +81,12 @@ public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService
return; return;
} }
mapper.cleanStaffRelated(wxEnterpriseId,staffIds); mapper.cleanStaffRelated(wxEnterpriseId,staffIds);
}
@Override
public MemberUnionidRelatedDTO getBySelfExternalUserId(String wxUserId, String wxEnterpriseId, String selfExternalUserId) {
MemberUnionidRelated unionidRelated = mapper.getBySelfExternalUserId(wxUserId, wxEnterpriseId, selfExternalUserId);
return EntityUtil.changeEntityNew(MemberUnionidRelatedDTO.class, unionidRelated);
} }
} }
...@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service; ...@@ -20,6 +20,7 @@ import org.springframework.stereotype.Service;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;
/** /**
* Created 2020/6/24. * Created 2020/6/24.
...@@ -62,6 +63,28 @@ public class StaffClerkBindLogServiceImpl implements StaffClerkBindLogService { ...@@ -62,6 +63,28 @@ public class StaffClerkBindLogServiceImpl implements StaffClerkBindLogService {
} }
@Override @Override
public void pushToMqBatch(String optStaffId, int optType, int channelCode, List<String> relationIds) {
logger.info("pushToMqBatch: {},{}", optStaffId, channelCode);
List<String> ret = relationIds.stream().map(rid -> {
StaffClerkBindLogInfoDTO infoDTO = new StaffClerkBindLogInfoDTO();
infoDTO.setChannelCode(channelCode);
infoDTO.setOptStaffId(optStaffId);
infoDTO.setOptType(optType);
infoDTO.setRelationId(rid);
return JSONObject.toJSONString(infoDTO);
}).collect(Collectors.toList());
GicMQClient clientInstance = GICMQClientUtil.getClientInstance();
try {
logger.info("绑定的mq日志:{},{}", optStaffId, relationIds);
clientInstance.sendBatchMessages(STAFF_LOG_MQ, ret);
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public Page<StaffClerkBindLogDetailDTO> pageBindLog(String wxEnterpriseId,List<String> clerkIds, List<String> staffIds, List<String> enterpriseIds, int optType,String search, BasePageInfo pageInfo) { public Page<StaffClerkBindLogDetailDTO> pageBindLog(String wxEnterpriseId,List<String> clerkIds, List<String> staffIds, List<String> enterpriseIds, int optType,String search, BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo); PageHelper.startPage(pageInfo);
List<TabHaobanStaffClerkBindLog> clerkBindLogList = staffClerkBindLogMapper.listStaffClerkBindLog(wxEnterpriseId, clerkIds, staffIds, enterpriseIds, optType,search); List<TabHaobanStaffClerkBindLog> clerkBindLogList = staffClerkBindLogMapper.listStaffClerkBindLog(wxEnterpriseId, clerkIds, staffIds, enterpriseIds, optType,search);
......
package com.gic.haoban.manage.service.service.impl; package com.gic.haoban.manage.service.service.impl;
import java.util.*; import java.util.*;
import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.gic.commons.util.ToolUtil; import com.gic.commons.util.ToolUtil;
...@@ -56,8 +57,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -56,8 +57,6 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
@Autowired @Autowired
private StaffService staffService; private StaffService staffService;
@Autowired
private TabHaobanStaffClerkRelationMapper tabHaobanStaffClerkRelationMapper;
@Autowired @Autowired
private ClerkMainStoreRelatedService clerkMainStoreRelatedService; private ClerkMainStoreRelatedService clerkMainStoreRelatedService;
...@@ -82,9 +81,10 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -82,9 +81,10 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
logger.info("已经不存在:{},{}", clerkId, optStaffId); logger.info("已经不存在:{},{}", clerkId, optStaffId);
return true; return true;
} }
TabHaobanStaffClerkRelation staffClerkRelation = tabHaobanStaffClerkRelationMapper.getOneByClerkId(clerkId);
int i = mapper.changeStatusByClerkId(clerkId, 0); int i = mapper.changeStatusByClerkId(clerkId, 0);
delSetMainStore(staffClerkRelation); //删除 并设置主门店
clerkMainStoreRelatedService.delMainStore(clerkRelation.getStaffId(), clerkRelation.getStoreId(), clerkRelation.getWxEnterpriseId());
boolean b = i >= 0; boolean b = i >= 0;
if (b) { if (b) {
//推入日志 //推入日志
...@@ -93,6 +93,47 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -93,6 +93,47 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
return b; return b;
} }
@Override
public boolean delBindByStoreIds(String wxEnterpriseId, Set<String> storeIds, String optStaffId, int chanelCode) {
if (CollectionUtils.isEmpty(storeIds)) {
logger.info("没有传门店列表:{}", wxEnterpriseId);
return true;
}
List<TabHaobanStaffClerkRelation> needUnbind = mapper.listBindByStoreIds(wxEnterpriseId, storeIds);
if (CollectionUtils.isEmpty(needUnbind)) {
logger.info("没有门店绑定了需要解绑的:{}", wxEnterpriseId);
}
//清除绑定
mapper.delByStoreIds(storeIds);
//删除主门店
clerkMainStoreRelatedService.delMainStoreByStoreIds(storeIds);
List<String> need = needUnbind.stream().map(tab -> tab.getStaffClerkRelationId()).collect(Collectors.toList());
//放入队列
staffClerkBindLogService.pushToMqBatch(optStaffId, BindTypeEnum.UNBIND.getVal(), chanelCode, need);
return true;
}
@Override
public boolean delBindNotInStoreIds(String wxEnterpriseId, String enterpriseId, Set<String> storeIds, String optStaffId, int chanelCode) {
if (CollectionUtils.isEmpty(storeIds)) {
logger.info("没有传门店列表:{}", wxEnterpriseId);
return true;
}
List<TabHaobanStaffClerkRelation> needUnbind = mapper.listBindNotInStoreIds(wxEnterpriseId, enterpriseId, storeIds);
if (CollectionUtils.isEmpty(needUnbind)) {
logger.info("没有门店绑定了需要解绑的:{}", wxEnterpriseId);
}
Set<String> needDelStoreIds = needUnbind.stream().map(tab -> tab.getStoreId()).collect(Collectors.toSet());
//清除绑定
mapper.delByStoreIds(needDelStoreIds);
List<String> need = needUnbind.stream().map(tab -> tab.getStaffClerkRelationId()).collect(Collectors.toList());
//放入队列
staffClerkBindLogService.pushToMqBatch(optStaffId, BindTypeEnum.UNBIND.getVal(), chanelCode, need);
return true;
}
private void delSetMainStore(TabHaobanStaffClerkRelation staffClerkRelation) { private void delSetMainStore(TabHaobanStaffClerkRelation staffClerkRelation) {
if (staffClerkRelation == null) { if (staffClerkRelation == null) {
logger.info("staffClerkRelation为空"); logger.info("staffClerkRelation为空");
...@@ -100,16 +141,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -100,16 +141,8 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
} }
String staffId = staffClerkRelation.getStaffId(); String staffId = staffClerkRelation.getStaffId();
String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId(); String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId();
TabHaobanClerkMainStoreRelated r = clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId); //删除主门店 设置新主门店 删除好友关系
if(r != null){ clerkMainStoreRelatedService.delMainStore(staffId, staffClerkRelation.getStoreId(), wxEnterpriseId);
r.setStatusFlag(0);
clerkMainStoreRelatedService.update(r);
}
externalClerkRelatedService.delByClerkIdAndStaffId(staffClerkRelation.getClerkId(), staffId);
List<StaffClerkRelationDTO> list = this.lisByStaffId(wxEnterpriseId, staffId);
if (list != null && list.size() >= 1) {
clerkMainStoreRelatedService.setMainStore(staffId, list.get(list.size() - 1).getStoreId(), wxEnterpriseId);
}
} }
private void setMainStore(StaffClerkRelationDTO staffClerkRelation) { private void setMainStore(StaffClerkRelationDTO staffClerkRelation) {
...@@ -133,7 +166,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -133,7 +166,7 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
dto.setUpdateTime(new Date()); dto.setUpdateTime(new Date());
int insert = mapper.insert(EntityUtil.changeEntityByJSON(TabHaobanStaffClerkRelation.class, dto)); int insert = mapper.insert(EntityUtil.changeEntityByJSON(TabHaobanStaffClerkRelation.class, dto));
setMainStore(dto); // setMainStore(dto);
String s = insert > 0 ? dto.getStaffClerkRelationId() : null; String s = insert > 0 ? dto.getStaffClerkRelationId() : null;
if (null != s) { if (null != s) {
//推入日志 //推入日志
...@@ -251,4 +284,13 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService ...@@ -251,4 +284,13 @@ public class StaffClerkRelationServiceImpl implements StaffClerkRelationService
List<TabHaobanStaffClerkRelation> ret = mapper.listBindByStoreId(wxEnterpriseId, storeId); List<TabHaobanStaffClerkRelation> ret = mapper.listBindByStoreId(wxEnterpriseId, storeId);
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, ret); return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, ret);
} }
@Override
public List<StaffClerkRelationDTO> listBindStoreIdByEnterpriseId(String enterpriseId) {
List<TabHaobanStaffClerkRelation> clerkRelations = mapper.listBindStoreIdByEnterpriseId(enterpriseId);
if (CollectionUtils.isEmpty(clerkRelations)) {
return new ArrayList<>();
}
return EntityUtil.changeEntityListNew(StaffClerkRelationDTO.class, clerkRelations);
}
} }
package com.gic.haoban.manage.service.service.impl;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
import com.gic.commons.util.ToolUtil;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.StaffClerkRelationDTO;
import com.gic.haoban.manage.api.dto.StoreOrGroupInfoDTO;
import com.gic.haoban.manage.api.enums.ChannelCodeEnum;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStoreRangeMapper;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStoreRelationMapper;
import com.gic.haoban.manage.service.entity.TabStoreRange;
import com.gic.haoban.manage.service.entity.TabStoreRelation;
import com.gic.haoban.manage.service.service.StaffClerkRelationService;
import com.gic.haoban.manage.service.service.StoreRangeService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.google.common.collect.Sets;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.stream.Collectors;
import static org.slf4j.LoggerFactory.getLogger;
/**
* Created 2021/4/9.
*
* @author hua
*/
@Service
public class StoreRangeServiceImpl implements StoreRangeService {
private static final Logger logger = getLogger(StoreRangeServiceImpl.class);
@Autowired
private TabHaobanStoreRangeMapper tabHaobanStoreRangeMapper;
@Autowired
private TabHaobanStoreRelationMapper tabHaobanStoreRelationMapper;
@Autowired
private StaffClerkRelationService staffClerkRelationService;
@Override
public boolean saveStoreRange(List<StoreOrGroupInfoDTO> relations, String enterpriseId, String wxEnterpriseId) {
tabHaobanStoreRangeMapper.deleteByEnterpriseId(wxEnterpriseId, enterpriseId);
List<TabStoreRange> ranges = relations.stream().map(dto -> {
TabStoreRange tabStoreRange = new TabStoreRange();
tabStoreRange.setEnterpriseId(enterpriseId);
tabStoreRange.setWxEnterpriseId(wxEnterpriseId);
tabStoreRange.setRelationId(dto.getRelationId());
tabStoreRange.setRelationType(dto.getRelationType());
tabStoreRange.setStoreRangeId(ToolUtil.randomUUID());
return tabStoreRange;
}).collect(Collectors.toList());
tabHaobanStoreRangeMapper.insertBatch(ranges);
return true;
}
@Override
public List<StoreOrGroupInfoDTO> queryBindStoreRange(String enterpriseId, String wxEnterpriseId) {
List<TabStoreRange> tabStoreRanges = tabHaobanStoreRangeMapper.queryByEnterpriseId(wxEnterpriseId, enterpriseId);
if (CollectionUtils.isEmpty(tabStoreRanges)) {
return null;
}
return tabStoreRanges.stream().map(tab -> {
StoreOrGroupInfoDTO infoDTO = new StoreOrGroupInfoDTO();
infoDTO.setRelationId(tab.getRelationId());
infoDTO.setRelationType(tab.getRelationType());
return infoDTO;
}).collect(Collectors.toList());
}
@Override
public List<TabStoreRange> queryAllBindRangeByEnterpriseId(String enterpriseId) {
List<TabStoreRange> tabStoreRanges = tabHaobanStoreRangeMapper.queryByEnterpriseId(null, enterpriseId);
if (CollectionUtils.isEmpty(tabStoreRanges)) {
return null;
}
return tabStoreRanges;
}
@Override
public boolean delStoreRangeByRelationId(String enterpriseId, String relationId) {
tabHaobanStoreRangeMapper.delStoreRangeByRelationId(relationId, enterpriseId);
return true;
}
@Override
public boolean delStoreRelationByStoreId(String enterpriseId, String storeId) {
tabHaobanStoreRelationMapper.deleteStoreRalation(enterpriseId, storeId);
return true;
}
@Override
public Page<TabStoreRelation> pageStoreRelation(String enterpriseId, String wxEnterpriseId, String search, BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo);
List<TabStoreRelation> storeRelations = tabHaobanStoreRelationMapper.searchStoreRange(wxEnterpriseId, enterpriseId, search);
Page<TabStoreRelation> retPage = PageUtil.changePageHelperToCurrentPage(new PageInfo<>(storeRelations));
return retPage;
}
@Override
public boolean saveStoreRelations(List<TabStoreRelation> list, String optStaffId, int channelCode) {
if (CollectionUtils.isEmpty(list)) {
logger.info("没有需要保存的");
return true;
}
String enterpriseId = list.get(0).getEnterpriseId();
//根据wxEnterpriseId 分组
Map<String, Set<String>> newStoreIdBywxEnterpriseMap = list.stream().collect(Collectors.groupingBy(TabStoreRelation::getWxEnterpriseId, Collectors.mapping(dto -> dto.getStoreId(), Collectors.toSet())));
//所有就的门店old绑定列表
Map<String, Set<String>> oldStoreIdBywxEnterpriseMap = getOldStoreIdsByWxEnterpriseId(enterpriseId);
Set<String> needUnBindStoreIds = new HashSet<>();
oldStoreIdBywxEnterpriseMap.forEach((wxEid, oldStoreIds) -> {
Set<String> newStoreIds = newStoreIdBywxEnterpriseMap.get(wxEid);
if (CollectionUtils.isEmpty(newStoreIds)) {
return;
}
Sets.SetView<String> needDelStoreIds = Sets.difference(oldStoreIds, newStoreIds);
logger.info("wxEnterpriseId-difference-" + wxEid + ":{},{}", JSONObject.toJSONString(oldStoreIds), JSONObject.toJSONString(newStoreIds));
logger.info("wxEnterpriseId:{},{}", wxEid, JSONObject.toJSONString(needDelStoreIds));
Set<String> mid = needDelStoreIds.stream().collect(Collectors.toSet());
needUnBindStoreIds.addAll(mid);
});
//这些门店解除绑定
staffClerkRelationService.delBindByStoreIds(null, needUnBindStoreIds, optStaffId, channelCode);
//先删除 后新增
tabHaobanStoreRelationMapper.deleteAllStoreRalation(enterpriseId);
//批量插入
insertStoreRelationBatch(list);
return true;
}
/**
* 批量插入
*
* @param storeRelations
*/
private void insertStoreRelationBatch(List<TabStoreRelation> storeRelations) {
int batchSize = 1000;
int sumSize = storeRelations.size();
int count = (sumSize / batchSize) + ((sumSize % batchSize > 0) ? 1 : 0);
for (int i = 0; i < count; i++) {
int from = i * batchSize;
int subSize = sumSize - from;
int to = (subSize > batchSize) ? from + batchSize : from + subSize;
List<TabStoreRelation> relations = storeRelations.subList(from, to);
tabHaobanStoreRelationMapper.insertBatch(relations);
}
}
/**
* 获取企业下的老的绑定门店
*
* @param enterpriseId
* @return
*/
private Map<String, Set<String>> getOldStoreIdsByWxEnterpriseId(String enterpriseId) {
Map<String, Set<String>> ret = new HashMap<>();
Set<String> wxEnterpriseIds = new HashSet<>();
//更新前绑定门店列表
List<TabStoreRelation> storeRelations = tabHaobanStoreRelationMapper.listStoreRange(enterpriseId);
Map<String, Set<String>> oldStoreIdBywxEnterpriseMap = storeRelations.stream().collect(Collectors.groupingBy(TabStoreRelation::getWxEnterpriseId, Collectors.mapping(dto -> dto.getStoreId(), Collectors.toSet())));
if (CollectionUtils.isNotEmpty(storeRelations)) {
wxEnterpriseIds.addAll(oldStoreIdBywxEnterpriseMap.keySet());
}
//导购绑定列表
List<StaffClerkRelationDTO> staffClerkRelationDTOS = staffClerkRelationService.listBindStoreIdByEnterpriseId(enterpriseId);
Map<String, Set<String>> oldStaffStoreIdByWxEidMap = staffClerkRelationDTOS.stream().collect(Collectors.groupingBy(StaffClerkRelationDTO::getWxEnterpriseId, Collectors.mapping(dto -> dto.getStoreId(), Collectors.toSet())));
if (CollectionUtils.isNotEmpty(staffClerkRelationDTOS)) {
wxEnterpriseIds.addAll(oldStaffStoreIdByWxEidMap.keySet());
}
if (CollectionUtils.isEmpty(wxEnterpriseIds)) {
return ret;
}
//聚合两者就是总门店了
wxEnterpriseIds.forEach(wxid -> {
if (!ret.containsKey(wxid)) {
ret.put(wxid, new HashSet<>());
}
Set<String> storeIds = oldStaffStoreIdByWxEidMap.get(wxid);
if (CollectionUtils.isNotEmpty(storeIds)) {
ret.get(wxid).addAll(storeIds);
}
Set<String> staffStoreIds = oldStoreIdBywxEnterpriseMap.get(wxid);
if (CollectionUtils.isNotEmpty(staffStoreIds)) {
ret.get(wxid).addAll(staffStoreIds);
}
});
return ret;
}
@Override
public List<TabStoreRange> queryStoreRangeByRelationId(String enterpriseId, List<String> relationIds) {
return tabHaobanStoreRangeMapper.listStoreRangeByRelationId(relationIds, enterpriseId);
}
@Override
public List<String> listStoreIdByWxEnterpriseId(String wxEnterpriseId, String enterpriseId) {
return tabHaobanStoreRelationMapper.listStoreIdByWxEnterpriseId(wxEnterpriseId, enterpriseId);
}
}
package com.gic.haoban.manage.service.service.impl; package com.gic.haoban.manage.service.service.impl;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -8,24 +12,30 @@ import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper; ...@@ -8,24 +12,30 @@ import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated; import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated;
import com.gic.haoban.manage.service.service.WxEnterpriseRelatedService; import com.gic.haoban.manage.service.service.WxEnterpriseRelatedService;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import static org.slf4j.LoggerFactory.getLogger;
@Service @Service
public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedService { public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedService {
private static final Logger logger = getLogger(WxEnterpriseRelatedServiceImpl.class);
@Autowired @Autowired
private WxEnterpriseRelatedMapper mapper; private WxEnterpriseRelatedMapper mapper;
@Autowired
private WxEnterpriseMapper wxEnterpriseMapper;
@Override @Override
public TabHaobanWxEnterpriseRelated getByGicEnterpriseIdByEnterpriseRelatedId(String wxEnterpriseRelatedId) { public TabHaobanWxEnterpriseRelated getByGicEnterpriseIdByEnterpriseRelatedId(String wxEnterpriseRelatedId) {
return mapper.selectByPrimaryKey(wxEnterpriseRelatedId); return mapper.selectByPrimaryKey(wxEnterpriseRelatedId);
} }
@Override
public TabHaobanWxEnterpriseRelated getEnterpriseByGicEnterpriseId(String gicEnterpriseId) {
TabHaobanWxEnterpriseRelated tab = mapper.findOneByEnterpriseId(gicEnterpriseId);
return tab;
}
@Override @Override
public List<TabHaobanWxEnterpriseRelated> getByWxEnterpriseId(String wxEnterpriseId) { public List<TabHaobanWxEnterpriseRelated> getByWxEnterpriseId(String wxEnterpriseId) {
...@@ -33,4 +43,20 @@ public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedServic ...@@ -33,4 +43,20 @@ public class WxEnterpriseRelatedServiceImpl implements WxEnterpriseRelatedServic
return list; return list;
} }
@Override
public List<TabHaobanWxEnterprise> listByEnterpriseId(String enterpriseId) {
List<String> eids = new ArrayList<>();
eids.add(enterpriseId);
List<TabHaobanWxEnterpriseRelated> relateds = mapper.listEnterpriseByEnterpriseIds(eids);
if (CollectionUtils.isEmpty(relateds)) {
return null;
}
Set<String> wxEnterpriseIds = relateds.stream().map(tab -> tab.getWxEnterpriseId()).collect(Collectors.toSet());
return wxEnterpriseMapper.listByIds(wxEnterpriseIds);
}
@Override
public TabHaobanWxEnterpriseRelated getByEnterpriseId(String wxEnterpriseId, String enterpriseId) {
return mapper.findOneByEIdAndWxEid(enterpriseId, wxEnterpriseId);
}
} }
...@@ -9,6 +9,8 @@ import com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService; ...@@ -9,6 +9,8 @@ import com.gic.haoban.manage.api.service.ClerkMainStoreRelatedApiService;
import com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated; import com.gic.haoban.manage.service.entity.TabHaobanClerkMainStoreRelated;
import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService; import com.gic.haoban.manage.service.service.ClerkMainStoreRelatedService;
import java.util.Date;
@Service @Service
public class ClerkMainStoreRelatedApiServiceImpl implements ClerkMainStoreRelatedApiService { public class ClerkMainStoreRelatedApiServiceImpl implements ClerkMainStoreRelatedApiService {
...@@ -17,18 +19,18 @@ public class ClerkMainStoreRelatedApiServiceImpl implements ClerkMainStoreRelate ...@@ -17,18 +19,18 @@ public class ClerkMainStoreRelatedApiServiceImpl implements ClerkMainStoreRelate
@Override @Override
public void setMainStore(String staffId, String storeId, String wxEnterpriseId) { public void setMainStore(String staffId, String storeId, String wxEnterpriseId) {
TabHaobanClerkMainStoreRelated r = clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId,wxEnterpriseId); TabHaobanClerkMainStoreRelated related = clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId);
if(r != null){ if (null != related && (!related.getStoreId().equals(storeId))) {
r.setStoreId(storeId); related.setStatusFlag(0);
clerkMainStoreRelatedService.update(r); related.setUpdateTime(new Date());
}else{ clerkMainStoreRelatedService.update(related);
clerkMainStoreRelatedService.setMainStore(staffId, storeId, wxEnterpriseId);
} }
clerkMainStoreRelatedService.setMainStore(staffId, storeId, wxEnterpriseId);
} }
@Override @Override
public ClerkMainStoreRelatedDTO getWxEnterpriseIdAndStaffId(String wxEnterpriseId, String staffId) { public ClerkMainStoreRelatedDTO getWxEnterpriseIdAndStaffId(String wxEnterpriseId, String staffId) {
return EntityUtil.changeEntityByJSON(ClerkMainStoreRelatedDTO.class, clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId,wxEnterpriseId)); return EntityUtil.changeEntityByJSON(ClerkMainStoreRelatedDTO.class, clerkMainStoreRelatedService.getMainStoreByStaffId(staffId, wxEnterpriseId));
} }
} }
...@@ -2,12 +2,17 @@ package com.gic.haoban.manage.service.service.out.impl; ...@@ -2,12 +2,17 @@ package com.gic.haoban.manage.service.service.out.impl;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.base.api.common.ServiceResponse;
import com.gic.haoban.common.utils.PageUtil; import com.gic.haoban.common.utils.PageUtil;
import com.gic.haoban.manage.api.dto.*; 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.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper;
import com.gic.haoban.manage.service.entity.MemberUnionidRelated;
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;
...@@ -25,6 +30,10 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA ...@@ -25,6 +30,10 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA
private static final Logger log = LogManager.getLogger(ExternalClerkRelatedApiServiceImpl.class); private static final Logger log = LogManager.getLogger(ExternalClerkRelatedApiServiceImpl.class);
@Autowired @Autowired
private TabHaobanExternalClerkRelatedMapper tabHaobanExternalClerkRelatedMapper; private TabHaobanExternalClerkRelatedMapper tabHaobanExternalClerkRelatedMapper;
@Autowired
private MemberUnionidRelatedMapper memberUnionidRelatedMapper;
@Override @Override
public List<ExternalClerkRelatedDTO> listByEnterpriseIdAndDate( public List<ExternalClerkRelatedDTO> listByEnterpriseIdAndDate(
String enterpriseId, Date date) { String enterpriseId, Date date) {
...@@ -50,5 +59,66 @@ public class ExternalClerkRelatedApiServiceImpl implements ExternalClerkRelatedA ...@@ -50,5 +59,66 @@ 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, List<Integer> statusFlags, BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo);
List<TabHaobanExternalClerkRelated> ret = tabHaobanExternalClerkRelatedMapper.listByWxEnterpriseIdAndWxUserIdAndStatus(wxEnterpriseId, wxUserId, statusFlags);
Page<ExternalClerkRelatedDTO> retPage = PageUtil.changePageHelperToCurrentPage(new PageInfo<>(ret), ExternalClerkRelatedDTO.class);
return retPage;
}
@Override
public boolean pushExternalByRelationKey(String relationKey) {
tabHaobanExternalClerkRelatedMapper.pushExternalByRelationKey(relationKey);
return true;
}
@Override
public ServiceResponse<ExternalClerkRelatedDTO> bindMemberIdExternalByRelationKey(String relationKey, String enterpriseId, String memberId, String unionid) {
ServiceResponse<ExternalClerkRelatedDTO> resp = new ServiceResponse<>();
TabHaobanExternalClerkRelated externalClerkRelated = tabHaobanExternalClerkRelatedMapper.getByRelationKey(relationKey);
if (null == externalClerkRelated) {
resp.setCode(0);
resp.setMessage("relationKey对应的关联关系不存在或删除");
return resp;
}
if (!externalClerkRelated.getEnterpriseId().equals(enterpriseId)) {
resp.setCode(0);
resp.setMessage("relationKey对应的企业与所传会员企业不对应");
return resp;
}
externalClerkRelated.setMemberId(memberId);
externalClerkRelated.setUnionid(unionid);
externalClerkRelated.setUpdateTime(new Date());
externalClerkRelated.setStatusFlag(1);
tabHaobanExternalClerkRelatedMapper.updateByPrimaryKeySelective(externalClerkRelated);
//更新unionid
MemberUnionidRelated memberUnionidRelated = memberUnionidRelatedMapper.selectByPrimaryKey(externalClerkRelated.getMemberUnionidRelatedId());
memberUnionidRelated.setUnionid(unionid);
memberUnionidRelated.setUpdateTime(new Date());
memberUnionidRelatedMapper.updateByPrimaryKeySelective(memberUnionidRelated);
resp.setResult(EntityUtil.changeEntityNew(ExternalClerkRelatedDTO.class, externalClerkRelated));
return resp;
}
@Override
public ExternalClerkRelatedDTO getClerkFriendByUnionid(String enterpriseId, String clerkId, String unionid) {
TabHaobanExternalClerkRelated externalClerkRelated = tabHaobanExternalClerkRelatedMapper.getClerkExternalByUnionId(enterpriseId, clerkId, unionid);
ExternalClerkRelatedDTO clerkRelatedDTO = EntityUtil.changeEntityNew(ExternalClerkRelatedDTO.class, externalClerkRelated);
return clerkRelatedDTO;
}
@Override
public List<ExternalClerkRelatedDTO> listExternalClerkByWxUserIdAncExternalUserId(String wxEnterpriseId, String wxUserId, String enterpriseId, String externalUserId) {
List<TabHaobanExternalClerkRelated> list = tabHaobanExternalClerkRelatedMapper.listExternalClerkByWxUserIdAncExternalUserId(wxEnterpriseId, wxUserId, enterpriseId, externalUserId);
return EntityUtil.changeEntityListNew(ExternalClerkRelatedDTO.class, list);
}
} }
...@@ -5,6 +5,7 @@ import java.net.URL; ...@@ -5,6 +5,7 @@ import java.net.URL;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import com.gic.haoban.base.api.common.ServiceResponse;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -88,6 +89,7 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -88,6 +89,7 @@ public class MaterialApiServiceImpl implements MaterialApiService {
@Override @Override
public void editCategory(MaterialCategoryDTO materialCategoryDTO) { public void editCategory(MaterialCategoryDTO materialCategoryDTO) {
materialCategoryService.editCategory(materialCategoryDTO); materialCategoryService.editCategory(materialCategoryDTO);
} }
...@@ -149,59 +151,64 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -149,59 +151,64 @@ public class MaterialApiServiceImpl implements MaterialApiService {
} }
@Override @Override
public void editMaterial(MaterialDTO materialDTO) { public List<MaterialDTO> listMaterialByIds(List<String> materialIds) {
Integer type = materialDTO.getMaterialType(); return materialService.listMaterialByIds(materialIds);
String materialId = materialDTO.getMaterialId(); }
MaterialDTO old = materialService.selectMaterialById(materialId);
String wxEnterpriseId = old.getWxEnterpriseId(); @Override
WxEnterpriseDTO enterprise = wxEnterpriseService.selectById(wxEnterpriseId); public void editMaterial(MaterialDTO materialDTO) {
if(type == null){ Integer type = materialDTO.getMaterialType();
return; String materialId = materialDTO.getMaterialId();
} MaterialDTO old = materialService.selectMaterialById(materialId);
if(enterprise == null){ String wxEnterpriseId = old.getWxEnterpriseId();
return; WxEnterpriseDTO enterprise = wxEnterpriseService.selectById(wxEnterpriseId);
} if(type == null){
QywxMediaTypeEnum fileType = null; return;
String url = ""; }
String oldUrl = ""; if(enterprise == null){
if(type == 2){ return;
fileType = QywxMediaTypeEnum.IMAGE; }
url = materialDTO.getImgUrl(); QywxMediaTypeEnum fileType = null;
oldUrl = old.getImgUrl(); String url = "";
} String oldUrl = "";
if(type == 4){ if(type == 2){
fileType = QywxMediaTypeEnum.VIDEO; fileType = QywxMediaTypeEnum.IMAGE;
url = materialDTO.getLink(); url = materialDTO.getImgUrl();
oldUrl = old.getLink(); oldUrl = old.getImgUrl();
} }
if(type == 5){ if(type == 4){
fileType = QywxMediaTypeEnum.FILE; fileType = QywxMediaTypeEnum.VIDEO;
url = materialDTO.getLink(); url = materialDTO.getLink();
oldUrl = old.getLink(); oldUrl = old.getLink();
} }
if(type == 3){ if(type == 5){
String imgUrl = materialDTO.getImgUrl(); fileType = QywxMediaTypeEnum.FILE;
String oldImgUrl = materialDTO.getImgUrl(); url = materialDTO.getLink();
if(!imgUrl.equals(oldImgUrl)){ oldUrl = old.getLink();
JSONResponse response = qywxSuiteApiService.uploadImage(enterprise.getCorpid(), config.getWxSuiteid(), getFileByte(imgUrl)); }
String wxImgUrl = response.getResult() == null ? "" : response.getResult().toString(); if(type == 3){
materialDTO.setWxImgUrl(wxImgUrl); String imgUrl = materialDTO.getImgUrl();
} String oldImgUrl = materialDTO.getImgUrl();
} if(!imgUrl.equals(oldImgUrl)){
if(fileType != null && !url.equals(oldUrl)){ JSONResponse response = qywxSuiteApiService.uploadImage(enterprise.getCorpid(), config.getWxSuiteid(), getFileByte(imgUrl));
String[] arr = url.split("/"); String wxImgUrl = response.getResult() == null ? "" : response.getResult().toString();
int count = arr.length; materialDTO.setWxImgUrl(wxImgUrl);
JSONResponse jp = qywxSuiteApiService.uploadMedia(enterprise.getCorpid(), config.getWxSuiteid(), getFileByte(url),arr[count - 1], fileType.getCode()); }
if(jp.getErrorCode() == 0){ }
materialDTO.setWxLastUploadTime(new Date()); if(fileType != null && !url.equals(oldUrl)){
materialDTO.setMediaId(jp.getResult().toString()); String[] arr = url.split("/");
materialService.edit(materialDTO); int count = arr.length;
} JSONResponse jp = qywxSuiteApiService.uploadMedia(enterprise.getCorpid(), config.getWxSuiteid(), getFileByte(url),arr[count - 1], fileType.getCode());
}else{ if(jp.getErrorCode() == 0){
materialService.edit(materialDTO); materialDTO.setWxLastUploadTime(new Date());
} materialDTO.setMediaId(jp.getResult().toString());
materialService.edit(materialDTO);
} }
}else{
materialService.edit(materialDTO);
}
}
@Override @Override
public String reUpdalodMetail(String materialId){ public String reUpdalodMetail(String materialId){
...@@ -272,4 +279,45 @@ public class MaterialApiServiceImpl implements MaterialApiService { ...@@ -272,4 +279,45 @@ public class MaterialApiServiceImpl implements MaterialApiService {
return materialCategoryService.listByParentCategory(categoryId); return materialCategoryService.listByParentCategory(categoryId);
} }
@Override
public ServiceResponse<Void> shareMaterial(String wxEnterpriseId, String toWxEnterpriseId, String materialId) {
ServiceResponse<Void> res = new ServiceResponse<>();
MaterialDTO materialDTO = materialService.selectMaterialById(materialId);
if (null == materialDTO) {
logger.info("不存在该素材");
res.setCode(2);
res.setMessage("不存在该素材");
return res;
}
if (!materialDTO.getFromMaterialId().equals("-1")) {
logger.info("该素材不允许分享");
res.setCode(3);
res.setMessage("该素材不允许分享");
return res;
}
MaterialDTO fromMaterialDTO = materialService.getMaterialByFromMaterialId(materialId, toWxEnterpriseId);
if (fromMaterialDTO != null) {
logger.info("已经存在素材,不能重复分享");
res.setCode(4);
res.setMessage("已经存在素材,不能重复分享");
return res;
}
materialDTO.setWxEnterpriseId(toWxEnterpriseId);
materialDTO.setFromMaterialId(materialId);
materialDTO.setMediaId(null);
materialDTO.setWxLastUploadTime(null);
materialService.insertMaterial(materialDTO);
return res;
}
@Override
public List<MaterialDTO> listByFromMaterialId(String materialId) {
List<MaterialDTO> materialDTOS = materialService.listMaterialByFromMateralId(materialId);
return materialDTOS;
}
@Override
public void delMaterial(List<String> ids) {
materialService.delmaterialByIds(ids);
}
} }
...@@ -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
......
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.setCreateTime(new Date());
miniprogramSetting.setStatusFlag(1);
tabMiniprogramSettingMapper.insertSelective(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 tabMiniprogramSettingMapper.listMiniprogramSetting(wxEnterpriseId);
}
@Override
public TabMiniprogramSetting getMiniprogramSetting(String wxEnterpriseId, String enterpriseId) {
TabMiniprogramSetting miniprogramSetting = tabMiniprogramSettingMapper.getMiniprogramSetting(wxEnterpriseId, enterpriseId);
if (miniprogramSetting == null) {
return null;
}
if (StringUtils.isBlank(miniprogramSetting.getImageUrl())) {
return miniprogramSetting;
}
Date date = new Date();
Date compareDate = DateUtils.addDays(date, -3);
if (miniprogramSetting.getCreateTime() != null && miniprogramSetting.getCreateTime().after(compareDate) && StringUtils.isNotBlank(miniprogramSetting.getMediaId())) {
return miniprogramSetting;
}
String[] arr = miniprogramSetting.getImageUrl().split("/");
WxEnterpriseDTO wxEnterpriseDTO = wxEnterpriseService.selectById(wxEnterpriseId);
Date createTme = miniprogramSetting.getCreateTime();
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 TabMiniprogramSetting getMiniprogramSettingNoMedia(String wxEnterpriseId, String enterpriseId) {
TabMiniprogramSetting miniprogramSetting = tabMiniprogramSettingMapper.getMiniprogramSetting(wxEnterpriseId, enterpriseId);
if (miniprogramSetting == null) {
return null;
}
return miniprogramSetting;
}
@Override
public boolean delMiniprogramSetting(String id) {
tabMiniprogramSettingMapper.deleteByPrimaryKey(id);
return true;
}
}
...@@ -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");
}
} }
......
package com.gic.haoban.manage.service.service.out.impl; package com.gic.haoban.manage.service.service.out.impl;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.clerk.api.dto.ClerkDTO; import com.gic.clerk.api.dto.ClerkDTO;
...@@ -23,14 +22,11 @@ import com.gic.haoban.manage.api.service.AuditApiService; ...@@ -23,14 +22,11 @@ import com.gic.haoban.manage.api.service.AuditApiService;
import com.gic.haoban.manage.api.service.StaffClerkRelationApiService; import com.gic.haoban.manage.api.service.StaffClerkRelationApiService;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper; import com.gic.haoban.manage.service.dao.mapper.TabHaobanStaffClerkRelationMapper;
import com.gic.haoban.manage.service.entity.*; import com.gic.haoban.manage.service.entity.*;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.service.*; import com.gic.haoban.manage.service.service.*;
import com.gic.wechat.api.dto.qywx.QywxExternalcontactDTO; import com.gic.wechat.api.dto.qywx.QywxExternalcontactDTO;
import com.gic.wechat.api.service.qywx.QywxUserApiService; import com.gic.wechat.api.service.qywx.QywxUserApiService;
import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.ibatis.annotations.Param;
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;
...@@ -284,11 +280,12 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -284,11 +280,12 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
TabHaobanStaffClerkRelation oldStaffClerkRelation = tabHaobanStaffClerkRelationMapper.selectByPrimaryKey(staffClerkRelation.getStaffClerkRelationId()); TabHaobanStaffClerkRelation oldStaffClerkRelation = tabHaobanStaffClerkRelationMapper.selectByPrimaryKey(staffClerkRelation.getStaffClerkRelationId());
tabHaobanStaffClerkRelationMapper.delByPrimaryKey(staffClerkRelation.getStaffClerkRelationId()); tabHaobanStaffClerkRelationMapper.delByPrimaryKey(staffClerkRelation.getStaffClerkRelationId());
staffClerkBindLogService.pushToMq(oldStaffClerkRelation.getStaffId(),optStaffId, BindTypeEnum.UNBIND.getVal(),chanelCode,staffClerkRelation.getStaffClerkRelationId()); staffClerkBindLogService.pushToMq(oldStaffClerkRelation.getStaffId(),optStaffId, BindTypeEnum.UNBIND.getVal(),chanelCode,staffClerkRelation.getStaffClerkRelationId());
clerkMainStoreRelatedService.delMainStore(oldStaffClerkRelation.getStaffId(), oldStaffClerkRelation.getStoreId(), oldStaffClerkRelation.getWxEnterpriseId());
} }
String relationId = staffClerkRelatinService.insert(staffClerkRelation); String relationId = staffClerkRelatinService.insert(staffClerkRelation);
staffClerkBindLogService.pushToMq(staffClerkRelation.getStaffId(),optStaffId, BindTypeEnum.BIND.getVal(),chanelCode,relationId); staffClerkBindLogService.pushToMq(staffClerkRelation.getStaffId(),optStaffId, BindTypeEnum.BIND.getVal(),chanelCode,relationId);
//设置主门店 //设置主门店
setMainStore(staffClerkRelation); clerkMainStoreRelatedService.getMainStoreByStaffId(staffClerkRelation.getStaffId(), staffClerkRelation.getWxEnterpriseId());
} }
@Override @Override
public void delByClerkId(String clerkId) { public void delByClerkId(String clerkId) {
...@@ -389,14 +386,16 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe ...@@ -389,14 +386,16 @@ public class StaffClerkRelationApiServiceImpl implements StaffClerkRelationApiSe
} }
String staffId = staffClerkRelation.getStaffId(); String staffId = staffClerkRelation.getStaffId();
String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId(); String wxEnterpriseId = staffClerkRelation.getWxEnterpriseId();
TabHaobanClerkMainStoreRelated r = clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId);
r.setStatusFlag(0);
clerkMainStoreRelatedService.update(r);
externalClerkRelatedService.delByClerkIdAndStaffId(staffClerkRelation.getClerkId(), staffId); externalClerkRelatedService.delByClerkIdAndStaffId(staffClerkRelation.getClerkId(), staffId);
List<StaffClerkRelationDTO> list = staffClerkRelatinService.lisByStaffId(wxEnterpriseId, staffId); //删除主门店
if(list != null && list.size() >= 1){ clerkMainStoreRelatedService.delMainStore(staffId, staffClerkRelation.getStoreId(), wxEnterpriseId);
clerkMainStoreRelatedService.setMainStore(staffId, list.get(list.size()-1).getStoreId(), wxEnterpriseId); // TabHaobanClerkMainStoreRelated r = clerkMainStoreRelatedService.selectByWxEnterpriseIdAndStoreId(staffId, wxEnterpriseId);
} // r.setStatusFlag(0);
// clerkMainStoreRelatedService.update(r);
// List<StaffClerkRelationDTO> list = staffClerkRelatinService.lisByStaffId(wxEnterpriseId, staffId);
// if(list != null && list.size() >= 1){
// clerkMainStoreRelatedService.setMainStore(staffId, list.get(list.size()-1).getStoreId(), wxEnterpriseId);
// }
} }
@Override @Override
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment