Commit 6e4b6b49 by 陶光胜

Merge branch 'developer' into 'master'

Developer

See merge request !2
parents 51f1d73b 05fbae53
package com.gic.enterprise.constant;
/**
* 微盟商城店铺配置类型
* @ClassName: WmStoreConfigTypeEnum

* @Description: 

* @author guojuxing

* @date 2019/11/25 2:42 PM

*/
public enum WmStoreConfigTypeEnum {
MEMBER_CARD_CONFIG(1, "会员卡配置"),
COUPON_CONFIG(2, "卡券配置"),
ORDER_CONFIG(3, "订单配置"),
INTEGRAL_CONFIG(4, "积分配置"),
GOODS_CONFIG(5, "商品配置"),
APPLET_CONFIG(6, "小程序配置");
private int code;
private String message;
/**
* 是否是枚举内的code值
* @param code
* @return
*/
public static boolean isRightCode(Integer code) {
if (code == null) {
return false;
}
for (WmStoreConfigTypeEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return true;
}
}
return false;
}
public static String getMessageByCode(Integer code) {
if (isRightCode(code)) {
for (WmStoreConfigTypeEnum typeEnum : values()) {
if (code.intValue() == typeEnum.getCode()) {
return typeEnum.getMessage();
}
}
}
return "--";
}
private WmStoreConfigTypeEnum(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
}
......@@ -5,19 +5,19 @@ import java.util.Date;
public class UserMessageDTO implements Serializable {
private Integer messageId;
private String classifyName;
private String classify;
private String title;
private String content;
private Date createTime;
private Integer status;
private Integer sign;
public String getClassifyName() {
return classifyName;
public String getClassify() {
return classify;
}
public void setClassifyName(String classifyName) {
this.classifyName = classifyName;
public void setClassify(String classify) {
this.classify = classify;
}
public String getTitle() {
......
package com.gic.enterprise.dto;
import java.io.Serializable;
import java.util.Date;
/**
* 微盟商城店铺-积分配置
* @ClassName: WmOrderConfigDTO

* @Description: 

* @author guojuxing

* @date 2020/4/14 4:08 PM

*/
public class WmIntegralConfigDTO implements Serializable{
private static final long serialVersionUID = -8965484222353430286L;
/**
*
*/
private Integer enterpriseId;
/**
* 微盟主账号(平台唯一),用于关联配置
*/
private String wmMainAccount;
/**
* GIC计算本商城订单积分 1:开启 0:关闭
* 开启后订单积分计算统一由GIC计算,关闭则由ERP计算
*/
private Integer gicCalculateMallOrderIntegral;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getEnterpriseId() {
return enterpriseId;
}
public WmIntegralConfigDTO setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public String getWmMainAccount() {
return wmMainAccount;
}
public WmIntegralConfigDTO setWmMainAccount(String wmMainAccount) {
this.wmMainAccount = wmMainAccount;
return this;
}
public Integer getGicCalculateMallOrderIntegral() {
return gicCalculateMallOrderIntegral;
}
public WmIntegralConfigDTO setGicCalculateMallOrderIntegral(Integer gicCalculateMallOrderIntegral) {
this.gicCalculateMallOrderIntegral = gicCalculateMallOrderIntegral;
return this;
}
public Date getCreateTime() {
return createTime;
}
public WmIntegralConfigDTO setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public WmIntegralConfigDTO setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
}
package com.gic.enterprise.dto;
import java.io.Serializable;
import java.util.Date;
/**
* 微盟商城店铺-订单配置
* @ClassName: WmOrderConfigDTO

* @Description: 

* @author guojuxing

* @date 2020/4/14 4:08 PM

*/
public class WmOrderConfigDTO implements Serializable{
private static final long serialVersionUID = -7720153967192439149L;
/**
*
*/
private Integer orderConfigId;
/**
*
*/
private Integer enterpriseId;
/**
* 微盟主账号(平台唯一),用于关联配置
*/
private String wmMainAccount;
/**
* 微盟订单是否进入了线下订单系统(例如ERP) 1:是 0:不是
*/
private Integer wmOrderToOffline;
/**
* 在线下订单系统是否可以区分出微盟订单 1:是 0:否
*/
private Integer offlineDifferentiateWm;
/**
* 订单获取方案 1:从微盟获取订单 2:从ERP获取订单
*/
private Integer orderFromMode;
/**
* 1:有效
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getOrderConfigId() {
return orderConfigId;
}
public WmOrderConfigDTO setOrderConfigId(Integer orderConfigId) {
this.orderConfigId = orderConfigId;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public WmOrderConfigDTO setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public String getWmMainAccount() {
return wmMainAccount;
}
public WmOrderConfigDTO setWmMainAccount(String wmMainAccount) {
this.wmMainAccount = wmMainAccount;
return this;
}
public Integer getWmOrderToOffline() {
return wmOrderToOffline;
}
public WmOrderConfigDTO setWmOrderToOffline(Integer wmOrderToOffline) {
this.wmOrderToOffline = wmOrderToOffline;
return this;
}
public Integer getOfflineDifferentiateWm() {
return offlineDifferentiateWm;
}
public WmOrderConfigDTO setOfflineDifferentiateWm(Integer offlineDifferentiateWm) {
this.offlineDifferentiateWm = offlineDifferentiateWm;
return this;
}
public Integer getOrderFromMode() {
return orderFromMode;
}
public WmOrderConfigDTO setOrderFromMode(Integer orderFromMode) {
this.orderFromMode = orderFromMode;
return this;
}
public Integer getStatus() {
return status;
}
public WmOrderConfigDTO setStatus(Integer status) {
this.status = status;
return this;
}
public Date getCreateTime() {
return createTime;
}
public WmOrderConfigDTO setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public WmOrderConfigDTO setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
}
package com.gic.enterprise.dto.data;
import java.io.Serializable;
import java.util.Date;
/**
* 会员消费配置
* @ClassName: DataMemberConsumeConfigDTO

* @Description: 

* @author guojuxing

* @date 2020/4/16 3:26 PM

*/
public class DataMemberConsumeConfigDTO implements Serializable{
private static final long serialVersionUID = -8285427103409771318L;
/**
*
*/
private Integer memberConsumeConfigId;
/**
*
*/
private Integer enterpriseId;
/**
* 会员消费统计粒度 1:会员 + 渠道 + 线上店铺/线下门店品牌 (按订单统计) 2:会员 + 渠道 + 线上店铺/线下门店品牌 + 商品品牌 (按订单项统计)
*/
private Integer memberConsumeCount;
/**
* 最高单笔配置 1:最高ERP单笔应付』 2:『最高单笔销售应付』 3:『最高有效单笔应付』 4:『最高成交单笔应付』
*/
private Integer memberConsumeMax;
/**
* 消费次数 1:消费单次数』2:『有效消费次数』
*/
private Integer memberConsumeTimes;
/**
* 1:有效
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getMemberConsumeConfigId() {
return memberConsumeConfigId;
}
public DataMemberConsumeConfigDTO setMemberConsumeConfigId(Integer memberConsumeConfigId) {
this.memberConsumeConfigId = memberConsumeConfigId;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public DataMemberConsumeConfigDTO setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public Integer getMemberConsumeCount() {
return memberConsumeCount;
}
public DataMemberConsumeConfigDTO setMemberConsumeCount(Integer memberConsumeCount) {
this.memberConsumeCount = memberConsumeCount;
return this;
}
public Integer getMemberConsumeMax() {
return memberConsumeMax;
}
public DataMemberConsumeConfigDTO setMemberConsumeMax(Integer memberConsumeMax) {
this.memberConsumeMax = memberConsumeMax;
return this;
}
public Integer getMemberConsumeTimes() {
return memberConsumeTimes;
}
public DataMemberConsumeConfigDTO setMemberConsumeTimes(Integer memberConsumeTimes) {
this.memberConsumeTimes = memberConsumeTimes;
return this;
}
public Integer getStatus() {
return status;
}
public DataMemberConsumeConfigDTO setStatus(Integer status) {
this.status = status;
return this;
}
public Date getCreateTime() {
return createTime;
}
public DataMemberConsumeConfigDTO setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public DataMemberConsumeConfigDTO setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
}
package com.gic.enterprise.dto.wm;
import java.io.Serializable;
import java.util.Date;
/**
* 微盟店铺配置
* @ClassName: WmStoreConfigDTO

* @Description: 

* @author guojuxing

* @date 2020/4/15 10:16 AM

*/
public class WmStoreConfigDTO implements Serializable{
private static final long serialVersionUID = 6295403527873697597L;
/**
*
*/
private Integer storeConfigId;
/**
*
*/
private Integer enterpriseId;
/**
* 微盟主账号(平台唯一),用于关联配置
*/
private String wmMainAccount;
/**
* 店铺配置类型 1:会员卡配置 2:卡券配置 3:订单配置 4:积分配置 5:商品同步记录 6:小程序配置
*/
private Integer storeConfigType;
/**
* 店铺配置类型json字符串
*/
private String storeConfigJson;
/**
* 1:有效
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getStoreConfigId() {
return storeConfigId;
}
public WmStoreConfigDTO setStoreConfigId(Integer storeConfigId) {
this.storeConfigId = storeConfigId;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public WmStoreConfigDTO setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public String getWmMainAccount() {
return wmMainAccount;
}
public WmStoreConfigDTO setWmMainAccount(String wmMainAccount) {
this.wmMainAccount = wmMainAccount;
return this;
}
public Integer getStoreConfigType() {
return storeConfigType;
}
public WmStoreConfigDTO setStoreConfigType(Integer storeConfigType) {
this.storeConfigType = storeConfigType;
return this;
}
public String getStoreConfigJson() {
return storeConfigJson;
}
public WmStoreConfigDTO setStoreConfigJson(String storeConfigJson) {
this.storeConfigJson = storeConfigJson;
return this;
}
public Integer getStatus() {
return status;
}
public WmStoreConfigDTO setStatus(Integer status) {
this.status = status;
return this;
}
public Date getCreateTime() {
return createTime;
}
public WmStoreConfigDTO setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public WmStoreConfigDTO setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
}
......@@ -15,6 +15,10 @@ public interface CustomStoreApiService {
ServiceResponse<Integer> openCustomStore(Integer enterpriseId, String appid, Integer customStoreId);
ServiceResponse<Integer> closeCustomStore(Integer enterpriseId, String appid);
ServiceResponse<Integer> closeCustomStore(Integer customStoreId);
ServiceResponse<CustomStoreDTO> getCustomStore(Integer enterpriseId, String appid);
ServiceResponse<Void> customSettingHasCommpleted(Integer enterpriseId);
......
package com.gic.enterprise.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.enterprise.dto.data.DataMemberConsumeConfigDTO;
public interface DataConfigApiService {
/**
* 会员消费配置
* @Title: configMemberConsumeConfig

* @Description:

* @author guojuxing
* @param dto

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>


*/
ServiceResponse<Integer> configMemberConsume(DataMemberConsumeConfigDTO dto);
ServiceResponse<DataMemberConsumeConfigDTO> getMemberConsumeConfigByEnterpriseId(Integer enterpriseId);
}
......@@ -70,6 +70,8 @@ public interface PushMessageApiService {
*/
ServiceResponse<PushMessageDTO> getPushMessageById(Integer messageId);
ServiceResponse<UserMessageDTO> getUserMessageDetail(Integer messageId);
/** @Description: 删除通知消息
* @author taogs
* @Date 16:54 2019/11/27
......@@ -154,5 +156,5 @@ public interface PushMessageApiService {
* @Param
* @return
*/
ServiceResponse<Integer> readMessage(Integer messageId, Integer userId);
ServiceResponse<Integer> readMessage(Integer messageId);
}
......@@ -2,7 +2,9 @@ package com.gic.enterprise.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.enterprise.dto.WmMemberCardConfigDTO;
import com.gic.enterprise.dto.WmOrderConfigDTO;
import com.gic.enterprise.dto.WmStoreDTO;
import com.gic.enterprise.dto.wm.WmStoreConfigDTO;
import java.util.List;
......@@ -50,22 +52,23 @@ public interface WmStoreApiService {
ServiceResponse<WmStoreDTO> getWmStoreByWmMallStoreId(Integer wmMallStoreId);
/**
* 新增会员卡配置
* @Title: saveOrUpdateWmMemberCardConfig

* 店铺配置
* @Title: saveOrUpdateWmStoreConfig

* @Description:

* @author guojuxing
* @param dto

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>


*/
ServiceResponse<Integer> saveOrUpdateWmMemberCardConfig(WmMemberCardConfigDTO dto);
ServiceResponse<Integer> saveOrUpdateWmStoreConfig(WmStoreConfigDTO dto);
/**
* 根据微盟主账号查询会员卡配置
* @Title: getWmMemberCardConfigByWmMainAccount

* 根据微盟主账号查询配置
* @Title: getWmStoreConfigByWmMainAccount

* @Description:

* @author guojuxing
* @param wmMainAccount

* @return com.gic.api.base.commons.ServiceResponse<com.gic.enterprise.dto.WmMemberCardConfigDTO>

* @param wmStoreConfigType 店铺配置类型 1:会员卡配置 2:卡券配置 3:订单配置 4:积分配置 5:商品同步记录 6:小程序配置 WmStoreConfigTypeEnum枚举类
* @return com.gic.api.base.commons.ServiceResponse<com.gic.enterprise.dto.wm.WmStoreConfigDTO>


*/
ServiceResponse<WmMemberCardConfigDTO> getWmMemberCardConfigByWmMainAccount(String wmMainAccount);
ServiceResponse<WmStoreConfigDTO> getWmStoreConfigByWmMainAccount(String wmMainAccount, Integer wmStoreConfigType);
}
package com.gic.enterprise.dao.mapper;
import com.gic.enterprise.entity.TabWmMemberCardConfig;
import com.gic.enterprise.entity.TabDataMemberConsumeConfig;
public interface TabWmMemberCardConfigMapper {
public interface TabDataMemberConsumeConfigMapper {
/**
* 根据主键删除
*
* @param memberCardConfigId 主键
* @param memberConsumeConfigId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer memberCardConfigId);
int deleteByPrimaryKey(Integer memberConsumeConfigId);
/**
* 插入一条记录
......@@ -17,7 +17,7 @@ public interface TabWmMemberCardConfigMapper {
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabWmMemberCardConfig record);
int insert(TabDataMemberConsumeConfig record);
/**
* 动态插入一条记录
......@@ -25,15 +25,15 @@ public interface TabWmMemberCardConfigMapper {
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabWmMemberCardConfig record);
int insertSelective(TabDataMemberConsumeConfig record);
/**
* 根据主键查询
*
* @param memberCardConfigId 主键
* @param memberConsumeConfigId 主键
* @return 实体对象
*/
TabWmMemberCardConfig selectByPrimaryKey(Integer memberCardConfigId);
TabDataMemberConsumeConfig selectByPrimaryKey(Integer memberConsumeConfigId);
/**
* 根据主键动态更新记录
......@@ -41,7 +41,7 @@ public interface TabWmMemberCardConfigMapper {
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabWmMemberCardConfig record);
int updateByPrimaryKeySelective(TabDataMemberConsumeConfig record);
/**
* 根据主键更新记录
......@@ -49,7 +49,7 @@ public interface TabWmMemberCardConfigMapper {
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabWmMemberCardConfig record);
int updateByPrimaryKey(TabDataMemberConsumeConfig record);
TabWmMemberCardConfig getByWmMainAccount(String wmMainAccount);
TabDataMemberConsumeConfig getByEnterpriseId(Integer enterpriseId);
}
\ No newline at end of file
......@@ -61,6 +61,5 @@ public interface TabPushUserMessageMapper {
int readAll(@Param("userId") Integer userId);
int readMessage(@Param("messageId") Integer messageId,
@Param("userId") Integer userId);
int readMessage(@Param("messageId") Integer messageId);
}
\ No newline at end of file
package com.gic.enterprise.dao.mapper;
import com.gic.enterprise.entity.TabWmStoreConfig;
import org.apache.ibatis.annotations.Param;
public interface TabWmStoreConfigMapper {
/**
* 根据主键删除
*
* @param storeConfigId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer storeConfigId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabWmStoreConfig record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabWmStoreConfig record);
/**
* 根据主键查询
*
* @param storeConfigId 主键
* @return 实体对象
*/
TabWmStoreConfig selectByPrimaryKey(Integer storeConfigId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabWmStoreConfig record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabWmStoreConfig record);
TabWmStoreConfig getByWmMainAccount(@Param("wmMainAccount") String wmMainAccount, @Param("storeConfigType") Integer storeConfigType);
}
\ No newline at end of file
package com.gic.enterprise.entity;
import java.util.Date;
/**
* tab_data_member_consume_config
*/
public class TabDataMemberConsumeConfig {
/**
*
*/
private Integer memberConsumeConfigId;
/**
*
*/
private Integer enterpriseId;
/**
* 会员消费统计粒度 1:会员 + 渠道 + 线上店铺/线下门店品牌 (按订单统计) 2:会员 + 渠道 + 线上店铺/线下门店品牌 + 商品品牌 (按订单项统计)
*/
private Integer memberConsumeCount;
/**
* 最高单笔配置 1:最高ERP单笔应付』 2:『最高单笔销售应付』 3:『最高有效单笔应付』 4:『最高成交单笔应付』
*/
private Integer memberConsumeMax;
/**
* 消费次数 1:消费单次数』2:『有效消费次数』
*/
private Integer memberConsumeTimes;
/**
* 1:有效
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getMemberConsumeConfigId() {
return memberConsumeConfigId;
}
public TabDataMemberConsumeConfig setMemberConsumeConfigId(Integer memberConsumeConfigId) {
this.memberConsumeConfigId = memberConsumeConfigId;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public TabDataMemberConsumeConfig setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public Integer getMemberConsumeCount() {
return memberConsumeCount;
}
public TabDataMemberConsumeConfig setMemberConsumeCount(Integer memberConsumeCount) {
this.memberConsumeCount = memberConsumeCount;
return this;
}
public Integer getMemberConsumeMax() {
return memberConsumeMax;
}
public TabDataMemberConsumeConfig setMemberConsumeMax(Integer memberConsumeMax) {
this.memberConsumeMax = memberConsumeMax;
return this;
}
public Integer getMemberConsumeTimes() {
return memberConsumeTimes;
}
public TabDataMemberConsumeConfig setMemberConsumeTimes(Integer memberConsumeTimes) {
this.memberConsumeTimes = memberConsumeTimes;
return this;
}
public Integer getStatus() {
return status;
}
public TabDataMemberConsumeConfig setStatus(Integer status) {
this.status = status;
return this;
}
public Date getCreateTime() {
return createTime;
}
public TabDataMemberConsumeConfig setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public TabDataMemberConsumeConfig setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
}
\ No newline at end of file
package com.gic.enterprise.entity;
import java.util.Date;
/**
* tab_wm_order_config
*/
public class TabWmOrderConfig {
/**
*
*/
private Integer orderConfigId;
/**
*
*/
private Integer enterpriseId;
/**
* 微盟主账号(平台唯一),用于关联配置
*/
private String wmMainAccount;
/**
* 微盟订单是否进入了线下订单系统(例如ERP) 1:是 0:不是
*/
private Integer wmOrderToOffline;
/**
* 在线下订单系统是否可以区分出微盟订单 1:是 0:否
*/
private Integer offlineDifferentiateWm;
/**
* 订单获取方案 1:从微盟获取订单 2:从ERP获取订单
*/
private Integer orderFromMode;
/**
* 1:有效
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getOrderConfigId() {
return orderConfigId;
}
public TabWmOrderConfig setOrderConfigId(Integer orderConfigId) {
this.orderConfigId = orderConfigId;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public TabWmOrderConfig setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public String getWmMainAccount() {
return wmMainAccount;
}
public TabWmOrderConfig setWmMainAccount(String wmMainAccount) {
this.wmMainAccount = wmMainAccount;
return this;
}
public Integer getWmOrderToOffline() {
return wmOrderToOffline;
}
public TabWmOrderConfig setWmOrderToOffline(Integer wmOrderToOffline) {
this.wmOrderToOffline = wmOrderToOffline;
return this;
}
public Integer getOfflineDifferentiateWm() {
return offlineDifferentiateWm;
}
public TabWmOrderConfig setOfflineDifferentiateWm(Integer offlineDifferentiateWm) {
this.offlineDifferentiateWm = offlineDifferentiateWm;
return this;
}
public Integer getOrderFromMode() {
return orderFromMode;
}
public TabWmOrderConfig setOrderFromMode(Integer orderFromMode) {
this.orderFromMode = orderFromMode;
return this;
}
public Integer getStatus() {
return status;
}
public TabWmOrderConfig setStatus(Integer status) {
this.status = status;
return this;
}
public Date getCreateTime() {
return createTime;
}
public TabWmOrderConfig setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public TabWmOrderConfig setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
}
\ No newline at end of file
package com.gic.enterprise.entity;
import java.util.Date;
/**
* tab_wm_store_config
*/
public class TabWmStoreConfig {
/**
*
*/
private Integer storeConfigId;
/**
*
*/
private Integer enterpriseId;
/**
* 微盟主账号(平台唯一),用于关联配置
*/
private String wmMainAccount;
/**
* 店铺配置类型 1:会员卡配置 2:卡券配置 3:订单配置 4:积分配置 5:商品同步记录 6:小程序配置
*/
private Integer storeConfigType;
/**
* 店铺配置类型json字符串
*/
private String storeConfigJson;
/**
* 1:有效
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getStoreConfigId() {
return storeConfigId;
}
public TabWmStoreConfig setStoreConfigId(Integer storeConfigId) {
this.storeConfigId = storeConfigId;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public TabWmStoreConfig setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public String getWmMainAccount() {
return wmMainAccount;
}
public TabWmStoreConfig setWmMainAccount(String wmMainAccount) {
this.wmMainAccount = wmMainAccount;
return this;
}
public Integer getStoreConfigType() {
return storeConfigType;
}
public TabWmStoreConfig setStoreConfigType(Integer storeConfigType) {
this.storeConfigType = storeConfigType;
return this;
}
public String getStoreConfigJson() {
return storeConfigJson;
}
public TabWmStoreConfig setStoreConfigJson(String storeConfigJson) {
this.storeConfigJson = storeConfigJson;
return this;
}
public Integer getStatus() {
return status;
}
public TabWmStoreConfig setStatus(Integer status) {
this.status = status;
return this;
}
public Date getCreateTime() {
return createTime;
}
public TabWmStoreConfig setCreateTime(Date createTime) {
this.createTime = createTime;
return this;
}
public Date getUpdateTime() {
return updateTime;
}
public TabWmStoreConfig setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
return this;
}
}
\ No newline at end of file
......@@ -16,5 +16,7 @@ public interface CustomStoreService {
int openCustomStore(Integer customStoreId);
int closeCustomStore(Integer customStoreId);
TabCustomStore getCustomStore(Integer enterpriseId, String appid);
}
package com.gic.enterprise.service;
import com.gic.enterprise.dto.data.DataMemberConsumeConfigDTO;
import com.gic.enterprise.entity.TabDataMemberConsumeConfig;
public interface DataMemberConsumeConfigService {
/**
* 新增会员消费配置
* @param dto
* @return
*/
Integer saveMemberConsumeConfig(DataMemberConsumeConfigDTO dto);
/**
* 更新配置信息
* @Title: editMemberConsumeConfig

* @Description:

* @author guojuxing
* @param dto

* @return void


*/
void editMemberConsumeConfig(DataMemberConsumeConfigDTO dto);
TabDataMemberConsumeConfig getByEnterpriseId(Integer enterpriseId);
}
package com.gic.enterprise.service;
import com.gic.enterprise.entity.TabPushUserMessage;
public interface PushUserMessageService {
int save(Integer enterpriseId, Integer userId, Integer messageId, String classify, String title, String content);
......@@ -9,5 +11,7 @@ public interface PushUserMessageService {
int readAll(Integer userId);
int readMessage(Integer messageId, Integer userId);
int readMessage(Integer messageId);
TabPushUserMessage getById(Integer id);
}
package com.gic.enterprise.service;
import com.gic.enterprise.dto.WmMemberCardConfigDTO;
import com.gic.enterprise.entity.TabWmMemberCardConfig;
import com.gic.enterprise.dto.wm.WmStoreConfigDTO;
import com.gic.enterprise.entity.TabWmStoreConfig;
public interface WmMemberCardConfigService {
public interface WmStoreConfigService {
/**
* 新增会员卡配置
* @Title: saveWmMemberCardConfig

* 新增店铺配置
* @Title: saveWmStoreConfig

* @Description:

* @author guojuxing
* @param dto

* @return java.lang.Integer


*/
Integer saveWmMemberCardConfig(WmMemberCardConfigDTO dto);
Integer saveWmStoreConfig(WmStoreConfigDTO dto);
void updateWmMemberCardConfig(WmMemberCardConfigDTO dto);
void editWmStoreConfig(WmStoreConfigDTO dto);
/**
* 根据微盟主账号查询记录,主账号平台唯一
* 根据微盟主账号查询配置
* @Title: getByWmMainAccount

* @Description:

* @author guojuxing
* @param wmMainAccount

* @return com.gic.enterprise.entity.TabWmMemberCardConfig

* @param wmMainAccount
* @param storeConfigType
店铺配置类型 1:会员卡配置 2:卡券配置 3:订单配置 4:积分配置 5:商品同步记录 6:小程序配置 WmStoreConfigTypeEnum枚举类
* @return com.gic.enterprise.entity.TabWmStoreConfig


*/
TabWmMemberCardConfig getByWmMainAccount(String wmMainAccount);
TabWmStoreConfig getByWmMainAccount(String wmMainAccount, Integer storeConfigType);
}
......@@ -58,6 +58,15 @@ public class CustomStoreServiceImpl implements CustomStoreService {
}
@Override
public int closeCustomStore(Integer customStoreId) {
TabCustomStore store = new TabCustomStore();
store.setCustomStoreId(customStoreId);
store.setStatus(2);
return this.tabCustomStoreMapper.updateByPrimaryKeySelective(store);
}
@Override
public TabCustomStore getCustomStore(Integer enterpriseId, String appid) {
List<TabCustomStore> list = this.tabCustomStoreMapper.getCustomStore(enterpriseId, appid);
if(CollectionUtils.isNotEmpty(list)){
......
......@@ -39,6 +39,6 @@ public class CustomThemeServiceImpl implements CustomThemeService {
if(CollectionUtils.isNotEmpty(list)){
return list.get(0).getTheme();
}
return 0;
return 1;
}
}
package com.gic.enterprise.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.dao.mapper.TabDataMemberConsumeConfigMapper;
import com.gic.enterprise.dto.data.DataMemberConsumeConfigDTO;
import com.gic.enterprise.entity.TabDataMemberConsumeConfig;
import com.gic.enterprise.service.DataMemberConsumeConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
@Service("dataMemberConsumeConfigService")
public class DataMemberConsumeConfigServiceImpl implements DataMemberConsumeConfigService{
@Autowired
private TabDataMemberConsumeConfigMapper tabDataMemberConsumeConfigMapper;
@Override
public Integer saveMemberConsumeConfig(DataMemberConsumeConfigDTO dto) {
Date now = new Date();
dto.setCreateTime(now);
dto.setUpdateTime(now);
dto.setStatus(1);
TabDataMemberConsumeConfig record = EntityUtil.changeEntityNew(TabDataMemberConsumeConfig.class, dto);
tabDataMemberConsumeConfigMapper.insertSelective(record);
return record.getMemberConsumeConfigId();
}
@Override
public void editMemberConsumeConfig(DataMemberConsumeConfigDTO dto) {
dto.setUpdateTime(new Date());
TabDataMemberConsumeConfig record = EntityUtil.changeEntityNew(TabDataMemberConsumeConfig.class, dto);
tabDataMemberConsumeConfigMapper.updateByPrimaryKeySelective(record);
}
@Override
public TabDataMemberConsumeConfig getByEnterpriseId(Integer enterpriseId) {
return tabDataMemberConsumeConfigMapper.getByEnterpriseId(enterpriseId);
}
}
......@@ -51,6 +51,6 @@ public class HelpCenterServiceImpl implements HelpCenterService {
@Override
public Integer countHelpCenterByIsShow() {
return null;
return listHelpCenter().size();
}
}
......@@ -46,7 +46,12 @@ public class PushUserMessageServiceImpl implements PushUserMessageService {
}
@Override
public int readMessage(Integer messageId, Integer userId) {
return this.tabPushUserMessageMapper.readMessage(messageId, userId);
public int readMessage(Integer messageId) {
return this.tabPushUserMessageMapper.readMessage(messageId);
}
@Override
public TabPushUserMessage getById(Integer id) {
return this.tabPushUserMessageMapper.selectByPrimaryKey(id);
}
}
package com.gic.enterprise.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.dao.mapper.TabWmMemberCardConfigMapper;
import com.gic.enterprise.dto.WmMemberCardConfigDTO;
import com.gic.enterprise.entity.TabWmMemberCardConfig;
import com.gic.enterprise.service.WmMemberCardConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
@Service("wmMemberCardConfigService")
public class WmMemberCardConfigServiceImpl implements WmMemberCardConfigService{
@Autowired
private TabWmMemberCardConfigMapper tabWmMemberCardConfigMapper;
@Override
public Integer saveWmMemberCardConfig(WmMemberCardConfigDTO dto) {
Date now = new Date();
dto.setUpdateTime(now);
dto.setCreateTime(now);
dto.setStatus(1);
TabWmMemberCardConfig record = EntityUtil.changeEntityNew(TabWmMemberCardConfig.class, dto);
tabWmMemberCardConfigMapper.insert(record);
return record.getMemberCardConfigId();
}
@Override
public void updateWmMemberCardConfig(WmMemberCardConfigDTO dto) {
dto.setUpdateTime(new Date());
TabWmMemberCardConfig record = EntityUtil.changeEntityNew(TabWmMemberCardConfig.class, dto);
tabWmMemberCardConfigMapper.updateByPrimaryKeySelective(record);
}
@Override
public TabWmMemberCardConfig getByWmMainAccount(String wmMainAccount) {
return tabWmMemberCardConfigMapper.getByWmMainAccount(wmMainAccount);
}
}
package com.gic.enterprise.service.impl;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.dao.mapper.TabWmStoreConfigMapper;
import com.gic.enterprise.dto.wm.WmStoreConfigDTO;
import com.gic.enterprise.entity.TabWmStoreConfig;
import com.gic.enterprise.service.WmStoreConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
@Service("wmStoreConfigService")
public class WmStoreConfigServiceImpl implements WmStoreConfigService{
@Autowired
private TabWmStoreConfigMapper tabWmStoreConfigMapper;
@Override
public Integer saveWmStoreConfig(WmStoreConfigDTO dto) {
Date now = new Date();
dto.setUpdateTime(now);
dto.setCreateTime(now);
dto.setStatus(1);
TabWmStoreConfig record = EntityUtil.changeEntityNew(TabWmStoreConfig.class, dto);
tabWmStoreConfigMapper.insert(record);
return record.getStoreConfigId();
}
@Override
public void editWmStoreConfig(WmStoreConfigDTO dto) {
dto.setUpdateTime(new Date());
TabWmStoreConfig record = EntityUtil.changeEntityNew(TabWmStoreConfig.class, dto);
tabWmStoreConfigMapper.updateByPrimaryKeySelective(record);
}
@Override
public TabWmStoreConfig getByWmMainAccount(String wmMainAccount, Integer storeConfigType) {
return tabWmStoreConfigMapper.getByWmMainAccount(wmMainAccount, storeConfigType);
}
}
......@@ -84,12 +84,6 @@ public class AppletDecorationConfigApiServiceImpl implements AppletDecorationCon
if (!mainCardResult.isSuccess()) {
return ServiceResponse.failure(mainCardResult.getCode(), mainCardResult.getMessage());
}
//默认选中和主卡关联的店铺,不可编辑
ServiceResponse<ShopDTO> shopResult = getMainCardStore(appId, enterpriseId);
if (!shopResult.isSuccess()) {
return ServiceResponse.failure(shopResult.getCode(), shopResult.getMessage());
}
ShopDTO shopDTO = shopResult.getResult();
Long mainCardId = mainCardResult.getResult();
AppletDecorationConfigDTO result = new AppletDecorationConfigDTO();
......@@ -98,8 +92,14 @@ public class AppletDecorationConfigApiServiceImpl implements AppletDecorationCon
dataAssetArea.setOrder(mainCardId.toString());
dataAssetArea.setCoupon(mainCardId.toString());
dataAssetArea.setIntegral(mainCardId.toString());
dataAssetArea.setMallOrder(shopDTO.getId().toString());
dataAssetArea.setMallOrderName(shopDTO.getName());
//默认选中和主卡关联的店铺,不可编辑
ServiceResponse<ShopDTO> shopResult = getMainCardStore(appId, enterpriseId);
if (shopResult.isSuccess()) {
ShopDTO shopDTO = shopResult.getResult();
dataAssetArea.setMallOrder(shopDTO.getId().toString());
dataAssetArea.setMallOrderName(shopDTO.getName());
}
//会员中心页面卡范围
result.setMemberCardArea(mainCardId.toString());
//数据资产对象
......@@ -311,12 +311,11 @@ public class AppletDecorationConfigApiServiceImpl implements AppletDecorationCon
//默认选中和主卡关联的店铺,不可编辑 //实时调用
ServiceResponse<ShopDTO> shopResult = getMainCardStore(appId, enterpriseId);
if (!shopResult.isSuccess()) {
return ServiceResponse.failure(shopResult.getCode(), shopResult.getMessage());
if (shopResult.isSuccess()) {
ShopDTO shopDTO = shopResult.getResult();
appletDataAssetArea.setMallOrder(shopDTO.getId().toString());
appletDataAssetArea.setMallOrderName(shopDTO.getName());
}
ShopDTO shopDTO = shopResult.getResult();
appletDataAssetArea.setMallOrder(shopDTO.getId().toString());
appletDataAssetArea.setMallOrderName(shopDTO.getName());
//数据资产设置
dto.setDataAssetArea(JSON.toJSONString(appletDataAssetArea));
......
......@@ -65,6 +65,18 @@ public class CustomStoreApiServiceImpl implements CustomStoreApiService {
}
@Override
public ServiceResponse<Integer> closeCustomStore(Integer enterpriseId, String appid) {
int i = this.customStoreService.closeCustomStore(enterpriseId, appid);
return ServiceResponse.success(i);
}
@Override
public ServiceResponse<Integer> closeCustomStore(Integer customStoreId) {
int i = this.customStoreService.closeCustomStore(customStoreId);
return ServiceResponse.success(i);
}
@Override
public ServiceResponse<CustomStoreDTO> getCustomStore(Integer enterpriseId, String appid) {
TabCustomStore customStore = this.customStoreService.getCustomStore(enterpriseId, appid);
return ServiceResponse.success(EntityUtil.changeEntityByJSON(CustomStoreDTO.class, customStore));
......
package com.gic.enterprise.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.dto.data.DataMemberConsumeConfigDTO;
import com.gic.enterprise.entity.TabDataMemberConsumeConfig;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.DataConfigApiService;
import com.gic.enterprise.service.DataMemberConsumeConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service("dataConfigApiService")
public class DataConfigApiServiceImpl implements DataConfigApiService {
@Autowired
private DataMemberConsumeConfigService dataMemberConsumeConfigService;
@Override
public ServiceResponse<Integer> configMemberConsume(DataMemberConsumeConfigDTO dto) {
if (dto.getEnterpriseId() == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "商户ID不能为空");
}
TabDataMemberConsumeConfig record = dataMemberConsumeConfigService.getByEnterpriseId(dto.getEnterpriseId());
if (record == null) {
//还未配置,新增
return ServiceResponse.success(dataMemberConsumeConfigService.saveMemberConsumeConfig(dto));
}
dto.setMemberConsumeConfigId(record.getMemberConsumeConfigId());
dataMemberConsumeConfigService.editMemberConsumeConfig(dto);
return ServiceResponse.success(record.getMemberConsumeConfigId());
}
@Override
public ServiceResponse<DataMemberConsumeConfigDTO> getMemberConsumeConfigByEnterpriseId(Integer enterpriseId) {
TabDataMemberConsumeConfig record = dataMemberConsumeConfigService.getByEnterpriseId(enterpriseId);
if (record == null) {
//还未配置,新增
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "还未配置会员消费规则");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(DataMemberConsumeConfigDTO.class, record));
}
}
......@@ -96,7 +96,7 @@ public class DownloadReportApiServiceImpl implements DownloadReportApiService {
Integer line = downloadReportService.updateDownloadUrl(downloadReportId, downloadUrl);
TabDownloadReport downloadReport = this.downloadReportService.getById(downloadReportId);
if(downloadReport != null){
String url = config.getHost() + "/damo-system/report-list";
String url = config.getHost() + "damo-system/report-list";
String content = "您的"+ downloadReport.getDataContent() +"已生成,请前往<a href='"+ url +"'>下载中心</a>查看";
this.pushMessageApiService.pushUserMessage(downloadReport.getEnterpriseId(), downloadReport.getApplyUserId(), "下载通知", "下载通知", content);
}
......
......@@ -6,6 +6,7 @@ import com.gic.commons.util.EntityUtil;
import com.gic.commons.util.PageHelperUtils;
import com.gic.enterprise.dto.HelpCenterDTO;
import com.gic.enterprise.entity.TabHelpCenter;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.HelpCenterApiService;
import com.gic.enterprise.service.HelpCenterService;
import com.github.pagehelper.PageHelper;
......@@ -38,6 +39,12 @@ public class HelpCenterApiServiceImpl implements HelpCenterApiService {
tabHelpCenter.setIsShow(0);
}
}
if(tabHelpCenter.getIsShow() == 1){
Integer integer = this.helpCenterService.countHelpCenterByIsShow();
if(integer >=5){
return ServiceResponse.failure(ErrorCode.SYSTEM_ERROR.getCode(), "显示数量超过5个了");
}
}
Integer i = this.helpCenterService.saveHelpCenter(tabHelpCenter);
return ServiceResponse.success(i);
}
......
......@@ -14,6 +14,7 @@ import com.gic.enterprise.dto.PushTypeDTO;
import com.gic.enterprise.dto.UserMessageDTO;
import com.gic.enterprise.entity.TabPushClassify;
import com.gic.enterprise.entity.TabPushMessage;
import com.gic.enterprise.entity.TabPushUserMessage;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.*;
import com.gic.mq.sdk.GicMQClient;
......@@ -201,8 +202,8 @@ public class PushMessageApiServiceImpl implements PushMessageApiService {
}
@Override
public ServiceResponse<Integer> readMessage(Integer messageId, Integer userId) {
int i = this.pushUserMessageService.readMessage(messageId, userId);
public ServiceResponse<Integer> readMessage(Integer messageId) {
int i = this.pushUserMessageService.readMessage(messageId);
if(i > 0){
this.pushMessageService.readCount(messageId);
}
......@@ -225,6 +226,12 @@ public class PushMessageApiServiceImpl implements PushMessageApiService {
}
@Override
public ServiceResponse<UserMessageDTO> getUserMessageDetail(Integer messageId){
TabPushUserMessage message = this.pushUserMessageService.getById(messageId);
return ServiceResponse.success(EntityUtil.changeEntityByJSON(UserMessageDTO.class, message));
}
@Override
public ServiceResponse<Integer> deletePushMessage(Integer messageId) {
int i = this.pushMessageService.delete(messageId);
return ServiceResponse.success(i);
......
......@@ -3,9 +3,6 @@ package com.gic.enterprise.service.outer.impl;
import java.util.List;
import java.util.Optional;
import com.gic.enterprise.dto.WmMemberCardConfigDTO;
import com.gic.enterprise.entity.TabWmMemberCardConfig;
import com.gic.enterprise.service.WmMemberCardConfigService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -13,10 +10,15 @@ import org.springframework.stereotype.Service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.constant.MallModeEnum;
import com.gic.enterprise.constant.WmStoreConfigTypeEnum;
import com.gic.enterprise.dto.WmMemberCardConfigDTO;
import com.gic.enterprise.dto.WmStoreDTO;
import com.gic.enterprise.dto.wm.WmStoreConfigDTO;
import com.gic.enterprise.entity.TabWmStore;
import com.gic.enterprise.entity.TabWmStoreConfig;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.WmStoreApiService;
import com.gic.enterprise.service.WmStoreConfigService;
import com.gic.enterprise.service.WmStoreService;
@Service("wmStoreApiService")
......@@ -24,7 +26,7 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
@Autowired
private WmStoreService wmStoreService;
@Autowired
private WmMemberCardConfigService wmMemberCardConfigService;
private WmStoreConfigService wmStoreConfigService;
@Override
public ServiceResponse<Integer> saveWmStore(WmStoreDTO wmStoreDTO) {
......@@ -58,8 +60,7 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
@Override
public ServiceResponse<List<WmStoreDTO>> listWmStore(Integer enterpriseId) {
List<TabWmStore> list = wmStoreService.listWmStore(enterpriseId);
return ServiceResponse.success(
EntityUtil.changeEntityListNew(WmStoreDTO.class, list));
return ServiceResponse.success(EntityUtil.changeEntityListNew(WmStoreDTO.class, list));
}
@Override
......@@ -71,29 +72,46 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
return ServiceResponse.success(EntityUtil.changeEntityNew(WmStoreDTO.class, record));
}
@Override
public ServiceResponse<Integer> saveOrUpdateWmMemberCardConfig(WmMemberCardConfigDTO dto) {
ServiceResponse validParam = validWmMemberCardConfig(dto);
if (!validParam.isSuccess()) {
return ServiceResponse.failure(validParam.getCode(), validParam.getMessage());
public ServiceResponse<Integer> saveOrUpdateWmStoreConfig(WmStoreConfigDTO dto) {
if (dto.getEnterpriseId() == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "商户ID不能为空");
}
TabWmMemberCardConfig record = wmMemberCardConfigService.getByWmMainAccount(dto.getWmMainAccount());
if (!WmStoreConfigTypeEnum.isRightCode(dto.getStoreConfigType())) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "店铺配置类型值非法");
}
TabWmStore wmStore = wmStoreService.getByWmMainAccount(dto.getWmMainAccount());
if (wmStore == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "微盟主账号错误,查无数据");
}
if (StringUtils.isBlank(dto.getStoreConfigJson())) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "店铺配置信息不能为空");
}
TabWmStoreConfig record = wmStoreConfigService.getByWmMainAccount(dto.getWmMainAccount(),
dto.getStoreConfigType());
if (record == null) {
return ServiceResponse.success(wmMemberCardConfigService.saveWmMemberCardConfig(dto));
//新增
return ServiceResponse.success(wmStoreConfigService.saveWmStoreConfig(dto));
}
//编辑
dto.setMemberCardConfigId(record.getMemberCardConfigId());
wmMemberCardConfigService.updateWmMemberCardConfig(dto);
return ServiceResponse.success(record.getMemberCardConfigId());
dto.setStoreConfigId(record.getStoreConfigId());
wmStoreConfigService.editWmStoreConfig(dto);
return ServiceResponse.success(record.getStoreConfigId());
}
@Override
public ServiceResponse<WmMemberCardConfigDTO> getWmMemberCardConfigByWmMainAccount(String wmMainAccount) {
TabWmMemberCardConfig record = wmMemberCardConfigService.getByWmMainAccount(wmMainAccount);
public ServiceResponse<WmStoreConfigDTO> getWmStoreConfigByWmMainAccount(String wmMainAccount,
Integer wmStoreConfigType) {
TabWmStoreConfig record = wmStoreConfigService.getByWmMainAccount(wmMainAccount, wmStoreConfigType);
if (record == null) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "还未配置");
if (!WmStoreConfigTypeEnum.isRightCode(wmStoreConfigType)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "店铺配置类型值非法");
}
//新增
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(),
WmStoreConfigTypeEnum.getMessageByCode(wmStoreConfigType) + "还未配置");
}
return ServiceResponse.success(EntityUtil.changeEntityNew(WmMemberCardConfigDTO.class, record));
return ServiceResponse.success(EntityUtil.changeEntityNew(WmStoreConfigDTO.class, record));
}
private ServiceResponse validWmMemberCardConfig(WmMemberCardConfigDTO dto) {
......
......@@ -126,6 +126,8 @@
<dubbo:service interface="com.gic.enterprise.service.WmStoreApiService" ref="wmStoreApiService" timeout="6000" />
<dubbo:service interface="com.gic.enterprise.service.DataConfigApiService" ref="dataConfigApiService" timeout="6000" />
<dubbo:reference interface="com.gic.mall.share.api.service.ShopApiService" id="shopApiService" timeout="6000" />
......
......@@ -143,7 +143,7 @@
select
<include refid="Base_Column_List" />
from tab_custom_store
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} and status=1
where enterprise_id = #{enterpriseId,jdbcType=INTEGER} and (status=1 or status=2)
<if test="appid != null and appid != ''">
and appid= #{appid}
</if>
......@@ -155,7 +155,7 @@
update tab_custom_store
set status = 2
where enterprise_id = #{enterpriseId,jdbcType=INTEGER}
and appid = #{appid,jdbcType=VARCHAR}
and appid = #{appid,jdbcType=VARCHAR} and status=1
</update>
<select id="getCustomStore" resultMap="BaseResultMap">
select
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabDataMemberConsumeConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabDataMemberConsumeConfig">
<id column="member_consume_config_id" jdbcType="INTEGER" property="memberConsumeConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="member_consume_count" jdbcType="INTEGER" property="memberConsumeCount" />
<result column="member_consume_max" jdbcType="INTEGER" property="memberConsumeMax" />
<result column="member_consume_times" jdbcType="INTEGER" property="memberConsumeTimes" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
member_consume_config_id, enterprise_id, member_consume_count, member_consume_max,
member_consume_times, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_data_member_consume_config
where member_consume_config_id = #{memberConsumeConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_data_member_consume_config
where member_consume_config_id = #{memberConsumeConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabDataMemberConsumeConfig">
insert into tab_data_member_consume_config (member_consume_config_id, enterprise_id,
member_consume_count, member_consume_max, member_consume_times,
status, create_time, update_time
)
values (#{memberConsumeConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER},
#{memberConsumeCount,jdbcType=INTEGER}, #{memberConsumeMax,jdbcType=INTEGER}, #{memberConsumeTimes,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabDataMemberConsumeConfig" useGeneratedKeys="true" keyProperty="memberConsumeConfigId">
insert into tab_data_member_consume_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="memberConsumeConfigId != null">
member_consume_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="memberConsumeCount != null">
member_consume_count,
</if>
<if test="memberConsumeMax != null">
member_consume_max,
</if>
<if test="memberConsumeTimes != null">
member_consume_times,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="memberConsumeConfigId != null">
#{memberConsumeConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberConsumeCount != null">
#{memberConsumeCount,jdbcType=INTEGER},
</if>
<if test="memberConsumeMax != null">
#{memberConsumeMax,jdbcType=INTEGER},
</if>
<if test="memberConsumeTimes != null">
#{memberConsumeTimes,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabDataMemberConsumeConfig">
update tab_data_member_consume_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="memberConsumeCount != null">
member_consume_count = #{memberConsumeCount,jdbcType=INTEGER},
</if>
<if test="memberConsumeMax != null">
member_consume_max = #{memberConsumeMax,jdbcType=INTEGER},
</if>
<if test="memberConsumeTimes != null">
member_consume_times = #{memberConsumeTimes,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where member_consume_config_id = #{memberConsumeConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabDataMemberConsumeConfig">
update tab_data_member_consume_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
member_consume_count = #{memberConsumeCount,jdbcType=INTEGER},
member_consume_max = #{memberConsumeMax,jdbcType=INTEGER},
member_consume_times = #{memberConsumeTimes,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where member_consume_config_id = #{memberConsumeConfigId,jdbcType=INTEGER}
</update>
<select id="getByEnterpriseId" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_data_member_consume_config
where status = 1
and enterprise_id = #{enterpriseId}
</select>
</mapper>
\ No newline at end of file
......@@ -263,8 +263,10 @@
select
t1.link_id, t1.create_time, t1.update_time, t1.parent_id, t1.status, t1.type, t1.object_type, t1.name, t1.h5_content,
t1.applet_content, t1.is_custom
from tab_link t1 left join tab_link_scene t2 on t1.link_id = t2.link_id
where (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} and t2.status = 1 ))
from tab_link t1 left join (
select * from tab_link_scene where status = 1
) t2 on t1.link_id = t2.link_id
where (t1.enterprise_type = 1 or (t1.enterprise_type = 2 and t2.enterprise_id = #{enterpriseId} ))
and t1.status = 1
<if test="objectType != null ">
<if test="objectType == 1">
......
......@@ -20,8 +20,8 @@
<result column="push_status" jdbcType="INTEGER" property="pushStatus" />
</resultMap>
<resultMap id="userMessageResult" type="com.gic.enterprise.dto.UserMessageDTO">
<id column="message_id" jdbcType="INTEGER" property="messageId" />
<result column="classify" jdbcType="VARCHAR" property="classifyName" />
<id column="id" jdbcType="INTEGER" property="messageId" />
<result column="classify" jdbcType="VARCHAR" property="classify" />
<result column="title" jdbcType="VARCHAR" property="title" />
<result column="content" jdbcType="VARCHAR" property="content" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
......@@ -260,7 +260,7 @@
</select>
<select id="pageUserMessage" resultMap="userMessageResult">
select
t1.classify,t1.title,t1.content,t1.message_id,t1.create_time,t1.status, t3.sign
t1.classify,t1.title,t1.content,t1.id,t1.create_time,t1.status, t3.sign
from tab_push_user_message t1 left join tab_push_message t3 on t1.message_id = t3.message_id
where t1.user_id=#{userId}
and (t1.status = 1 or t1.status = 2)
......
......@@ -169,6 +169,6 @@
<update id="readMessage">
update tab_push_user_message
set status=2
where user_id = #{userId,jdbcType=INTEGER} and status=1 and message_id=#{messageId}
where status=1 and id=#{messageId}
</update>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabWmOrderConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabWmOrderConfig">
<id column="order_config_id" jdbcType="INTEGER" property="orderConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="wm_main_account" jdbcType="VARCHAR" property="wmMainAccount" />
<result column="wm_order_to_offline" jdbcType="INTEGER" property="wmOrderToOffline" />
<result column="offline_differentiate_wm" jdbcType="INTEGER" property="offlineDifferentiateWm" />
<result column="order_from_mode" jdbcType="INTEGER" property="orderFromMode" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
order_config_id, enterprise_id, wm_main_account, wm_order_to_offline, offline_differentiate_wm,
order_from_mode, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_wm_order_config
where order_config_id = #{orderConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_wm_order_config
where order_config_id = #{orderConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmOrderConfig" useGeneratedKeys="true" keyProperty="orderConfigId">
insert into tab_wm_order_config (order_config_id, enterprise_id, wm_main_account,
wm_order_to_offline, offline_differentiate_wm,
order_from_mode, status, create_time,
update_time)
values (#{orderConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMainAccount,jdbcType=VARCHAR},
#{wmOrderToOffline,jdbcType=INTEGER}, #{offlineDifferentiateWm,jdbcType=INTEGER},
#{orderFromMode,jdbcType=INTEGER}, #{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabWmOrderConfig">
insert into tab_wm_order_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="orderConfigId != null">
order_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="wmMainAccount != null">
wm_main_account,
</if>
<if test="wmOrderToOffline != null">
wm_order_to_offline,
</if>
<if test="offlineDifferentiateWm != null">
offline_differentiate_wm,
</if>
<if test="orderFromMode != null">
order_from_mode,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="orderConfigId != null">
#{orderConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
#{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="wmOrderToOffline != null">
#{wmOrderToOffline,jdbcType=INTEGER},
</if>
<if test="offlineDifferentiateWm != null">
#{offlineDifferentiateWm,jdbcType=INTEGER},
</if>
<if test="orderFromMode != null">
#{orderFromMode,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabWmOrderConfig">
update tab_wm_order_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="wmOrderToOffline != null">
wm_order_to_offline = #{wmOrderToOffline,jdbcType=INTEGER},
</if>
<if test="offlineDifferentiateWm != null">
offline_differentiate_wm = #{offlineDifferentiateWm,jdbcType=INTEGER},
</if>
<if test="orderFromMode != null">
order_from_mode = #{orderFromMode,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where order_config_id = #{orderConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabWmOrderConfig">
update tab_wm_order_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
wm_order_to_offline = #{wmOrderToOffline,jdbcType=INTEGER},
offline_differentiate_wm = #{offlineDifferentiateWm,jdbcType=INTEGER},
order_from_mode = #{orderFromMode,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where order_config_id = #{orderConfigId,jdbcType=INTEGER}
</update>
<select id="getByWmMainAccount" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
FROM tab_wm_order_config
where status = 1
and wm_main_account = #{wmMainAccount}
</select>
</mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.gic.enterprise.dao.mapper.TabWmStoreConfigMapper">
<resultMap id="BaseResultMap" type="com.gic.enterprise.entity.TabWmStoreConfig">
<id column="store_config_id" jdbcType="INTEGER" property="storeConfigId" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="wm_main_account" jdbcType="VARCHAR" property="wmMainAccount" />
<result column="store_config_type" jdbcType="INTEGER" property="storeConfigType" />
<result column="store_config_json" jdbcType="VARCHAR" property="storeConfigJson" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
store_config_id, enterprise_id, wm_main_account, store_config_type, store_config_json,
status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_wm_store_config
where store_config_id = #{storeConfigId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_wm_store_config
where store_config_id = #{storeConfigId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmStoreConfig" useGeneratedKeys="true" keyProperty="storeConfigId">
insert into tab_wm_store_config (store_config_id, enterprise_id, wm_main_account,
store_config_type, store_config_json, status,
create_time, update_time)
values (#{storeConfigId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMainAccount,jdbcType=VARCHAR},
#{storeConfigType,jdbcType=INTEGER}, #{storeConfigJson,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.enterprise.entity.TabWmStoreConfig">
insert into tab_wm_store_config
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="storeConfigId != null">
store_config_id,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="wmMainAccount != null">
wm_main_account,
</if>
<if test="storeConfigType != null">
store_config_type,
</if>
<if test="storeConfigJson != null">
store_config_json,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="storeConfigId != null">
#{storeConfigId,jdbcType=INTEGER},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
#{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="storeConfigType != null">
#{storeConfigType,jdbcType=INTEGER},
</if>
<if test="storeConfigJson != null">
#{storeConfigJson,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.enterprise.entity.TabWmStoreConfig">
update tab_wm_store_config
<set>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="wmMainAccount != null">
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
</if>
<if test="storeConfigType != null">
store_config_type = #{storeConfigType,jdbcType=INTEGER},
</if>
<if test="storeConfigJson != null">
store_config_json = #{storeConfigJson,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where store_config_id = #{storeConfigId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.enterprise.entity.TabWmStoreConfig">
update tab_wm_store_config
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
wm_main_account = #{wmMainAccount,jdbcType=VARCHAR},
store_config_type = #{storeConfigType,jdbcType=INTEGER},
store_config_json = #{storeConfigJson,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where store_config_id = #{storeConfigId,jdbcType=INTEGER}
</update>
<select id="getByWmMainAccount" resultMap="BaseResultMap">
select <include refid="Base_Column_List"></include>
from tab_wm_store_config
where wm_main_account = #{wmMainAccount}
and status = 1
and store_config_type = #{storeConfigType}
</select>
</mapper>
\ No newline at end of file
......@@ -35,6 +35,7 @@ public class CustomStoreController {
dto.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
dto.setStoreWidgetId(customStoreQO.getStorewidgetId());
if(customStoreQO.getSaveType() == 2){
this.customStoreApiService.closeCustomStore(UserDetailUtils.getUserDetail().getEnterpriseId(), customStoreQO.getAppId());
dto.setStatus(1);
}else {
if(customStoreQO.getCustomStoreId() == null){
......@@ -86,8 +87,14 @@ public class CustomStoreController {
}
@RequestMapping("open-custom-store")
public RestResponse updateCustomStoreStatus(Integer customStoreId, String appId){
this.customStoreApiService.openCustomStore(UserDetailUtils.getUserDetail().getEnterpriseId(), appId, customStoreId);
public RestResponse updateCustomStoreStatus(Integer customStoreId, String appid){
this.customStoreApiService.openCustomStore(UserDetailUtils.getUserDetail().getEnterpriseId(), appid, customStoreId);
return RestResponse.success();
}
@RequestMapping("close-custom-store")
public RestResponse updateCustomStoreStatus(Integer customStoreId){
this.customStoreApiService.closeCustomStore(customStoreId);
return RestResponse.success();
}
}
package com.gic.enterprise.web.controller;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.download.utils.OperationResultUtils;
import com.gic.enterprise.dto.data.DataMemberConsumeConfigDTO;
import com.gic.enterprise.service.DataConfigApiService;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.enterprise.utils.UserDetailUtils;
@RestController
@RequestMapping("/data-config")
public class DataConfigController {
private final static Logger LOGGER = LogManager.getLogger(DataConfigController.class);
@Autowired
private DataConfigApiService dataConfigApiService;
@RequestMapping("/config-member-consume")
public RestResponse configMemberConsume(DataMemberConsumeConfigDTO dto) {
dto.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
return OperationResultUtils.operationResult(dataConfigApiService.configMemberConsume(dto),
OperationResultUtils.LOG_EDIT + "数据统计配置-会员消费配置",
UserDetailUtils.getUserDetail().getEnterpriseInfo().getEnterpriseName());
}
@RequestMapping("/get-member-consume-config")
public RestResponse getMemberConsumeConfig() {
return ResultControllerUtils.commonResult(dataConfigApiService
.getMemberConsumeConfigByEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId()));
}
}
......@@ -84,9 +84,9 @@ public class IndexModuleController {
@RequestMapping("message-detail")
public RestResponse messageDetail(Integer messageId){
ServiceResponse<PushMessageDTO> response = this.pushMessageApiService.getPushMessageById(messageId);
this.pushMessageApiService.readMessage(messageId, UserDetailUtils.getUserDetail().getUserId());
return RestResponse.success(response.getResult());
ServiceResponse<UserMessageDTO> userMessageDetail = this.pushMessageApiService.getUserMessageDetail(messageId);
this.pushMessageApiService.readMessage(messageId);
return RestResponse.success(userMessageDetail.getResult());
}
@RequestMapping("message-classify")
......
package com.gic.enterprise.web.controller.wm;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.enterprise.constant.MallModeEnum;
import com.gic.enterprise.dto.WmMemberCardConfigDTO;
import com.gic.enterprise.utils.ResultControllerUtils;
import java.util.HashMap;
import java.util.Map;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.download.utils.OperationResultUtils;
import com.gic.enterprise.constant.MallModeEnum;
import com.gic.enterprise.constant.WmStoreConfigTypeEnum;
import com.gic.enterprise.dto.WmStoreDTO;
import com.gic.enterprise.dto.wm.WmStoreConfigDTO;
import com.gic.enterprise.service.WmStoreApiService;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.enterprise.utils.UserDetailUtils;
import java.util.HashMap;
import java.util.Map;
@RestController
@RequestMapping("/wm-mall-store")
public class WmMallStoreController {
......@@ -75,16 +76,28 @@ public class WmMallStoreController {
return RestResponse.success(result);
}
@RequestMapping("/save-or-update-wm-member-card-config")
public RestResponse saveOrUpdateWmMemberCardConfig(WmMemberCardConfigDTO dto) {
@RequestMapping("/list-wm-store-config")
public RestResponse listWmStoreConfig() {
Map<String, String> result = new HashMap<>(16);
for (WmStoreConfigTypeEnum modeEnum : WmStoreConfigTypeEnum.values()) {
result.put(String.valueOf(modeEnum.getCode()), modeEnum.getMessage());
}
return RestResponse.success(result);
}
@RequestMapping("/save-or-update-wm-store-config")
public RestResponse saveOrUpdateWmStoreConfig(WmStoreConfigDTO dto) {
dto.setEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
return OperationResultUtils.operationResult(wmStoreApiService.saveOrUpdateWmMemberCardConfig(dto),
OperationResultUtils.LOG_EDIT + "微盟商城-会员卡配置", dto.getWmMainAccount());
return OperationResultUtils
.operationResult(wmStoreApiService.saveOrUpdateWmStoreConfig(dto),
OperationResultUtils.LOG_EDIT + "微盟商城-店铺配置"
+ WmStoreConfigTypeEnum.getMessageByCode(dto.getStoreConfigType()),
dto.getWmMainAccount());
}
@RequestMapping("/get-wm-member-card-config-by-wm-main-account")
public RestResponse getWmMemberCardConfigByWmMainAccount(String wmMainAccount) {
@RequestMapping("/get-wm-store-config-by-wm-main-account")
public RestResponse getWmStoreConfigByWmMainAccount(String wmMainAccount, Integer wmStoreConfigType) {
return ResultControllerUtils
.commonResult(wmStoreApiService.getWmMemberCardConfigByWmMainAccount(wmMainAccount));
.commonResult(wmStoreApiService.getWmStoreConfigByWmMainAccount(wmMainAccount, wmStoreConfigType));
}
}
......@@ -38,4 +38,12 @@ public class CustomStoreVO {
public void setAppType(Integer appType) {
this.appType = appType;
}
public Integer getStoreWidgetId() {
return storeWidgetId;
}
public void setStoreWidgetId(Integer storeWidgetId) {
this.storeWidgetId = storeWidgetId;
}
}
......@@ -112,6 +112,7 @@
<dubbo:reference interface="com.gic.enterprise.service.ProjectItemApiService" id="projectItemApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.enterprise.service.WmStoreApiService" id="wmStoreApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.enterprise.service.DataConfigApiService" id="dataConfigApiService" timeout="6000"/>
<dubbo:reference interface="com.gic.marketing.api.service.coupon.CouponShelfApiService" id="couponShelfApiService" timeout="6000"/>
......
package com.gic.operation.web.controller;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import com.gic.auth.constant.UserConstants;
import com.gic.authcenter.security.core.dto.EnterpriseTempDTO;
import com.gic.authcenter.security.core.dto.UserDetailsVO;
import com.gic.enterprise.dto.EnterpriseResourceRelDTO;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.qo.EnterpriseQO;
import com.gic.enterprise.utils.AutoCreatePasswordUtils;
import com.gic.enterprise.utils.UserDetailUtils;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.constant.OrderTypeEnum;
import com.gic.marketing.process.api.service.sms.SmsSendApiService;
import com.gic.open.api.dto.market.MarketUserDTO;
import com.gic.open.api.service.market.MarketAppCategoryApiService;
import com.gic.open.api.service.market.MarketUserApiService;
import com.gic.operation.web.vo.ApplicationTokenVO;
import com.gic.operation.web.vo.CouponLogVO;
import com.gic.operation.web.vo.MarketAppCategoryVO;
import com.gic.authcenter.security.core.constant.DataResourceEnum;
import com.gic.authcenter.security.core.dto.AuthcenterUserDetails;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.slf4j.Logger;
......@@ -35,9 +17,12 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.constant.UserConstants;
import com.gic.auth.dto.UserDTO;
import com.gic.auth.service.MenuApiService;
import com.gic.auth.service.UserApiService;
import com.gic.authcenter.security.core.dto.EnterpriseTempDTO;
import com.gic.authcenter.security.core.dto.UserDetailsVO;
import com.gic.authcenter.security.core.util.UserUtils;
import com.gic.commons.util.CollectionUtil;
import com.gic.commons.util.EntityUtil;
......@@ -48,27 +33,39 @@ import com.gic.enterprise.constant.EnterpriseVersionStatusEnum;
import com.gic.enterprise.dto.EnterpriseDTO;
import com.gic.enterprise.dto.EnterpriseInitDTO;
import com.gic.enterprise.dto.EnterpriseLicenseDTO;
import com.gic.enterprise.dto.EnterpriseResourceRelDTO;
import com.gic.enterprise.dto.market.OrderBuyLicenseDTO;
import com.gic.enterprise.dto.market.OrderGicDTO;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.qo.BuyForGicQO;
import com.gic.enterprise.qo.EnterpriseQO;
import com.gic.enterprise.qo.OrderServiceQO;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.enterprise.service.EnterpriseInitApiService;
import com.gic.enterprise.utils.AutoCreatePasswordUtils;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.finance.constant.EnterprisePlatformTypeEnum;
import com.gic.finance.constant.OrderTypeEnum;
import com.gic.finance.dto.TransferAccountsApprovalDTO;
import com.gic.finance.service.TransferAccountsApprovalApiService;
import com.gic.marketing.process.api.service.sms.SmsSendApiService;
import com.gic.open.api.dto.ApplicationTokenDTO;
import com.gic.open.api.dto.OrderDTO;
import com.gic.open.api.dto.OrderItemDTO;
import com.gic.open.api.dto.market.MarketUserDTO;
import com.gic.open.api.service.AppTokenApiService;
import com.gic.open.api.service.CouponApiService;
import com.gic.open.api.service.OrderApiService;
import com.gic.open.api.service.ServeApiService;
import com.gic.open.api.service.market.MarketAppCategoryApiService;
import com.gic.open.api.service.market.MarketUserApiService;
import com.gic.operation.web.qo.PageQO;
import com.gic.operation.web.utils.UserPasswordUtil;
import com.gic.operation.web.vo.ApplicationTokenVO;
import com.gic.operation.web.vo.CouponLogVO;
import com.gic.operation.web.vo.MarketAppCategoryVO;
import com.gic.operation.web.vo.enterprise.*;
import com.gic.store.utils.CommonResultControllerUtils;
/**
* 商户相关操作
......@@ -152,22 +149,33 @@ public class EnterpriseController {
orderBy = 0;
}
UserDetailsVO user = UserUtils.getUser();
//运维拥有的权限商户ID集合
List<EnterpriseTempDTO> enterpriseTemp = user.getEnterpriseList();
List<Integer> enterpriseIdList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(enterpriseTemp)) {
for (EnterpriseTempDTO enterpriseTempDTO : enterpriseTemp) {
enterpriseIdList.add(enterpriseTempDTO.getId());
//是否拥有全部商户
boolean permissionAll = user.getAuthorities().stream().anyMatch(
sga -> Objects.equals(sga.getAuthority(),
AuthcenterUserDetails.DATA_PREFIX + DataResourceEnum.all_enterprise.name()
)
);
List<Integer> enterpriseIdList = null;
if (!permissionAll) {
//运维拥有的权限商户ID集合
enterpriseIdList = new ArrayList<>();
List<EnterpriseTempDTO> enterpriseTemp = user.getEnterpriseList();
if (CollectionUtils.isNotEmpty(enterpriseTemp)) {
for (EnterpriseTempDTO enterpriseTempDTO : enterpriseTemp) {
enterpriseIdList.add(Integer.parseInt(enterpriseTempDTO.getEnterpriseId()));
}
}
}
EnterpriseQO params = new EnterpriseQO()
.setSearch(search).setServiceVersion(serviceVersion).setCreatorId(user.getId())
.setEnterpriseIdList(enterpriseIdList).setOrderBy(EnterpriseListOrderByEnum.getOrderBy(orderBy))
.setEnterpriseIdList(Optional.ofNullable(enterpriseIdList).orElse(Arrays.asList(-9999))).setOrderBy(EnterpriseListOrderByEnum.getOrderBy(orderBy))
.setServiceStatus(serviceStatus);
pageQO.setCurrentPage(pageQO.getCurrentPage());
pageQO.setPageSize(pageQO.getPageSize());
//todo 现放开过滤
params.setListAll(1);
if (permissionAll) {
params.setListAll(1);
}
return ResultControllerUtils.commonResult(enterpriseApiService.listEnterprise(params));
}
......@@ -224,8 +232,7 @@ public class EnterpriseController {
@RequestMapping("/list-enterprise-init-info")
public RestResponse listEnterpriseInitInfo(Integer enterpriseId) {
List<EnterpriseInitDTO> dtoList = (List<EnterpriseInitDTO>) CommonResultControllerUtils
.commonResult(enterpriseInitApiService.listByEnterpriseId(enterpriseId));
List<EnterpriseInitDTO> dtoList = enterpriseInitApiService.listByEnterpriseId(enterpriseId).getResult();
return RestResponse.success(changeListToTree(0, dtoList));
}
......@@ -290,20 +297,17 @@ public class EnterpriseController {
@RequestMapping("/get-enterprise")
public RestResponse editEnterprise(Integer enterpriseId) {
return RestResponse.success(
CommonResultControllerUtils.commonResult(enterpriseApiService.getEnterpriseById(enterpriseId)));
return ResultControllerUtils.commonResult(enterpriseApiService.getEnterpriseById(enterpriseId));
}
@RequestMapping("/enable-enterprise")
public RestResponse enableEnterprise(Integer enterpriseId) {
return RestResponse
.success(CommonResultControllerUtils.commonResult(enterpriseApiService.enableEnterprise(enterpriseId)));
return ResultControllerUtils.commonResult(enterpriseApiService.enableEnterprise(enterpriseId));
}
@RequestMapping("/disable-enterprise")
public RestResponse disableEnterprise(Integer enterpriseId) {
return RestResponse.success(
CommonResultControllerUtils.commonResult(enterpriseApiService.disableEnterprise(enterpriseId)));
return ResultControllerUtils.commonResult(enterpriseApiService.disableEnterprise(enterpriseId));
}
@RequestMapping("/basic-service-info")
......@@ -318,8 +322,7 @@ public class EnterpriseController {
@RequestMapping("/list-gic-default-service")
public RestResponse listGicDefaultService() {
return RestResponse
.success(CommonResultControllerUtils.commonResult(serveApiService.listServePropByGICDefaultAPP()));
return ResultControllerUtils.commonResult(serveApiService.listServePropByGICDefaultAPP());
}
@RequestMapping("/enterprise-detail")
......
......@@ -5,6 +5,7 @@ import com.gic.api.base.commons.ServiceResponse;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.enterprise.dto.HelpCenterDTO;
import com.gic.enterprise.response.EnterpriseRestResponse;
import com.gic.enterprise.service.HelpCenterApiService;
import com.gic.operation.web.qo.PageQO;
import com.gic.operation.web.vo.HelpCenterVO;
......@@ -27,7 +28,10 @@ public class HelpCenterController {
@RequestMapping("save-help-center")
public RestResponse saveHelpCenter(HelpCenterVO vo){
ServiceResponse<Integer> response = this.helpCenterApiService.saveHelpCenter(EntityUtil.changeEntityByJSON(HelpCenterDTO.class, vo));
return RestResponse.success(response.getResult());
if(response.isSuccess()){
return RestResponse.success();
}
return EnterpriseRestResponse.failure(response);
}
@RequestMapping("help-center-detail")
......
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