package com.kmall.api.service.mk;

import com.google.common.collect.Maps;
import com.kmall.api.dao.ApiGoodsMapper;
import com.kmall.api.dao.ApiOrderMapper;
import com.kmall.api.dao.mk.*;
import com.kmall.api.dto.CampMinusDto;
import com.kmall.api.dto.UserCouponDto;
import com.kmall.api.entity.CartVo;
import com.kmall.api.entity.GoodsVo;
import com.kmall.api.entity.StoreVo;
import com.kmall.api.entity.ThirdMerchantBizVo;
import com.kmall.api.entity.mk.MkStoreCampMinusLevelVo;
import com.kmall.api.entity.mk.MkStoreCampMinusVo;
import com.kmall.api.service.ApiStoreService;
import com.kmall.api.service.ApiThirdMerchantBizService;
import com.kmall.common.constant.Dict;
import com.kmall.common.utils.Constant;
import com.kmall.common.utils.DateUtils;
import com.kmall.common.utils.RRException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;
import java.util.*;

/**
 * 门店满减满折活动Service实现类
 *
 * @author emato
 * @email admin@qhdswl.com
 * @date 2019-05-07 16:06:28
 */
@Service
public class ApiMkStoreCampMinusService {
    private Log logger = LogFactory.getLog(ApiMkStoreCampMinusService.class);
    @Autowired
    private ApiMkStoreCampMinusMapper mkStoreCampMinusMapper;
    @Autowired
    private ApiMkStoreCampMinusGoodsMapper apiMkStoreCampMinusGoodsMapper;
    @Autowired
    private ApiMkStoreCampMinusLevelMapper apiMkStoreCampMinusLevelMapper;
    @Autowired
    private ApiGoodsMapper apiGoodsMapper;
    @Autowired
    private ApiThirdMerchantBizService apiThirdMerchantBizService;
    @Autowired
    private ApiStoreService apiStoreService;
    @Autowired
    private ApiOrderMapper apiOrderMapper;

    public MkStoreCampMinusVo queryObject(Integer campMinusId) {
        MkStoreCampMinusVo mkStoreCampMinusVo = mkStoreCampMinusMapper.queryObject(campMinusId);
        if(mkStoreCampMinusVo != null){
            StoreVo storeVo = apiStoreService.queryObject(Long.valueOf(mkStoreCampMinusVo.getStoreId()));
            if(storeVo != null) {
                mkStoreCampMinusVo.setStoreName(storeVo.getStoreName());
            }
            String invalidTime = DateUtils.format(mkStoreCampMinusVo.getCampBegTime(),DateUtils.DATE_TIME_PATTERN) +
                    " 至 " + DateUtils.format(mkStoreCampMinusVo.getCampEndTime(),DateUtils.DATE_TIME_PATTERN);
            mkStoreCampMinusVo.setInValidTime(invalidTime);
        }
        return mkStoreCampMinusVo;
    }

    public List<MkStoreCampMinusVo> queryList(Map<String, Object> map) {
        return mkStoreCampMinusMapper.queryList(map);
    }

    public int queryTotal(Map<String, Object> map) {
        return mkStoreCampMinusMapper.queryTotal(map);
    }


