Commit 4ea9df43 authored by 王淑君's avatar 王淑君

修改更新视频进度

parent ec319629
...@@ -15,8 +15,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2; ...@@ -15,8 +15,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
/** /**
* Created by lcy on 17/8/9. * Created by lcy on 17/8/9.
*/ */
@EnableDiscoveryClient //@EnableDiscoveryClient
//@EnableEurekaClient @EnableEurekaClient
@EnableFeignClients @EnableFeignClients
@SpringBootApplication @SpringBootApplication
@EnableTransactionManagement @EnableTransactionManagement
......
...@@ -12,11 +12,11 @@ public class AddOrUpdateDTO { ...@@ -12,11 +12,11 @@ public class AddOrUpdateDTO {
@ApiModelProperty(value = "BannerId" ,required = false, dataType = "varchar") @ApiModelProperty(value = "BannerId" ,required = false, dataType = "varchar")
private String businessId; private String businessId;
@NotBlank @NotBlank(message = "标题不能为空")
@ApiModelProperty(value = "标题" ,required = true, dataType = "varchar") @ApiModelProperty(value = "标题" ,required = true, dataType = "varchar")
private String title; private String title;
@NotBlank @NotBlank(message = "图片未上传")
@ApiModelProperty(value = "图片地址",required = true, dataType = "varchar") @ApiModelProperty(value = "图片地址",required = true, dataType = "varchar")
private String imageUrl; private String imageUrl;
......
...@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiImplicitParams; ...@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.rcisoft.business.brstudentchapter.dto.BRStudentChapterDto; import org.rcisoft.business.brstudentchapter.dto.BRStudentChapterDto;
import org.rcisoft.common.controller.PaginationController; import org.rcisoft.common.controller.PaginationController;
import org.rcisoft.sys.user.bean.CurUser;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -41,7 +42,8 @@ public class BRStudentChapterController extends PaginationController<BRStudentCh ...@@ -41,7 +42,8 @@ public class BRStudentChapterController extends PaginationController<BRStudentCh
@ApiOperation(value="1201 添加/更新学生端观看章节进度", notes="添加/更新") @ApiOperation(value="1201 添加/更新学生端观看章节进度", notes="添加/更新")
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")}) //@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@PostMapping(value = "/add") @PostMapping(value = "/add")
public Result addOrUpdate(@Valid BRStudentChapterDto brStudentChapterDto, BindingResult bindingResult) { public Result addOrUpdate(CurUser curUser, @Valid BRStudentChapterDto brStudentChapterDto, BindingResult bindingResult) {
brStudentChapterDto.setStudentId(curUser.getUserId());
PersistModel data = bRStudentChapterServiceImpl.save(brStudentChapterDto); PersistModel data = bRStudentChapterServiceImpl.save(brStudentChapterDto);
return Result.builder(data, return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS, MessageConstant.MESSAGE_ALERT_SUCCESS,
......
...@@ -61,10 +61,10 @@ public class ValidatedResult implements Serializable{ ...@@ -61,10 +61,10 @@ public class ValidatedResult implements Serializable{
while(var3.hasNext()) { while(var3.hasNext()) {
FieldError fieldError = (FieldError)var3.next(); FieldError fieldError = (FieldError)var3.next();
this.errorsMap.put(fieldError.getField(), new String[]{fieldError.getDefaultMessage(), fieldError.getCode()}); this.errorsMap.put(" ",new String[]{fieldError.getDefaultMessage()});
// this.errorsMap.put(fieldError.getField(), new String[]{fieldError.getDefaultMessage(), fieldError.getCode()});
} }
} }
return this.errorsMap; return this.errorsMap;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment