Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
W
wyszyk
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
注册表
注册表
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
任建彩
wyszyk
Commits
78f18233
提交
78f18233
authored
8月 24, 2022
作者:
任建彩
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat:作者
1.resource
上级
ef3fdc6e
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
23 行增加
和
23 行删除
+23
-23
EbookMapper.java
...main/java/com/zrqx/resource/mapper/ebook/EbookMapper.java
+23
-23
没有找到文件。
wyszyk-provider/wyszyk-provider-resource/src/main/java/com/zrqx/resource/mapper/ebook/EbookMapper.java
浏览文件 @
78f18233
...
...
@@ -33,15 +33,15 @@ public interface EbookMapper extends BaseMapper<Ebook> {
*/
@Select
(
"<script>"
+
"SELECT DISTINCT "
+
" bb.id,bb.name,b
a
.author,bb.isbn, "
+
" bb.id,bb.name,b
b
.author,bb.isbn, "
+
" be.cover,be.realprice,be.createdTime,be.updateTime,be.status "
+
" FROM res_book bb "
+
" LEFT JOIN res_ebook be ON bb.id = be.id "
+
" LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookid"
+
" LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
//
+ " LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
+
" WHERE 1 = 1 "
+
"<if test='form.option == 1'>"
+
" AND (b
a.author IS NULL OR ba
.author = '') "
+
" AND (b
b.author IS NULL OR bb
.author = '') "
+
"</if>"
+
"<if test='form.option == 2'>"
+
" AND (be.cover IS NULL OR be.cover = '') "
...
...
@@ -75,12 +75,12 @@ public interface EbookMapper extends BaseMapper<Ebook> {
@Select
(
"<script>"
+
"SELECT DISTINCT "
+
" bb.id,bb.name,b
a
.author,bb.isbn,bb.resourceType, "
+
" bb.id,bb.name,b
b
.author,bb.isbn,bb.resourceType, "
+
" be.cover,be.price,be.realPrice,be.createdTime,be.updateTime,be.status "
+
" FROM res_book bb "
+
" LEFT JOIN res_ebook be ON bb.id = be.id "
+
" LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookid"
+
" LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
//
+ " LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
+
" WHERE 1 = 1 AND be.status = 1 "
+
" rlike(bdt.code,form.diyTypeCode) "
+
" LIKE(bb.name,form.name) "
...
...
@@ -150,11 +150,11 @@ public interface EbookMapper extends BaseMapper<Ebook> {
* @date: 2019年2月18日 下午1:49:56
*/
@Select
(
"<script>"
+
"select DISTINCT bb.id, bb.name, bb.translatorId, bb.translator,
a.authorId,a
.author, "
+
"select DISTINCT bb.id, bb.name, bb.translatorId, bb.translator,
bb
.author, "
+
"bb.publisher,DATE_FORMAT(bb.publishTime,'%Y-%m-%d') publishTime, be.price, be.priceOption, be.realPrice, be.cover, be.synopsis, be.status, be.browseNum, bb.resourceType "
+
"FROM res_book bb "
+
"LEFT JOIN res_ebook be ON bb.id = be.id "
+
"LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
//
+ "LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
+
"WHERE be.status = 1 "
+
"<if test = 'id != null' >"
+
"and bb.id != #{id} "
...
...
@@ -164,10 +164,10 @@ public interface EbookMapper extends BaseMapper<Ebook> {
@Select
(
"<script>"
+
"select DISTINCT bb.id, bb.name, "
+
"bb.publisher,DATE_FORMAT(bb.publishTime,'%Y-%m-%d') publishTime,
a.authorId,a
.author, be.priceOption, be.price, be.realPrice, be.cover, be.status, be.browseNum,bb.resourceType "
+
"bb.publisher,DATE_FORMAT(bb.publishTime,'%Y-%m-%d') publishTime,
bb
.author, be.priceOption, be.price, be.realPrice, be.cover, be.status, be.browseNum,bb.resourceType "
+
"FROM res_book bb "
+
"LEFT JOIN res_ebook be ON bb.id = be.id "
+
"LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
//
+ "LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
+
"where be.status = 1 "
+
"<if test='"
+
MapperConstants
.
LIST_NOT_EMPTY
+
"(isBuyIds)' >"
+
"and bb.id not in "
...
...
@@ -185,11 +185,11 @@ public interface EbookMapper extends BaseMapper<Ebook> {
* @return
*/
@Select
(
"<script>"
+
"select rb.id,rb.name,rb.resourceType, re.priceOption, re.realPrice,re.price,re.cover,re.synopsis,
a.author,a.authorId
, re.browseNum "
+
"select rb.id,rb.name,rb.resourceType, re.priceOption, re.realPrice,re.price,re.cover,re.synopsis,
bb.author
, re.browseNum "
+
"from res_book rb "
+
"left join res_ebook re on rb.id = re.id "
+
"left join res_resource_relation rr on rb.id = rr.resourceId "
+
"LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on rb.id = a.resourceId "
//
+ "LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on rb.id = a.resourceId "
+
"where re.status = 1 "
+
"eq(rr.objectId, resourceId) "
+
"</script>"
)
...
...
@@ -204,11 +204,11 @@ public interface EbookMapper extends BaseMapper<Ebook> {
* @date: 2019年2月18日 下午1:49:56
*/
@Select
(
"<script>"
+
"select DISTINCT bb.id, bb.name, bb.translatorId, bb.translator,
a.authorId,a
.author, "
+
"select DISTINCT bb.id, bb.name, bb.translatorId, bb.translator,
bb
.author, "
+
"bb.publisher,DATE_FORMAT(bb.publishTime,'%Y-%m-%d') publishTime, be.price, be.priceOption, be.realPrice, be.cover, be.synopsis, be.status, be.browseNum, bb.resourceType "
+
"FROM res_book bb "
+
"LEFT JOIN res_ebook be ON bb.id = be.id "
+
"LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
//
+ "LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
+
"WHERE be.status = 1 "
+
"eq(id,form.id) "
+
"</script>"
)
...
...
@@ -223,14 +223,14 @@ public interface EbookMapper extends BaseMapper<Ebook> {
* @date 2019年1月24日 下午3:33:32
*/
@Select
(
"<script>"
+
"select DISTINCT bb.id, bb.name,
a.authorId, a
.author, bb.translatorId, bb.translator, "
+
"select DISTINCT bb.id, bb.name,
bb
.author, bb.translatorId, bb.translator, "
+
"bb.publisher,DATE_FORMAT(bb.publishTime,'%Y-%m-%d') publishTime, bb.resourceType, be.priceOption, be.price,be.realPrice, be.cover, be.synopsis, be.status, be.browseNum"
+
",qr.qrCode "
+
"FROM res_book bb "
+
"LEFT JOIN res_ebook be ON bb.id = be.id "
+
"LEFT JOIN res_ebook_diy_type diy ON be.id = diy.ebookId "
+
"LEFT JOIN res_qr_code qr ON be.id = qr.resourceId "
+
"LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
//
+ "LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
+
"where be.status = 1 "
+
"<if test = '"
+
MapperConstants
.
NOT_BLANK
+
"(form.diyTypeCode)' >"
+
"and diy.code like concat(#{form.diyTypeCode}, '%') "
...
...
@@ -259,14 +259,14 @@ public interface EbookMapper extends BaseMapper<Ebook> {
* @date 2018年12月20日 下午2:33:32
*/
@Select
(
"<script>"
+
"select DISTINCT bb.id, bb.name,
a.authorId, a
.author, bb.translatorId, bb.translator, "
+
"select DISTINCT bb.id, bb.name,
bb
.author, bb.translatorId, bb.translator, "
+
"bb.publisher,DATE_FORMAT(bb.publishTime,'%Y-%m-%d') publishTime, bb.resourceType, be.priceOption, be.realPrice,be.price,be.cover, be.synopsis, be.status, be.browseNum,be.createdTime "
+
",qr.qrCode "
+
"FROM res_book bb "
+
"LEFT JOIN res_ebook be ON bb.id = be.id "
+
"LEFT JOIN res_ebook_diy_type diy ON be.id = diy.ebookId "
+
"LEFT JOIN res_qr_code qr ON be.id = qr.resourceId "
+
"LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
//
+ "LEFT JOIN (SELECT resourceId,authorId,author FROM res_relation_author GROUP BY resourceId) a on be.id = a.resourceId "
+
"where be.status = 1 "
+
" rlike(diy.code,form.diyTypeCode) "
+
"<if test='form.ids != null and form.ids.size > 0' >"
...
...
@@ -311,23 +311,23 @@ public interface EbookMapper extends BaseMapper<Ebook> {
*/
@Select
(
"<script>"
+
"SELECT DISTINCT "
+
" bb.id,2 as resourceType,be.cover,bb.name,b
a
.author,be.price,be.realPrice,be.synopsis,be.browseNum,be.sales "
+
" bb.id,2 as resourceType,be.cover,bb.name,b
b
.author,be.price,be.realPrice,be.synopsis,be.browseNum,be.sales "
+
" FROM res_book bb "
+
" LEFT JOIN res_ebook be ON bb.id = be.id "
+
" LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookId"
+
" LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
//
+ " LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
+
" WHERE be.status = 1 "
+
" eq(be.priceOption,form.priceOption)"
+
"</script>"
)
List
<
ResourceListInfoVO
>
queryResourcePageInfoList
(
@Param
(
"form"
)
ResourceQueryForm
form
);
@Select
(
"<script>"
+
"SELECT DISTINCT "
+
" bb.id,2 as resourceType,t1.cover,bb.name,b
a
.author,t1.synopsis,t1.browseNum,t1.price,t1.realPrice,bb.publishTime,bb.publisher,rr.projectId "
+
" bb.id,2 as resourceType,t1.cover,bb.name,b
b
.author,t1.synopsis,t1.browseNum,t1.price,t1.realPrice,bb.publishTime,bb.publisher,rr.projectId "
+
" FROM res_book bb "
+
" LEFT JOIN res_ebook t1 ON bb.id = t1.id "
+
" LEFT JOIN res_ebook_diy_type bdt ON t1.id = bdt.ebookId"
+
" LEFT JOIN res_ebook_label_content_diy_type ld ON t1.id = ld.ebookId"
+
" LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
//
+ " LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
+
" LEFT JOIN res_project_model_resource rr ON bb.id = rr.resourceId "
+
" WHERE t1.status = 1 "
+
" like(bb.name,form.keyWord)"
...
...
@@ -359,11 +359,11 @@ public interface EbookMapper extends BaseMapper<Ebook> {
List
<
EbookListVO
>
getBookNameList
(
@Param
(
"form"
)
QueryEbookInfoForm
form
);
@Select
(
"<script>"
+
"SELECT DISTINCT "
+
" bb.id,2 as resourceType,be.cover,bb.name,b
a
.author,be.price,be.realPrice,be.synopsis,be.browseNum,be.sales "
+
" bb.id,2 as resourceType,be.cover,bb.name,b
b
.author,be.price,be.realPrice,be.synopsis,be.browseNum,be.sales "
+
" FROM res_book bb "
+
" LEFT JOIN res_ebook be ON bb.id = be.id "
+
" LEFT JOIN res_ebook_diy_type bdt ON be.id = bdt.ebookId"
+
" LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
//
+ " LEFT JOIN ( SELECT resourceId,author,authorId FROM res_relation_author GROUP BY resourceId HAVING MIN(id)) ba ON bb.id = ba.resourceId "
+
" WHERE be.status = 1 "
+
" ne(bb.id,bookid) "
+
"</script>"
)
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论