| | |
| | | import com.dsh.activity.entity.IntroduceRewards; |
| | | import com.dsh.activity.mapper.IntroduceRewardsMapper; |
| | | import com.dsh.activity.model.IntroduceChangeStateDTO; |
| | | import com.dsh.activity.model.IntroduceQuery; |
| | | import com.dsh.activity.model.IntroduceVO; |
| | | import com.dsh.activity.service.IntroduceRewardsService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | public class IntroduceRewardsServiceImpl extends ServiceImpl<IntroduceRewardsMapper, IntroduceRewards> implements IntroduceRewardsService { |
| | | @Autowired |
| | | private IntroduceRewardsMapper introduceRewardsMapper; |
| | | |
| | | @Override |
| | | public Object changeState(IntroduceChangeStateDTO dto) { |
| | | List<Integer> ids = dto.getIds(); |
| | | Integer state = dto.getState(); |
| | | return introduceRewardsMapper.changeState(ids,state); |
| | | return introduceRewardsMapper.changeState(ids, state); |
| | | } |
| | | |
| | | @Override |
| | | public List<IntroduceVO> listAll(IntroduceQuery query) { |
| | | |
| | | String STime = null; |
| | | String ETime = null; |
| | | if (StringUtils.hasLength(query.getTime())) { |
| | | STime = query.getTime().split(" - ")[0] + " 00:00:00"; |
| | | ETime = query.getTime().split(" - ")[1] + " 23:59:59"; |
| | | } |
| | | return introduceRewardsMapper.listAll(query, STime, ETime); |
| | | } |
| | | } |