提交 89ca5ab4 作者: 沈振路

延时客服复用目标号存在素材不让复用

上级 3e13277f
......@@ -242,6 +242,12 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
@Override
public BaseResult copy(String appId, String bookId, String bookName, Integer chapterIdx, List<String> targetAppList) {
// 校验目标号是否存在素材
List<String> nameList = this.baseMapper.getAccountNameWithMaterial(targetAppList);
if (CollectionUtil.isNotEmpty(nameList)) {
return new BaseResult().error("目标号" + nameList + "存在素材, 无法复用");
}
List<AuthorizerInfo> authorizerInfoList = authorizerInfoService.list();
Map<String, AuthorizerInfo> authMap = authorizerInfoList.stream().collect(Collectors.toMap(AuthorizerInfo::getAppid, Function.identity()));
......@@ -355,6 +361,17 @@ public class CustomerGraphicsDelayServiceImpl extends ServiceImpl<CustomerGraphi
}
@Override
public GenericsResult<Boolean> canBatchOperate(String appid) {
Long userId = tokenManager.getUserIdFromToken();
if (userId == null) {
return new GenericsResult<>(false);
}
int count = this.count(new QueryWrapper<CustomerGraphicsDelay>().eq("app_id", appid).ne("create_user", userId));
return new GenericsResult<>(count == 0);
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论