Commit 079ce215 by 陶光胜

Merge branch 'developer' of…

Merge branch 'developer' of http://115.159.76.241/base_platform_enterprise/gic-platform-enterprise into developer
parents 3ce9b0d6 77eeebdd
......@@ -9,7 +9,7 @@ package com.gic.enterprise.constant;
*/
public enum MallModeEnum {
MICRO_MALL(1, "微商城模式"),
SMART_RETAIL(1, "智慧零售模式"),
SMART_RETAIL(2, "智慧零售模式"),
;
private int code;
......
......@@ -11,10 +11,7 @@ public enum WmStoreConfigTypeEnum {
MEMBER_CARD_CONFIG(1, "会员卡配置"),
COUPON_CONFIG(2, "卡券配置"),
ORDER_CONFIG(3, "订单配置"),
INTEGRAL_CONFIG(4, "积分配置"),
GOODS_CONFIG(5, "商品配置"),
APPLET_CONFIG(6, "小程序配置");
GOODS_CONFIG(4, "商品配置");
private int code;
private String message;
......
......@@ -44,6 +44,16 @@ public class WmStoreDTO implements Serializable{
private String wmPidName;
/**
* 会员小程序ID
*/
private String memberWechat;
/**
* 微盟小程序APPID
*/
private String wmAppid;
/**
* 商城模式 1:微商城模式 2:智慧零售模式
*/
private Integer mallMode;
......@@ -180,4 +190,22 @@ public class WmStoreDTO implements Serializable{
this.updateTime = updateTime;
return this;
}
public String getMemberWechat() {
return memberWechat;
}
public WmStoreDTO setMemberWechat(String memberWechat) {
this.memberWechat = memberWechat;
return this;
}
public String getWmAppid() {
return wmAppid;
}
public WmStoreDTO setWmAppid(String wmAppid) {
this.wmAppid = wmAppid;
return this;
}
}
......@@ -37,6 +37,16 @@ public class TabWmStore {
private String wmPidName;
/**
* 会员小程序ID
*/
private String memberWechat;
/**
* 微盟小程序APPID
*/
private String wmAppid;
/**
* 商城模式 1:微商城模式 2:智慧零售模式
*/
private Integer mallMode;
......@@ -173,4 +183,22 @@ public class TabWmStore {
this.updateTime = updateTime;
return this;
}
public String getMemberWechat() {
return memberWechat;
}
public TabWmStore setMemberWechat(String memberWechat) {
this.memberWechat = memberWechat;
return this;
}
public String getWmAppid() {
return wmAppid;
}
public TabWmStore setWmAppid(String wmAppid) {
this.wmAppid = wmAppid;
return this;
}
}
\ No newline at end of file
......@@ -37,7 +37,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
......@@ -118,12 +117,12 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
// 判断有没有审核员, 没有审核员就返回错误
ServiceResponse<List<AuditorDTO>> auditorResponse = auditorApiService.listAuditorByProject(auditLogDTO.getProjectItemId(), auditLogDTO.getApplyUserId(), auditLogDTO.getEnterpriseId());
List<AuditorDTO> auditorList = Collections.emptyList();
// 普通管理员需要判断是否有审核员
if (!auditorResponse.isSuccess()) {
return EnterpriseServiceResponse.failure(auditorResponse.getCode(), auditorResponse.getMessage());
}
auditorList = auditorResponse.getResult();
List<AuditorDTO> auditorList = auditorResponse.getResult();
List<AuditorDTO> openidList = auditorList.stream().filter(e -> StringUtils.isNotBlank(e.getOpenid())).collect(Collectors.toList());
List<AuditorDTO> userIdList = auditorList.stream().filter(e -> e.getUserId() != null).collect(Collectors.toList());
if (CollectionUtils.isEmpty(openidList) && CollectionUtils.isEmpty(userIdList)) {
......@@ -251,7 +250,7 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
String url = config.getHost() + "/damo-system/examine-logs";
String result = auditLogDTO.getAuditResult() == 1? "已通过" : "未通过";
String content = "您的操作"+ result +"审核,可以在<a href='"+url+"'>审核日志</a>查看到本次审核记录";
this.pushMessageApiService.pushUserMessage(auditLogDTO.getEnterpriseId(), auditLogDTO.getApplyUserId(),"系统消息", "审核结果", content);
this.pushMessageApiService.pushUserMessage(auditLog.getEnterpriseId(), auditLog.getApplyUserId(),"系统消息", "审核结果", content);
return EnterpriseServiceResponse.success();
}
......
......@@ -3,6 +3,7 @@ package com.gic.enterprise.service.outer.impl;
import java.util.List;
import java.util.Optional;
import com.gic.commons.util.StringUtil;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -204,6 +205,20 @@ public class WmStoreApiServiceImpl implements WmStoreApiService {
if (isCanEdit && record.getStoreBrandId().intValue() != storeBrandId.intValue()) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已授权,店招品牌不能修改");
}
String wmAppid = wmStoreDTO.getWmAppid();
if (StringUtil.isBlank(wmAppid)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "微盟小程序APPID不能为空");
}
if (isCanEdit && !record.getWmAppid().equals(wmAppid)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已授权,微盟小程序APPID不能修改");
}
String memberApplet = wmStoreDTO.getMemberWechat();
if (StringUtil.isBlank(memberApplet)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "会员小程序不能为空");
}
if (isCanEdit && !record.getMemberWechat().equals(memberApplet)) {
return ServiceResponse.failure(ErrorCode.PARAMETER_ERROR.getCode(), "已授权,会员小程序不能修改");
}
return ServiceResponse.success();
}
}
......@@ -8,6 +8,8 @@
<result column="wm_pid" jdbcType="VARCHAR" property="wmPid" />
<result column="wm_store_id" jdbcType="VARCHAR" property="wmStoreId" />
<result column="wm_pid_name" jdbcType="VARCHAR" property="wmPidName" />
<result column="member_wechat" jdbcType="VARCHAR" property="memberWechat" />
<result column="wm_appid" jdbcType="VARCHAR" property="wmAppid" />
<result column="mall_mode" jdbcType="INTEGER" property="mallMode" />
<result column="store_brand_id" jdbcType="INTEGER" property="storeBrandId" />
<result column="auth_status" jdbcType="INTEGER" property="authStatus" />
......@@ -16,7 +18,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
wm_mall_store_id, enterprise_id, wm_main_account, wm_pid, wm_store_id, wm_pid_name,
wm_mall_store_id, enterprise_id, wm_main_account, wm_pid, wm_store_id, wm_pid_name, member_wechat, wm_appid,
mall_mode, store_brand_id, auth_status, status, create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
......@@ -31,12 +33,12 @@
</delete>
<insert id="insert" parameterType="com.gic.enterprise.entity.TabWmStore" useGeneratedKeys="true" keyProperty="wmMallStoreId">
insert into tab_wm_store (wm_mall_store_id, enterprise_id, wm_main_account,
wm_pid, wm_store_id, wm_pid_name,
wm_pid, wm_store_id, wm_pid_name, member_wechat, wm_appid,
mall_mode, store_brand_id, auth_status,
status, create_time, update_time
)
values (#{wmMallStoreId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{wmMainAccount,jdbcType=VARCHAR},
#{wmPid,jdbcType=VARCHAR}, #{wmStoreId,jdbcType=VARCHAR}, #{wmPidName,jdbcType=VARCHAR},
#{wmPid,jdbcType=VARCHAR}, #{wmStoreId,jdbcType=VARCHAR}, #{wmPidName,jdbcType=VARCHAR}, #{memberWechat,jdbcType=VARCHAR}, #{wmAppid,jdbcType=VARCHAR},
#{mallMode,jdbcType=INTEGER}, #{storeBrandId,jdbcType=INTEGER}, #{authStatus,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
......@@ -62,6 +64,12 @@
<if test="wmPidName != null">
wm_pid_name,
</if>
<if test="memberWechat != null">
member_wechat,
</if>
<if test="wmAppid != null">
wm_appid,
</if>
<if test="mallMode != null">
mall_mode,
</if>
......@@ -100,6 +108,12 @@
<if test="wmPidName != null">
#{wmPidName,jdbcType=VARCHAR},
</if>
<if test="memberWechat != null">
#{memberWechat,jdbcType=VARCHAR},
</if>
<if test="wmAppid != null">
#{wmAppid,jdbcType=VARCHAR},
</if>
<if test="mallMode != null">
#{mallMode,jdbcType=INTEGER},
</if>
......@@ -138,6 +152,12 @@
<if test="wmPidName != null">
wm_pid_name = #{wmPidName,jdbcType=VARCHAR},
</if>
<if test="memberWechat != null">
member_wechat = #{memberWechat,jdbcType=VARCHAR},
</if>
<if test="wmAppid != null">
wm_appid = #{wmAppid,jdbcType=VARCHAR},
</if>
<if test="mallMode != null">
mall_mode = #{mallMode,jdbcType=INTEGER},
</if>
......@@ -166,6 +186,8 @@
wm_pid = #{wmPid,jdbcType=VARCHAR},
wm_store_id = #{wmStoreId,jdbcType=VARCHAR},
wm_pid_name = #{wmPidName,jdbcType=VARCHAR},
member_wechat = #{memberWechat,jdbcType=VARCHAR},
wm_appid = #{wmAppid,jdbcType=VARCHAR},
mall_mode = #{mallMode,jdbcType=INTEGER},
store_brand_id = #{storeBrandId,jdbcType=INTEGER},
auth_status = #{authStatus,jdbcType=INTEGER},
......@@ -186,8 +208,8 @@
<if test="dataType == 2">
and wm_store_id = #{data}
</if>
<if test="dataType == 1">
and wm_main_account = #{data}
<if test="dataType == 3">
and wm_pid = #{data}
</if>
<if test="wmMallStoreId != null">
and wm_mall_store_id &lt;&gt; #{wmMallStoreId}
......
......@@ -3,6 +3,7 @@ package com.gic.enterprise.web.controller.wm;
import java.util.HashMap;
import java.util.Map;
import com.gic.enterprise.web.vo.wm.WmStoreDetailVO;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -43,7 +44,7 @@ public class WmMallStoreController {
@RequestMapping("/get-wm-store-detail")
public RestResponse getDetail(Integer wmMallStoreId) {
return ResultControllerUtils.commonResult(wmStoreApiService.getWmStoreByWmMallStoreId(wmMallStoreId));
return ResultControllerUtils.commonResultOne(wmStoreApiService.getWmStoreByWmMallStoreId(wmMallStoreId), WmStoreDetailVO.class);
}
@RequestMapping("/list-wm-store")
......
package com.gic.enterprise.web.vo.wm;
import java.io.Serializable;
public class WmStoreDetailVO implements Serializable{
private static final long serialVersionUID = -1783266568980086032L;
/**
*
*/
private Integer wmMallStoreId;
/**
*
*/
private Integer enterpriseId;
/**
* 微盟主账号
*/
private String wmMainAccount;
/**
* 微盟pid
*/
private String wmPid;
/**
* 微盟store_id
*/
private String wmStoreId;
/**
* 店铺名称
*/
private String wmPidName;
/**
* 会员小程序ID
*/
private String memberWechat;
/**
* 微盟小程序APPID
*/
private String wmAppid;
/**
* 商城模式 1:微商城模式 2:智慧零售模式
*/
private Integer mallMode;
/**
* 店招品牌
*/
private Integer storeBrandId;
/**
* 授权状态 0:未授权 1:已授权
*/
private Integer authStatus;
public Integer getWmMallStoreId() {
return wmMallStoreId;
}
public WmStoreDetailVO setWmMallStoreId(Integer wmMallStoreId) {
this.wmMallStoreId = wmMallStoreId;
return this;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public WmStoreDetailVO setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
return this;
}
public String getWmMainAccount() {
return wmMainAccount;
}
public WmStoreDetailVO setWmMainAccount(String wmMainAccount) {
this.wmMainAccount = wmMainAccount;
return this;
}
public String getWmPid() {
return wmPid;
}
public WmStoreDetailVO setWmPid(String wmPid) {
this.wmPid = wmPid;
return this;
}
public String getWmStoreId() {
return wmStoreId;
}
public WmStoreDetailVO setWmStoreId(String wmStoreId) {
this.wmStoreId = wmStoreId;
return this;
}
public String getWmPidName() {
return wmPidName;
}
public WmStoreDetailVO setWmPidName(String wmPidName) {
this.wmPidName = wmPidName;
return this;
}
public String getMemberWechat() {
return memberWechat;
}
public WmStoreDetailVO setMemberWechat(String memberWechat) {
this.memberWechat = memberWechat;
return this;
}
public String getWmAppid() {
return wmAppid;
}
public WmStoreDetailVO setWmAppid(String wmAppid) {
this.wmAppid = wmAppid;
return this;
}
public Integer getMallMode() {
return mallMode;
}
public WmStoreDetailVO setMallMode(Integer mallMode) {
this.mallMode = mallMode;
return this;
}
public Integer getStoreBrandId() {
return storeBrandId;
}
public WmStoreDetailVO setStoreBrandId(Integer storeBrandId) {
this.storeBrandId = storeBrandId;
return this;
}
public Integer getAuthStatus() {
return authStatus;
}
public WmStoreDetailVO setAuthStatus(Integer authStatus) {
this.authStatus = authStatus;
return this;
}
}
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