    /**
     * 查询详情页商品所支持的优惠券
     * @param storeId
     * @param campId
     * @param goodsId
     * @return
     */
    public List<MkStoreCampMinusVo> queryStoreCampMinusByGoodsId(Integer storeId, Integer campId, Integer goodsId){
        GoodsVo goodsVo = apiGoodsMapper.queryObjectByStoreId(Long.valueOf(goodsId),Long.valueOf(storeId));
        if(goodsVo == null){
            logger.error("商品信息不能为空");
            throw new RRException("商品信息不能为空");
        }
        //查询该门店下的所有满减满折活动
        Map discountMap = Maps.newHashMap();
        discountMap.put("storeId", storeId);
        discountMap.put("goodsBizType", goodsVo.getGoodsBizType());
        discountMap.put("isPast", "0");//进行中
        if(campId != null){
            discountMap.put("campId", campId);
        }
        //详情页根据门店id、用户id、业务类型获取当前门店所有的未过期的满减满折信息
        List<MkStoreCampMinusVo> mkStoreTicketDiscountList = mkStoreCampMinusMapper.getCampMinusByStoreIdList(discountMap);
        List<MkStoreCampMinusVo> campMinusVos = new ArrayList<>();
        StringBuffer goodsIdStr = new StringBuffer();
        for (MkStoreCampMinusVo campMinusVo : mkStoreTicketDiscountList) {
            //查询商品是否满足该满减满折
            Integer total = queryCampMinusGoodsTotal(storeId, goodsId, campMinusVo);
            campMinusVo.setGoodsId(goodsId);
            if(total > 0){
                goodsIdStr.append(goodsId+",");
                campMinusVos.add(campMinusVo);
            }
        }
        if(goodsIdStr != null && !goodsIdStr.toString().equalsIgnoreCase("")) {
            String[] gid = goodsIdStr.toString().split(",");
            Integer[] goodsIds =  new Integer[gid.length];
            for(int i=0;i < gid.length;i++){
                goodsIds[i] = Integer.parseInt(gid[i]);
            }
            List goodsList = new ArrayList();
            for (Integer goods : goodsIds) {
                if (!goodsList.contains(goods)) {
                    goodsList.add(goods);
                }
            }
            for (MkStoreCampMinusVo vo : campMinusVos) {
                vo.setGoodsIds(goodsList);
            }
        }
        return campMinusVos;
    }
    /**
     * 查询商品是否满足该满减满折活动
     * @param storeId
     * @param goodsId
     * @param campMinusVo
     * @return
     */
    public Integer queryCampMinusGoodsTotal(Integer storeId, Integer goodsId, MkStoreCampMinusVo campMinusVo){
        if(storeId == null){
            logger.error("门店id不能为空");
            throw new RRException("门店id不能为空");
        }
        StoreVo storeVo = apiStoreService.queryObject(Long.valueOf(storeId));
        ThirdMerchantBizVo thirdMerchantBiz = new ThirdMerchantBizVo();
        if(storeVo != null) {
            thirdMerchantBiz = apiThirdMerchantBizService.getThirdMerchangByCode(storeVo.getThirdPartyMerchCode());
            if (null == thirdMerchantBiz) {
                logger.error("第三方商户为空");
                throw new RRException("第三方商户为空");
            }
        }
        Map params = Maps.newHashMap();
        params.put("fields", "psr1.category_id");
        params.put("store_id", storeId);
        params.put("campMinusId", campMinusVo.getCampMinusId());
        params.put("applyType", campMinusVo.getApplyType());

        params.remove("fields");

        params.put("fields", "a.id,a.name,a.goods_brief,a.list_pic_url,psr1.retail_price," +
                "psr1.market_price,b.id as product_id,psr1.stock_num");
        params.put("is_hot", "1");
        params.put("is_delete", 0);
        params.put("store_id", storeId);
        params.put("isStockShare", thirdMerchantBiz.getIsStockShare());
        params.put("goodsId", goodsId);

        return apiMkStoreCampMinusGoodsMapper.queryCampMinusGoodsTotal(params);
    }

