Skip to content

Commit

Permalink
style:代码格式化调整
Browse files Browse the repository at this point in the history
  • Loading branch information
kui committed Jul 27, 2024
1 parent 02abc58 commit 135d250
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@
*/
@Data
public class SurveyMetaUpdateParam implements Serializable {
@NotBlank(message = "问卷id不能为空",groups = {Update.class,Delete.class})
@NotBlank(message = "问卷id不能为空", groups = {Update.class, Delete.class})
private String surveyId;
@NotBlank(message = "问卷标题不能为空",groups = {Update.class})
@NotBlank(message = "问卷标题不能为空", groups = {Update.class})
private String title;
@NotBlank(message = "问卷描述不能为空",groups = {Update.class})
@NotBlank(message = "问卷描述不能为空", groups = {Update.class})
private String remark;

public interface Update {
}

public interface Delete {
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ public RpcResult<Object> getBannerData() {
@PostMapping("/updateConf")
public RpcResult<Boolean> updateConf(HttpServletRequest request,
@RequestBody @Validated(SurveyInfoInVO.UpdateConf.class) SurveyInfoInVO infoInVO) {
SurveyConf surveyConf = new SurveyConf();
SurveyConf surveyConf = new SurveyConf();
surveyConf.setCode(infoInVO.getConfigData());
surveyConf.setPageId(infoInVO.getSurveyId());
surveyConfService.saveSurveyConfig(surveyConf);
Expand Down Expand Up @@ -105,24 +105,25 @@ public RpcResult<SurveyInfoOutVO> getSurvey(@RequestParam("surveyId") @NotBlank
*/
@PostMapping("/updateMeta")
public RpcResult updateMeta(@RequestBody @Validated(SurveyMetaUpdateParam.Update.class) SurveyMetaUpdateParam param) {
boolean flag = surveyService.updateMeta(param);
boolean flag = surveyService.updateMeta(param);
if (flag) {
return RpcResultUtil.createSuccessResult(null);
}
return RpcResultUtil.createFailedResult(RespErrorCode.UPDATE_SURVEY_META_ERROR.getCode(),RespErrorCode.UPDATE_SURVEY_META_ERROR.getMessage());
return RpcResultUtil.createFailedResult(RespErrorCode.UPDATE_SURVEY_META_ERROR.getCode(), RespErrorCode.UPDATE_SURVEY_META_ERROR.getMessage());
}

/**
* 删除问卷
*
* @param param
* @return
*/
@PostMapping("/deleteSurvey")
public RpcResult deleteSurvey(@RequestBody @Validated(SurveyMetaUpdateParam.Delete.class) SurveyMetaUpdateParam param) {
boolean flag = surveyService.deleteSurvey(param.getSurveyId());
boolean flag = surveyService.deleteSurvey(param.getSurveyId());
if (flag) {
return RpcResultUtil.createSuccessResult(null);
}
return RpcResultUtil.createFailedResult(RespErrorCode.DELETE_SURVEY_ERROR.getCode(),RespErrorCode.DELETE_SURVEY_ERROR.getMessage());
return RpcResultUtil.createFailedResult(RespErrorCode.DELETE_SURVEY_ERROR.getCode(), RespErrorCode.DELETE_SURVEY_ERROR.getMessage());
}
}

0 comments on commit 135d250

Please sign in to comment.