/**
* 发布
*
* @param
* @return
*/
@AutoLog(value = "情报专列-发布")
@ApiOperation(value="情报专列-发布", notes="情报专列-发布")
@PutMapping(value = "/release")
public Result<?> release(@RequestBody LIntelligenceEntity lIntelligenceEntity) {
String publisher = lIntelligenceEntity.getPublisher();
log.debug("发布人{}",publisher);
LoginUser loginUser = getCurrentUser();
String userId = loginUser.getId();
if (publisher.equals("") ){
return Result.error("通知发布者为空");
}
if (userId.equals("")){
return Result.error("请检查当前用户");
}
if ( userId.equals(publisher) ){
lIntelligenceEntity.setReason("");
//lIntelligenceEntity.setStatus(6);
lIntelligenceService.updateById(lIntelligenceEntity);
return Result.ok("发布成功!");
}else {
return Result.error("您不是情报发布人");
}
}
当前用户才可发布情报
最新推荐文章于 2024-07-08 20:45:00 发布