| | |
| | | package com.ks.daylucky.service.impl.remote; |
| | | |
| | | import com.beust.jcommander.ParameterException; |
| | | import com.ks.daylucky.mapper.ActivityTagMapper; |
| | | import com.ks.daylucky.pojo.DO.ActivityTag; |
| | | import com.ks.daylucky.service.ActivityTagService; |
| | | import com.ks.lib.common.exception.ParamsException; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | |
| | | @Validated |
| | | @Override |
| | | public void addActivityTag(@Valid ActivityTag tag) throws ParameterException { |
| | | public void addActivityTag(@Valid ActivityTag tag) throws ParamsException { |
| | | if (tag.getWeight() == null) { |
| | | tag.setWeight(1); |
| | | } |
| | |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public void setTags(Long activityId, List<ActivityTag> tags) { |
| | | public void setTags(Long activityId, List<ActivityTag> tags) throws ParamsException { |
| | | if (tags == null) { |
| | | return; |
| | | } |