记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
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
董敬伟
liquidnet-bus-v1
Commits
cfbf6aa2
Commit
cfbf6aa2
authored
Aug 09, 2022
by
jiangxiulong
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/jxl_yb_0729' into jxl_sweet_pre
parents
fa9e0971
8730c8af
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
283 additions
and
71 deletions
+283
-71
SweetYbEnrollParam.java
...liquidnet/service/sweet/dto/param/SweetYbEnrollParam.java
+42
-0
ISweetYbEnrollService.java
...iquidnet/service/sweet/service/ISweetYbEnrollService.java
+19
-0
SweetYbEnroll.java
...ava/com/liquidnet/service/sweet/entity/SweetYbEnroll.java
+79
-0
SweetYbEnrollMapper.java
...m/liquidnet/service/sweet/mapper/SweetYbEnrollMapper.java
+16
-0
SweetYbEnrollMapper.xml
...om.liquidnet.service.sweet.mapper/SweetYbEnrollMapper.xml
+5
-0
db_sweetsugar_structure.sql
.../liquidnet-service-sweet/docu/db_sweetsugar_structure.sql
+29
-4
SweetMybatisPlusCodeGenerator.java
.../com/liquidnet/service/SweetMybatisPlusCodeGenerator.java
+4
-4
SweetYbEnrollController.java
...net/service/sweet/controller/SweetYbEnrollController.java
+39
-0
SweetYbEnrollServiceImpl.java
.../service/sweet/service/impl/SweetYbEnrollServiceImpl.java
+49
-0
sqlmap.properties
...uidnet-service-sweet/src/main/resources/sqlmap.properties
+1
-63
No files found.
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/dto/param/SweetYbEnrollParam.java
0 → 100644
View file @
cfbf6aa2
package
com
.
liquidnet
.
service
.
sweet
.
dto
.
param
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
@ApiModel
(
value
=
"SweetYbEnrollParam"
,
description
=
"YB报名表入参"
)
@Data
public
class
SweetYbEnrollParam
implements
Serializable
{
private
static
final
long
serialVersionUID
=
487812347569053758L
;
@ApiModelProperty
(
position
=
11
,
required
=
false
,
value
=
"联系电话"
,
example
=
"15888888888"
)
private
String
contactTell
;
@ApiModelProperty
(
position
=
12
,
required
=
false
,
value
=
"联系微信"
,
example
=
"jiangxiulong"
)
private
String
contactWechat
;
@ApiModelProperty
(
position
=
13
,
required
=
true
,
value
=
"乐队名称"
,
example
=
"新裤子"
)
@NotBlank
(
message
=
"请填写乐队名称"
)
private
String
nickname
;
@ApiModelProperty
(
position
=
14
,
required
=
true
,
value
=
"风格"
,
example
=
"摇滚,世界音乐,国风,民谣,电子,其他"
)
@NotBlank
(
message
=
"请选择风格"
)
private
String
style
;
@ApiModelProperty
(
position
=
15
,
required
=
true
,
value
=
"乐队照片"
,
example
=
"img.zhengzai.tv/img.png"
)
@NotBlank
(
message
=
"请上传乐队照片"
)
private
String
imgUrl
;
@ApiModelProperty
(
position
=
16
,
required
=
true
,
value
=
"音频文件"
,
example
=
"img.zhengzai.tv/audio.mp3"
)
@NotBlank
(
message
=
"请上传音频文件"
)
private
String
audioUrl
;
@ApiModelProperty
(
position
=
17
,
required
=
false
,
value
=
"院校"
,
example
=
" 川音,现音,其他"
)
private
String
universities
;
}
liquidnet-bus-api/liquidnet-service-sweet-api/src/main/java/com/liquidnet/service/sweet/service/ISweetYbEnrollService.java
0 → 100644
View file @
cfbf6aa2
package
com
.
liquidnet
.
service
.
sweet
.
service
;
import
com.baomidou.mybatisplus.extension.service.IService
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.param.SweetYbEnrollParam
;
import
com.liquidnet.service.sweet.entity.SweetYbEnroll
;
/**
* <p>
* YB报名表 服务类
* </p>
*
* @author jiangxiulong
* @since 2022-07-29
*/
public
interface
ISweetYbEnrollService
extends
IService
<
SweetYbEnroll
>
{
ResponseDto
<
Boolean
>
create
(
SweetYbEnrollParam
param
);
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/entity/SweetYbEnroll.java
0 → 100644
View file @
cfbf6aa2
package
com
.
liquidnet
.
service
.
sweet
.
entity
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
/**
* <p>
* YB报名表
* </p>
*
* @author jiangxiulong
* @since 2022-07-29
*/
@Data
@EqualsAndHashCode
(
callSuper
=
false
)
public
class
SweetYbEnroll
implements
Serializable
{
private
static
final
long
serialVersionUID
=
-
2081186417971841992L
;
@TableId
(
value
=
"mid"
,
type
=
IdType
.
AUTO
)
private
Long
mid
;
/**
* enroll_id
*/
private
String
enrollId
;
/**
* 联系电话
*/
private
String
contactTell
;
/**
* 联系微信
*/
private
String
contactWechat
;
/**
* 乐队名称
*/
private
String
nickname
;
/**
* 风格(必填)(可勾选 摇滚,世界音乐,国风,民谣,电子,其他)
*/
private
String
style
;
/**
* 乐队照片(必填,3MB以内)
*/
private
String
imgUrl
;
/**
* 音频文件上传 (必填,20MB以内)
*/
private
String
audioUrl
;
/**
* 院校(非必填)(可勾选 川音,现音,其他)
*/
private
String
universities
;
/**
* 创建时间
*/
private
LocalDateTime
createdAt
;
/**
* 更新时间
*/
private
LocalDateTime
updatedAt
;
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/java/com/liquidnet/service/sweet/mapper/SweetYbEnrollMapper.java
0 → 100644
View file @
cfbf6aa2
package
com
.
liquidnet
.
service
.
sweet
.
mapper
;
import
com.liquidnet.service.sweet.entity.SweetYbEnroll
;
import
com.baomidou.mybatisplus.core.mapper.BaseMapper
;
/**
* <p>
* YB报名表 Mapper 接口
* </p>
*
* @author jiangxiulong
* @since 2022-07-29
*/
public
interface
SweetYbEnrollMapper
extends
BaseMapper
<
SweetYbEnroll
>
{
}
liquidnet-bus-do/liquidnet-service-sweet-do/src/main/resources/com.liquidnet.service.sweet.mapper/SweetYbEnrollMapper.xml
0 → 100644
View file @
cfbf6aa2
<?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.liquidnet.service.sweet.mapper.SweetYbEnrollMapper"
>
</mapper>
liquidnet-bus-service/liquidnet-service-sweet/docu/db_sweetsugar_structure.sql
View file @
cfbf6aa2
...
@@ -439,9 +439,12 @@ CREATE TABLE `sweet_wechat_users`
...
@@ -439,9 +439,12 @@ CREATE TABLE `sweet_wechat_users`
DEFAULT
CHARSET
utf8mb4
DEFAULT
CHARSET
utf8mb4
COLLATE
utf8mb4_unicode_ci
COLLATE
utf8mb4_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'正在现场服务号关注事件储存用户信息表'
;
ROW_FORMAT
=
DYNAMIC
COMMENT
'正在现场服务号关注事件储存用户信息表'
;
ALTER
TABLE
`sweet_wechat_users`
ADD
INDEX
idx_wechat_open_id
(
`open_id`
);
ALTER
TABLE
`sweet_wechat_users`
ALTER
TABLE
`sweet_wechat_users`
ADD
INDEX
idx_wechat_union_id
(
`union_id`
);
ADD
INDEX
idx_wechat_open_id
(
`open_id`
);
alter
table
sweet_wechat_users
add
is_cancel
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'是否取消 1正常 2已取消'
after
subscribe_scene
;
ALTER
TABLE
`sweet_wechat_users`
ADD
INDEX
idx_wechat_union_id
(
`union_id`
);
alter
table
sweet_wechat_users
add
is_cancel
tinyint
NOT
NULL
DEFAULT
1
COMMENT
'是否取消 1正常 2已取消'
after
subscribe_scene
;
-- 小程序登录记录用户解密后信息表
-- 小程序登录记录用户解密后信息表
drop
TABLE
if
exists
`sweet_applet_users`
;
drop
TABLE
if
exists
`sweet_applet_users`
;
...
@@ -464,7 +467,8 @@ CREATE TABLE `sweet_applet_users`
...
@@ -464,7 +467,8 @@ CREATE TABLE `sweet_applet_users`
DEFAULT
CHARSET
utf8mb4
DEFAULT
CHARSET
utf8mb4
COLLATE
utf8mb4_unicode_ci
COLLATE
utf8mb4_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'小程序登录记录用户解密后信息表'
;
ROW_FORMAT
=
DYNAMIC
COMMENT
'小程序登录记录用户解密后信息表'
;
ALTER
TABLE
`sweet_applet_users`
ADD
INDEX
idx_applet_union_id
(
`union_id`
);
ALTER
TABLE
`sweet_applet_users`
ADD
INDEX
idx_applet_union_id
(
`union_id`
);
-- 答题表
-- 答题表
drop
TABLE
if
exists
`sweet_answer`
;
drop
TABLE
if
exists
`sweet_answer`
;
...
@@ -484,6 +488,27 @@ CREATE TABLE `sweet_answer`
...
@@ -484,6 +488,27 @@ CREATE TABLE `sweet_answer`
COLLATE
utf8mb4_unicode_ci
COLLATE
utf8mb4_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'答题表'
;
ROW_FORMAT
=
DYNAMIC
COMMENT
'答题表'
;
-- YB报名
drop
TABLE
if
exists
`sweet_yb_enroll`
;
CREATE
TABLE
`sweet_yb_enroll`
(
`mid`
bigint
unsigned
NOT
NULL
AUTO_INCREMENT
primary
key
,
`enroll_id`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'enroll_id'
,
`contact_tell`
varchar
(
30
)
NOT
NULL
DEFAULT
''
COMMENT
'联系电话'
,
`contact_wechat`
varchar
(
64
)
NOT
NULL
DEFAULT
''
COMMENT
'联系微信'
,
`nickname`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'乐队名称'
,
`style`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'风格(必填)(可勾选 摇滚,世界音乐,国风,民谣,电子,其他)'
,
`img_url`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'乐队照片(必填,3MB以内)'
,
`audio_url`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'音频文件上传 (必填,20MB以内)'
,
`universities`
varchar
(
255
)
NOT
NULL
DEFAULT
''
COMMENT
'院校(非必填)(可勾选 川音,现音,其他)'
,
`created_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'创建时间'
,
`updated_at`
datetime
NULL
DEFAULT
CURRENT_TIMESTAMP
COMMENT
'更新时间'
,
KEY
`sweet_yb_enroll_id`
(
`enroll_id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
utf8mb4
COLLATE
utf8mb4_unicode_ci
ROW_FORMAT
=
DYNAMIC
COMMENT
'YB报名表'
;
-- 城市投票表
-- 城市投票表
drop
TABLE
if
exists
`sweet_city_vote`
;
drop
TABLE
if
exists
`sweet_city_vote`
;
CREATE
TABLE
`sweet_city_vote`
CREATE
TABLE
`sweet_city_vote`
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/SweetMybatisPlusCodeGenerator.java
View file @
cfbf6aa2
...
@@ -89,13 +89,13 @@ public class SweetMybatisPlusCodeGenerator {
...
@@ -89,13 +89,13 @@ public class SweetMybatisPlusCodeGenerator {
DataSourceConfig
dsc
=
new
DataSourceConfig
();
DataSourceConfig
dsc
=
new
DataSourceConfig
();
// dsc.setSchemaName("public");
// dsc.setSchemaName("public");
dsc
.
setDriverName
(
"com.mysql.cj.jdbc.Driver"
);
dsc
.
setDriverName
(
"com.mysql.cj.jdbc.Driver"
);
dsc
.
setUrl
(
"jdbc:mysql://
39.107.71.112:3308
/dev_ln_scene?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=CST"
);
dsc
.
setUrl
(
"jdbc:mysql://
java-test.mysql.polardb.rds.aliyuncs.com:3306
/dev_ln_scene?useUnicode=true&useSSL=false&characterEncoding=utf8&serverTimezone=CST"
);
dsc
.
setUsername
(
"
testmall
"
);
dsc
.
setUsername
(
"
zhengzai
"
);
dsc
.
setPassword
(
"
zhengzai!mYT
"
);
dsc
.
setPassword
(
"
Zhengzai@rd2U#
"
);
String
resourcePath
=
"/Users/jiangxiulong/Downloads/tmp"
;
String
resourcePath
=
"/Users/jiangxiulong/Downloads/tmp"
;
String
directory
=
"com.liquidnet.service.sweet"
;
String
directory
=
"com.liquidnet.service.sweet"
;
String
[]
dbTableArray
=
new
String
[]{
"sweet_
collection_reservation
"
};
String
[]
dbTableArray
=
new
String
[]{
"sweet_
yb_enroll
"
};
doGenerator
(
resourcePath
,
dsc
,
directory
,
dbTableArray
);
doGenerator
(
resourcePath
,
dsc
,
directory
,
dbTableArray
);
...
...
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/controller/SweetYbEnrollController.java
0 → 100644
View file @
cfbf6aa2
package
com
.
liquidnet
.
service
.
sweet
.
controller
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.sweet.dto.param.SweetYbEnrollParam
;
import
com.liquidnet.service.sweet.service.ISweetYbEnrollService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
/**
* <p>
* YB报名表 前端控制器
* </p>
*
* @author jiangxiulong
* @since 2022-07-29
*/
@Api
(
tags
=
"YB"
)
@RestController
@RequestMapping
(
"/yb"
)
public
class
SweetYbEnrollController
{
@Autowired
private
ISweetYbEnrollService
iSweetYbEnrollService
;
@PostMapping
(
"enroll"
)
@ApiOperation
(
"报名"
)
public
ResponseDto
<
Boolean
>
add
(
@Valid
@RequestBody
SweetYbEnrollParam
param
)
{
return
iSweetYbEnrollService
.
create
(
param
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/service/impl/SweetYbEnrollServiceImpl.java
0 → 100644
View file @
cfbf6aa2
package
com
.
liquidnet
.
service
.
sweet
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.liquidnet.commons.lang.util.CollectionUtil
;
import
com.liquidnet.commons.lang.util.IDGenerator
;
import
com.liquidnet.commons.lang.util.StringUtil
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.SqlMapping
;
import
com.liquidnet.service.base.constant.MQConst
;
import
com.liquidnet.service.sweet.dto.param.SweetYbEnrollParam
;
import
com.liquidnet.service.sweet.entity.SweetYbEnroll
;
import
com.liquidnet.service.sweet.mapper.SweetYbEnrollMapper
;
import
com.liquidnet.service.sweet.service.ISweetYbEnrollService
;
import
com.liquidnet.service.sweet.utils.QueueUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.LinkedList
;
/**
* <p>
* YB报名表 服务实现类
* </p>
*
* @author jiangxiulong
* @since 2022-07-29
*/
@Service
public
class
SweetYbEnrollServiceImpl
extends
ServiceImpl
<
SweetYbEnrollMapper
,
SweetYbEnroll
>
implements
ISweetYbEnrollService
{
@Autowired
QueueUtils
queueUtils
;
@Override
public
ResponseDto
<
Boolean
>
create
(
SweetYbEnrollParam
param
)
{
LinkedList
<
String
>
sqls
=
CollectionUtil
.
linkedListString
();
LinkedList
<
Object
[]>
sqlsDataA
=
CollectionUtil
.
linkedListObjectArr
();
sqls
.
add
(
SqlMapping
.
get
(
"sweet_yb_enroll.insert"
));
sqlsDataA
.
add
(
new
Object
[]{
IDGenerator
.
nextSnowId
(),
StringUtil
.
isEmpty
(
param
.
getContactTell
())
?
""
:
param
.
getContactTell
(),
StringUtil
.
isEmpty
(
param
.
getContactWechat
())
?
""
:
param
.
getContactWechat
(),
param
.
getNickname
(),
param
.
getStyle
(),
param
.
getImgUrl
(),
param
.
getAudioUrl
(),
StringUtil
.
isEmpty
(
param
.
getUniversities
())
?
""
:
param
.
getUniversities
()
});
queueUtils
.
sendMsgByRedis
(
MQConst
.
SweetQueue
.
SWEET_ANSWER_INSERT
.
getKey
(),
SqlMapping
.
gets
(
sqls
,
sqlsDataA
));
return
ResponseDto
.
success
(
true
);
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/resources/sqlmap.properties
View file @
cfbf6aa2
This diff is collapsed.
Click to expand it.
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