    /**
     * 匹配可使用的满减满折活动
     *
     * @param userCouponDto
     * @return
     */
    public List<CampMinusDto> matchUserCampMinusList(UserCouponDto userCouponDto) {
        List<CampMinusDto> result = new ArrayList();
        List<MkStoreCampMinusVo> switchList = new ArrayList();
        List<CartVo> cartVoList = userCouponDto.getCartGoodsList();
        if(cartVoList == null || cartVoList.size() == 0){
            return result;
        }
        //查询购物车商品所支持的满减满折活动
        Map map = queryStoreCampMinusByCartGoodsId(userCouponDto);
        List<MkStoreCampMinusVo> mkStoreCampMinusList = (List<MkStoreCampMinusVo>)map.get("mkStoreCampMinusList");
        if(mkStoreCampMinusList != null && mkStoreCampMinusList.size() > 0){
            for (MkStoreCampMinusVo minusVo : mkStoreCampMinusList) {
                //满元减且满足最高层级减一次，获取最高优惠进行对购物车的比较
                if(minusVo.getCampMinusType().equalsIgnoreCase(Dict.campMinusType.item_00.getItem()) && minusVo.getMinusMode().equalsIgnoreCase(Dict.minusMode.item_00.getItem())){
                    //查询当前用户是否已用过该促销满减活动，不能大于0，只满足最高层级减一次
                    Integer checkCampByUserCount = mkStoreCampMinusMapper.queryOrderCountByUserIdAndCampId(userCouponDto.getUserId(),minusVo.getCampMinusId());
                    if(checkCampByUserCount == 0) {
                        MkStoreCampMinusLevelVo levelVo = apiMkStoreCampMinusLevelMapper.queryYuanCondByCampMinusId(minusVo.getCampMinusId(), Dict.campMinusType.item_00.getItem(), Dict.minusMode.item_00.getItem());
                        BigDecimal cond = levelVo.getYuanMinusCond();
                        BigDecimal money = levelVo.getYuanMinusPref();
                        //获取购物车中商品支持的优惠活动，对该优惠活动的条件进行比较
                        getResultByCheckCond(minusVo, cartVoList, cond, money, result, switchList);
                    }
                }
                //满件减且满足最高层级减一次，获取最高优惠进行对购物车的比较
                if(minusVo.getCampMinusType().equalsIgnoreCase(Dict.campMinusType.item_01.getItem()) && minusVo.getMinusMode().equalsIgnoreCase(Dict.minusMode.item_00.getItem())){
                    //查询当前用户是否已用过该促销满减活动，不能大于0，只满足最高层级减一次
                    Integer checkCampByUserCount = mkStoreCampMinusMapper.queryOrderCountByUserIdAndCampId(userCouponDto.getUserId(),minusVo.getCampMinusId());
                    if(checkCampByUserCount == 0) {
                        MkStoreCampMinusLevelVo levelVo = apiMkStoreCampMinusLevelMapper.queryPieceConfByCampMinusId(minusVo.getCampMinusId(), Dict.campMinusType.item_01.getItem(), Dict.minusMode.item_00.getItem());
                        Integer pieceConf = levelVo.getPieceMinusConf();//件数
                        BigDecimal money = levelVo.getPieceMinusPref();
                        getResultByCheckPieceConf(minusVo, cartVoList, pieceConf, money, result, switchList);
                    }
                }
                //满元减且每满一次减一次，获取最高优惠进行对购物车的比较
                if(minusVo.getCampMinusType().equalsIgnoreCase(Dict.campMinusType.item_00.getItem()) && minusVo.getMinusMode().equalsIgnoreCase(Dict.minusMode.item_10.getItem())){
                    MkStoreCampMinusLevelVo levelVo = apiMkStoreCampMinusLevelMapper.queryYuanCondByCampMinusId(minusVo.getCampMinusId(), Dict.campMinusType.item_00.getItem(), Dict.minusMode.item_10.getItem());
                    BigDecimal cond = levelVo.getYuanMinusCond();
                    BigDecimal money = levelVo.getYuanMinusPref();
                    BigDecimal moneyEachDisc = levelVo.getPieceMinusEachDisc();//满减件每人优惠
                    if(moneyEachDisc.compareTo(Constant.ZERO) == 0){
                        getResultByCheckCond(minusVo, cartVoList, cond, money, result, switchList);
                    }else {
                        //获取当前用户用该优惠的订单个数
                        Integer count = apiOrderMapper.queryTopicNumByTopicIdAndUserId(minusVo.getStoreTopicId(), userCouponDto.getUserId());
                        BigDecimal totalDisc = Constant.ZERO;
                        //订单个数*优惠金额 = 该满减活动使用总金额
                        if (count != 0) {
                            totalDisc = money.multiply(BigDecimal.valueOf(count));
                        }
                        //该满减活动使用总金额<满减活动每人最多优惠金额，则可使用
                        if (totalDisc.compareTo(moneyEachDisc) < 0) {
                            getResultByCheckCond(minusVo, cartVoList, cond, money, result, switchList);
                        }
                    }
                }
                //满件减且每满一次减一次，获取最高优惠进行对购物车的比较
                if(minusVo.getCampMinusType().equalsIgnoreCase(Dict.campMinusType.item_01.getItem()) && minusVo.getMinusMode().equalsIgnoreCase(Dict.minusMode.item_10.getItem())){
                    MkStoreCampMinusLevelVo levelVo = apiMkStoreCampMinusLevelMapper.queryPieceConfByCampMinusId(minusVo.getCampMinusId(), Dict.campMinusType.item_01.getItem(), Dict.minusMode.item_10.getItem());
                    Integer pieceConf = levelVo.getPieceMinusConf();
                    BigDecimal money = levelVo.getPieceMinusPref();
                    BigDecimal moneyEachDisc = levelVo.getPieceMinusEachDisc();//满减件每人优惠
                    if(moneyEachDisc.compareTo(Constant.ZERO) == 0){
                        getResultByCheckPieceConf(minusVo, cartVoList, pieceConf, money, result, switchList);
                    }else {
                        //获取当前用户用该优惠的订单个数
                        Integer count = apiOrderMapper.queryTopicNumByTopicIdAndUserId(minusVo.getStoreTopicId(), userCouponDto.getUserId());
                        BigDecimal totalDisc = Constant.ZERO;
                        //订单个数*优惠金额 = 该满减活动使用总金额
                        if (count != 0) {
                            totalDisc = money.multiply(BigDecimal.valueOf(count));
                        }
                        //该满减活动使用总金额<满减活动每人最多优惠金额，则可使用
                        if (totalDisc.compareTo(moneyEachDisc) < 0) {
                            getResultByCheckPieceConf(minusVo, cartVoList, pieceConf, money, result, switchList);
                        }
                    }
                }
                //满元折，获取最高优惠进行对购物车的比较
                if(minusVo.getCampMinusType().equalsIgnoreCase(Dict.campMinusType.item_10.getItem())){
                    //查询当前用户是否已用过该促销满减活动，不能大于0，只满足最高层级减一次
                    Integer checkCampByUserCount = mkStoreCampMinusMapper.queryOrderCountByUserIdAndCampId(userCouponDto.getUserId(),minusVo.getCampMinusId());
                    if(checkCampByUserCount == 0) {
                        MkStoreCampMinusLevelVo levelVo = apiMkStoreCampMinusLevelMapper.queryDiscCondByCampMinusId(minusVo.getCampMinusId());
                        BigDecimal cond = levelVo.getYuanDiscCond();
                        BigDecimal money = levelVo.getYuanDiscPref();
                        getResultByCheckCond(minusVo, cartVoList, cond, money, result, switchList);
                    }
                }
                //满件折，获取最高优惠进行对购物车的比较
                if(minusVo.getCampMinusType().equalsIgnoreCase(Dict.campMinusType.item_11.getItem())){
                    //查询当前用户是否已用过该促销满减活动，不能大于0，只满足最高层级减一次
                    Integer checkCampByUserCount = mkStoreCampMinusMapper.queryOrderCountByUserIdAndCampId(userCouponDto.getUserId(),minusVo.getCampMinusId());
                    if(checkCampByUserCount == 0) {
                        MkStoreCampMinusLevelVo levelVo = apiMkStoreCampMinusLevelMapper.queryDiscConfByCampMinusId(minusVo.getCampMinusId());
                        Integer pieceConf = levelVo.getPieceDiscConf();
                        BigDecimal money = levelVo.getPieceDiscPref();
                        getResultByCheckPieceConf(minusVo, cartVoList, pieceConf, money, result, switchList);
                    }
                }
            }
            if(result != null && result.size() > 0) {
                CampMinusDto campMinusDto = new CampMinusDto();
                campMinusDto.setCampMinusId(0);
                campMinusDto.setCampName("不参与满减活动");
                campMinusDto.setMoney(Constant.ZERO);
                campMinusDto.setGoodsBizType(userCouponDto.getBizType());
                result.add(campMinusDto);
            }
        }
        return result;
    }

