|
@@ -26,6 +26,7 @@ import com.ym.mec.thirdparty.message.MessageSenderPluginContext;
|
|
|
import com.ym.mec.thirdparty.message.MessageSenderPluginContext.MessageSender;
|
|
|
import com.ym.mec.util.collection.MapUtil;
|
|
|
import com.ym.mec.util.date.DateUtil;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
@@ -83,6 +84,9 @@ public class StudentCourseHomeworkServiceImpl extends BaseServiceImpl<Long, Stud
|
|
|
@Override
|
|
|
@Transactional(rollbackFor = Exception.class)
|
|
|
public void submitHomework(StudentCourseHomework bean) {
|
|
|
+ if(Objects.isNull(bean.getAttachments())||StringUtils.isBlank(bean.getAttachments())){
|
|
|
+ throw new BizException("请选择作业");
|
|
|
+ }
|
|
|
StudentCourseHomework existHomework = studentCourseHomeworkDao.get(bean.getId());
|
|
|
if (Objects.isNull(bean) || Objects.isNull(bean.getId()) || Objects.isNull(existHomework)) {
|
|
|
throw new BizException("作业不存在");
|