| | |
| | | package com.dsh.account.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.dsh.account.dto.CreateHistoryDto; |
| | | import com.dsh.account.dto.GetHistoryDto; |
| | | import com.dsh.account.dto.StudentSearch; |
| | | import com.dsh.account.dto.TStudentDto; |
| | | import com.dsh.account.dto.*; |
| | | import com.dsh.account.entity.GiftSearchDto; |
| | | import com.dsh.account.entity.TStudent; |
| | | import com.dsh.account.feignclient.course.CoursePaymentClient; |
| | | import com.dsh.account.feignclient.course.model.TCoursePackagePayment; |
| | | import com.dsh.account.model.StudentVo; |
| | | import com.dsh.account.service.TAppUserService; |
| | | import com.dsh.account.service.TStudentService; |
| | | import com.dsh.account.util.ResultUtil; |
| | | import com.dsh.account.util.TokenUtil; |
| | | import io.micrometer.core.instrument.search.Search; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import jdk.nashorn.internal.ir.annotations.Ignore; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import springfox.documentation.swagger2.mappers.ModelMapper; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据名称模糊搜索学员 |
| | | * @param name |
| | |
| | | |
| | | return getHistoryDtos; |
| | | } |
| | | |
| | | |
| | | @Resource |
| | | private CoursePaymentClient paymentClient; |
| | | @ResponseBody |
| | | @PostMapping("/student/giftSelect") |
| | | public List<SelectDto> giftSelect(@RequestBody GiftSearchDto giftSearchDto){ |
| | | System.out.println("======giftSelect=========giftSearchDto===="+giftSearchDto); |
| | | |
| | | // Integer appId = studentService.getGiftSelect(giftSearchDto); |
| | | TCoursePackagePayment coursePackagePaymentById = paymentClient.getCoursePackagePaymentById(giftSearchDto.getId()); |
| | | // System.out.println("=======giftSelect======appId====>"+appId); |
| | | List<TStudent> selectDtos = studentService.list(new QueryWrapper<TStudent>() |
| | | .select("name, id") |
| | | .eq("state", 1) |
| | | .eq("name", giftSearchDto.getName()).eq("phone",giftSearchDto.getPhone()).ne("appUserId",coursePackagePaymentById.getAppUserId())); |
| | | |
| | | |
| | | List<SelectDto> list = new ArrayList<>(); |
| | | for (TStudent student : selectDtos) { |
| | | SelectDto selectDto = new SelectDto(); |
| | | selectDto.setValue(student.getName()); |
| | | selectDto.setId(student.getId()); |
| | | list.add(selectDto); |
| | | } |
| | | System.out.println("=======giftSelect======selectDtos====>"+list); |
| | | return list; |
| | | } |
| | | } |