Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
midjourney-proxy
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
徐少华
midjourney-proxy
Commits
9955a5b1
Commit
9955a5b1
authored
May 18, 2020
by
郑永强
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【1002925】书刊权益配置支持独立选择配置资讯功能
parent
16c932de
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
400 additions
and
15 deletions
+400
-15
AppletNewsBiz.java
...c/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
+9
-1
AppletNewsBizImpl.java
...va/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
+10
-1
AppletNewsDao.java
...c/main/java/com/pcloud/book/applet/dao/AppletNewsDao.java
+3
-0
AppletNewsDaoImpl.java
...va/com/pcloud/book/applet/dao/impl/AppletNewsDaoImpl.java
+5
-0
AppletHomeFacade.java
.../java/com/pcloud/book/applet/facade/AppletHomeFacade.java
+2
-1
CustomPlanBiz.java
...c/main/java/com/pcloud/book/custom/biz/CustomPlanBiz.java
+2
-0
CustomPlanBizImpl.java
...va/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
+10
-0
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+0
-0
RightsSettingItemDetailDao.java
...ud/book/rightsSetting/dao/RightsSettingItemDetailDao.java
+19
-0
RightsSettingItemDetailDaoImpl.java
...ightsSetting/dao/impl/RightsSettingItemDetailDaoImpl.java
+29
-0
RightsNowItem.java
...a/com/pcloud/book/rightsSetting/entity/RightsNowItem.java
+13
-1
RightsSettingItem.java
...m/pcloud/book/rightsSetting/entity/RightsSettingItem.java
+6
-0
RightsSettingItemDetail.java
...ud/book/rightsSetting/entity/RightsSettingItemDetail.java
+38
-0
RightsSettingTitle.java
.../pcloud/book/rightsSetting/entity/RightsSettingTitle.java
+5
-1
RightsServeTypeEnum.java
.../pcloud/book/rightsSetting/enums/RightsServeTypeEnum.java
+22
-0
PcloudGroupActivityBiz.java
...ava/com/pcloud/book/skill/biz/PcloudGroupActivityBiz.java
+9
-0
PcloudGroupActivityBizImpl.java
...cloud/book/skill/biz/impl/PcloudGroupActivityBizImpl.java
+17
-0
PcloudGroupActivityDao.java
...ava/com/pcloud/book/skill/dao/PcloudGroupActivityDao.java
+3
-0
PcloudGroupActivityDaoImpl.java
...cloud/book/skill/dao/impl/PcloudGroupActivityDaoImpl.java
+4
-0
AppletNews.xml
...vice-book/src/main/resources/mapper/applet/AppletNews.xml
+33
-0
RightsSettingItemDetail.Mapper.xml
...s/mapper/rightssetting/RightsSettingItemDetail.Mapper.xml
+105
-0
RightsSettingItemMapper.xml
...esources/mapper/rightssetting/RightsSettingItemMapper.xml
+9
-5
RightsSettingTitleMapper.xml
...sources/mapper/rightssetting/RightsSettingTitleMapper.xml
+17
-5
PcloudGroupActivityDao.xml
...rc/main/resources/mapper/skill/PcloudGroupActivityDao.xml
+30
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/AppletNewsBiz.java
View file @
9955a5b1
...
...
@@ -13,6 +13,7 @@ import com.pcloud.book.applet.vo.AppletNewsShowStateVO;
import
com.pcloud.common.page.PageBeanNew
;
import
java.util.List
;
import
java.util.Map
;
/**
* 小程序资讯
...
...
@@ -74,7 +75,7 @@ public interface AppletNewsBiz {
*/
PageBeanNew
<
AppletNewsDTO
>
listAppletNews
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Long
rightsClassifyId
,
String
source
,
Long
newsClassifyId
);
Long
subjectLabelId
,
Long
rightsClassifyId
,
String
source
,
Integer
showState
,
Long
newsClassifyId
);
/**
* 获取所有资讯栏目
...
...
@@ -202,4 +203,11 @@ public interface AppletNewsBiz {
PageBeanNew
<
AppletNewsDTO
>
listAppletNews4Analysis
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Integer
linkOnly
,
Long
rightsClassifyId
);
/**
*
* @param appletNewsId
* @return
*/
Map
<
Long
,
AppletNewsDTO
>
getByIds
(
List
<
Long
>
appletNewsId
);
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/biz/impl/AppletNewsBizImpl.java
View file @
9955a5b1
...
...
@@ -148,11 +148,12 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
@Override
public
PageBeanNew
<
AppletNewsDTO
>
listAppletNews
(
Integer
currentPage
,
Integer
numPerPage
,
String
name
,
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
,
Long
rightsClassifyId
,
String
source
,
Long
newsClassifyId
)
{
Long
subjectLabelId
,
Long
rightsClassifyId
,
String
source
,
Integer
showState
,
Long
newsClassifyId
)
{
Map
<
String
,
Object
>
paramMap
=
new
HashMap
<>();
paramMap
.
put
(
"name"
,
name
);
paramMap
.
put
(
"rightsClassifyId"
,
rightsClassifyId
);
paramMap
.
put
(
"source"
,
source
);
paramMap
.
put
(
"showState"
,
showState
);
paramMap
.
put
(
"newsClassifyId"
,
newsClassifyId
);
//处理分类
if
(
null
!=
firstClassify
){
...
...
@@ -525,6 +526,14 @@ public class AppletNewsBizImpl implements AppletNewsBiz {
}
@Override
public
Map
<
Long
,
AppletNewsDTO
>
getByIds
(
List
<
Long
>
appletNewsIds
)
{
if
(
ListUtils
.
isEmpty
(
appletNewsIds
)){
new
HashMap
<>();
}
return
appletNewsDao
.
getByIds
(
appletNewsIds
);
}
@Override
public
void
addUserNewsClassify
(
List
<
Long
>
newsClassifyIds
,
Long
wechatUserId
)
{
if
(
null
==
wechatUserId
){
return
;
...
...
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/AppletNewsDao.java
View file @
9955a5b1
...
...
@@ -6,6 +6,7 @@ import com.pcloud.book.applet.vo.AppletNewsClassifyVO;
import
com.pcloud.book.applet.vo.AppletNewsShowStateVO
;
import
com.pcloud.common.core.dao.BaseDao
;
import
java.util.List
;
import
java.util.Map
;
/**
...
...
@@ -81,4 +82,6 @@ public interface AppletNewsDao extends BaseDao<AppletNews> {
* * @param null
*/
Boolean
urlNumberExist
(
String
jumpUrl
,
String
urlNumber
,
Long
id
);
Map
<
Long
,
AppletNewsDTO
>
getByIds
(
List
<
Long
>
appletNewsIds
);
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/dao/impl/AppletNewsDaoImpl.java
View file @
9955a5b1
...
...
@@ -117,4 +117,9 @@ public class AppletNewsDaoImpl extends BaseDaoImpl<AppletNews> implements Applet
return
getSessionTemplate
().
selectOne
(
getStatement
(
"urlNumberExist"
),
map
);
}
@Override
public
Map
<
Long
,
AppletNewsDTO
>
getByIds
(
List
<
Long
>
list
)
{
return
this
.
getSqlSession
().
selectMap
(
getStatement
(
"getByIds"
),
list
,
"id"
);
}
}
pcloud-service-book/src/main/java/com/pcloud/book/applet/facade/AppletHomeFacade.java
View file @
9955a5b1
...
...
@@ -452,6 +452,7 @@ public class AppletHomeFacade {
@RequestParam
(
value
=
"subjectLabelId"
,
required
=
false
)
@ApiParam
(
"科目标签"
)
Long
subjectLabelId
,
@RequestParam
(
value
=
"rightsClassifyId"
,
required
=
false
)
@ApiParam
(
"权益分类"
)
Long
rightsClassifyId
,
@RequestParam
(
value
=
"source"
,
required
=
false
)
@ApiParam
(
"来源"
)
String
source
,
@RequestParam
(
value
=
"showState"
,
required
=
false
)
@ApiParam
(
"上架"
)
Integer
showState
,
@RequestParam
(
value
=
"newsClassifyId"
,
required
=
false
)
@ApiParam
(
"资讯栏目id"
)
Long
newsClassifyId
)
throws
PermissionException
{
SessionUtil
.
getInfoToken4Redis
(
token
);
...
...
@@ -459,7 +460,7 @@ public class AppletHomeFacade {
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"缺少分页参数"
);
}
return
new
ResponseDto
<>(
appletNewsBiz
.
listAppletNews
(
currentPage
,
numPerPage
,
name
,
firstClassify
,
secondClassify
,
gradeLabelId
,
subjectLabelId
,
rightsClassifyId
,
source
,
newsClassifyId
));
subjectLabelId
,
rightsClassifyId
,
source
,
showState
,
newsClassifyId
));
}
@ApiOperation
(
"客户端资讯列表"
)
...
...
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/CustomPlanBiz.java
View file @
9955a5b1
...
...
@@ -52,4 +52,6 @@ public interface CustomPlanBiz {
List
<
PlanReadTypeDto
>
getPlanReadTypesByBookId
(
Long
bookId
);
List
<
CustomPlan
>
listByCustomPlanIds
(
List
<
Long
>
customPlanIds
);
Map
<
Long
,
CustomPlan
>
getByIds
(
List
<
Long
>
planIds
);
}
pcloud-service-book/src/main/java/com/pcloud/book/custom/biz/impl/CustomPlanBizImpl.java
View file @
9955a5b1
...
...
@@ -72,6 +72,7 @@ import java.util.Arrays;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.function.Function
;
import
java.util.stream.Collectors
;
import
static
com
.
dcg
.
coolq
.
sdk
.
CoolQSDK
.
sendPrivateMsg
;
...
...
@@ -542,4 +543,13 @@ public class CustomPlanBizImpl implements CustomPlanBiz {
public
List
<
CustomPlan
>
listByCustomPlanIds
(
List
<
Long
>
customPlanIds
)
{
return
customPlanMapper
.
getCustomPlanByIds
(
customPlanIds
);
}
@Override
public
Map
<
Long
,
CustomPlan
>
getByIds
(
List
<
Long
>
planIds
)
{
List
<
CustomPlan
>
customPlan
=
customPlanMapper
.
getCustomPlanByIds
(
planIds
);
if
(
ListUtils
.
isEmpty
(
customPlan
)){
return
new
HashMap
<>();
}
return
customPlan
.
stream
().
collect
(
Collectors
.
toMap
(
x
->
x
.
getId
().
longValue
(),
Function
.
identity
()));
}
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
9955a5b1
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/RightsSettingItemDetailDao.java
0 → 100644
View file @
9955a5b1
package
com
.
pcloud
.
book
.
rightsSetting
.
dao
;
import
com.pcloud.book.rightsSetting.entity.RightsSettingItemDetail
;
import
com.pcloud.common.core.dao.BaseDao
;
import
java.util.List
;
/**
* (RightsSettingItemDetail)表数据库访问层
*
* @author makejava
* @since 2020-05-18 22:28:12
*/
public
interface
RightsSettingItemDetailDao
extends
BaseDao
<
RightsSettingItemDetail
>
{
void
deleteByItemIds
(
List
<
Long
>
rightsSettingItemIds
);
List
<
RightsSettingItemDetail
>
getByItemIds
(
List
<
Long
>
itemIds
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/impl/RightsSettingItemDetailDaoImpl.java
0 → 100644
View file @
9955a5b1
package
com
.
pcloud
.
book
.
rightsSetting
.
dao
.
impl
;
import
com.pcloud.book.rightsSetting.entity.RightsSettingItemDetail
;
import
com.pcloud.book.rightsSetting.dao.RightsSettingItemDetailDao
;
import
com.pcloud.common.core.dao.BaseDaoImpl
;
import
org.springframework.stereotype.Repository
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
/**
* (RightsSettingItemDetail)表数据库访问层
*
* @author makejava
* @since 2020-05-18 22:28:12
*/
@Repository
(
"rightsSettingItemDetailDaoImpl"
)
public
class
RightsSettingItemDetailDaoImpl
extends
BaseDaoImpl
<
RightsSettingItemDetail
>
implements
RightsSettingItemDetailDao
{
@Override
public
void
deleteByItemIds
(
List
<
Long
>
list
)
{
this
.
getSqlSession
().
delete
(
getStatement
(
"deleteByItemIds"
),
list
);
}
@Override
public
List
<
RightsSettingItemDetail
>
getByItemIds
(
List
<
Long
>
list
)
{
return
this
.
getSqlSession
().
selectList
(
getStatement
(
"getByItemIds"
),
list
);
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsNowItem.java
View file @
9955a5b1
package
com
.
pcloud
.
book
.
rightsSetting
.
entity
;
import
com.pcloud.book.skill.dto.GroupActivity4AppletDTO
;
import
com.pcloud.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
...
...
@@ -68,6 +69,17 @@ public class RightsNowItem extends BaseEntity {
private
Integer
useType
;
@ApiModelProperty
(
"兑换地址"
)
private
String
exchangeAddress
;
@ApiModelProperty
(
"社群名称"
)
private
String
groupName
;
@ApiModelProperty
(
"社群简介"
)
private
String
groupDesc
;
@ApiModelProperty
(
"社群二维码"
)
private
String
groupQrCode
;
@ApiModelProperty
(
"社群信息"
)
private
GroupActivity4AppletDTO
groupActivity4AppletDTO
;
@ApiModelProperty
(
"资讯名称"
)
private
String
newsName
;
@ApiModelProperty
(
"资讯图"
)
private
String
newsSource
;
}
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSettingItem.java
View file @
9955a5b1
...
...
@@ -48,6 +48,10 @@ public class RightsSettingItem extends BaseEntity {
timezone
=
"GMT+8"
)
private
Date
createTime
;
/**
* 开启
*/
private
Integer
openState
;
/**
* 权益标题
...
...
@@ -79,6 +83,8 @@ public class RightsSettingItem extends BaseEntity {
@ApiModelProperty
(
"社群"
)
private
List
<
GroupActivity4AppletDTO
>
groupActivity4AppletList
;
@ApiModelProperty
(
"服务类型;GROUP、NEWS、PLAN"
)
private
String
serveType
;
/**
* 轻松阅读
*/
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSettingItemDetail.java
0 → 100644
View file @
9955a5b1
package
com
.
pcloud
.
book
.
rightsSetting
.
entity
;
import
java.util.Date
;
import
java.math.BigDecimal
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.pcloud.common.entity.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
/**
* (RightsSettingItemDetail)实体类
*
* @author makejava
* @since 2020-05-18 22:28:12
*/
@Data
public
class
RightsSettingItemDetail
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
861375509249616760L
;
@ApiModelProperty
(
"即享权益项id"
)
private
Long
id
;
@ApiModelProperty
(
"权益子项id"
)
private
Long
rightsSettingItemId
;
@ApiModelProperty
(
"社群或资讯id"
)
private
Long
serveId
;
@ApiModelProperty
(
"社群、资讯"
)
private
String
serveType
;
@ApiModelProperty
(
"创建时间"
)
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSettingTitle.java
View file @
9955a5b1
package
com
.
pcloud
.
book
.
rightsSetting
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
import
lombok.Data
;
@Data
public
class
RightsSettingTitle
{
public
class
RightsSettingTitle
implements
Serializable
{
private
Long
id
;
private
Long
rightsSettingId
;
...
...
@@ -31,6 +33,8 @@ public class RightsSettingTitle {
)
private
Date
updateTime
;
private
String
serveType
;
/**
* 列表
*/
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/enums/RightsServeTypeEnum.java
0 → 100644
View file @
9955a5b1
package
com
.
pcloud
.
book
.
rightsSetting
.
enums
;
public
enum
RightsServeTypeEnum
{
/**
* 共读社群
*/
GROUP
(
1
),
/**
* 小程序资讯
*/
NEWS
(
2
),
/**
* 方案
*/
PLAN
(
3
);
public
final
Integer
value
;
RightsServeTypeEnum
(
Integer
value
)
{
this
.
value
=
value
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/PcloudGroupActivityBiz.java
View file @
9955a5b1
...
...
@@ -9,6 +9,9 @@ import com.pcloud.common.page.PageBeanNew;
import
org.springframework.web.bind.annotation.RequestParam
;
import
java.util.List
;
import
java.util.Map
;
public
interface
PcloudGroupActivityBiz
{
/**
...
...
@@ -44,4 +47,10 @@ public interface PcloudGroupActivityBiz {
* @return
*/
GroupActivity4AppletDTO
getGroupActivity4Applet
(
Long
rightSettingId
,
Long
adviserId
,
Long
bookId
,
Long
channelId
,
Integer
readType
);
/**
* 根据id获取社群共读
* @param ids
* @return
*/
Map
<
Long
,
GroupActivity4AppletDTO
>
getByIds
(
List
<
Long
>
ids
);
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/biz/impl/PcloudGroupActivityBizImpl.java
View file @
9955a5b1
...
...
@@ -323,4 +323,21 @@ public class PcloudGroupActivityBizImpl implements PcloudGroupActivityBiz {
groupActivity4AppletDTO
.
setStatementDTOList
(
statementDTOS
);
return
groupActivity4AppletDTO
;
}
@Override
public
Map
<
Long
,
GroupActivity4AppletDTO
>
getByIds
(
List
<
Long
>
ids
)
{
if
(
ListUtils
.
isEmpty
(
ids
)){
return
new
HashMap
<>();
}
Map
<
Long
,
GroupActivity4AppletDTO
>
mapDto
=
pcloudGroupActivityDao
.
getByIds
(
ids
);
if
(
mapDto
.
isEmpty
()){
return
new
HashMap
<>();
}
for
(
GroupActivity4AppletDTO
groupActivity4AppletDTO:
mapDto
.
values
()){
String
filterStr
=
StringUtilParent
.
replaceHtml
(
groupActivity4AppletDTO
.
getDesc
());
String
subStr
=
filterStr
.
length
()
>
60
?
filterStr
.
substring
(
0
,
60
)
+
"..."
:
filterStr
;
groupActivity4AppletDTO
.
setCutDesc
(
subStr
);
}
return
mapDto
;
}
}
pcloud-service-book/src/main/java/com/pcloud/book/skill/dao/PcloudGroupActivityDao.java
View file @
9955a5b1
...
...
@@ -18,4 +18,6 @@ public interface PcloudGroupActivityDao extends BaseDao<PcloudGroupActivity> {
GroupActivity4AppletDTO
getGroupActivity4Applet
(
Long
firstClassify
,
Long
secondClassify
,
Long
gradeLabelId
,
Long
subjectLabelId
);
List
<
GroupActivity4AppletDTO
>
getTishBookSchoolList
(
BaseTempletClassify
baseTempletClassify
,
Integer
limit
);
Map
<
Long
,
GroupActivity4AppletDTO
>
getByIds
(
List
<
Long
>
ids
);
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/skill/dao/impl/PcloudGroupActivityDaoImpl.java
View file @
9955a5b1
...
...
@@ -47,4 +47,8 @@ public class PcloudGroupActivityDaoImpl extends BaseDaoImpl<PcloudGroupActivity>
return
super
.
getSqlSession
().
selectList
(
getStatement
(
"getTishBookSchoolList"
),
map
);
}
@Override
public
Map
<
Long
,
GroupActivity4AppletDTO
>
getByIds
(
List
<
Long
>
list
)
{
return
super
.
getSqlSession
().
selectMap
(
getStatement
(
"getByIds"
),
list
,
"id"
);
}
}
pcloud-service-book/src/main/resources/mapper/applet/AppletNews.xml
View file @
9955a5b1
...
...
@@ -384,6 +384,39 @@
ORDER BY n.create_time DESC
</select>
<select
id=
"getByIds"
resultType=
"com.pcloud.book.applet.dto.AppletNewsDTO"
>
SELECT
n.id,
n.news_name newsName,
n.source,
n.news_classify_id newsClassifyId,
n.pro_label_id proLabelId,
n.dep_label_id depLabelId,
n.pur_label_id purLabelId,
n.type,
n.digest,
n.pic1,
n.pic2,
n.pic3,
n.show_state showState,
n.create_time createTime,
n.first_classify firstClassify,
n.second_classify secondClassify,
n.grade_label_id gradeLabelId,
n.subject_label_id subjectLabelId,
n.rights_classify_id rightsClassifyId,
n.jump_type jumpType,
n.jump_url jumpUrl,
n.url_number urlNumber
FROM applet_news n
WHERE n.show_state = 1
AND n.id IN
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"("
close=
")"
>
${item}
</foreach>
ORDER BY n.create_time DESC
</select>
<select
id=
"listAppletNews4Wechat"
parameterType=
"map"
resultType=
"com.pcloud.book.applet.dto.AppletNewsDTO"
>
SELECT
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingItemDetail.Mapper.xml
0 → 100644
View file @
9955a5b1
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.pcloud.book.rightsSetting.dao.impl.RightsSettingItemDetailDaoImpl"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.rightsSetting.entity.RightsSettingItemDetail"
>
<id
column=
"id"
property=
"id"
jdbcType=
"BIGINT"
/>
<result
column=
"rights_setting_item_id"
property=
"rightsSettingItemId"
jdbcType=
"BIGINT"
/>
<result
column=
"serve_id"
property=
"serveId"
jdbcType=
"BIGINT"
/>
<result
column=
"serve_type"
property=
"serveType"
jdbcType=
"VARCHAR"
/>
<result
column=
"create_time"
property=
"createTime"
jdbcType=
"TIMESTAMP"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
id, rights_setting_item_id, serve_id, serve_type, create_time
</sql>
<select
id=
"getById"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM rights_setting_item_detail
WHERE id = #{id}
</select>
<select
id=
"getByItemIds"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM rights_setting_item_detail
WHERE rights_setting_item_id IN
<foreach
collection=
"list"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
</select>
<select
id=
"getList"
resultMap=
"BaseResultMap"
>
SELECT
<include
refid=
"Base_Column_List"
/>
FROM rights_setting_item_detail
</select>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO rights_setting_item_detail(
rights_setting_item_id,
serve_id,
serve_type,
create_time
) VALUES (
#{rightsSettingItemId, jdbcType=BIGINT},
#{serveId, jdbcType=BIGINT},
#{serveType, jdbcType=VARCHAR},
NOW()
)
</insert>
<insert
id=
"batchInsert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
INSERT INTO rights_setting_item_detail (
rights_setting_item_id,
serve_id,
serve_type,
create_time
) VALUES
<foreach
collection=
"list"
item=
"item"
separator=
","
>
(
#{item.rightsSettingItemId, jdbcType=BIGINT},
#{item.serveId, jdbcType=BIGINT},
#{item.serveType, jdbcType=VARCHAR},
NOW()
)
</foreach>
</insert>
<!--通过主键修改数据-->
<update
id=
"update"
>
UPDATE rights_setting_item_detail
<set>
<if
test=
"rightsSettingItemId != null"
>
rights_setting_item_id = #{rightsSettingItemId},
</if>
<if
test=
"serveId != null"
>
serve_id = #{serveId},
</if>
<if
test=
"serveType != null and serveType != ''"
>
serve_type = #{serveType},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime},
</if>
</set>
WHERE id = #{id}
</update>
<!--通过主键删除-->
<delete
id=
"deleteById"
>
DELETE FROM rights_setting_item_detail where id = #{id}
</delete>
<delete
id=
"deleteByItemIds"
>
DELETE FROM rights_setting_item_detail where
rights_setting_item_id IN
<foreach
collection=
"list"
item=
"item"
open=
"("
separator=
","
close=
")"
>
${item}
</foreach>
</delete>
</mapper>
\ No newline at end of file
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingItemMapper.xml
View file @
9955a5b1
...
...
@@ -11,6 +11,9 @@
<result
property=
"createTime"
column=
"create_time"
jdbcType=
"TIMESTAMP"
/>
<result
property=
"title"
column=
"title"
jdbcType=
"VARCHAR"
/>
<result
property=
"uuid"
column=
"uuid"
jdbcType=
"VARCHAR"
/>
<result
property=
"openState"
column=
"open_state"
jdbcType=
"INTEGER"
/>
<result
property=
"serviceDesc"
column=
"service_desc"
jdbcType=
"VARCHAR"
/>
<result
property=
"serveType"
column=
"serve_type"
jdbcType=
"VARCHAR"
/>
<result
property=
"easyRead"
column=
"easy_read"
jdbcType=
"TINYINT"
/>
<result
property=
"efficientRead"
column=
"efficient_read"
jdbcType=
"TINYINT"
/>
<result
property=
"deepRead"
column=
"deep_read"
jdbcType=
"TINYINT"
/>
...
...
@@ -21,10 +24,9 @@
select
i.id, i.rights_setting_id rightsSettingId,
i.rights_type rightsType, i.rights_classify_id rightsClassifyId,
i.description, i.create_time createTime, i.title,i.uuid,IFNULL(p.is_open,0) isOpen,p.service_desc serviceDesc
,
i.description, i.create_time createTime, i.title,i.uuid,i.open_state openState,i.service_desc serviceDesc,i.serve_type serveType
,
c.book_id bookId, i.easy_read easyRead,i.efficient_read efficientRead,i.deep_read deepRead
from book.rights_setting_item i
left join book.rights_read_plan p on i.id=p.rights_setting_item_id
LEFT JOIN rights_setting c ON c.id=i.rights_setting_id
<where>
<if
test=
"id != null"
>
...
...
@@ -56,9 +58,9 @@
<!--新增所有列-->
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into book.rights_setting_item(rights_setting_id, rights_type, rights_classify_id, description, create_time,title,uuid,
insert into book.rights_setting_item(rights_setting_id, rights_type, rights_classify_id, description, create_time,title,uuid,
open_state,serve_type,
easy_read,efficient_read,deep_read)
values (#{rightsSettingId}, #{rightsType}, #{rightsClassifyId}, #{description}, NOW(), #{title},#{uuid},
values (#{rightsSettingId}, #{rightsType}, #{rightsClassifyId}, #{description}, NOW(), #{title},#{uuid},
#{openState},#{serveType},
#{easyRead},#{efficientRead},#{deepRead})
</insert>
...
...
@@ -74,7 +76,7 @@
<!--批量新增-->
<insert
id=
"batchInsert"
useGeneratedKeys=
"true"
parameterType=
"java.util.List"
>
insert into book.rights_setting_item (
rights_setting_id, rights_type, rights_classify_id, description, create_time,title,uuid,
rights_setting_id, rights_type, rights_classify_id, description, create_time,title,uuid,
open_state,serve_type,
easy_read,efficient_read,deep_read
)
values
...
...
@@ -87,6 +89,8 @@
NOW(),
#{item.title},
#{item.uuid},
#{item.openState},
#{item.serveType}
#{item.easyRead},#{item.efficientRead},#{item.deepRead}
)
</foreach>
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingTitleMapper.xml
View file @
9955a5b1
...
...
@@ -10,6 +10,7 @@
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"rights_setting_now_type"
jdbcType=
"TINYINT"
property=
"rightsSettingNowType"
/>
<result
column=
"serve_type"
jdbcType=
"VARCHAR"
property=
"serveType"
/>
<result
column=
"easy_read"
jdbcType=
"TINYINT"
property=
"easyRead"
/>
<result
column=
"efficient_read"
jdbcType=
"TINYINT"
property=
"efficientRead"
/>
<result
column=
"deep_read"
jdbcType=
"TINYINT"
property=
"deepRead"
/>
...
...
@@ -18,15 +19,15 @@
<sql
id=
"baseSql"
>
id, rights_setting_id, rights_setting_title,
rights_setting_desc, open_state, create_time,
update_time,rights_setting_now_type,easy_read,efficient_read,deep_read
update_time,rights_setting_now_type,
serve_type,
easy_read,efficient_read,deep_read
</sql>
<insert
id=
"insert"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingTitle"
>
insert into rights_setting_title (id, rights_setting_id, rights_setting_title,
rights_setting_desc, open_state, create_time,
update_time,rights_setting_now_type,easy_read,efficient_read,deep_read)
update_time,rights_setting_now_type,
serve_type,
easy_read,efficient_read,deep_read)
values (#{id,jdbcType=BIGINT}, #{rightsSettingId,jdbcType=BIGINT}, #{rightsSettingTitle,jdbcType=VARCHAR},
#{rightsSettingDesc,jdbcType=VARCHAR}, #{openState,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},#{rightsSettingNowType},#{easyRead},#{efficientRead},#{deepRead})
#{updateTime,jdbcType=TIMESTAMP},#{rightsSettingNowType},#{
serveType},#{
easyRead},#{efficientRead},#{deepRead})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingTitle"
>
insert into rights_setting_title
...
...
@@ -52,6 +53,9 @@
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"serveType != null"
>
serve_type,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
...
...
@@ -75,6 +79,9 @@
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"serveType != null"
>
#{serve_type,jdbcType=VARCHAR},
</if>
</trim>
</insert>
...
...
@@ -89,12 +96,12 @@
<insert
id=
"batchInsert"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingTitle"
>
insert into rights_setting_title (id, rights_setting_id, rights_setting_title,
rights_setting_desc, open_state, create_time, update_time,rights_setting_now_type,
rights_setting_desc, open_state, create_time, update_time,rights_setting_now_type,
serve_type,
easy_read,efficient_read,deep_read)
values
<foreach
collection=
"list"
item=
"item"
index=
"index"
separator=
","
>
(#{item.id,jdbcType=BIGINT}, #{item.rightsSettingId,jdbcType=BIGINT}, #{item.rightsSettingTitle,jdbcType=VARCHAR},
#{item.rightsSettingDesc,jdbcType=VARCHAR}, #{item.openState,jdbcType=TINYINT}, now(), now(),#{item.rightsSettingNowType},
#{item.rightsSettingDesc,jdbcType=VARCHAR}, #{item.openState,jdbcType=TINYINT}, now(), now(),#{item.rightsSettingNowType},
#{item.serveType},
#{item.easyRead},#{item.efficientRead},#{item.deepRead})
</foreach>
</insert>
...
...
@@ -118,6 +125,11 @@
when id=#{item.id} then #{item.openState}
</foreach>
</trim>
<trim
prefix=
"serve_type =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
when id=#{item.id} then #{item.serveType}
</foreach>
</trim>
<trim
prefix=
"easy_read =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
when id=#{item.id} then #{item.easyRead}
...
...
pcloud-service-book/src/main/resources/mapper/skill/PcloudGroupActivityDao.xml
View file @
9955a5b1
...
...
@@ -132,6 +132,36 @@
where a.id = #{id,jdbcType=INTEGER}
</select>
<select
id=
"getByIds"
resultType=
"com.pcloud.book.skill.dto.GroupActivity4AppletDTO"
>
SELECT
a.id,
a.id groupActivityId,
a.`name`,
a.description as `desc`,
a.join_type AS joinType,
a.group_pic AS groupPic,
a.book_group_qrcode_id AS bookGroupQrcodeId,
b.group_name AS groupName,
b.user_number userNumber,
b.classify_id classifyId,
c.book_group_id bookGroupId,
a.first_classify AS firstClassify,
a.second_classify AS secondClassify,
a.grade_label_id AS gradeLabelId,
a.subject_label_id AS subjectLabelId
FROM
pcloud_group_activity a
INNER JOIN book_group_qrcode b on a.book_group_qrcode_id = b.id AND b.is_delete = 0
INNER JOIN book_group_classify c ON b.classify_id = c.id AND c.is_delete = 0
WHERE
a.is_delete = 0
AND a.id IN
<foreach
collection=
"list"
item=
"item"
open=
"("
close=
")"
separator=
","
>
${item}
</foreach>
ORDER BY id DESC
</select>
<select
id=
"getGroupActivity4Applet"
resultType=
"com.pcloud.book.skill.dto.GroupActivity4AppletDTO"
parameterType=
"map"
>
SELECT
a.id,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment