44323
2023-11-22 1863e6353f0de84082a21738f5d0a28f3cfeadc0
cloud-server-course/src/main/java/com/dsh/course/controller/CoursePackagePaymentController.java
@@ -38,6 +38,7 @@
import net.bytebuddy.asm.Advice;
import org.aspectj.weaver.ast.Var;
import io.swagger.models.auth.In;
import org.checkerframework.checker.units.qual.C;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
@@ -131,6 +132,25 @@
    private CoursePackageStudentService coursePackageStudentService;
    private final SimpleDateFormat format = new SimpleDateFormat("MM-dd HH:mm");
    /**
     * 查询学员入学时间 根据第一次购买课包的时间
     * @return
     */
    @RequestMapping("/base/coursePackagePayment/getTime")
    public String getTime(@RequestBody Integer studentId){
        List<TCoursePackagePayment> list = packagePaymentService.list(new QueryWrapper<TCoursePackagePayment>()
                .eq("studentId", studentId)
                .orderByDesc("insertTime")
                .last("LIMIT 1"));
        if (list.size()>0){
            SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd");
            Date insertTime = list.get(0).getInsertTime();
            String format1 = format.format(list.get(0).getInsertTime());
            return format1;
        }
        return "";
    }
    /**
     * 添加购课记录-后台
     * @return