    /**
     * 获取购物车中的商品id，判断是否满足满减满折优惠的满元减、折条件，返回满足的list
     * @param minusVo
     * @param cartVoList
     * @param pieceConf
     * @param result
     * @param switchList
     */
    private void getResultByCheckPieceConf(MkStoreCampMinusVo minusVo,List<CartVo> cartVoList,
                                           Integer pieceConf, BigDecimal money, List<CampMinusDto> result,List<MkStoreCampMinusVo> switchList){
        if(minusVo.getCampMinusType().equalsIgnoreCase(Dict.campMinusType.item_01.getItem())) {
            if (minusVo.getApplyType().equalsIgnoreCase(Dict.applyType.item_00.getItem())) {//全部商品参与
                //计算购物车中满足部分商品的销售价
                BigDecimal totalByGoodsId = getTotalByGoodsId(cartVoList, minusVo);
                //计算购物车中满足部分商品的件数
                Integer pieceByGoodsId = getPieceByGoodsId(cartVoList, minusVo);
                //购物车中件数>满减件，去重
                if (pieceByGoodsId.compareTo(pieceConf) >= 0 && totalByGoodsId.compareTo(money) > 0 && containsList(switchList, minusVo)) {
                    CampMinusDto campMinusDto = setCampMinus(minusVo, money);
                    result.add(campMinusDto);
                    switchList.add(minusVo);
                }
            }
            if (!minusVo.getApplyType().equalsIgnoreCase(Dict.applyType.item_00.getItem())) {//部分商品参与
                //计算购物车中满足部分商品的销售价
                BigDecimal totalByGoodsId = getTotalByGoodsId(cartVoList, minusVo);
                //计算购物车中满足部分商品的件数
                Integer pieceByGoodsId = getPieceByGoodsId(cartVoList, minusVo);
                //购物车中件数>满减件，去重
                if (pieceByGoodsId.compareTo(pieceConf) >= 0 && totalByGoodsId.compareTo(money) > 0 && containsList(switchList, minusVo)) {
                    CampMinusDto campMinusDto = setCampMinus(minusVo, money);
                    result.add(campMinusDto);
                    switchList.add(minusVo);
                }
            }
        }
        if(minusVo.getCampMinusType().equalsIgnoreCase(Dict.campMinusType.item_11.getItem())){
            if (minusVo.getApplyType().equalsIgnoreCase(Dict.applyType.item_00.getItem())) {//全部商品参与
//                //计算购物车中满足部分商品的销售价
//                BigDecimal totalByGoodsId = getTotalByGoodsId(cartVoList, minusVo);
                //计算购物车中满足部分商品的件数
                Integer pieceByGoodsId = getPieceByGoodsId(cartVoList, minusVo);
                //购物车中件数>满减件，去重
                if (pieceByGoodsId.compareTo(pieceConf) >= 0 && containsList(switchList, minusVo)) {
                    CampMinusDto campMinusDto = setCampMinus(minusVo, money);
                    result.add(campMinusDto);
                    switchList.add(minusVo);
                }
            }
            if (!minusVo.getApplyType().equalsIgnoreCase(Dict.applyType.item_00.getItem())) {//部分商品参与
//                //计算购物车中满足部分商品的销售价
//                BigDecimal totalByGoodsId = getTotalByGoodsId(cartVoList, minusVo);
                //计算购物车中满足部分商品的件数
                Integer pieceByGoodsId = getPieceByGoodsId(cartVoList, minusVo);
                //购物车中件数>满减件，去重
                if (pieceByGoodsId.compareTo(pieceConf) >= 0 && containsList(switchList, minusVo)) {
                    CampMinusDto campMinusDto = setCampMinus(minusVo, money);
                    result.add(campMinusDto);
                    switchList.add(minusVo);
                }
            }
        }
    }

