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 7ab42bac
authored
Feb 04, 2021
by
孙喜旺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge remote-tracking branch 'origin/back_end_dev' into back_end_dev
2 parents
f3e5db0b
dbb77f9e
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
135 additions
and
54 deletions
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatItemController.java
linkwe-admin/src/main/resources/application.yml
linkwe-common/src/main/java/com/linkwechat/common/config/CosConfig.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeTaskFission.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeChatCollectionDto.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeChatSideVo.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatItemMapper.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatItemService.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatCollectionServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatItemServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterServiceImpl.java
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
linkwe-wecom/src/main/resources/mapper/wecom/WeChatCollectionMapper.xml
linkwe-wecom/src/main/resources/mapper/wecom/WeChatItemMapper.xml
linkwe-wecom/src/main/resources/mapper/wecom/WeTaskFissionMapper.xml
sql/link-wechat.sql
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatCollectionController.java
View file @
7ab42ba
...
...
@@ -5,6 +5,7 @@ import com.linkwechat.common.core.controller.BaseController;
import
com.linkwechat.common.core.domain.AjaxResult
;
import
com.linkwechat.common.core.page.TableDataInfo
;
import
com.linkwechat.common.enums.BusinessType
;
import
com.linkwechat.wecom.domain.dto.WeChatCollectionDto
;
import
com.linkwechat.wecom.domain.vo.WeChatSideVo
;
import
com.linkwechat.wecom.service.IWeChatCollectionService
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -32,20 +33,20 @@ public class WeChatCollectionController extends BaseController {
*/
//@PreAuthorize("@ss.hasPermi('chat:collection:add')")
@Log
(
title
=
"添加收藏"
,
businessType
=
BusinessType
.
INSERT
)
@P
u
tMapping
(
"addCollection"
)
public
AjaxResult
addCollection
(
@Request
Param
(
value
=
"materialId"
)
Long
materialId
,
@RequestParam
(
value
=
"userId"
)
String
userId
)
{
return
toAjax
(
weChatCollectionService
.
addCollection
(
materialId
,
userId
));
@P
os
tMapping
(
"addCollection"
)
public
AjaxResult
addCollection
(
@Request
Body
WeChatCollectionDto
chatCollectionDto
)
{
return
toAjax
(
weChatCollectionService
.
addCollection
(
chatCollectionDto
.
getMaterialId
(),
chatCollectionDto
.
getUserId
()
));
}
/**
* 取消收藏
*/
@PreAuthorize
(
"@ss.hasPermi('chat:collection:delete')"
)
//
@PreAuthorize("@ss.hasPermi('chat:collection:delete')")
// @Log(title = "取消收藏", businessType = BusinessType.UPDATE)
@PostMapping
(
value
=
"cancleCollection"
)
public
AjaxResult
cancleCollection
(
@Request
Param
(
value
=
"materialId"
)
Long
materialId
,
@RequestParam
(
value
=
"userId"
)
String
userId
)
{
return
toAjax
(
weChatCollectionService
.
cancleCollection
(
materialId
,
userId
));
public
AjaxResult
cancleCollection
(
@Request
Body
WeChatCollectionDto
chatCollectionDto
)
{
return
toAjax
(
weChatCollectionService
.
cancleCollection
(
chatCollectionDto
.
getMaterialId
(),
chatCollectionDto
.
getUserId
()
));
}
/**
...
...
linkwe-admin/src/main/java/com/linkwechat/web/controller/wecom/WeChatItemController.java
View file @
7ab42ba
...
...
@@ -43,9 +43,9 @@ public class WeChatItemController extends BaseController {
//@PreAuthorize("@ss.hasPermi('chat:item:list')")
@GetMapping
(
"/list"
)
public
TableDataInfo
list
(
@RequestParam
(
value
=
"sideId"
)
Long
sideId
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@RequestParam
(
value
=
"mediaType"
)
String
mediaType
)
{
,
@RequestParam
(
value
=
"keyword"
,
required
=
false
)
String
keyword
,
@RequestParam
(
value
=
"mediaType"
)
String
mediaType
,
@RequestParam
(
value
=
"userId"
)
String
userId
)
{
startPage
();
List
<
WeChatSideVo
>
weChatSideVos
=
weChatItemService
.
chatItems
(
sideId
,
keyword
,
mediaType
);
List
<
WeChatSideVo
>
weChatSideVos
=
weChatItemService
.
chatItems
(
sideId
,
keyword
,
mediaType
,
userId
);
return
getDataTable
(
weChatSideVos
);
}
...
...
linkwe-admin/src/main/resources/application.yml
View file @
7ab42ba
...
...
@@ -214,4 +214,5 @@ cos:
secretKey
:
e3D8oFetseC0f8OX9XeV7UcTDiyyQ8cr
#link-wechat-1251309172.cos.ap-nanjing.myqcloud.com
region
:
ap-nanjing
bucketName
:
link-wechat-1251309172
\ No newline at end of file
bucketName
:
link-wechat-1251309172
imgUrlPrefix
:
https://link-wechat-1251309172.cos.ap-nanjing.myqcloud.com/
\ No newline at end of file
linkwe-common/src/main/java/com/linkwechat/common/config/CosConfig.java
View file @
7ab42ba
...
...
@@ -20,4 +20,6 @@ public class CosConfig {
private
String
bucketName
;
private
String
imgUrlPrefix
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/WeTaskFission.java
View file @
7ab42ba
...
...
@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.linkwechat.common.annotation.Excel
;
import
com.linkwechat.common.core.domain.BaseEntity
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.Data
;
import
org.apache.commons.lang3.builder.ToStringBuilder
;
import
org.apache.commons.lang3.builder.ToStringStyle
;
...
...
@@ -26,6 +27,11 @@ public class WeTaskFission extends BaseEntity {
private
Long
id
;
/**
* 任务类型:1 任务宝 2 群裂变
*/
private
Integer
fissionType
;
/**
* 任务活动名称
*/
@Excel
(
name
=
"任务活动名称"
)
...
...
@@ -64,6 +70,12 @@ public class WeTaskFission extends BaseEntity {
private
List
<
WeTaskFissionStaff
>
taskFissionStaffs
;
/**
* 客户群
*/
@TableField
(
exist
=
false
)
private
List
<
WeGroup
>
taskFissionWeGroups
;
/**
* 客户标签id列表,当为全部时保存为all
*/
@Excel
(
name
=
"客户标签id列表,当为全部时保存为all"
)
...
...
@@ -90,20 +102,22 @@ public class WeTaskFission extends BaseEntity {
/**
* 任务裂变目标员工
*/
@Excel
(
name
=
"任务裂变目标员工"
)
private
String
fissStaffId
;
@Excel
(
name
=
"任务裂变目标id"
)
@ApiModelProperty
(
value
=
"任务裂变目标id, 目标员工或者群活码id"
)
private
String
fissionTargetId
;
/**
* 任务裂变目标员工姓名
*/
@Excel
(
name
=
"任务裂变目标员工姓名"
)
private
String
fissStaff
;
@Excel
(
name
=
"任务裂变目标"
)
@ApiModelProperty
(
value
=
"任务裂变目标, 目标员工名称或者群活码二维码地址"
)
private
String
fissionTarget
;
/**
* 任务裂变目标员工二维码
*/
@Excel
(
name
=
"任务裂变目标
员工
二维码"
)
private
String
fiss
Staff
Qrcode
;
@Excel
(
name
=
"任务裂变目标二维码"
)
private
String
fissQrcode
;
/**
* 兑奖链接
...
...
@@ -139,6 +153,7 @@ public class WeTaskFission extends BaseEntity {
public
String
toString
()
{
return
new
ToStringBuilder
(
this
,
ToStringStyle
.
MULTI_LINE_STYLE
)
.
append
(
"id"
,
getId
())
.
append
(
"fissionType"
,
getFissionType
())
.
append
(
"taskName"
,
getTaskName
())
.
append
(
"fissInfo"
,
getFissInfo
())
.
append
(
"fissNum"
,
getFissNum
())
...
...
@@ -148,9 +163,9 @@ public class WeTaskFission extends BaseEntity {
.
append
(
"customerTag"
,
getCustomerTag
())
.
append
(
"postersId"
,
getPostersId
())
.
append
(
"postersUrl"
,
getPostersUrl
())
.
append
(
"fiss
StaffId"
,
getFissStaff
Id
())
.
append
(
"fiss
Staff"
,
getFissStaff
())
.
append
(
"fiss
StaffQrcode"
,
getFissStaff
Qrcode
())
.
append
(
"fiss
ionTargetId"
,
getFissionTarget
Id
())
.
append
(
"fiss
ionTarget"
,
getFissionTarget
())
.
append
(
"fiss
Qrcode"
,
getFiss
Qrcode
())
.
append
(
"rewardUrl"
,
getRewardUrl
())
.
append
(
"rewardImageUrl"
,
getRewardImageUrl
())
.
append
(
"rewardRule"
,
getRewardRule
())
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/dto/WeChatCollectionDto.java
0 → 100644
View file @
7ab42ba
package
com
.
linkwechat
.
wecom
.
domain
.
dto
;
import
lombok.Data
;
/**
* @author Administrator
*/
@Data
public
class
WeChatCollectionDto
{
private
Long
materialId
;
private
String
userId
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/domain/vo/WeChatSideVo.java
View file @
7ab42ba
package
com
.
linkwechat
.
wecom
.
domain
.
vo
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
/**
* 聊天侧边栏
* @author kewen
...
...
@@ -34,4 +37,13 @@ public class WeChatSideVo {
*/
private
String
materialName
;
/**
* 是否收藏 0未收藏 1 已收藏
*/
private
String
collection
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd"
)
private
Date
createTime
;
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/mapper/WeChatItemMapper.java
View file @
7ab42ba
...
...
@@ -39,5 +39,5 @@ public interface WeChatItemMapper extends BaseMapper<WeChatItem> {
* @param keyword 关键词
* @return
*/
public
List
<
WeChatSideVo
>
findChatItems
(
@Param
(
"sideId"
)
Long
sideId
,
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"mediaType"
)
String
mediaType
);
public
List
<
WeChatSideVo
>
findChatItems
(
@Param
(
"sideId"
)
Long
sideId
,
@Param
(
"keyword"
)
String
keyword
,
@Param
(
"mediaType"
)
String
mediaType
,
@Param
(
"userId"
)
String
userId
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/IWeChatItemService.java
View file @
7ab42ba
...
...
@@ -27,6 +27,6 @@ public interface IWeChatItemService extends IService<WeChatItem> {
* @param sideId 侧边栏id
* @return
*/
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
,
String
mediaType
);
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
,
String
mediaType
,
String
userId
);
}
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatCollectionServiceImpl.java
View file @
7ab42ba
package
com
.
linkwechat
.
wecom
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.exception.CustomException
;
import
com.linkwechat.common.exception.wecom.WeComException
;
import
com.linkwechat.common.utils.SnowFlakeUtil
;
import
com.linkwechat.wecom.domain.WeChatCollection
;
import
com.linkwechat.wecom.domain.vo.WeChatSideVo
;
...
...
@@ -25,6 +28,12 @@ public class WeChatCollectionServiceImpl extends ServiceImpl<WeChatCollectionMap
@Override
public
int
addCollection
(
Long
materialId
,
String
userId
)
{
QueryWrapper
<
WeChatCollection
>
wrapper
=
new
QueryWrapper
<>();
wrapper
.
eq
(
"material_id"
,
materialId
).
eq
(
"user_id"
,
userId
);
WeChatCollection
queryCollection
=
weChatCollectionMapper
.
selectOne
(
wrapper
);
if
(
null
!=
queryCollection
){
throw
new
CustomException
(
"你已收藏"
);
}
WeChatCollection
chatCollection
=
new
WeChatCollection
();
chatCollection
.
setCollectionId
(
SnowFlakeUtil
.
nextId
());
chatCollection
.
setMaterialId
(
materialId
);
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeChatItemServiceImpl.java
View file @
7ab42ba
...
...
@@ -96,8 +96,8 @@ public class WeChatItemServiceImpl extends ServiceImpl<WeChatItemMapper, WeChatI
}
@Override
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
,
String
mediaType
)
{
return
weChatItemMapper
.
findChatItems
(
sideId
,
keyword
,
mediaType
);
public
List
<
WeChatSideVo
>
chatItems
(
Long
sideId
,
String
keyword
,
String
mediaType
,
String
userId
)
{
return
weChatItemMapper
.
findChatItems
(
sideId
,
keyword
,
mediaType
,
userId
);
}
/**
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WePosterServiceImpl.java
View file @
7ab42ba
package
com
.
linkwechat
.
wecom
.
service
.
impl
;
import
com.baomidou.mybatisplus.extension.service.impl.ServiceImpl
;
import
com.linkwechat.common.config.CosConfig
;
import
com.linkwechat.common.config.RuoYiConfig
;
import
com.linkwechat.common.config.ServerConfig
;
import
com.linkwechat.common.utils.file.FileUploadUtils
;
...
...
@@ -59,6 +60,8 @@ public class WePosterServiceImpl extends ServiceImpl<WePosterMapper, WePoster> i
@Resource
private
IWeCategoryService
weCategoryService
;
@Resource
private
CosConfig
cosConfig
;
/**
* 查询一条
...
...
@@ -187,8 +190,8 @@ public class WePosterServiceImpl extends ServiceImpl<WePosterMapper, WePoster> i
ImageIO
.
write
(
backgroundImg
,
"png"
,
byteArrayOutputStream
);
NetFileUtils
.
StreamMultipartFile
streamMultipartFile
=
new
NetFileUtils
.
StreamMultipartFile
(
System
.
currentTimeMillis
()+
".jpg"
,
byteArrayOutputStream
.
toByteArray
());
byteArrayOutputStream
.
close
();
String
path
=
FileUploadUtils
.
upload
File
(
streamMultipartFile
);
poster
.
setSampleImgPath
(
serverConfig
.
getUrl
()
+
path
);
String
path
=
FileUploadUtils
.
upload
2Cos
(
streamMultipartFile
,
cosConfig
);
poster
.
setSampleImgPath
(
cosConfig
.
getImgUrlPrefix
()
+
path
);
}
catch
(
IOException
e
)
{
e
.
printStackTrace
();
throw
new
RuntimeException
(
"图片生成错误"
);
...
...
linkwe-wecom/src/main/java/com/linkwechat/wecom/service/impl/WeTaskFissionServiceImpl.java
View file @
7ab42ba
...
...
@@ -139,9 +139,9 @@ public class WeTaskFissionServiceImpl implements IWeTaskFissionService {
//海报路径
String
postersPath
=
weTaskFission
.
getPostersUrl
();
//目标员工id
String
fiss
StaffId
=
weTaskFission
.
getFissStaff
Id
();
String
fiss
ionTargetId
=
weTaskFission
.
getFissionTarget
Id
();
//目标员工活码
String
fiss
StaffQrcode
=
weTaskFission
.
getFissStaff
Qrcode
();
String
fiss
Qrcode
=
weTaskFission
.
getFiss
Qrcode
();
//todo 生成海报
LinkMessageDto
linkMessageDto
=
new
LinkMessageDto
();
...
...
@@ -187,6 +187,12 @@ public class WeTaskFissionServiceImpl implements IWeTaskFissionService {
if
(
user
!=
null
)
{
WeTaskFissionRecord
record
=
getTaskFissionRecordId
(
weTaskFissionPosterDTO
.
getTaskFissionId
(),
user
.
getUserId
(),
user
.
getName
());
String
qrcode
=
getPosterQRCode
(
weTaskFissionPosterDTO
.
getFissStaffId
(),
record
);
//保存qrcode信息
WeTaskFission
taskFission
=
weTaskFissionMapper
.
selectWeTaskFissionById
(
weTaskFissionPosterDTO
.
getTaskFissionId
());
taskFission
.
setFissQrcode
(
qrcode
);
weTaskFissionMapper
.
updateWeTaskFission
(
taskFission
);
WePoster
poster
=
wePosterService
.
selectOne
(
weTaskFissionPosterDTO
.
getPosterId
());
poster
.
getPosterSubassemblyList
().
stream
().
filter
(
Objects:
:
nonNull
)
.
filter
(
wePosterSubassembly
->
wePosterSubassembly
.
getType
()
==
3
).
forEach
(
wePosterSubassembly
->
{
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeChatCollectionMapper.xml
View file @
7ab42ba
...
...
@@ -29,7 +29,8 @@
wm.material_name,
wm.material_url,
wm.content,
wc.media_type
wc.media_type,
wcc.create_time
FROM
we_chat_collection wcc
LEFT JOIN we_material wm ON wcc.material_id = wm.id
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeChatItemMapper.xml
View file @
7ab42ba
...
...
@@ -27,7 +27,17 @@
wm.material_name,
wm.material_url,
wm.content,
wc.media_type
wc.media_type,
(
SELECT
COUNT(1)
FROM
we_chat_collection
WHERE
material_id = wci.material_id
AND user_id = #{userId}
) collection,
wci.create_time
FROM
we_chat_item wci
LEFT JOIN we_material wm ON wci.material_id = wm.id
...
...
linkwe-wecom/src/main/resources/mapper/wecom/WeTaskFissionMapper.xml
View file @
7ab42ba
...
...
@@ -3,9 +3,10 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.linkwechat.wecom.mapper.WeTaskFissionMapper"
>
<resultMap
type=
"WeTaskFission"
id=
"WeTaskFissionResult"
>
<result
property=
"id"
column=
"id"
/>
<result
property=
"fissionType"
column=
"fission_type"
/>
<result
property=
"taskName"
column=
"task_name"
/>
<result
property=
"fissInfo"
column=
"fiss_info"
/>
<result
property=
"fissNum"
column=
"fiss_num"
/>
...
...
@@ -15,9 +16,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"customerTag"
column=
"customer_tag"
/>
<result
property=
"postersId"
column=
"posters_id"
/>
<result
property=
"postersUrl"
column=
"posters_url"
/>
<result
property=
"fiss
StaffId"
column=
"fiss_staff
_id"
/>
<result
property=
"fiss
Staff"
column=
"fiss_staff
"
/>
<result
property=
"fiss
StaffQrcode"
column=
"fiss_staff
_qrcode"
/>
<result
property=
"fiss
ionTargetId"
column=
"fission_target
_id"
/>
<result
property=
"fiss
ionTarget"
column=
"fission_target
"
/>
<result
property=
"fiss
Qrcode"
column=
"fiss
_qrcode"
/>
<result
property=
"rewardUrl"
column=
"reward_url"
/>
<result
property=
"rewardImageUrl"
column=
"reward_image_url"
/>
<result
property=
"rewardRule"
column=
"reward_rule"
/>
...
...
@@ -30,12 +31,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql
id=
"selectWeTaskFissionVo"
>
select id,
task_name, fiss_info, fiss_num, start_time, over_time, customer_tag_id, customer_tag, posters_id, posters_url, fiss_staff_id, fiss_staff, fiss_staff
_qrcode, reward_url, reward_image_url, reward_rule, fiss_status, welcome_msg, create_by, create_time, update_by, update_time from we_task_fission
select id,
fission_type, task_name, fiss_info, fiss_num, start_time, over_time, customer_tag_id, customer_tag, posters_id, posters_url, fission_target_id, fission_target, fiss
_qrcode, reward_url, reward_image_url, reward_rule, fiss_status, welcome_msg, create_by, create_time, update_by, update_time from we_task_fission
</sql>
<select
id=
"selectWeTaskFissionList"
parameterType=
"WeTaskFission"
resultMap=
"WeTaskFissionResult"
>
<include
refid=
"selectWeTaskFissionVo"
/>
<where>
<where>
<if
test=
"fissionType != null "
>
and fission_type = #{fissionType}
</if>
<if
test=
"taskName != null and taskName != ''"
>
and task_name like concat('%', #{taskName}, '%')
</if>
<if
test=
"fissInfo != null and fissInfo != ''"
>
and fiss_info = #{fissInfo}
</if>
<if
test=
"fissNum != null "
>
and fiss_num = #{fissNum}
</if>
...
...
@@ -45,9 +47,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"customerTag != null and customerTag != ''"
>
and customer_tag = #{customerTag}
</if>
<if
test=
"postersId != null "
>
and posters_id = #{postersId}
</if>
<if
test=
"postersUrl != null and postersUrl != ''"
>
and posters_url = #{postersUrl}
</if>
<if
test=
"fiss
StaffId != null and fissStaffId != ''"
>
and fiss_staff_id = #{fissStaff
Id}
</if>
<if
test=
"fiss
Staff != null and fissStaff != ''"
>
and fiss_staff = #{fissStaff
}
</if>
<if
test=
"fiss
StaffQrcode != null and fissStaffQrcode != ''"
>
and fiss_staff_qrcode = #{fissStaff
Qrcode}
</if>
<if
test=
"fiss
ionTargetId != null and fissionTargetId != ''"
>
and fission_target_id = #{fissionTarget
Id}
</if>
<if
test=
"fiss
ionTarget != null and fissionTarget != ''"
>
and fission_target = #{fissionTarget
}
</if>
<if
test=
"fiss
Qrcode != null and fissQrcode != ''"
>
and fiss_qrcode = #{fiss
Qrcode}
</if>
<if
test=
"rewardUrl != null and rewardUrl != ''"
>
and reward_url = #{rewardUrl}
</if>
<if
test=
"rewardImageUrl != null and rewardImageUrl != ''"
>
and reward_image_url = #{rewardImageUrl}
</if>
<if
test=
"rewardRule != null and rewardRule != ''"
>
and reward_rule = #{rewardRule}
</if>
...
...
@@ -55,15 +57,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"welcomeMsg != null and welcomeMsg != ''"
>
and welcome_msg = #{welcomeMsg}
</if>
</where>
</select>
<select
id=
"selectWeTaskFissionById"
parameterType=
"Long"
resultMap=
"WeTaskFissionResult"
>
<include
refid=
"selectWeTaskFissionVo"
/>
where id = #{id}
</select>
<insert
id=
"insertWeTaskFission"
parameterType=
"WeTaskFission"
useGeneratedKeys=
"true"
keyProperty=
"id"
>
insert into we_task_fission
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fissionType != null"
>
fission_type,
</if>
<if
test=
"taskName != null and taskName != ''"
>
task_name,
</if>
<if
test=
"fissInfo != null"
>
fiss_info,
</if>
<if
test=
"fissNum != null"
>
fiss_num,
</if>
...
...
@@ -73,9 +76,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"customerTag != null"
>
customer_tag,
</if>
<if
test=
"postersId != null"
>
posters_id,
</if>
<if
test=
"postersUrl != null and postersUrl != ''"
>
posters_url,
</if>
<if
test=
"fiss
StaffId != null and fissStaffId != ''"
>
fiss_staff
_id,
</if>
<if
test=
"fiss
Staff != null and fissStaff != ''"
>
fiss_staff
,
</if>
<if
test=
"fiss
StaffQrcode != null and fissStaffQrcode != ''"
>
fiss_staff
_qrcode,
</if>
<if
test=
"fiss
ionTargetId != null and fissionTargetId != ''"
>
fission_target
_id,
</if>
<if
test=
"fiss
ionTarget != null and fissionTarget != ''"
>
fission_target
,
</if>
<if
test=
"fiss
Qrcode != null and fissQrcode != ''"
>
fiss
_qrcode,
</if>
<if
test=
"rewardUrl != null and rewardUrl != ''"
>
reward_url,
</if>
<if
test=
"rewardImageUrl != null and rewardImageUrl != ''"
>
reward_image_url,
</if>
<if
test=
"rewardRule != null"
>
reward_rule,
</if>
...
...
@@ -87,6 +90,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"updateTime != null"
>
update_time,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"fissionType != null"
>
#{fissionType},
</if>
<if
test=
"taskName != null and taskName != ''"
>
#{taskName},
</if>
<if
test=
"fissInfo != null"
>
#{fissInfo},
</if>
<if
test=
"fissNum != null"
>
#{fissNum},
</if>
...
...
@@ -96,9 +100,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"customerTag != null"
>
#{customerTag},
</if>
<if
test=
"postersId != null"
>
#{postersId},
</if>
<if
test=
"postersUrl != null and postersUrl != ''"
>
#{postersUrl},
</if>
<if
test=
"fiss
StaffId != null and fissStaffId != ''"
>
#{fissStaff
Id},
</if>
<if
test=
"fiss
Staff != null and fissStaff != ''"
>
#{fissStaff
},
</if>
<if
test=
"fiss
StaffQrcode != null and fissStaffQrcode != ''"
>
#{fissStaff
Qrcode},
</if>
<if
test=
"fiss
ionTargetId != null and fissionTargetId != ''"
>
#{fissionTarget
Id},
</if>
<if
test=
"fiss
ionTarget != null and fissionTarget != ''"
>
#{fissionTarget
},
</if>
<if
test=
"fiss
Qrcode != null and fissQrcode != ''"
>
#{fiss
Qrcode},
</if>
<if
test=
"rewardUrl != null and rewardUrl != ''"
>
#{rewardUrl},
</if>
<if
test=
"rewardImageUrl != null and rewardImageUrl != ''"
>
#{rewardImageUrl},
</if>
<if
test=
"rewardRule != null"
>
#{rewardRule},
</if>
...
...
@@ -114,6 +118,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update
id=
"updateWeTaskFission"
parameterType=
"WeTaskFission"
>
update we_task_fission
<trim
prefix=
"SET"
suffixOverrides=
","
>
<if
test=
"fissionType != null"
>
fission_type = #{fissionType},
</if>
<if
test=
"taskName != null and taskName != ''"
>
task_name = #{taskName},
</if>
<if
test=
"fissInfo != null"
>
fiss_info = #{fissInfo},
</if>
<if
test=
"fissNum != null"
>
fiss_num = #{fissNum},
</if>
...
...
@@ -123,9 +128,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"customerTag != null"
>
customer_tag = #{customerTag},
</if>
<if
test=
"postersId != null"
>
posters_id = #{postersId},
</if>
<if
test=
"postersUrl != null and postersUrl != ''"
>
posters_url = #{postersUrl},
</if>
<if
test=
"fiss
StaffId != null and fissStaffId != ''"
>
fiss_staff_id = #{fissStaff
Id},
</if>
<if
test=
"fiss
Staff != null and fissStaff != ''"
>
fiss_staff = #{fissStaff
},
</if>
<if
test=
"fiss
StaffQrcode != null and fissStaffQrcode != ''"
>
fiss_staff_qrcode = #{fissStaff
Qrcode},
</if>
<if
test=
"fiss
ionTargetId != null and fissionTargetId != ''"
>
fission_target_id = #{fissionTarget
Id},
</if>
<if
test=
"fiss
ionTarget != null and fissionTarget != ''"
>
fission_target = #{fissionTarget
},
</if>
<if
test=
"fiss
Qrcode != null and fissQrcode != ''"
>
fiss_qrcode = #{fiss
Qrcode},
</if>
<if
test=
"rewardUrl != null and rewardUrl != ''"
>
reward_url = #{rewardUrl},
</if>
<if
test=
"rewardImageUrl != null and rewardImageUrl != ''"
>
reward_image_url = #{rewardImageUrl},
</if>
<if
test=
"rewardRule != null"
>
reward_rule = #{rewardRule},
</if>
...
...
@@ -144,10 +149,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete>
<delete
id=
"deleteWeTaskFissionByIds"
parameterType=
"String"
>
delete from we_task_fission where id in
delete from we_task_fission where id in
<foreach
item=
"id"
collection=
"array"
open=
"("
separator=
","
close=
")"
>
#{id}
</foreach>
</delete>
</mapper>
\ No newline at end of file
sql/link-wechat.sql
View file @
7ab42ba
...
...
@@ -6410,6 +6410,7 @@ DROP TABLE IF EXISTS `we_task_fission`;
CREATE
TABLE
`we_task_fission`
(
`id`
BIGINT
NOT
NULL
AUTO_INCREMENT
COMMENT
'主键'
,
`fission_type`
INTEGER
NOT
NULL
DEFAULT
1
COMMENT
'活动类型,1 任务宝 2 群裂变'
,
`task_name`
VARCHAR
(
100
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'任务活动名称'
,
`fiss_info`
VARCHAR
(
255
)
NULL
DEFAULT
NULL
COMMENT
'裂变引导语'
,
`fiss_num`
INTEGER
NOT
NULL
DEFAULT
1
COMMENT
'裂变客户数量'
,
...
...
@@ -6419,9 +6420,9 @@ CREATE TABLE `we_task_fission` (
`customer_tag`
MEDIUMTEXT
NULL
COMMENT
'客户标签名称列表,为all是可为空'
,
`posters_id`
BIGINT
NULL
DEFAULT
NULL
COMMENT
'海报id'
,
`posters_url`
VARCHAR
(
300
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'裂变海报路径'
,
`fiss
_staff_id`
VARCHAR
(
64
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'任务裂变目标员工
'
,
`fiss
_staff`
VARCHAR
(
100
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'任务裂变目标员工姓名
'
,
`fiss_
staff_qrcode`
VARCHAR
(
500
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'任务裂变目标员工
二维码'
,
`fiss
ion_target_id`
VARCHAR
(
64
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'任务裂变目标员工/群裂变id
'
,
`fiss
ion_target`
VARCHAR
(
100
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'任务裂变目标员工姓名/群裂变二维码地址
'
,
`fiss_
qrcode`
VARCHAR
(
500
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'任务裂变目标
二维码'
,
`reward_url`
VARCHAR
(
500
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'兑奖链接'
,
`reward_image_url`
VARCHAR
(
500
)
NOT
NULL
DEFAULT
'NULL'
COMMENT
'兑奖链接图片'
,
`reward_rule`
MEDIUMTEXT
NULL
COMMENT
'兑奖规则'
,
...
...
@@ -6432,7 +6433,7 @@ CREATE TABLE `we_task_fission` (
`update_by`
VARCHAR
(
100
)
NULL
DEFAULT
NULL
COMMENT
'更新人'
,
`update_time`
DATETIME
NULL
COMMENT
'更新时间'
,
CONSTRAINT
we_task_fission_pk
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
'任务宝
主
表'
;
)
ENGINE
=
InnoDB
DEFAULT
CHARSET
=
utf8mb4
ROW_FORMAT
=
DYNAMIC
COMMENT
'任务宝表'
;
-- ---
-- Table 'we_task_fission_record'
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