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

修改更新视频进度

parent ec319629
......@@ -15,8 +15,8 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
/**
* Created by lcy on 17/8/9.
*/
@EnableDiscoveryClient
//@EnableEurekaClient
//@EnableDiscoveryClient
@EnableEurekaClient
@EnableFeignClients
@SpringBootApplication
@EnableTransactionManagement
......
......@@ -12,11 +12,11 @@ public class AddOrUpdateDTO {
@ApiModelProperty(value = "BannerId" ,required = false, dataType = "varchar")
private String businessId;
@NotBlank
@NotBlank(message = "标题不能为空")
@ApiModelProperty(value = "标题" ,required = true, dataType = "varchar")
private String title;
@NotBlank
@NotBlank(message = "图片未上传")
@ApiModelProperty(value = "图片地址",required = true, dataType = "varchar")
private String imageUrl;
......
......@@ -8,6 +8,7 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.rcisoft.business.brstudentchapter.dto.BRStudentChapterDto;
import org.rcisoft.common.controller.PaginationController;
import org.rcisoft.sys.user.bean.CurUser;
import org.springframework.validation.BindingResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
......@@ -41,7 +42,8 @@ public class BRStudentChapterController extends PaginationController<BRStudentCh
@ApiOperation(value="1201 添加/更新学生端观看章节进度", notes="添加/更新")
//@ApiImplicitParams({@ApiImplicitParam(name = "businessId", value = "businessId", required = false, dataType = "varchar")})
@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);
return Result.builder(data,
MessageConstant.MESSAGE_ALERT_SUCCESS,
......
......@@ -61,10 +61,10 @@ public class ValidatedResult implements Serializable{
while(var3.hasNext()) {
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;
}
......
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