| | |
| | | package com.ks.lucky.service.impl.remote; |
| | | |
| | | import com.ks.lib.common.exception.ParamsException; |
| | | import com.ks.lucky.exception.LuckySponsorException; |
| | | import com.ks.lucky.mapper.LuckySponsorsMapper; |
| | | import com.ks.lucky.pojo.DO.LuckySponsors; |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Service(version = "1.0") |
| | | @Service(version = "1.0.0") |
| | | public class LuckySponsorServiceImpl implements LuckySponsorService { |
| | | |
| | | @Resource |
| | |
| | | |
| | | @Validated |
| | | @Override |
| | | public Long addSponsor(LuckySponsors sponsor) throws LuckySponsorException { |
| | | public Long addSponsor(LuckySponsors sponsor) throws ParamsException,LuckySponsorException { |
| | | LuckySponsorQuery query = new LuckySponsorQuery(); |
| | | query.account = sponsor.getAccount(); |
| | | query.start=0; |
| | | query.count=1; |
| | | List<LuckySponsors> list = luckySponsorsMapper.list(query); |
| | | if (list != null && list.size() > 0) { |
| | | throw new LuckySponsorException(LuckySponsorException.CODE_EXIST, "账号已经存在"); |