Commit bd8ae234 by guojuxing

接口更新

parent ff5d71ab
package com.gic.store.service.outer.impl;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.Page;
......@@ -17,7 +30,7 @@ import com.gic.enterprise.response.EnterpriseServiceResponse;
import com.gic.enterprise.service.EnterpriseApiService;
import com.gic.enterprise.service.WmStoreSyncLogApiService;
import com.gic.member.api.service.StoreUpdateApiService;
import com.gic.member.config.api.dto.UserOwnerDefaultDTO;
import com.gic.member.config.api.dto.UserAscriptionDefaultDTO;
import com.gic.member.config.api.service.CardAscriptionConfigService;
import com.gic.mq.sdk.GicMQClient;
import com.gic.popup.config.InitPopupConfig;
......@@ -35,19 +48,6 @@ import com.gic.store.utils.valid.ValidUtil;
import com.gic.weimob.api.dto.WeimobGuiderSynDTO;
import com.gic.weimob.api.service.WeimobStoreSiteApiService;
import com.github.pagehelper.PageHelper;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Import;
import org.springframework.stereotype.Service;
import java.util.*;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @author zhiwj
......@@ -604,10 +604,10 @@ public class ClerkApiServiceImpl implements ClerkApiService {
Map<Integer, TabClerk> clerkIdMap = clerkList.stream().collect(Collectors.toMap(TabClerk::getClerkId, TabClerk -> TabClerk));
//过滤掉默认导购
if(StoreStatusEnum.INONLINE.getCode() == status){
List<UserOwnerDefaultDTO> result = this.cardAscriptionConfigService.getDefaultUserOwner(enterpriseId).getResult();
List<UserAscriptionDefaultDTO> result = this.cardAscriptionConfigService.getDefaultUserOwner(enterpriseId).getResult()
if(CollectionUtils.isNotEmpty(result)){
clerkIdList = clerkIdList.stream().filter(clerkId -> {
for(UserOwnerDefaultDTO dto : result){
for(UserAscriptionDefaultDTO dto : result){
if(clerkId.intValue() == dto.getClerkId().intValue()){
messageBuiler.append(clerkIdMap.get(clerkId).getClerkName()).append(",默认导购不能下线;");
throw new CommonException(ErrorCode.PARAMETER_ERROR.getCode(), "该导购为默认导购,操作失败");
......
package com.gic.store.strategy.impl;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.gic.member.config.api.dto.UserOwnerDefaultDTO;
import com.gic.member.config.api.dto.UserAscriptionDefaultDTO;
import com.gic.member.config.api.service.CardAscriptionConfigService;
import com.gic.spark.api.service.SparkJobApiService;
import com.gic.store.constant.Constants;
......@@ -12,14 +21,6 @@ import com.gic.store.service.ClerkService;
import com.gic.store.service.StoreLogService;
import com.gic.store.service.StoreService;
import com.gic.store.strategy.BulkUpdateStoreStrtegy;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;
/**
*
......@@ -45,7 +46,7 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
@Override
public String bulkUpdateStore(String storeInfoIds, Integer enterpriseId, String value, StoreService storeService, Integer operatorId, String operatorName) {
List<Integer> storeInfoIdList = new ArrayList<>();
List<UserOwnerDefaultDTO> result = this.cardAscriptionConfigService.getDefaultUserOwner(enterpriseId).getResult();
List<UserAscriptionDefaultDTO> result = this.cardAscriptionConfigService.getDefaultUserOwner(enterpriseId).getResult();
if (Constants.ALL.equals(storeInfoIds)) {
storeInfoIdList = storeService.listAllStoreInfoId(enterpriseId);
} else {
......@@ -57,7 +58,7 @@ public class StoreStatusStrategyImpl implements BulkUpdateStoreStrtegy {
}
if(CollectionUtils.isNotEmpty(result) && StoreStatusEnum.INONLINE.getCode() == Integer.valueOf(value)){
storeInfoIdList = storeInfoIdList.stream().filter(storeInfoId -> {
for(UserOwnerDefaultDTO dto : result){
for(UserAscriptionDefaultDTO dto : result){
if(storeInfoId.intValue() == dto.getStoreInfoId().intValue()){
return false;
}
......
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