Commit a1dfac07 authored by liqin's avatar liqin 💬

bug fixed

parent 54bdac3f
...@@ -198,6 +198,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements ...@@ -198,6 +198,9 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
//通过与不通过时 都修改 //通过与不通过时 都修改
boolean updateRefItemByRefItemId = updateRefItemByRefItemId(audit); boolean updateRefItemByRefItemId = updateRefItemByRefItemId(audit);
if (AuditOperationEnum.EDIT.name().equals(audit.getOperation())) {
return updateRefItemByRefItemId;
}
int update = auditMapper.updateById(audit); int update = auditMapper.updateById(audit);
return updateRefItemByRefItemId && update >= 1; return updateRefItemByRefItemId && update >= 1;
} }
......
...@@ -406,8 +406,16 @@ public class ChinaMobileRestApiController extends BaseController { ...@@ -406,8 +406,16 @@ public class ChinaMobileRestApiController extends BaseController {
} }
} }
LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getVideoContentId()); LambdaQueryWrapper<Asset> assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getVideoContentId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT); assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.VIDEO_CONTENT.name());
List<Asset> videoList = this.assetService.list(assetQueryWrapper); List<Asset> videoList = this.assetService.list(assetQueryWrapper);
assetQueryWrapper.clear();
assetQueryWrapper = Wrappers.<Asset>lambdaQuery().eq(Asset::getRefItemId, exhibitionBoard.getId());
assetQueryWrapper.eq(Asset::getFileCat, FileCatEnum.EXHIBITION_BOARD_DATUM.name());
List<Asset> datumList = this.assetService.list(assetQueryWrapper);
exhibitionBoard.setDatumList(datumList);
videoList.addAll(datumList.stream().filter(x -> FileTypeEnum.VIDEO.name().equalsIgnoreCase(x.getFileType())).collect(Collectors.toList()));
exhibitionBoard.setVideoList(videoList); exhibitionBoard.setVideoList(videoList);
} }
return getResult(page); return getResult(page);
......
...@@ -61,6 +61,12 @@ public class ExhibitionBoardController extends BaseController { ...@@ -61,6 +61,12 @@ public class ExhibitionBoardController extends BaseController {
@ApiOperation(value = "添加展板", notes = "添加展板") @ApiOperation(value = "添加展板", notes = "添加展板")
@MethodLog(operModule = OperModule.DISPLAYCONTENT, operType = OperType.ADD) @MethodLog(operModule = OperModule.DISPLAYCONTENT, operType = OperType.ADD)
public Map<String, Object> saveExhibitionBoard(@Validated(value = {Add.class}) ExhibitionBoard exhibitionBoard) { public Map<String, Object> saveExhibitionBoard(@Validated(value = {Add.class}) ExhibitionBoard exhibitionBoard) {
final LambdaQueryWrapper<ExhibitionBoard> lambdaQueryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().eq(ExhibitionBoard::getName, exhibitionBoard.getName().trim());
final int count = this.exhibitionBoardService.count(lambdaQueryWrapper);
if (count > 0) {
return getFailResult("400", "名称已存在,请修改名称");
}
TUser user = getcurUser(); TUser user = getcurUser();
final List<String> audioIdList = exhibitionBoard.getAudioIdList(); final List<String> audioIdList = exhibitionBoard.getAudioIdList();
if (audioIdList == null || audioIdList.isEmpty()) { if (audioIdList == null || audioIdList.isEmpty()) {
...@@ -113,6 +119,13 @@ public class ExhibitionBoardController extends BaseController { ...@@ -113,6 +119,13 @@ public class ExhibitionBoardController extends BaseController {
@ApiOperation(value = "修改展板信息", notes = "修改展板信息") @ApiOperation(value = "修改展板信息", notes = "修改展板信息")
@MethodLog(operModule = OperModule.DISPLAYCONTENT, operType = OperType.UPDATE) @MethodLog(operModule = OperModule.DISPLAYCONTENT, operType = OperType.UPDATE)
public Map<String, Object> updateExhibitionBoard(@Validated(value = {Update.class}) ExhibitionBoard exhibitionBoard) { public Map<String, Object> updateExhibitionBoard(@Validated(value = {Update.class}) ExhibitionBoard exhibitionBoard) {
final LambdaQueryWrapper<ExhibitionBoard> lambdaQueryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().eq(ExhibitionBoard::getName, exhibitionBoard.getName().trim());
lambdaQueryWrapper.ne(ExhibitionBoard::getId, exhibitionBoard.getId());
final int count = this.exhibitionBoardService.count(lambdaQueryWrapper);
if (count > 0) {
return getFailResult("400", "名称已存在,请修改名称");
}
TUser user = getcurUser(); TUser user = getcurUser();
final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId()); final VideoContent videoContent = this.videoContentService.getById(exhibitionBoard.getVideoContentId());
exhibitionBoard.setVideoContentName(videoContent.getName()); exhibitionBoard.setVideoContentName(videoContent.getName());
......
...@@ -75,6 +75,12 @@ public class LearningContentController extends BaseController { ...@@ -75,6 +75,12 @@ public class LearningContentController extends BaseController {
@ApiOperation(value = "添加学习内容", notes = "添加学习内容") @ApiOperation(value = "添加学习内容", notes = "添加学习内容")
@MethodLog(operModule = OperModule.LEARNCONTENT, operType = OperType.ADD) @MethodLog(operModule = OperModule.LEARNCONTENT, operType = OperType.ADD)
public Map<String, Object> saveLearningContent(@Validated(value = {Add.class}) LearningContent learningContent) { public Map<String, Object> saveLearningContent(@Validated(value = {Add.class}) LearningContent learningContent) {
final LambdaQueryWrapper<LearningContent> lambdaQueryWrapper = Wrappers.<LearningContent>lambdaQuery().eq(LearningContent::getName, learningContent.getName().trim());
final int count = this.learningContentService.count(lambdaQueryWrapper);
if (count > 0) {
return getFailResult("400", "名称已存在,请修改名称");
}
final TUser tUser = getcurUser(); final TUser tUser = getcurUser();
if (tUser != null) { if (tUser != null) {
learningContent.setOrganCode(tUser.getOrgCode()); learningContent.setOrganCode(tUser.getOrgCode());
...@@ -147,6 +153,13 @@ public class LearningContentController extends BaseController { ...@@ -147,6 +153,13 @@ public class LearningContentController extends BaseController {
@ApiOperation(value = "修改学习内容信息", notes = "修改学习内容信息") @ApiOperation(value = "修改学习内容信息", notes = "修改学习内容信息")
@MethodLog(operModule = OperModule.LEARNCONTENT, operType = OperType.UPDATE) @MethodLog(operModule = OperModule.LEARNCONTENT, operType = OperType.UPDATE)
public Map<String, Object> updateLearningContent(@Validated(value = {Update.class}) LearningContent learningContent) { public Map<String, Object> updateLearningContent(@Validated(value = {Update.class}) LearningContent learningContent) {
final LambdaQueryWrapper<LearningContent> lambdaQueryWrapper = Wrappers.<LearningContent>lambdaQuery().eq(LearningContent::getName, learningContent.getName().trim());
lambdaQueryWrapper.ne(LearningContent::getId, learningContent.getId());
final int count = this.learningContentService.count(lambdaQueryWrapper);
if (count > 0) {
return getFailResult("400", "名称已存在,请修改名称");
}
TUser user = getcurUser(); TUser user = getcurUser();
learningContent.setAuditStatus(AuditStatusEnum.TBC.name()); learningContent.setAuditStatus(AuditStatusEnum.TBC.name());
// 保存业务节点信息 // 保存业务节点信息
......
...@@ -60,6 +60,12 @@ public class VideoContentController extends BaseController { ...@@ -60,6 +60,12 @@ public class VideoContentController extends BaseController {
@ApiOperation(value = "添加视频内容", notes = "添加视频内容") @ApiOperation(value = "添加视频内容", notes = "添加视频内容")
@MethodLog(operModule = OperModule.VIDEOCONTENT, operType = OperType.ADD) @MethodLog(operModule = OperModule.VIDEOCONTENT, operType = OperType.ADD)
public Map<String, Object> saveVideoContent(@Validated(value = {Add.class}) VideoContent videoContent) { public Map<String, Object> saveVideoContent(@Validated(value = {Add.class}) VideoContent videoContent) {
final LambdaQueryWrapper<VideoContent> lambdaQueryWrapper = Wrappers.<VideoContent>lambdaQuery().eq(VideoContent::getName, videoContent.getName().trim());
final int count = this.videoContentService.count(lambdaQueryWrapper);
if (count > 0) {
return getFailResult("400", "名称已存在,请修改名称");
}
TUser user = getcurUser(); TUser user = getcurUser();
final List<String> videoFileIdList = videoContent.getVideoFileIdList(); final List<String> videoFileIdList = videoContent.getVideoFileIdList();
if (videoFileIdList == null || videoFileIdList.isEmpty()) { if (videoFileIdList == null || videoFileIdList.isEmpty()) {
...@@ -106,6 +112,13 @@ public class VideoContentController extends BaseController { ...@@ -106,6 +112,13 @@ public class VideoContentController extends BaseController {
@ApiOperation(value = "修改视频内容信息", notes = "修改视频内容信息") @ApiOperation(value = "修改视频内容信息", notes = "修改视频内容信息")
@MethodLog(operModule = OperModule.VIDEOCONTENT, operType = OperType.UPDATE) @MethodLog(operModule = OperModule.VIDEOCONTENT, operType = OperType.UPDATE)
public Map<String, Object> updateVideoContent(@Validated(value = {Update.class}) VideoContent videoContent) { public Map<String, Object> updateVideoContent(@Validated(value = {Update.class}) VideoContent videoContent) {
final LambdaQueryWrapper<VideoContent> lambdaQueryWrapper = Wrappers.<VideoContent>lambdaQuery().eq(VideoContent::getName, videoContent.getName().trim());
lambdaQueryWrapper.ne(VideoContent::getId, videoContent.getId());
final int count = this.videoContentService.count(lambdaQueryWrapper);
if (count > 0) {
return getFailResult("400", "名称已存在,请修改名称");
}
TUser user = getcurUser(); TUser user = getcurUser();
videoContent.setAuditStatus(AuditStatusEnum.TBC.name()); videoContent.setAuditStatus(AuditStatusEnum.TBC.name());
boolean flag = videoContentService.updateById(videoContent); boolean flag = videoContentService.updateById(videoContent);
......
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