| | |
| | | |
| | | import com.ks.lib.common.exception.ParamsException; |
| | | import com.ks.lucky.exception.LuckyActivitySponsorInfoException; |
| | | import com.ks.lucky.exception.LuckySponsorAdException; |
| | | import com.ks.lucky.pojo.DO.LuckyActivitySponsorInfo; |
| | | import com.ks.lucky.remote.service.LuckyActivitySponsorInfoService; |
| | | import com.ks.lucky.service.impl.LuckyActivitySponsorInfoManager; |
| | |
| | | |
| | | @Validated |
| | | @Override |
| | | public Long addSponsorInfo(LuckyActivitySponsorInfo sponsorInfo) throws ParamsException,LuckyActivitySponsorInfoException { |
| | | public Long addSponsorInfo(LuckyActivitySponsorInfo sponsorInfo) throws ParamsException, LuckyActivitySponsorInfoException, LuckySponsorAdException { |
| | | luckyActivitySponsorInfoManager.addSponsorInfo(sponsorInfo); |
| | | return sponsorInfo.getId(); |
| | | } |
| | | |
| | | @Override |
| | | public void updateSponsorInfo(LuckyActivitySponsorInfo sponsorInfo) throws LuckyActivitySponsorInfoException { |
| | | luckyActivitySponsorInfoManager.updateSponsorInfo(sponsorInfo); |
| | | LuckyActivitySponsorInfo old = luckyActivitySponsorInfoManager.getSponsorInfoDetail(sponsorInfo.getId()); |
| | | if (old == null) { |
| | | return; |
| | | } |
| | | |
| | | luckyActivitySponsorInfoManager.updateSponsorInfo(sponsorInfo, old.getActivityId()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public void deleteSponsorInfo(Long id) { |
| | | luckyActivitySponsorInfoManager.deleteSponsorInfo(id); |
| | | LuckyActivitySponsorInfo old = luckyActivitySponsorInfoManager.getSponsorInfoDetail(id); |
| | | if (old == null) { |
| | | return; |
| | | } |
| | | luckyActivitySponsorInfoManager.deleteSponsorInfo(id, old.getActivityId()); |
| | | } |
| | | } |