Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
zgzx
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
svn
zgzx
Commits
c91093d7
提交
c91093d7
authored
11月 20, 2020
作者:
renjiancai
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
--no commit message
上级
cb7933ea
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
6 行增加
和
33 行删除
+6
-33
AudioLibraryController.java
...ce/bg/controller/audiolibrary/AudioLibraryController.java
+4
-15
AudioLibrarySerivceImpl.java
...urce/bg/service/audiolibrary/AudioLibrarySerivceImpl.java
+2
-18
没有找到文件。
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/controller/audiolibrary/AudioLibraryController.java
浏览文件 @
c91093d7
...
...
@@ -136,7 +136,7 @@ public class AudioLibraryController {
return
CallBack
.
success
();
}
@ApiOperation
(
value
=
"批量审核"
,
notes
=
"批量审核"
)
/*
@ApiOperation(value = "批量审核", notes = "批量审核")
@PostMapping(value = "/batch/update/status")
public CallBack<Boolean> updateArray(@RequestBody List<String> ids) {
Example example = service.createExample();
...
...
@@ -148,7 +148,7 @@ public class AudioLibraryController {
throw new BaseException("操作失败");
}
return CallBack.success();
}
}
*/
@ApiOperation
(
value
=
"删除"
,
notes
=
"删除"
)
@PostMapping
(
value
=
"/delete/{oid}"
)
...
...
@@ -175,17 +175,6 @@ public class AudioLibraryController {
AudioLibrary
entity
=
service
.
selectByPrimaryKey
(
oid
);
AudioLibraryOneVO
vo
=
new
AudioLibraryOneVO
();
BeanUtils
.
copyProperties
(
entity
,
vo
);
if
(
StringUtils
.
isNotBlank
(
entity
.
getAuthorId
())){
vo
.
setAuthorNameAndId
(
entity
.
getAuthor
()
+
","
+
entity
.
getAuthorId
());
}
else
{
vo
.
setAuthorNameAndId
(
entity
.
getAuthor
());
}
if
(
entity
.
getRealPrice
()
!=
null
){
vo
.
setRealPrice
(
entity
.
getRealPrice
().
toString
());
}
if
(
entity
.
getPrice
()
!=
null
){
vo
.
setPrice
(
entity
.
getPrice
().
toString
());
}
Example
example
=
vdrService
.
createExample
();
example
.
createCriteria
().
andEqualTo
(
"audioId"
,
oid
);
List
<
AudioLibraryDiyType
>
list
=
vdrService
.
selectByExample
(
example
);
...
...
@@ -256,7 +245,7 @@ public class AudioLibraryController {
return CallBack.success();
}*/
@ApiOperation
(
value
=
"批量修改阅读权限"
,
notes
=
"批量修改阅读权限"
)
/*
@ApiOperation(value = "批量修改阅读权限", notes = "批量修改阅读权限")
@PostMapping(value = "/batch/update/read")
public CallBack<Boolean> updateReadTextPower(@RequestBody BatchUpdateVideoLibraryForm form) {
Example example = service.createExample();
...
...
@@ -267,5 +256,5 @@ public class AudioLibraryController {
throw new BaseException("操作失败");
}
return CallBack.success();
}
}
*/
}
com.zrqx.resource/src/main/java/com/zrqx/resource/bg/service/audiolibrary/AudioLibrarySerivceImpl.java
浏览文件 @
c91093d7
...
...
@@ -50,36 +50,20 @@ public class AudioLibrarySerivceImpl extends BaseServiceImpl<AudioLibrary,String
@Override
public
boolean
saveOrUpdate
(
SaveUpdateAudioLibraryForm
form
)
{
AudioLibrary
entity
=
new
AudioLibrary
();
if
(
StringUtils
.
isNotBlank
(
form
.
getAuthorNameAndId
())){
String
[]
authorNameAndId
=
form
.
getAuthorNameAndId
().
split
(
","
);
form
.
setAuthor
(
authorNameAndId
[
0
]);
if
(
authorNameAndId
.
length
>
1
){
form
.
setAuthorId
(
authorNameAndId
[
1
]);
}
}
BeanUtils
.
copyProperties
(
form
,
entity
);
if
(
PriceOptionEnum
.
STATUS_0
.
getCode
()
==
form
.
getPriceOption
()){
entity
.
setRealPrice
(
new
BigDecimal
(
0
));
}
if
(
entity
.
getId
()
==
null
){
//添加
entity
.
setStatus
(
LibraryStatusEnum
.
STATUS_0
.
getCode
());
entity
.
setUploadTime
(
new
Date
());
entity
.
setResourceType
(
AllResourceTypeEnum
.
AUDIO
.
getCode
());
entity
.
setBrowseNum
(
50
);
entity
.
setReadTextPower
(
1
);
entity
.
setBrowseNum
(
0
);
entity
.
setSalesNum
(
0
);
entity
.
setClickNum
(
5
0
);
entity
.
setClickNum
(
0
);
mapper
.
insert
(
entity
);
}
else
{
//修改
entity
.
setUpdateTime
(
new
Date
());
mapper
.
updateByPrimaryKeySelective
(
entity
);
if
(
form
.
getPrice
()
==
null
){
AudioLibrary
a
=
super
.
notNull
(
entity
.
getId
());
a
.
setPrice
(
form
.
getPrice
());
mapper
.
updateByPrimaryKey
(
a
);
}
//删除当前对象与自定义分类的关系
AudioLibraryDiyType
old
=
new
AudioLibraryDiyType
();
old
.
setAudioId
(
entity
.
getId
());
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论