44323
2023-11-22 f6ba3e15355e22767e69f8fc14ae22523f8db8dc
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
@@ -1054,9 +1074,11 @@
    @ApiOperation(value = "已报名课程详情", tags = {"APP-开始上课"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "Authorization", value = "Bearer +token", required = true, dataType = "String", paramType = "header", defaultValue = "Bearer eyJhbGciOiJIUzUxMiJ9....."),
            @ApiImplicitParam(value = "经度", name = "lon", dataType = "string", required = false),
            @ApiImplicitParam(value = "纬度", name = "lat", dataType = "string", required = false),
            @ApiImplicitParam(name = "coursePayId" ,value = "课包记录id",dataType = "long"),
    })
    public ResultUtil<CourseDetailsResponse> getRegisteredData(Long coursePayId){
    public ResultUtil<CourseDetailsResponse> getRegisteredData(Long coursePayId, String lon, String lat){
        try {
            Integer appUserId = tokenUtil.getUserIdFormRedis();
            if(null == appUserId){
@@ -2183,7 +2205,7 @@
                    List<CoursePackageStudent> list5 = cspsService.list(new QueryWrapper<CoursePackageStudent>().eq("studentId", courseDetailReq.getStuId()).eq("coursePackageId",tCoursePackage.getId()));
                    if(list5.size()>0){
                    if(list5.size()>0&&list4.size()>0){
                        Integer signInOrNot = list4.get(0).getSignInOrNot();
                        detailsListVo.setType(1);