    /**
     * 获取购物车中的商品id，判断是否满足满减满折优惠的满件减、折条件，返回满足的list
     * @param minusVo
     * @param cartVoList
     * @param cond
     * @param money
     * @param result
     * @param switchList
     */
    private void getResultByCheckCond(MkStoreCampMinusVo minusVo,List<CartVo> cartVoList,
                                  BigDecimal cond, BigDecimal money, List<CampMinusDto> result,List<MkStoreCampMinusVo> switchList){
        if(minusVo.getApplyType().equalsIgnoreCase(Dict.applyType.item_00.getItem())){//全部商品参与
            //计算购物车中满足部分商品的销售价
            BigDecimal totalByGoodsId = getTotalByGoodsId(cartVoList, minusVo);
            //销售价>满减价，去重
            if (totalByGoodsId.compareTo(cond) >= 0 && totalByGoodsId.compareTo(money) > 0 && containsList(switchList,minusVo)) {
                CampMinusDto campMinusDto = setCampMinus(minusVo, money);
                result.add(campMinusDto);
                switchList.add(minusVo);
            }
        }
        if(!minusVo.getApplyType().equalsIgnoreCase(Dict.applyType.item_00.getItem())) {//部分商品参与
            //计算购物车中满足部分商品的销售价
            BigDecimal totalByGoodsId = getTotalByGoodsId(cartVoList,minusVo);
            //销售价>满减价，去重
            if(totalByGoodsId.compareTo(cond) >= 0 && totalByGoodsId.compareTo(money) > 0 && containsList(switchList,minusVo)){
                CampMinusDto campMinusDto = setCampMinus(minusVo, money);
                result.add(campMinusDto);
                switchList.add(minusVo);
            }
        }
    }

