|
@@ -14,6 +14,7 @@ import com.redxun.common.base.search.QueryFilterBuilder;
|
|
|
import com.redxun.common.constant.HttpMethodConstants;
|
|
|
import com.redxun.common.utils.ContextUtil;
|
|
|
import com.redxun.common.utils.ExceptionUtil;
|
|
|
+import com.redxun.knowledge.map.entity.dto.PkIdDto;
|
|
|
import com.redxun.knowledge.map.entity.vo.KnowledgeVo;
|
|
|
import com.redxun.knowledge.map.entity.vo.OsUserVo;
|
|
|
import com.redxun.knowledge.map.entity.dao.Map;
|
|
@@ -28,6 +29,8 @@ import io.swagger.annotations.ApiOperation;
|
|
|
import io.swagger.annotations.ApiParam;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.validation.BindingResult;
|
|
|
+import org.springframework.validation.annotation.Validated;
|
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
|
|
import java.util.HashMap;
|
|
@@ -171,6 +174,18 @@ public class MapController extends BaseController<Map> {
|
|
|
return jsonResult.setData(knowledgeVo);
|
|
|
}
|
|
|
|
|
|
+ @ApiOperation("设置地图学习内容学习状态")
|
|
|
+ @PostMapping("updateLearningStateV2")
|
|
|
+ public JsonResult updateLearningStateV2(@Validated @RequestBody PkIdDto pkIdDto, BindingResult validResult) {
|
|
|
+ JsonResult jsonResult = JsonResult.getSuccessResult("");
|
|
|
+ if (validResult.hasErrors()) {
|
|
|
+ return jsonResult.setMessage("参数错误");
|
|
|
+ }
|
|
|
+ mapService.updateLearningStateV2(pkIdDto.getPkId(),pkIdDto.getUserId());
|
|
|
+ //jsonResult.setMessage("考试完成!");
|
|
|
+ return jsonResult.setData("");
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|