| | |
| | | |
| | | |
| | | import com.dsh.course.feignClient.activity.BenefitsVideoClient; |
| | | import com.dsh.course.feignClient.activity.PointMercharsClient; |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVedioChangeStateVO; |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVideoClassification; |
| | | import com.dsh.course.feignClient.activity.model.BenefitsVideos; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | public String infoBenefitsVideos(Model model, @PathVariable("id") Integer id,@PathVariable("type") Integer type,@PathVariable("benefitsVideosId") Integer benefitsVideosId) { |
| | | TQueryBenefitsVideosVO tQueryBenefitsVideosVO = new TQueryBenefitsVideosVO(); |
| | | BenefitsVideos benefitVideosById = benefitsVideoClient.getBenefitVideosById(benefitsVideosId); |
| | | TCourse tCourse = courseClient.queryCourseById(id); |
| | | TCourse tCourse = courseClient.queryCourseById(benefitVideosById.getCourseId()); |
| | | BeanUtils.copyProperties(tCourse,tQueryBenefitsVideosVO); |
| | | tQueryBenefitsVideosVO.setIntegral(benefitVideosById.getIntegral()); |
| | | tQueryBenefitsVideosVO.setBenefitsVideosId(benefitVideosById.getId()); |
| | |
| | | for (BenefitsVideos benefitsVideos : benefitVideoById) { |
| | | for (TQueryBenefitsVideosVO courseByCourseId : courseByCourseIds) { |
| | | if (benefitsVideos.getCourseId().equals(courseByCourseId.getId())){ |
| | | courseByCourseId.setId(benefitsVideos.getId()); |
| | | courseByCourseId.setIntegral(benefitsVideos.getIntegral()); |
| | | courseByCourseId.setBenefitsVideosId(benefitsVideos.getId()); |
| | | courseByCourseId.setState(benefitsVideos.getState()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return courseByCourseIds; |
| | | } |
| | | /** |
| | |
| | | * |
| | | * @return |
| | | */ |
| | | |
| | | @Resource |
| | | private PointMercharsClient mercharsClient; |
| | | @RequestMapping("/changeCourseState") |
| | | @ResponseBody |
| | | public Object changeCourseState(@RequestBody CourseChangeStateDTO dto){ |
| | | |
| | | courseClient.changeState(dto); |
| | | mercharsClient.changeState(dto); |
| | | |
| | | return ResultUtil.success(); |
| | | } |
| | | |