From c036557db88c6297b9a626a892dce35c14ab8ee5 Mon Sep 17 00:00:00 2001 From: nickchange <126672920+nickchange@users.noreply.github.com> Date: 星期四, 09 十一月 2023 18:30:31 +0800 Subject: [PATCH] 11.6 --- cloud-server-activity/src/main/java/com/dsh/activity/service/impl/IntroduceRewardsServiceImpl.java | 26 ++++++++++++++++++++++++++ 1 files changed, 26 insertions(+), 0 deletions(-) diff --git a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/IntroduceRewardsServiceImpl.java b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/IntroduceRewardsServiceImpl.java index c5f53b7..0a0c701 100644 --- a/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/IntroduceRewardsServiceImpl.java +++ b/cloud-server-activity/src/main/java/com/dsh/activity/service/impl/IntroduceRewardsServiceImpl.java @@ -3,8 +3,15 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; 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; /** * <p> @@ -16,5 +23,24 @@ */ @Service 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); + } + @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); + } } -- Gitblit v1.7.1