|
@@ -16,7 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.HttpStatus;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
-import java.util.Date;
|
|
|
+import java.util.Calendar;
|
|
|
import java.util.List;
|
|
|
import java.util.Objects;
|
|
|
|
|
@@ -113,6 +113,11 @@ public class CourseReviewController extends BaseController {
|
|
|
if (Objects.isNull(sysUser)) {
|
|
|
return failed(HttpStatus.FORBIDDEN, "请登录");
|
|
|
}
|
|
|
+ if(null == courseHomeworkInfo.getExpiryDate()){
|
|
|
+ Calendar instance = Calendar.getInstance();
|
|
|
+ instance.add(Calendar.WEEK_OF_MONTH,1);
|
|
|
+ courseHomeworkInfo.setExpiryDate(instance.getTime());
|
|
|
+ }
|
|
|
return succeed(courseReviewService.addHomeWork(courseHomeworkInfo));
|
|
|
}
|
|
|
|