    /**
     * 获取购物车中满足满减满折优惠的商品件数
     * @param cartGoodsList
     * @param minusVo
     * @return
     */
    private Integer getPieceByGoodsId(List<CartVo> cartGoodsList, MkStoreCampMinusVo minusVo){
        Integer total = 0;
        List<Integer> goodsList = minusVo.getGoodsIds();
        for (CartVo vo: cartGoodsList) {
            for(Integer goodsId:goodsList){
                if (goodsId.compareTo(vo.getGoods_id().intValue()) == 0
                        && minusVo.getStoreId().compareTo(vo.getStore_id().intValue()) == 0 && minusVo.getGoodsBizType().equalsIgnoreCase(vo.getGoodsBizType())) {
                    total = total + vo.getNumber();
                }
            }
        }
        return total;
    }

    /**
     * 获取可支持满减满折优惠的商品总销售价
     * @param cartGoodsList
     * @param minusVo
     * @return
     */
    private BigDecimal getTotalByGoodsId(List<CartVo> cartGoodsList, MkStoreCampMinusVo minusVo){
        BigDecimal total = new BigDecimal(0);
        List<Integer> goodsId = minusVo.getGoodsIds();
        for(int i = 0; i<goodsId.size();i++) {
            for (CartVo vo:cartGoodsList) {
                if (goodsId.get(i).compareTo(vo.getGoods_id().intValue()) == 0 && minusVo.getStoreId().compareTo(vo.getStore_id().intValue()) == 0 && minusVo.getGoodsBizType().equalsIgnoreCase(vo.getGoodsBizType())) {
                    total = total.add(vo.getRetail_price().multiply(BigDecimal.valueOf(vo.getNumber())));
                }
            }
        }
        return total;
    }
    /**
     * 去重
     * @param switchList
     * @param minusVo
     * @return
     */
    private Boolean containsList(List<MkStoreCampMinusVo> switchList, MkStoreCampMinusVo minusVo){
        for (MkStoreCampMinusVo vo: switchList) {
            if(vo.getCampMinusId().equals(minusVo.getCampMinusId())){
                return false;
            }
        }
        return true;
    }

    private CampMinusDto setCampMinus(MkStoreCampMinusVo minusVo, BigDecimal money){
        CampMinusDto campMinusDto = new CampMinusDto();
        campMinusDto.setCampMinusType(minusVo.getCampMinusType());
        campMinusDto.setCampName(minusVo.getCampName());
        campMinusDto.setMoney(money);
        campMinusDto.setCampMinusId(minusVo.getCampMinusId());
        campMinusDto.setGoodsBizType(minusVo.getGoodsBizType());
        campMinusDto.setGoodsIds(minusVo.getGoodsIds());
        return campMinusDto;
    }
    /**
     * 查询购物车商品所支持的满减满折活动
     * @param userCouponDto
     * @return
     */
    public Map queryStoreCampMinusByCartGoodsId(UserCouponDto userCouponDto){
        Integer storeId = Integer.parseInt(String.valueOf(userCouponDto.getStoreId()));
        long userId= userCouponDto.getUserId();
        List<CartVo> cartList = userCouponDto.getCartGoodsList();
        String bizType = userCouponDto.getBizType();
        Integer campId = userCouponDto.getCampId();
        List<MkStoreCampMinusVo> mkStoreCampMinusList = new ArrayList<>();
        for(int i=0;i<cartList.size();i++){
            CartVo cartVo = cartList.get(i);
            if(bizType.equalsIgnoreCase(cartVo.getGoodsBizType())) {
                mkStoreCampMinusList.addAll(queryStoreCampMinusByGoodsId(storeId, campId, Integer.parseInt(String.valueOf(cartVo.getGoods_id()))));
            }
        }
        Map map = new HashMap();
        map.put("mkStoreCampMinusList", mkStoreCampMinusList);
        return map;
    }
}
