package com.xzx.gc.order.service;
|
|
import com.xzx.gc.entity.BlackWhite;
|
import com.xzx.gc.order.mapper.BlackWhiteMapper;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.stereotype.Service;
|
import org.springframework.transaction.annotation.Transactional;
|
|
@Service
|
@Transactional
|
public class BlackWhiteService {
|
|
|
@Autowired
|
BlackWhiteMapper blackWhiteMapper;
|
|
|
/**
|
* 查询用户是否在白名单或黑名单内
|
* @param activityType 活动类型 1,红包 2 分利 3分享
|
* @param mobile
|
* @param type 1黑名单 2白名单
|
* @return
|
*/
|
public boolean isWhiteByMobile(String activityType,String mobile,String type){
|
BlackWhite blackWhite=new BlackWhite();
|
blackWhite.setActivClass(activityType);
|
blackWhite.setUserMobile(mobile);
|
blackWhite.setBlackWhite(type);
|
int i = blackWhiteMapper.selectCount(blackWhite);
|
if(i>0){
|
return true;
|
}
|
return false;
|
}
|
|
|
|
|
}
|