Authored by LUOXC

是否支持被邀请

package com.yohoufo.order.controller;
import com.yoho.core.config.ConfigReader;
import com.yohoufo.common.ApiResponse;
import com.yohoufo.order.model.InviteSettlementListVO;
import com.yohoufo.order.service.IStoredSellerService;
import com.yohoufo.order.service.InviterService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
/**
... ... @@ -20,6 +23,12 @@ public class InviterController {
@Autowired
private InviterService inviterService;
@Autowired
private ConfigReader configReader;
@Autowired
private IStoredSellerService storedSellerService;
/**
* 我的收款记录
*
... ... @@ -39,4 +48,15 @@ public class InviterController {
return new ApiResponse.ApiResponseBuilder().code(200).message("ok").build();
}
@RequestMapping(params = "method=ufo.invite.isSupportBeenInvited")
@ResponseBody
public ApiResponse isSupportInvite(@RequestParam(name = "uid") Integer uid) {
boolean isSupportInvite = false;
if (configReader.getBoolean("ufo.invite.isSupportBeenInvited", true)) {
boolean userIsInHistory = storedSellerService.isStoredSellerInHistory(uid);
isSupportInvite = !userIsInHistory;
}
return new ApiResponse.ApiResponseBuilder().code(200).data(isSupportInvite).message("ok").build();
}
}
... ...
... ... @@ -14,6 +14,8 @@ public interface IStoredSellerService {
boolean isStoredSeller(Integer uid);
boolean isStoredSellerInHistory(Integer uid);
SellerResp entryStatus(Integer uid);
void addUserAsStoredSeller(Integer uid, EntrySellerType entrySellerType, SellerLevelFuncBo sellerLevelFuncBo);
... ... @@ -26,4 +28,5 @@ public interface IStoredSellerService {
int disableSpecialSuper(Integer uid);
int removeStoredSeller(Integer uid);
}
... ...
... ... @@ -8,8 +8,10 @@ import com.yohobuy.ufo.model.order.common.EntrySellerType;
import com.yohobuy.ufo.model.order.resp.SellerResp;
import com.yohoufo.common.caller.UfoServiceCaller;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.dal.order.SellerWalletMapper;
import com.yohoufo.dal.order.StoredSellerMapper;
import com.yohoufo.dal.order.SuperEntrySellerMapper;
import com.yohoufo.dal.order.model.SellerWallet;
import com.yohoufo.dal.order.model.StoredSeller;
import com.yohoufo.dal.order.model.SuperEntrySeller;
import com.yohoufo.dal.user.model.ZhiMaCert;
... ... @@ -27,6 +29,7 @@ import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
import java.time.ZoneOffset;
import java.util.Objects;
import java.util.Optional;
@Service
public class StoreSellerServiceImpl implements IStoredSellerService {
... ... @@ -73,6 +76,11 @@ public class StoreSellerServiceImpl implements IStoredSellerService {
}
@Override
public boolean isStoredSellerInHistory(Integer uid) {
return Objects.nonNull(storedSellerMapper.selectByUid(uid));
}
@Override
public SellerResp entryStatus(Integer uid){
logger.info("StoredSellerServiceImpl entryStatus uid is {} ",uid);
Boolean isZhiMaCert=false;
... ...
... ... @@ -23,4 +23,5 @@ ufo.order.sellerDeliverNewOnlineTime = 1548756000
ufo.order.sellerDeliverNewOnlineTimeEx = 1550127600
ufo.product.productLimitInfo=10009017,10008631,10008633,10008635,10008637,10008639,10008641,10008643,10008645,10008647,10008649,10008651,10008653,10008655,10008657,10008659,10008661,10008663,10008665,10008667,10008669,10008671,10008673,10008675,10008677,10008679,10008681,10008683,10008685,10008687,10008689,10008691,10008693,10008695,10008697,10008699,10008701,10008703,10008705,10008707,10008709,10008711,10008715,10008717,10008719,10008721,10008723,10008725,10008727,10008729,10008731,10008733,10008735,10008737,10008739,10008741,10008743,10008745,10008747,10008749,10008751,10008753,10008755,10008757,10008759,10008761,10008763,10008765,10008767,10008769,10008771,10008773,10008775,10008777,10008779,10008781,10008783,10008785,10008787,10009013,10009015,10009021,10009023,10009025,10009027,10009029,10009031,10009033,10009035,10009037,10009039,10009041,10009043,10009045,10009047,10008789,10008791,10008793,10008795,10008797,10008799,10008801,10008803,10008805,10008807,10008809,10008811,10008813,10008815,10008817,10008819,10008821,10008823,10008825,10008827,10008829,10008831,10008833,10008835,10008837,10008839,10008841,10008843,10008845,10008847,10008849,10008851,10008853,10008855,10008857,10008859,10008861,10008863,10008865,10008867,10008869,10008871,10008873,10008875,10008885,10008887,10008889,10008891,10008893,10008895,10008897,10008899,10008901,10008903,10008905,10008907,10008909,10008911,10008913,10008921,10008923,10008929,10008931,10008933,10008935,10008937,10008939,10008941,10008943,10008945,10008947,10008949,10008951,10008953,10008955,10008957,10008959,10008961,10008963,10008965,10008967,10008969,10008971,10008973,10008975,10008977,10008979,10008981,10008983,10008985,10008987,10008989,10008991,10008993,10008995,10008997,10008999,10009001,10009003,10009005,10009007,10009019,10009049,10009051,10009053,10009055,10009057,10009061,10009063,10009065,10009067
ufo.seller.rejoinMaxTimes=1
ufo.invite.isSupportBeenInvited=true
... ...