Commit a33ba06b authored by liqin's avatar liqin 💬

bug fixed

parent f5468d06
......@@ -64,6 +64,11 @@ public class CopyrightOwner implements Serializable {
@TableField("remarks")
private String remarks;
@ApiModelProperty("是否已删除")
@TableField("is_deleted")
@TableLogic
private Boolean deleted;
@ApiModelProperty("创建日期")
@TableField(value = "create_time", fill = FieldFill.INSERT)
private LocalDateTime createTime;
......
......@@ -46,6 +46,11 @@ public class ExhibitionBoardCat implements Serializable {
@TableField("remarks")
private String remarks;
@ApiModelProperty("是否已删除")
@TableField("is_deleted")
@TableLogic
private Boolean deleted;
@ApiModelProperty("创建日期")
@TableField(value = "create_time", fill = FieldFill.INSERT)
private LocalDateTime createTime;
......
......@@ -43,13 +43,18 @@ public class VideoContentCat implements Serializable {
@NotBlank(message = "视频内容分类名称不能为空", groups = {Add.class, Update.class})
private String name;
@ApiModelProperty("版权方ID")
@TableField("copyright_owner_id")
private String copyrightOwnerId;
@ApiModelProperty("备注")
@TableField("remarks")
private String remarks;
@ApiModelProperty("版权方ID")
@TableField("copyright_owner_id")
private String copyrightOwnerId;
@ApiModelProperty("是否已删除")
@TableField("is_deleted")
@TableLogic
private Boolean deleted;
@ApiModelProperty("创建日期")
@TableField(value = "create_time", fill = FieldFill.INSERT)
......
......@@ -149,8 +149,7 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
wrapper.eq("type", type);
}
wrapper.orderByDesc("create_time").last("limit 1");
Audit one = getOne(wrapper);
return one;
return getOne(wrapper);
}
/**
......@@ -236,7 +235,6 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
return update;
}
/**
* 根据审核操作 填充VideoContent属性用于更改
*
......@@ -248,18 +246,15 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
videoContent.setId(audit.getRefItemId());
videoContent.setAuditStatus(audit.getStatus());
//当审核级别为复审,审核状态为通过是,会修改审核项其它表中的 发布与删除字段,不是此情况下是直接修改审核状态
boolean continueFill = AuditStatusEnum.APPROVED_FINAL.name().equals(audit.getStatus()) &&
AuditStatusEnum.TBCA.name().equals(audit.getLevel());
boolean continueFill = AuditStatusEnum.APPROVED_FINAL.name().equals(audit.getStatus()) && AuditStatusEnum.TBCA.name().equals(audit.getLevel());
if (!continueFill) {
return videoContent;
}
//
String operation = audit.getOperation();
AuditOperationEnum auditOperationEnum = AuditOperationEnum.valueOf(operation);
switch (auditOperationEnum) {
case ENABLE:
videoContent.setPublished(true);
videoContent.setDeleted(false);
break;
case DISABLE:
videoContent.setPublished(false);
......@@ -283,19 +278,15 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
exhibitionBoard.setId(audit.getRefItemId());
exhibitionBoard.setAuditStatus(audit.getStatus());
//当审核级别为复审,审核状态为通过是,会修改审核项其它表中的 发布与删除字段,不是此情况下是直接修改审核状态
boolean continueFill = AuditStatusEnum.APPROVED_FINAL.name().equals(audit.getStatus()) &&
AuditStatusEnum.TBCA.name().equals(audit.getLevel());
boolean continueFill = AuditStatusEnum.APPROVED_FINAL.name().equals(audit.getStatus()) && AuditStatusEnum.TBCA.name().equals(audit.getLevel());
if (!continueFill) {
return exhibitionBoard;
}
//
String operation = audit.getOperation();
AuditOperationEnum auditOperationEnum = AuditOperationEnum.valueOf(operation);
switch (auditOperationEnum) {
case UPPER:
exhibitionBoard.setPublished(true);
exhibitionBoard.setDeleted(false);
break;
case LOWER:
exhibitionBoard.setPublished(false);
......@@ -319,19 +310,15 @@ public class AuditServiceImpl extends ServiceImpl<AuditMapper, Audit> implements
learningContent.setAuditStatus(audit.getStatus());
learningContent.setId(audit.getRefItemId());
//当审核级别为复审,审核状态为通过是,会修改审核项其它表中的 发布与删除字段,不是此情况下是直接修改审核状态
boolean continueFill = AuditStatusEnum.APPROVED_FINAL.name().equals(audit.getStatus()) &&
AuditStatusEnum.TBCA.name().equals(audit.getLevel());
boolean continueFill = AuditStatusEnum.APPROVED_FINAL.name().equals(audit.getStatus()) && AuditStatusEnum.TBCA.name().equals(audit.getLevel());
if (!continueFill) {
return learningContent;
}
//
String operation = audit.getOperation();
AuditOperationEnum auditOperationEnum = AuditOperationEnum.valueOf(operation);
switch (auditOperationEnum) {
case ENABLE:
learningContent.setPublished(true);
learningContent.setDeleted(false);
break;
case DISABLE:
learningContent.setPublished(false);
......
......@@ -10,8 +10,8 @@ import cn.wisenergy.chnmuseum.party.common.validator.groups.Update;
import cn.wisenergy.chnmuseum.party.common.vo.AuditStatusParam;
import cn.wisenergy.chnmuseum.party.model.Audit;
import cn.wisenergy.chnmuseum.party.model.TUser;
import cn.wisenergy.chnmuseum.party.service.impl.AuditServiceImpl;
import cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl;
import cn.wisenergy.chnmuseum.party.service.AuditService;
import cn.wisenergy.chnmuseum.party.service.TUserService;
import cn.wisenergy.chnmuseum.party.web.controller.base.BaseController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
......@@ -21,7 +21,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -47,10 +46,10 @@ import java.util.Map;
public class AuditController extends BaseController {
@Resource
private AuditServiceImpl auditService;
private AuditService auditService;
@Resource
private TUserServiceImpl userService;
private TUserService userService;
@GetMapping("/getUserList")
@RequiresAuthentication //@RequiresPermissions("/audit/getUserList")
......@@ -63,11 +62,11 @@ public class AuditController extends BaseController {
@ApiImplicitParam(name = "status", value = "TBC,REFUSED,TBCA,APPROVED_FINAL", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "level", value = "TBC,TBCA", paramType = "query", dataType = "String")
})
@MethodLog(operModule = OperModule.RECHECK,operType = OperType.SELECT)
@MethodLog(operModule = OperModule.RECHECK, operType = OperType.SELECT)
public Map<String, Object> getUserList(String name, String status, String level) {
Page<Audit> auditList;
try {
TUser user1 = getcurUser();
// TUser user1 = getcurUser();
TUser user = new TUser();
if (StringUtils.isNotBlank(name)) {
user.setUserName(name);
......@@ -98,7 +97,7 @@ public class AuditController extends BaseController {
@PutMapping("/update")
@RequiresAuthentication //@RequiresPermissions("/audit/update")
@ApiOperation(value = "修改禁用审核信息", notes = "修改禁用审核信息")
@MethodLog(operModule = OperModule.RECHECK,operType = OperType.AUDIT)
@MethodLog(operModule = OperModule.RECHECK, operType = OperType.AUDIT)
public Map<String, Object> updateAudit(@RequestBody @Validated(value = {Update.class}) Audit audit) {
boolean flag;
//如果层级是初审,设置初审时间
......@@ -211,13 +210,11 @@ public class AuditController extends BaseController {
@ApiImplicitParam(name = "id", value = "id", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "视频内容:VIDEO_CONTENT,展板内容:EXHIBITION_BOARD,学习内容:LEARNING_CONTENT", paramType = "query", dataType = "String", allowableValues = "VIDEO_CONTENT,EXHIBITION_BOARD,LEARNING_CONTENT,ACCOUNT", required = true)
})
@MethodLog(operModule = OperModule.CHECKVIDEO,operType = OperType.DETAILS)
@MethodLog(operModule = OperModule.CHECKVIDEO, operType = OperType.DETAILS)
public Map<String, Object> getById(String id, String type) {
HashMap<String, Object> resultMap = new HashMap<>();
try {
Audit audit = null;
//只获取最新的一条审核数据
audit = auditService.selectOne(id, type);
Audit audit = auditService.selectOne(id, type);
resultMap.put("resultCode", "200");
resultMap.put("message", "操作成功");
resultMap.put("data", audit);
......@@ -237,7 +234,7 @@ public class AuditController extends BaseController {
@ApiImplicitParam(name = "status", value = "待初审:TBC, 驳回:REFUSED,待复审:TBCA, 通过:APPROVED_FINAL", paramType = "query", dataType = "String"),
@ApiImplicitParam(name = "type", value = "视频内容:VIDEO_CONTENT,展板内容:EXHIBITION_BOARD,学习内容:LEARNING_CONTENT", paramType = "query", dataType = "String", allowableValues = "VIDEO_CONTENT,EXHIBITION_BOARD,LEARNING_CONTENT,ACCOUNT", required = true)
})
@MethodLog(operModule = OperModule.CHECKVIDEO,operType = OperType.SELECT)
@MethodLog(operModule = OperModule.CHECKVIDEO, operType = OperType.SELECT)
public Map<String, Object> getPageAllList(String name, String status, @NotBlank(message = "type参数不能为空") String type) {
AuditStatusEnum auditStatus = null;
AuditStatusEnum auditStatusLevel = null;
......@@ -274,13 +271,9 @@ public class AuditController extends BaseController {
// break;
//
// }
if (auditTypeEnum == null) {
return getFailResult("type参数不正确");
}
if (StringUtils.isNotBlank(status)) {
auditStatus = AuditStatusEnum.valueOf(status);
}
//
try {
Page<Audit> auditList = auditService.pageList(name, auditStatus, auditStatusLevel, auditTypeEnum, getPage());
return getResult(auditList);
......@@ -293,9 +286,8 @@ public class AuditController extends BaseController {
@PutMapping("/updateAuditAllById")
@RequiresAuthentication //@RequiresPermissions("/audit/update")
@ApiOperation(value = "审核管理===根据id修改审核信息", notes = "审核管理===根据id修改审核信息")
@MethodLog(operModule = OperModule.CHECKVIDEO,operType = OperType.AUDIT)
@MethodLog(operModule = OperModule.CHECKVIDEO, operType = OperType.AUDIT)
public Map<String, Object> updateAuditAllById(@RequestBody @Validated AuditStatusParam auditStatusParam) {
String id = auditStatusParam.getId();
Audit audit = auditService.getById(id);
if (audit == null) {
......@@ -315,10 +307,7 @@ public class AuditController extends BaseController {
if (AuditStatusEnum.TBCA.name().equals(audit.getLevel())) {
audit.setSecondRemarks(auditStatusParam.getRemarks());
}
boolean update = auditService.updateAuditAllById(audit);
return update ? getSuccessResult() : getFailResult();
return auditService.updateAuditAllById(audit) ? getSuccessResult() : getFailResult();
}
......
......@@ -25,7 +25,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -124,6 +123,7 @@ public class CopyrightOwnerController extends BaseController {
@ApiOperation(value = "获取版权方全部列表(无分页)", notes = "获取版权方全部列表(无分页)")
public Map<String, Object> getCopyrightOwnerList(@RequestParam("copyrightOwnerType") CopyrightOwnerTypeEnum copyrightOwnerTypeEnum) {
LambdaQueryWrapper<CopyrightOwner> lambdaQueryWrapper = Wrappers.<CopyrightOwner>lambdaQuery().eq(CopyrightOwner::getOwnerType, copyrightOwnerTypeEnum.name());
lambdaQueryWrapper.eq(CopyrightOwner::getDeleted, false);
lambdaQueryWrapper.le(CopyrightOwner::getExpireDateStart, TimeUtils.getDateTimeOfTimestamp(System.currentTimeMillis()))
.ge(CopyrightOwner::getExpireDateEnd, TimeUtils.getDateTimeOfTimestamp(System.currentTimeMillis()));
List<CopyrightOwner> copyrightOwnerList = copyrightOwnerService.list(lambdaQueryWrapper);
......@@ -215,5 +215,16 @@ public class CopyrightOwnerController extends BaseController {
return getResult(copyrightOwner);
}
@DeleteMapping("/delete/{id}")
@RequiresAuthentication //@RequiresPermissions("exhibition:board:cat:delete")
@ApiOperation(value = "根据ID删除版权方", notes = "根据ID删除版权方")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String")
})
public Map<String, Object> deleteCopyrightOwner(@PathVariable("id") String id) {
this.copyrightOwnerService.removeById(id);
return getSuccessResult();
}
}
......@@ -104,8 +104,7 @@ public class ExhibitionBoardCatController extends BaseController {
@ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String")
})
public Map<String, Object> deleteExhibitionBoardCat(@PathVariable("id") String id) {
this.exhibitionBoardCatService.removeById(id);
return getSuccessResult();
}
......
......@@ -211,6 +211,8 @@ public class ExhibitionBoardController extends BaseController {
@RequestParam(value = "boardCopyrightOwnerIdList", required = false) List<String> boardCopyrightOwnerIdList,
@RequestParam(value = "auditStatus", defaultValue = "APPROVED_FINAL", required = false) AuditStatusEnum auditStatus) {
final LambdaQueryWrapper<ExhibitionBoard> lambdaQueryWrapper = Wrappers.<ExhibitionBoard>lambdaQuery().eq(ExhibitionBoard::getAuditStatus, auditStatus.name()).eq(ExhibitionBoard::getPublished, true);
lambdaQueryWrapper.eq(ExhibitionBoard::getPublished, true);
lambdaQueryWrapper.eq(ExhibitionBoard::getDeleted, false);
if (exhibitionBoardCatIdList != null && !exhibitionBoardCatIdList.isEmpty()) {
lambdaQueryWrapper.in(ExhibitionBoard::getExhibitionBoardCatId, exhibitionBoardCatIdList);
}
......
......@@ -13,7 +13,6 @@ import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
......@@ -79,22 +78,14 @@ public class LearningContentBoardController extends BaseController {
@PutMapping(value = "/sort")
@RequiresAuthentication //@RequiresPermissions("learning:content:board:sort")
public Map<String, Object> sort(String sourceId, String targetId) {
String moveType;
LearningContentBoard theSource = this.learningContentBoardService.getById(sourceId);
LearningContentBoard theTarget = this.learningContentBoardService.getById(targetId);
if (theSource.getSortorder() > theTarget.getSortorder()) {
moveType = "down";
} else {
moveType = "up";
}
String moveType = theSource.getSortorder() > theTarget.getSortorder() ? "down" : "up";
Integer sourceSortorder = theSource.getSortorder();
Integer targetSortorder = theTarget.getSortorder();
boolean flag = false;
//默认sortorder为降序排序,向上移动
if ("up".equalsIgnoreCase(moveType) && sourceSortorder < targetSortorder) {
flag = true;
QueryWrapper<LearningContentBoard> wrapper = new QueryWrapper<>();
wrapper.between("sortorder", sourceSortorder, targetSortorder);
wrapper.select("id", "sortorder");
......@@ -105,10 +96,11 @@ public class LearningContentBoardController extends BaseController {
this.learningContentBoardService.updateById(entity);
}
}
theSource.setSortorder(targetSortorder);
this.learningContentBoardService.updateById(theSource);
}
//默认sortorder为降序排序,向下移动
else if ("down".equalsIgnoreCase(moveType) && sourceSortorder > targetSortorder) {
flag = true;
QueryWrapper<LearningContentBoard> wrapper = new QueryWrapper<>();
wrapper.between("sortorder", targetSortorder, sourceSortorder);
wrapper.select("id", "sortorder");
......@@ -119,10 +111,11 @@ public class LearningContentBoardController extends BaseController {
this.learningContentBoardService.updateById(entity);
}
}
theSource.setSortorder(targetSortorder);
this.learningContentBoardService.updateById(theSource);
}
//默认sortorder为正序排序,向下移动
else if ("down".equalsIgnoreCase(moveType) && sourceSortorder < targetSortorder) {
flag = true;
QueryWrapper<LearningContentBoard> wrapper = new QueryWrapper<>();
wrapper.between("sortorder", sourceSortorder, targetSortorder);
wrapper.select("id", "sortorder");
......@@ -133,10 +126,11 @@ public class LearningContentBoardController extends BaseController {
this.learningContentBoardService.updateById(slide);
}
}
theSource.setSortorder(targetSortorder);
this.learningContentBoardService.updateById(theSource);
}
//默认sortorder为正序排序,向上移动
else if ("up".equalsIgnoreCase(moveType) && sourceSortorder > targetSortorder) {
flag = true;
QueryWrapper<LearningContentBoard> wrapper = new QueryWrapper<>();
wrapper.between("sortorder", targetSortorder, sourceSortorder);
wrapper.select("id", "sortorder");
......@@ -147,13 +141,10 @@ public class LearningContentBoardController extends BaseController {
this.learningContentBoardService.updateById(slide);
}
}
}
if (flag) {
theSource.setSortorder(targetSortorder);
this.learningContentBoardService.updateById(theSource);
return getSuccessResult();
}
return getFailResult();
return getSuccessResult();
}
}
......
......@@ -22,7 +22,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -48,8 +47,6 @@ public class LearningContentController extends BaseController {
@Resource
private ExhibitionBoardCatService exhibitionBoardCatService;
@Resource
private VideoContentCatService videoContentCatService;
@Resource
private VideoContentService videoContentService;
@Resource
private CopyrightOwnerService copyrightOwnerService;
......@@ -208,7 +205,10 @@ public class LearningContentController extends BaseController {
@ApiImplicitParam(name = "auditStatus", value = "审核状态", paramType = "query", dataType = "String")
})
public Map<String, Object> getLearningContentList(@RequestParam(value = "auditStatus", defaultValue = "APPROVED_FINAL", required = false) AuditStatusEnum auditStatus) {
List<LearningContent> learningContentList = learningContentService.list(Wrappers.<LearningContent>lambdaQuery().eq(LearningContent::getAuditStatus, auditStatus.name()));
final LambdaQueryWrapper<LearningContent> lambdaQueryWrapper = Wrappers.<LearningContent>lambdaQuery().eq(LearningContent::getAuditStatus, auditStatus.name());
lambdaQueryWrapper.eq(LearningContent::getPublished, true);
lambdaQueryWrapper.eq(LearningContent::getDeleted, false);
List<LearningContent> learningContentList = learningContentService.list();
return getResult(learningContentList);
}
......@@ -384,22 +384,14 @@ public class LearningContentController extends BaseController {
@PutMapping(value = "/sort")
@RequiresAuthentication //@RequiresPermissions("learning:content:sort")
public Map<String, Object> updateSortorder(String sourceId, String targetId) {
String moveType;
LearningContent theSource = this.learningContentService.getById(sourceId);
LearningContent theTarget = this.learningContentService.getById(targetId);
if (theSource.getSortorder() > theTarget.getSortorder()) {
moveType = "down";
} else {
moveType = "up";
}
String moveType = theSource.getSortorder() > theTarget.getSortorder() ? "down" : "up";
Integer sourceSortorder = theSource.getSortorder();
Integer targetSortorder = theTarget.getSortorder();
boolean flag = false;
//默认sortorder为降序排序,向上移动
if ("up".equalsIgnoreCase(moveType) && sourceSortorder < targetSortorder) {
flag = true;
QueryWrapper<LearningContent> wrapper = new QueryWrapper<>();
wrapper.between("sortorder", sourceSortorder, targetSortorder);
wrapper.select("id", "sortorder");
......@@ -410,10 +402,11 @@ public class LearningContentController extends BaseController {
this.learningContentService.updateById(entity);
}
}
theSource.setSortorder(targetSortorder);
this.learningContentService.updateById(theSource);
}
//默认sortorder为降序排序,向下移动
else if ("down".equalsIgnoreCase(moveType) && sourceSortorder > targetSortorder) {
flag = true;
QueryWrapper<LearningContent> wrapper = new QueryWrapper<>();
wrapper.between("sortorder", targetSortorder, sourceSortorder);
wrapper.select("id", "sortorder");
......@@ -424,10 +417,11 @@ public class LearningContentController extends BaseController {
this.learningContentService.updateById(entity);
}
}
theSource.setSortorder(targetSortorder);
this.learningContentService.updateById(theSource);
}
//默认sortorder为正序排序,向下移动
else if ("down".equalsIgnoreCase(moveType) && sourceSortorder < targetSortorder) {
flag = true;
QueryWrapper<LearningContent> wrapper = new QueryWrapper<>();
wrapper.between("sortorder", sourceSortorder, targetSortorder);
wrapper.select("id", "sortorder");
......@@ -438,10 +432,11 @@ public class LearningContentController extends BaseController {
this.learningContentService.updateById(slide);
}
}
theSource.setSortorder(targetSortorder);
this.learningContentService.updateById(theSource);
}
//默认sortorder为正序排序,向上移动
else if ("up".equalsIgnoreCase(moveType) && sourceSortorder > targetSortorder) {
flag = true;
QueryWrapper<LearningContent> wrapper = new QueryWrapper<>();
wrapper.between("sortorder", targetSortorder, sourceSortorder);
wrapper.select("id", "sortorder");
......@@ -452,13 +447,10 @@ public class LearningContentController extends BaseController {
this.learningContentService.updateById(slide);
}
}
}
if (flag) {
theSource.setSortorder(targetSortorder);
this.learningContentService.updateById(theSource);
return getSuccessResult();
}
return getFailResult();
return getSuccessResult();
}
@ApiOperation(value = "启用/禁用学习内容", notes = "启用/禁用学习内容")
......
......@@ -19,7 +19,6 @@ import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.shiro.authz.annotation.RequiresAuthentication;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
......@@ -142,5 +141,16 @@ public class VideoContentCatController extends BaseController {
return getResult(videoContentCat);
}
@DeleteMapping("/delete/{id}")
@RequiresAuthentication //@RequiresPermissions("exhibition:board:cat:delete")
@ApiOperation(value = "根据ID删除视频内容分类", notes = "根据ID删除视频内容分类")
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String")
})
public Map<String, Object> deleteVideoContentCat(@PathVariable("id") String id) {
this.videoContentCatService.removeById(id);
return getSuccessResult();
}
}
......@@ -54,7 +54,7 @@ public class VideoContentController extends BaseController {
@PostMapping(value = "/save")
@RequiresAuthentication //@RequiresPermissions("video:content:save")
@ApiOperation(value = "添加视频内容", notes = "添加视频内容")
public Map<String, Object> saveAsset(@Validated(value = {Add.class}) VideoContent videoContent) {
public Map<String, Object> saveVideoContent(@Validated(value = {Add.class}) VideoContent videoContent) {
TUser user = getcurUser();
final List<String> videoFileIdList = videoContent.getVideoFileIdList();
if (videoFileIdList == null || videoFileIdList.isEmpty()) {
......@@ -95,7 +95,7 @@ public class VideoContentController extends BaseController {
@PutMapping("/update")
@RequiresAuthentication //@RequiresPermissions("video:content:update")
@ApiOperation(value = "修改视频内容信息", notes = "修改视频内容信息")
public Map<String, Object> updateAsset(@Validated(value = {Update.class}) VideoContent videoContent) {
public Map<String, Object> updateVideoContent(@Validated(value = {Update.class}) VideoContent videoContent) {
TUser user = getcurUser();
videoContent.setAuditStatus(AuditStatusEnum.TBC.name());
videoContent.setPublished(false);
......@@ -147,7 +147,7 @@ public class VideoContentController extends BaseController {
@ApiImplicitParams(value = {
@ApiImplicitParam(name = "id", value = "标识ID", paramType = "path", dataType = "String")
})
public Map<String, Object> deleteAsset(@PathVariable("id") String id) {
public Map<String, Object> deleteVideoContent(@PathVariable("id") String id) {
TUser user = getcurUser();
final Audit audit = Audit.builder()
.content(this.videoContentService.getById(id).getName())
......@@ -178,7 +178,8 @@ public class VideoContentController extends BaseController {
@RequestParam(value = "videoContentCatId", required = false) String videoContentCatId,
@RequestParam(value = "videoContentCopyrightOwnerId", required = false) String videoContentCopyrightOwnerId) {
final LambdaQueryWrapper<VideoContent> lambdaQueryWrapper = new LambdaQueryWrapper<>();
//lambdaQueryWrapper.eq(Asset::getPublished, true);
lambdaQueryWrapper.eq(VideoContent::getPublished, true);
lambdaQueryWrapper.eq(VideoContent::getDeleted, false);
if (auditStatus != null) {
lambdaQueryWrapper.eq(VideoContent::getAuditStatus, auditStatus.name());
}
......
......@@ -11,7 +11,8 @@ mybatis-plus.check-config-location=true
mybatis-plus.mapper-locations=classpath:mapper/*.xml
mybatis-plus.type-aliases-package=cn.wisenergy.chnmuseum.party.model.**
mybatis-plus.global-config.db-config.id-type=assign_id
mybatis-plus.global-config.db-config.logic-delete-value=-1
mybatis-plus.global-config.db-config.logic-delete-field=deleted
mybatis-plus.global-config.db-config.logic-delete-value=1
mybatis-plus.global-config.db-config.logic-not-delete-value=0
mybatis-plus.global-config.banner=false
mybatis-plus.configuration.lazy-loading-enabled=true
......
......@@ -4,19 +4,20 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="cn.wisenergy.chnmuseum.party.model.CopyrightOwner">
<id column="id" property="id" />
<result column="name" property="name" />
<result column="owner_type" property="ownerType" />
<result column="expire_date_start" property="expireDateStart" />
<result column="expire_date_end" property="expireDateEnd" />
<result column="remarks" property="remarks" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="owner_type" property="ownerType"/>
<result column="expire_date_start" property="expireDateStart"/>
<result column="expire_date_end" property="expireDateEnd"/>
<result column="remarks" property="remarks"/>
<result column="is_deleted" property="deleted"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, name, owner_type, expire_date_start, expire_date_end, remarks, create_time, update_time
id, name, owner_type, expire_date_start, expire_date_end, remarks, is_deleted, create_time, update_time
</sql>
</mapper>
......@@ -4,16 +4,17 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="cn.wisenergy.chnmuseum.party.model.ExhibitionBoardCat">
<id column="id" property="id" />
<result column="name" property="name" />
<result column="remarks" property="remarks" />
<result column="create_time" property="createTime" />
<result column="update_time" property="updateTime" />
</resultMap>
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="remarks" property="remarks"/>
<result column="is_deleted" property="deleted"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, name, remarks, create_time, update_time
id, name, remarks, is_deleted, create_time, update_time
</sql>
</mapper>
......@@ -6,15 +6,16 @@
<resultMap id="BaseResultMap" type="cn.wisenergy.chnmuseum.party.model.VideoContentCat">
<id column="id" property="id"/>
<result column="name" property="name"/>
<result column="remarks" property="remarks"/>
<result column="copyright_owner_id" property="copyrightOwnerId"/>
<result column="remarks" property="remarks"/>
<result column="is_deleted" property="deleted"/>
<result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/>
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
id, name, remarks, copyright_owner_id, create_time, update_time
id, name, copyright_owner_id, remarks, is_deleted, create_time, update_time
</sql>
</mapper>
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