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
ef4da83b
Commit
ef4da83b
authored
Apr 23, 2020
by
吴博
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1002795
parent
088aa326
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
298 additions
and
14 deletions
+298
-14
RightsSettingBizImpl.java
...oud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
+0
-0
RightsSettingCheck.java
...loud/book/rightsSetting/dao/check/RightsSettingCheck.java
+12
-6
RightsSetting.java
...a/com/pcloud/book/rightsSetting/entity/RightsSetting.java
+22
-5
RightsSettingNow.java
...om/pcloud/book/rightsSetting/entity/RightsSettingNow.java
+53
-0
RightsSettingTitle.java
.../pcloud/book/rightsSetting/entity/RightsSettingTitle.java
+41
-0
RightsNowItemType.java
...om/pcloud/book/rightsSetting/enums/RightsNowItemType.java
+13
-1
RightsSettingTitleMapper.java
...d/book/rightsSetting/mapper/RightsSettingTitleMapper.java
+22
-0
generatorConfig.xml
pcloud-service-book/src/main/resources/generatorConfig.xml
+2
-2
RightsSettingTitleMapper.xml
...sources/mapper/rightssetting/RightsSettingTitleMapper.xml
+133
-0
No files found.
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/biz/impl/RightsSettingBizImpl.java
View file @
ef4da83b
This diff is collapsed.
Click to expand it.
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/dao/check/RightsSettingCheck.java
View file @
ef4da83b
...
...
@@ -40,15 +40,21 @@ public class RightsSettingCheck {
checkRightNowItem
(
rightsSetting
);
}
private
void
checkRightNowItem
(
RightsSetting
rightsSetting
){
private
void
checkRightNowItem
(
RightsSetting
rightsSetting
)
{
if
(
rightsSetting
==
null
)
{
return
;
}
checkRightNowItemApp
(
rightsSetting
.
getOnlineCourseNowItems
());
checkRightNowItemApp
(
rightsSetting
.
getLearningToolNowItems
());
checkRightNowItemApp
(
rightsSetting
.
getDrawNowItems
());
if
(!
ListUtils
.
isEmpty
(
rightsSetting
.
getGiftCouponPackageNowItems
())){
for
(
RightsNowItem
item
:
rightsSetting
.
getGiftCouponPackageNowItems
())
{
if
(
null
!=
rightsSetting
.
getOnlineRightsSettingTitle
())
{
checkRightNowItemApp
(
rightsSetting
.
getOnlineRightsSettingTitle
().
getRightsSettingItemList
());
}
if
(
null
!=
rightsSetting
.
getLearningToolTitle
())
{
checkRightNowItemApp
(
rightsSetting
.
getLearningToolTitle
().
getRightsSettingItemList
());
}
if
(
null
!=
rightsSetting
.
getDrawSettingTitle
())
{
checkRightNowItemApp
(
rightsSetting
.
getDrawSettingTitle
().
getRightsSettingItemList
());
}
if
(
null
!=
rightsSetting
.
getGiftCouponPackageTitle
()
&&
!
ListUtils
.
isEmpty
(
rightsSetting
.
getGiftCouponPackageTitle
().
getRightsSettingItemList
()))
{
for
(
RightsNowItem
item
:
rightsSetting
.
getGiftCouponPackageTitle
().
getRightsSettingItemList
())
{
if
(
item
.
getGiftCouponPackageId
()
==
null
)
{
throw
new
BookBizException
(
BookBizException
.
PARAM_IS_NULL
,
"专享礼包券id为空!"
);
}
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSetting.java
View file @
ef4da83b
...
...
@@ -6,6 +6,7 @@ import io.swagger.annotations.ApiModelProperty;
import
java.util.List
;
import
lombok.Data
;
import
lombok.NonNull
;
@Data
public
class
RightsSetting
extends
BaseTempletClassify
{
...
...
@@ -33,18 +34,29 @@ public class RightsSetting extends BaseTempletClassify {
@ApiModelProperty
(
"抽奖是否开启"
)
private
Boolean
drawNowOpen
;
@NonNull
@ApiModelProperty
(
"线上网课集合"
)
private
List
<
RightsNowItem
>
onlineCourseNowItems
;
private
RightsSettingTitle
onlineRightsSettingTitle
;
@NonNull
@ApiModelProperty
(
"学习工具集合"
)
private
List
<
RightsNowItem
>
learningToolNowItems
;
private
RightsSettingTitle
learningToolTitle
;
@NonNull
@ApiModelProperty
(
"抽奖集合"
)
private
List
<
RightsNowItem
>
drawNowItems
;
private
RightsSettingTitle
drawSettingTitle
;
@NonNull
@ApiModelProperty
(
"专享礼包券集合"
)
private
List
<
RightsNowItem
>
giftCouponPackageNowItems
;
private
RightsSettingTitle
giftCouponPackageTitle
;
@NonNull
@ApiModelProperty
(
"社群集合"
)
private
RightsSettingTitle
groupServiceTitle
;
@NonNull
@ApiModelProperty
(
"配套资料集合"
)
private
RightsSettingTitle
servesTitle
;
@ApiModelProperty
(
"启用专享社群服务"
)
private
Integer
enableGroupService
=
0
;
...
...
@@ -73,4 +85,8 @@ public class RightsSetting extends BaseTempletClassify {
* 长期权益
*/
private
List
<
RightsSettingItem
>
rightsSettingLongTermItems
;
public
RightsSetting
()
{
}
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSettingNow.java
0 → 100644
View file @
ef4da83b
package
com
.
pcloud
.
book
.
rightsSetting
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.util.Date
;
import
java.util.List
;
import
org.springframework.cloud.netflix.ribbon.RibbonHttpRequest
;
/**
* @ClassName com.pcloud.book.rightsSetting.entity.RightsSettingNow
* @Author 吴博
* @Description 即享权益
* @Date 2020/4/22 17:07
* @Version 1.0
**/
public
class
RightsSettingNow
{
private
Long
id
;
/**
* 权益id
*/
private
Long
rightsSettingId
;
/**
* 权益分类
*/
private
Long
rightsClassifyId
;
/**
* 权益描述
*/
private
String
rightsSettingDesc
;
/**
* 创建时间
*/
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
/**
* 权益标题
*/
private
String
rightsSettingTitle
;
/**
* 列表
*/
private
List
<
RightsSettingItem
>
rightsSettingItemList
;
private
Boolean
onlineCourseOpen
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/entity/RightsSettingTitle.java
0 → 100644
View file @
ef4da83b
package
com
.
pcloud
.
book
.
rightsSetting
.
entity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
java.util.Date
;
import
java.util.List
;
import
lombok.Data
;
@Data
public
class
RightsSettingTitle
{
private
Long
id
;
private
Long
rightsSettingId
;
private
String
rightsSettingTitle
;
private
String
rightsSettingDesc
;
private
Boolean
openState
;
private
Integer
rightsSettingNowType
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
createTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
updateTime
;
/**
* 列表
*/
private
List
<
RightsNowItem
>
rightsSettingItemList
;
}
\ No newline at end of file
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/enums/RightsNowItemType.java
View file @
ef4da83b
...
...
@@ -17,10 +17,22 @@ public enum RightsNowItemType {
/**
* 4专享礼包券
*/
GIFT_COUPON_PACKAGE
(
4
);
GIFT_COUPON_PACKAGE
(
4
),
/**
* 5专享礼包券
*/
GROUP_SERVICE
(
5
),
/**
* 6 配套资料
*/
SERVES
(
6
);
/**
* 值
*/
public
final
Integer
value
;
RightsNowItemType
(
Integer
value
)
{
...
...
pcloud-service-book/src/main/java/com/pcloud/book/rightsSetting/mapper/RightsSettingTitleMapper.java
0 → 100644
View file @
ef4da83b
package
com
.
pcloud
.
book
.
rightsSetting
.
mapper
;
import
com.pcloud.book.rightsSetting.entity.RightsSettingTitle
;
import
java.util.List
;
import
org.springframework.stereotype.Component
;
@Component
public
interface
RightsSettingTitleMapper
{
int
insert
(
RightsSettingTitle
record
);
int
insertSelective
(
RightsSettingTitle
record
);
void
deleteByRightSettingId
(
Long
rightsSettingId
);
void
batchInsert
(
List
<
RightsSettingTitle
>
rightsSettingTitles
);
void
batchUpdate
(
List
<
RightsSettingTitle
>
rightsSettingTitles
);
List
<
RightsSettingTitle
>
getByRightSettingId
(
Long
rightsSettingId
);
}
\ No newline at end of file
pcloud-service-book/src/main/resources/generatorConfig.xml
View file @
ef4da83b
...
...
@@ -5,7 +5,7 @@
<generatorConfiguration>
<classPathEntry
location=
"
E:\work\respository\mysql\mysql-connector-java\5.1.44\mysql-connector-java-5.1.44
.jar"
/>
location=
"
D:\maven\repository\mysql\mysql-connector-java\5.1.47\mysql-connector-java-5.1.47
.jar"
/>
<context
id=
"my"
targetRuntime=
"MyBatis3"
>
<commentGenerator>
<property
name=
"suppressDate"
value=
"false"
/>
...
...
@@ -38,7 +38,7 @@
selectByExampleQueryId="false">
</table>-->
<table
tableName=
"rights_setting
"
domainObjectName=
"RightsSetting
"
<table
tableName=
"rights_setting
_title"
domainObjectName=
"RightsSettingTitle
"
enableCountByExample=
"false"
enableUpdateByExample=
"false"
enableDeleteByExample=
"false"
enableSelectByExample=
"false"
selectByExampleQueryId=
"false"
>
...
...
pcloud-service-book/src/main/resources/mapper/rightssetting/RightsSettingTitleMapper.xml
0 → 100644
View file @
ef4da83b
<?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.mapper.RightsSettingTitleMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.pcloud.book.rightsSetting.entity.RightsSettingTitle"
>
<result
column=
"id"
jdbcType=
"BIGINT"
property=
"id"
/>
<result
column=
"rights_setting_id"
jdbcType=
"BIGINT"
property=
"rightsSettingId"
/>
<result
column=
"rights_setting_title"
jdbcType=
"VARCHAR"
property=
"rightsSettingTitle"
/>
<result
column=
"rights_setting_desc"
jdbcType=
"VARCHAR"
property=
"rightsSettingDesc"
/>
<result
column=
"open_state"
jdbcType=
"TINYINT"
property=
"openState"
/>
<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"
/>
</resultMap>
<sql
id=
"baseSql"
>
id, rights_setting_id, rights_setting_title,
rights_setting_desc, open_state, create_time,
update_time,rights_setting_now_type
</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)
values (#{id,jdbcType=BIGINT}, #{rightsSettingId,jdbcType=BIGINT}, #{rightsSettingTitle,jdbcType=VARCHAR},
#{rightsSettingDesc,jdbcType=VARCHAR}, #{openState,jdbcType=TINYINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},#{rightsSettingNowType})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.pcloud.book.rightsSetting.entity.RightsSettingTitle"
>
insert into rights_setting_title
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
id,
</if>
<if
test=
"rightsSettingId != null"
>
rights_setting_id,
</if>
<if
test=
"rightsSettingTitle != null"
>
rights_setting_title,
</if>
<if
test=
"rightsSettingDesc != null"
>
rights_setting_desc,
</if>
<if
test=
"openState != null"
>
open_state,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id,jdbcType=BIGINT},
</if>
<if
test=
"rightsSettingId != null"
>
#{rightsSettingId,jdbcType=BIGINT},
</if>
<if
test=
"rightsSettingTitle != null"
>
#{rightsSettingTitle,jdbcType=VARCHAR},
</if>
<if
test=
"rightsSettingDesc != null"
>
#{rightsSettingDesc,jdbcType=VARCHAR},
</if>
<if
test=
"openState != null"
>
#{openState,jdbcType=TINYINT},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<delete
id=
"deleteByRightSettingId"
parameterType=
"long"
>
delete
from
rights_setting_title
where
rights_setting_id = #{rightsSettingId}
</delete>
<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)
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})
</foreach>
</insert>
<update
id=
"batchUpdate"
parameterType=
"list"
>
update rights_setting_title
<trim
prefix=
"set"
suffixOverrides=
","
>
<trim
prefix=
"rights_setting_title =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
when id=#{item.id} then #{item.rightsSettingTitle}
</foreach>
</trim>
<trim
prefix=
"rights_setting_desc =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
when id=#{item.id} then #{item.rightsSettingDesc}
</foreach>
</trim>
<trim
prefix=
"open_state =case"
suffix=
"end,"
>
<foreach
collection=
"list"
item=
"item"
index=
"index"
>
when id=#{item.id} then #{item.openState}
</foreach>
</trim>
</trim>
where id in
<foreach
collection=
"list"
index=
"index"
item=
"item"
separator=
","
open=
"("
close=
")"
>
#{item.id,jdbcType=BIGINT}
</foreach>
</update>
<select
id=
"getByRightSettingId"
resultMap=
"BaseResultMap"
parameterType=
"long"
>
select
<include
refid=
"baseSql"
/>
from
rights_setting_title
where
rights_setting_id = #{rightsSettingId}
</select>
</mapper>
\ No newline at end of file
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