Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
江名洋
/
linkwe-scrm
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b769daf3
authored
Jan 26, 2021
by
姚宇航
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
群活码上传逻辑修改
1 parent
fd1e7943
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
77 additions
and
88 deletions
linkwe-common/src/main/java/com/linkwechat/common/utils/QREncode.java
linkwe-common/src/main/java/com/linkwechat/common/utils/file/FileUploadUtils.java
linkwe-framework/src/main/java/com/linkwechat/framework/config/SecurityConfig.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeGroupCodeServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeGroupCodeMapper.xml
sql/link-wechat.sql
linkwe-common/src/main/java/com/linkwechat/common/utils/QREncode.java
View file @
b769daf
...
@@ -3,9 +3,7 @@ package com.linkwechat.common.utils;
...
@@ -3,9 +3,7 @@ package com.linkwechat.common.utils;
import
java.awt.*
;
import
java.awt.*
;
import
java.awt.geom.RoundRectangle2D
;
import
java.awt.geom.RoundRectangle2D
;
import
java.awt.image.BufferedImage
;
import
java.awt.image.BufferedImage
;
import
java.io.File
;
import
java.io.*
;
import
java.io.IOException
;
import
java.io.OutputStream
;
import
java.net.URL
;
import
java.net.URL
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.Hashtable
;
import
java.util.Hashtable
;
...
@@ -22,7 +20,6 @@ import com.google.zxing.qrcode.QRCodeWriter;
...
@@ -22,7 +20,6 @@ import com.google.zxing.qrcode.QRCodeWriter;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
com.google.zxing.qrcode.decoder.ErrorCorrectionLevel
;
import
com.linkwechat.common.constant.Constants
;
import
com.linkwechat.common.constant.Constants
;
public
class
QREncode
{
public
class
QREncode
{
private
static
final
int
BLACK
=
0xFF000000
;
private
static
final
int
BLACK
=
0xFF000000
;
...
@@ -84,13 +81,13 @@ public class QREncode {
...
@@ -84,13 +81,13 @@ public class QREncode {
}
}
/**
/**
* 生成二维码
* 生成
带头像的
二维码
*
*
* @param content 内容
* @param content 内容
* @param logoUrl logo
在线地址
* @param logoUrl logo在线地址
* @return
* @return
*/
*/
p
rivate
static
BufferedImage
crateQRCode
(
String
content
,
String
logoUrl
)
{
p
ublic
static
BufferedImage
crateQRCode
(
String
content
,
String
logoUrl
)
{
if
(
StringUtils
.
isNotBlank
(
content
))
{
if
(
StringUtils
.
isNotBlank
(
content
))
{
ServletOutputStream
stream
=
null
;
ServletOutputStream
stream
=
null
;
HashMap
<
EncodeHintType
,
Comparable
>
hints
=
new
HashMap
<>(
4
);
HashMap
<
EncodeHintType
,
Comparable
>
hints
=
new
HashMap
<>(
4
);
...
@@ -151,35 +148,6 @@ public class QREncode {
...
@@ -151,35 +148,6 @@ public class QREncode {
}
}
/**
/**
* 生成二维码并保存
*
* @param content 内容
* @throws IOException
*/
public
static
void
saveQRCode
(
String
content
,
String
filePath
)
throws
IOException
{
BufferedImage
image
=
crateQRCode
(
content
,
null
);
if
(
StringUtils
.
isNotNull
(
image
))
{
File
file
=
createFile
(
filePath
);
ImageIO
.
write
(
image
,
IMAGE_FORMAT
,
file
);
}
}
/**
* 生成带logo的二维码并保存
*
* @param content 二维码内容
* @param logoUrl logo地址
* @throws IOException
*/
public
static
void
saveQRCode
(
String
content
,
String
logoUrl
,
String
filePath
)
throws
IOException
{
BufferedImage
image
=
crateQRCode
(
content
,
logoUrl
);
if
(
StringUtils
.
isNotNull
(
image
))
{
File
file
=
createFile
(
filePath
);
ImageIO
.
write
(
image
,
IMAGE_FORMAT
,
file
);
}
}
/**
* 生成带二维码并生成流文件进行传输
* 生成带二维码并生成流文件进行传输
*
*
* @param content 内容
* @param content 内容
...
@@ -208,22 +176,14 @@ public class QREncode {
...
@@ -208,22 +176,14 @@ public class QREncode {
}
}
}
}
/**
public
static
InputStream
writeToInputStream
(
BufferedImage
bufferedImage
)
throws
IOException
{
* 根据指定路径创建空文件
ByteArrayOutputStream
os
=
new
ByteArrayOutputStream
();
* @param path 路径
* @return 空文件
*/
private
static
File
createFile
(
String
path
)
{
File
file
=
new
File
(
path
);
try
{
try
{
if
(!
file
.
exists
())
{
ImageIO
.
write
(
bufferedImage
,
IMAGE_FORMAT
,
os
);
file
.
getParentFile
().
mkdir
();
return
new
ByteArrayInputStream
(
os
.
toByteArray
());
file
.
createNewFile
();
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
(
);
throw
new
IOException
(
e
.
getMessage
(),
e
);
}
}
return
file
;
}
}
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
...
...
linkwe-common/src/main/java/com/linkwechat/common/utils/file/FileUploadUtils.java
View file @
b769daf
...
@@ -2,6 +2,7 @@ package com.linkwechat.common.utils.file;
...
@@ -2,6 +2,7 @@ package com.linkwechat.common.utils.file;
import
java.io.File
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.linkwechat.common.config.CosConfig
;
import
com.linkwechat.common.config.CosConfig
;
...
@@ -147,6 +148,19 @@ public class FileUploadUtils {
...
@@ -147,6 +148,19 @@ public class FileUploadUtils {
}
}
}
}
/**
* 通过流进行文件上传
* @param in 流
* @throws IOException
*/
public
static
String
upload2Cos
(
InputStream
in
,
String
fileExtension
,
CosConfig
cosConfig
)
throws
IOException
{
try
{
return
upload2Cos
(
in
,
fileExtension
,
MimeTypeUtils
.
DEFAULT_ALLOWED_EXTENSION
,
cosConfig
);
}
catch
(
Exception
e
)
{
throw
new
IOException
(
e
.
getMessage
(),
e
);
}
}
/**
/**
* 文件上传
* 文件上传
...
@@ -191,7 +205,30 @@ public class FileUploadUtils {
...
@@ -191,7 +205,30 @@ public class FileUploadUtils {
return
fileName
;
return
fileName
;
}
}
/**
* 将流中的文件传到腾讯云
* @param inputStream 输入流
* @param fileExtension 被写入流的文件的后缀名
* @param allowedExtension 允许的后缀名
* @throws FileSizeLimitExceededException 文件大小超过上限
* @throws InvalidExtensionException 文件后缀名非法
*/
public
static
String
upload2Cos
(
InputStream
inputStream
,
String
fileExtension
,
String
[]
allowedExtension
,
CosConfig
cosConfig
)
throws
FileSizeLimitExceededException
,
InvalidExtensionException
{
String
fileName
=
DateUtils
.
datePath
()
+
"/"
+
IdUtils
.
fastUUID
()
+
"."
+
fileExtension
;
if
(!
isAllowedExtension
(
fileExtension
,
allowedExtension
))
{
throw
new
InvalidExtensionException
.
InvalidImageExtensionException
(
allowedExtension
,
fileExtension
,
fileName
);
}
COSCredentials
cred
=
new
BasicCOSCredentials
(
cosConfig
.
getSecretId
(),
cosConfig
.
getSecretKey
());
Region
region
=
new
Region
(
cosConfig
.
getRegion
());
ClientConfig
clientConfig
=
new
ClientConfig
(
region
);
COSClient
cosClient
=
new
COSClient
(
cred
,
clientConfig
);
ObjectMetadata
objectMetadata
=
new
ObjectMetadata
();
PutObjectRequest
putObjectRequest
=
new
PutObjectRequest
(
cosConfig
.
getBucketName
(),
fileName
,
inputStream
,
objectMetadata
);
cosClient
.
putObject
(
putObjectRequest
);
cosClient
.
shutdown
();
return
fileName
;
}
public
static
final
String
uploadFile
(
String
baseDir
,
MultipartFile
file
)
public
static
final
String
uploadFile
(
String
baseDir
,
MultipartFile
file
)
...
...
linkwe-framework/src/main/java/com/linkwechat/framework/config/SecurityConfig.java
View file @
b769daf
...
@@ -124,7 +124,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
...
@@ -124,7 +124,6 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter
.
antMatchers
(
"/wecom/ticket/**"
).
anonymous
()
.
antMatchers
(
"/wecom/ticket/**"
).
anonymous
()
.
antMatchers
(
"/wecom/user/getUserInfo"
).
anonymous
()
.
antMatchers
(
"/wecom/user/getUserInfo"
).
anonymous
()
.
antMatchers
(
"/common/uploadFile2Cos"
).
anonymous
()
// 除上面外的所有请求全部需要鉴权认证
// 除上面外的所有请求全部需要鉴权认证
.
anyRequest
().
authenticated
()
.
anyRequest
().
authenticated
()
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeGroupCodeServiceImpl.java
View file @
b769daf
package
com
.
linkwechat
.
wecom
.
service
.
impl
;
package
com
.
linkwechat
.
wecom
.
service
.
impl
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.List
;
import
cn.hutool.core.collection.CollectionUtil
;
import
cn.hutool.core.collection.CollectionUtil
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.config.
RuoYi
Config
;
import
com.linkwechat.common.config.
Cos
Config
;
import
com.linkwechat.common.config.ServerConfig
;
import
com.linkwechat.common.config.ServerConfig
;
import
com.linkwechat.common.exception.wecom.WeComException
;
import
com.linkwechat.common.exception.wecom.WeComException
;
import
com.linkwechat.common.utils.DateUtils
;
import
com.linkwechat.common.utils.QREncode
;
import
com.linkwechat.common.utils.QREncode
;
import
com.linkwechat.common.utils.StringUtils
;
import
com.linkwechat.common.utils.file.FileUploadUtils
;
import
com.linkwechat.common.utils.file.FileUploadUtils
;
import
com.linkwechat.common.utils.uuid.IdUtils
;
import
com.linkwechat.wecom.domain.WeGroupCodeActual
;
import
com.linkwechat.wecom.domain.WeGroupCodeActual
;
import
com.linkwechat.wecom.mapper.WeGroupCodeActualMapper
;
import
com.linkwechat.wecom.mapper.WeGroupCodeActualMapper
;
import
com.linkwechat.wecom.service.IWeGroupCodeActualService
;
import
com.linkwechat.wecom.service.IWeGroupCodeActualService
;
...
@@ -20,7 +18,6 @@ import org.springframework.stereotype.Service;
...
@@ -20,7 +18,6 @@ import org.springframework.stereotype.Service;
import
com.linkwechat.wecom.mapper.WeGroupCodeMapper
;
import
com.linkwechat.wecom.mapper.WeGroupCodeMapper
;
import
com.linkwechat.wecom.domain.WeGroupCode
;
import
com.linkwechat.wecom.domain.WeGroupCode
;
import
com.linkwechat.wecom.service.IWeGroupCodeService
;
import
com.linkwechat.wecom.service.IWeGroupCodeService
;
/**
/**
* 客户群活码Service业务层处理
* 客户群活码Service业务层处理
*
*
...
@@ -41,9 +38,7 @@ public class WeGroupCodeServiceImpl extends ServiceImpl<WeGroupCodeMapper,WeGrou
...
@@ -41,9 +38,7 @@ public class WeGroupCodeServiceImpl extends ServiceImpl<WeGroupCodeMapper,WeGrou
private
WeGroupCodeActualMapper
weGroupCodeActualMapper
;
private
WeGroupCodeActualMapper
weGroupCodeActualMapper
;
@Autowired
@Autowired
private
ServerConfig
serverConfig
;
private
CosConfig
cosConfig
;
private
static
final
String
IMAGE_FORMAT
=
"png"
;
/**
/**
* 查询客户群活码
* 查询客户群活码
...
@@ -107,34 +102,17 @@ public class WeGroupCodeServiceImpl extends ServiceImpl<WeGroupCodeMapper,WeGrou
...
@@ -107,34 +102,17 @@ public class WeGroupCodeServiceImpl extends ServiceImpl<WeGroupCodeMapper,WeGrou
public
void
insertWeGroupCode
(
WeGroupCode
weGroupCode
)
public
void
insertWeGroupCode
(
WeGroupCode
weGroupCode
)
{
{
try
{
try
{
String
uploadDir
=
RuoYiConfig
.
getUploadPath
();
String
fileName
=
DateUtils
.
datePath
()
+
"/"
+
IdUtils
.
fastUUID
()
+
"."
+
IMAGE_FORMAT
;
String
filePathName
=
FileUploadUtils
.
getPathFileName
(
uploadDir
,
fileName
);
// 生成并保存二维码图片
// 生成并保存二维码图片
String
logoUrl
=
weGroupCode
.
getActivityHeadUrl
();
String
logoUrl
=
weGroupCode
.
getActivityHeadUrl
();
if
(
StringUtils
.
isEmpty
(
logoUrl
))
{
InputStream
in
=
QREncode
.
writeToInputStream
(
QREncode
.
crateQRCode
(
weGroupCode
.
getActivityName
(),
logoUrl
));
QREncode
.
saveQRCode
(
weGroupCode
.
getActivityName
(),
uploadDir
+
"/"
+
fileName
);
String
fileName
=
FileUploadUtils
.
upload2Cos
(
in
,
"png"
,
cosConfig
);
}
else
{
String
codeUrl
=
"https://link-wechat-1251309172.cos.ap-nanjing.myqcloud.com/"
+
fileName
;
QREncode
.
saveQRCode
(
weGroupCode
.
getActivityName
(),
logoUrl
,
uploadDir
+
"/"
+
fileName
);
}
String
codeUrl
=
serverConfig
.
getUrl
()
+
filePathName
;
weGroupCode
.
setCodeUrl
(
codeUrl
);
weGroupCode
.
setCodeUrl
(
codeUrl
);
weGroupCodeMapper
.
insertWeGroupCode
(
weGroupCode
);
if
(
this
.
save
(
weGroupCode
)){
List
<
WeGroupCodeActual
>
actualList
=
weGroupCode
.
getActualList
();
if
(
CollectionUtil
.
isNotEmpty
(
actualList
)){
iWeGroupCodeActualService
.
saveBatch
(
actualList
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
throw
new
WeComException
(
e
.
getMessage
());
throw
new
WeComException
(
e
.
getMessage
());
}
}
}
}
/**
/**
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeGroupCodeMapper.xml
View file @
b769daf
...
@@ -109,6 +109,12 @@
...
@@ -109,6 +109,12 @@
<if
test=
"tipMsg != null"
>
tip_msg,
</if>
<if
test=
"tipMsg != null"
>
tip_msg,
</if>
<if
test=
"customerServerQrCode != null"
>
customer_server_qr_code,
</if>
<if
test=
"customerServerQrCode != null"
>
customer_server_qr_code,
</if>
<if
test=
"delFlag != null"
>
del_flag,
</if>
<if
test=
"delFlag != null"
>
del_flag,
</if>
<if
test=
"createBy != null"
>
create_by,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateBy != null"
>
update_by,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"remark != null"
>
del_flag,
</if>
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"id != null"
>
#{id},
</if>
<if
test=
"id != null"
>
#{id},
</if>
...
@@ -122,6 +128,11 @@
...
@@ -122,6 +128,11 @@
<if
test=
"tipMsg != null"
>
#{tipMsg},
</if>
<if
test=
"tipMsg != null"
>
#{tipMsg},
</if>
<if
test=
"customerServerQrCode != null"
>
#{customerServerQrCode},
</if>
<if
test=
"customerServerQrCode != null"
>
#{customerServerQrCode},
</if>
<if
test=
"delFlag != null"
>
#{delFlag},
</if>
<if
test=
"delFlag != null"
>
#{delFlag},
</if>
<if
test=
"createBy != null"
>
#{createBy},
</if>
<if
test=
"createTime != null"
>
#{createTime},
</if>
<if
test=
"updateBy != null"
>
#{updateBy},
</if>
<if
test=
"updateTime != null"
>
#{updateTime},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -137,6 +148,9 @@
...
@@ -137,6 +148,9 @@
<if
test=
"tipMsg != null"
>
tip_msg = #{tipMsg},
</if>
<if
test=
"tipMsg != null"
>
tip_msg = #{tipMsg},
</if>
<if
test=
"customerServerQrCode != null"
>
customer_server_qr_code = #{customerServerQrCode},
</if>
<if
test=
"customerServerQrCode != null"
>
customer_server_qr_code = #{customerServerQrCode},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag},
</if>
<if
test=
"delFlag != null"
>
del_flag = #{delFlag},
</if>
<if
test=
"updateBy != null"
>
update_by = #{updateBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
...
sql/link-wechat.sql
View file @
b769daf
...
@@ -4115,7 +4115,7 @@ INSERT INTO `sys_menu` VALUES ('2052', '引流码', '0', '20', 'drainageCode', n
...
@@ -4115,7 +4115,7 @@ INSERT INTO `sys_menu` VALUES ('2052', '引流码', '0', '20', 'drainageCode', n
INSERT
INTO
`sys_menu`
VALUES
(
'2053'
,
'员工活码'
,
'2052'
,
'10'
,
'staff'
,
'drainageCode/staff/list'
,
'1'
,
'C'
,
'0'
,
'0'
,
'drainageCode:staff:list'
,
'#'
,
'admin'
,
'2020-11-08 12:13:21'
,
'admin'
,
'2020-11-30 12:51:32'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2053'
,
'员工活码'
,
'2052'
,
'10'
,
'staff'
,
'drainageCode/staff/list'
,
'1'
,
'C'
,
'0'
,
'0'
,
'drainageCode:staff:list'
,
'#'
,
'admin'
,
'2020-11-08 12:13:21'
,
'admin'
,
'2020-11-30 12:51:32'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2054'
,
'新建员工活码'
,
'2052'
,
'20'
,
'staffAdd'
,
'drainageCode/staff/add'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:staff:add'
,
'#'
,
'admin'
,
'2020-11-08 12:14:55'
,
''
,
null
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2054'
,
'新建员工活码'
,
'2052'
,
'20'
,
'staffAdd'
,
'drainageCode/staff/add'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:staff:add'
,
'#'
,
'admin'
,
'2020-11-08 12:14:55'
,
''
,
null
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2055'
,
'员工活码详情'
,
'2052'
,
'30'
,
'staffDetail'
,
'drainageCode/staff/detail'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:staff:detail'
,
'#'
,
'admin'
,
'2020-11-08 12:19:19'
,
'admin'
,
'2020-11-08 12:20:59'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2055'
,
'员工活码详情'
,
'2052'
,
'30'
,
'staffDetail'
,
'drainageCode/staff/detail'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:staff:detail'
,
'#'
,
'admin'
,
'2020-11-08 12:19:19'
,
'admin'
,
'2020-11-08 12:20:59'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2056'
,
'客户群活码'
,
'2052'
,
'40'
,
'customerGroup'
,
'drainageCode/group/list'
,
'1'
,
'C'
,
'
1'
,
'1
'
,
'drainageCode:group:list'
,
'#'
,
'admin'
,
'2020-11-08 12:26:15'
,
'admin'
,
'2020-12-08 17:59:29'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2056'
,
'客户群活码'
,
'2052'
,
'40'
,
'customerGroup'
,
'drainageCode/group/list'
,
'1'
,
'C'
,
'
0'
,
'0
'
,
'drainageCode:group:list'
,
'#'
,
'admin'
,
'2020-11-08 12:26:15'
,
'admin'
,
'2020-12-08 17:59:29'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2057'
,
'新增客户群活码'
,
'2052'
,
'50'
,
'groupAdd'
,
'drainageCode/group/add'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:group:add'
,
'#'
,
'admin'
,
'2020-11-08 12:30:00'
,
'admin'
,
'2020-11-30 12:51:56'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2057'
,
'新增客户群活码'
,
'2052'
,
'50'
,
'groupAdd'
,
'drainageCode/group/add'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:group:add'
,
'#'
,
'admin'
,
'2020-11-08 12:30:00'
,
'admin'
,
'2020-11-30 12:51:56'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2058'
,
'客户群活码信息'
,
'2052'
,
'60'
,
'customerGroupDetail'
,
'drainageCode/group/detail'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:group:detail'
,
'#'
,
'admin'
,
'2020-11-08 12:31:41'
,
'admin'
,
'2020-11-11 15:06:00'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2058'
,
'客户群活码信息'
,
'2052'
,
'60'
,
'customerGroupDetail'
,
'drainageCode/group/detail'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:group:detail'
,
'#'
,
'admin'
,
'2020-11-08 12:31:41'
,
'admin'
,
'2020-11-11 15:06:00'
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2059'
,
'客户群信息'
,
'2052'
,
'70'
,
'groupBaseInfo'
,
'drainageCode/group/baseInfo'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:group:baseInfo'
,
'#'
,
'admin'
,
'2020-11-08 12:38:51'
,
''
,
null
,
''
);
INSERT
INTO
`sys_menu`
VALUES
(
'2059'
,
'客户群信息'
,
'2052'
,
'70'
,
'groupBaseInfo'
,
'drainageCode/group/baseInfo'
,
'1'
,
'C'
,
'1'
,
'0'
,
'drainageCode:group:baseInfo'
,
'#'
,
'admin'
,
'2020-11-08 12:38:51'
,
''
,
null
,
''
);
...
@@ -6013,17 +6013,18 @@ CREATE TABLE `we_group` (
...
@@ -6013,17 +6013,18 @@ CREATE TABLE `we_group` (
-- ----------------------------
-- ----------------------------
-- Table structure for we_group_code
-- Table structure for we_group_code
-- ----------------------------
-- ----------------------------
DROP
TABLE
IF
EXISTS
`we_group_code`
;
CREATE
TABLE
`we_group_code`
(
CREATE
TABLE
`we_group_code`
(
`id`
bigint
(
20
)
NOT
NULL
,
`id`
bigint
(
20
)
NOT
NULL
,
`code_url`
varchar
(
255
)
NOT
NULL
COMMENT
'二维码链接'
,
`code_url`
varchar
(
150
)
NOT
NULL
COMMENT
'二维码链接'
,
`activity_head_url`
varchar
(
255
)
DEFAULT
NULL
COMMENT
'活码头像链接'
,
`activity_head_url`
varchar
(
150
)
DEFAULT
NULL
COMMENT
'活码头像链接'
,
`activity_name`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'活码名称'
,
`activity_name`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'活码名称'
,
`activity_desc`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'活码描述'
,
`activity_desc`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'活码描述'
,
`activity_scene`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'场景'
,
`activity_scene`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'场景'
,
`guide`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'引导语'
,
`guide`
varchar
(
60
)
DEFAULT
NULL
COMMENT
'引导语'
,
`join_group_is_tip`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'进群是否提示:1:是;0:否;'
,
`join_group_is_tip`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'进群是否提示:1:是;0:否;'
,
`tip_msg`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'进群提示语'
,
`tip_msg`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'进群提示语'
,
`customer_server_qr_code`
varchar
(
1
0
0
)
DEFAULT
NULL
COMMENT
'客服二维码'
,
`customer_server_qr_code`
varchar
(
1
5
0
)
DEFAULT
NULL
COMMENT
'客服二维码'
,
`del_flag`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'0:正常;2:删除;'
,
`del_flag`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'0:正常;2:删除;'
,
`create_by`
varchar
(
64
)
DEFAULT
''
COMMENT
'创建者'
,
`create_by`
varchar
(
64
)
DEFAULT
''
COMMENT
'创建者'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
`create_time`
datetime
DEFAULT
NULL
COMMENT
'创建时间'
,
...
@@ -6031,7 +6032,7 @@ CREATE TABLE `we_group_code` (
...
@@ -6031,7 +6032,7 @@ CREATE TABLE `we_group_code` (
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`update_time`
datetime
DEFAULT
NULL
COMMENT
'更新时间'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
`remark`
varchar
(
500
)
DEFAULT
NULL
COMMENT
'备注'
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'客户群活码'
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
=
'客户群活码'
;
-- ----------------------------
-- ----------------------------
-- Records of we_group_code
-- Records of we_group_code
...
@@ -6043,13 +6044,13 @@ CREATE TABLE `we_group_code` (
...
@@ -6043,13 +6044,13 @@ CREATE TABLE `we_group_code` (
DROP
TABLE
IF
EXISTS
`we_group_code_actual`
;
DROP
TABLE
IF
EXISTS
`we_group_code_actual`
;
CREATE
TABLE
`we_group_code_actual`
(
CREATE
TABLE
`we_group_code_actual`
(
`id`
bigint
(
20
)
NOT
NULL
,
`id`
bigint
(
20
)
NOT
NULL
,
`actual_group_qr_code`
varchar
(
1
0
0
)
DEFAULT
NULL
COMMENT
'实际群码'
,
`actual_group_qr_code`
varchar
(
1
5
0
)
DEFAULT
NULL
COMMENT
'实际群码'
,
`group_name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'群名称'
,
`group_name`
varchar
(
100
)
DEFAULT
NULL
COMMENT
'群名称'
,
`effect_time`
datetime
DEFAULT
NULL
COMMENT
'有效期'
,
`effect_time`
datetime
DEFAULT
NULL
COMMENT
'有效期'
,
`scan_code_times_limit`
int
(
11
)
DEFAULT
NULL
COMMENT
'扫码次数限制'
,
`scan_code_times_limit`
int
(
11
)
DEFAULT
NULL
COMMENT
'扫码次数限制'
,
`group_code_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'群活码id'
,
`group_code_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'群活码id'
,
`chat_id`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'群聊id'
,
`chat_id`
varchar
(
32
)
DEFAULT
NULL
COMMENT
'群聊id'
,
`chat_group_name`
bigint
(
20
)
DEFAULT
NULL
COMMENT
'群聊名称'
,
`chat_group_name`
varchar
(
20
)
DEFAULT
NULL
COMMENT
'群聊名称'
,
`scan_code_times`
int
(
11
)
DEFAULT
0
COMMENT
'扫码次数'
,
`scan_code_times`
int
(
11
)
DEFAULT
0
COMMENT
'扫码次数'
,
`del_flag`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'0:正常使用;2:删除;'
,
`del_flag`
tinyint
(
4
)
DEFAULT
NULL
COMMENT
'0:正常使用;2:删除;'
,
`status`
tinyint
(
4
)
DEFAULT
'0'
COMMENT
'0:使用中'
,
`status`
tinyint
(
4
)
DEFAULT
'0'
COMMENT
'0:使用中'
,
Write
Preview
Markdown
is supported
Attach a file
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 post a comment