Commit f4307346 by xinla

Merge branch 'develop' into front_end_dev_2.0

2 parents 838d7100 69b8c6c2
Showing 157 changed files with 1392 additions and 569 deletions
......@@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<packaging>jar</packaging>
<artifactId>linkwe-admin-dev</artifactId>
<artifactId>linkwe-admin</artifactId>
<description>
web服务入口
......
......@@ -27,16 +27,16 @@ import java.util.List;
public class WeCommunityH5Controller extends BaseController {
@Autowired
private IWePresTagGroupTaskService tagGroupTaskService;
IWePresTagGroupTaskService tagGroupTaskService;
@Autowired
private IWeGroupSopService sopService;
IWeGroupSopService sopService;
@Autowired
private IWeCommunityKeywordToGroupService keywordToGroupService;
IWeCommunityKeywordToGroupService keywordToGroupService;
@Autowired
private ISysUserService userService;
ISysUserService userService;
/**
* 获取任务对应的执行人列表
......@@ -65,8 +65,8 @@ public class WeCommunityH5Controller extends BaseController {
AjaxResult res = AjaxResult.success();
if (type.equals(CommunityTaskType.TAG.getType())) {
// 老客标签建群数据
res.put("todo", tagGroupTaskService.getEmplTaskList(emplId, false));
res.put("done", tagGroupTaskService.getEmplTaskList(emplId, true));
res.put("todo", tagGroupTaskService.getFollowerTaskList(emplId, 0));
res.put("done", tagGroupTaskService.getFollowerTaskList(emplId, 1));
} else if (type.equals(CommunityTaskType.SOP.getType())) {
// 群SOP数据
res.put("todo", sopService.getEmplTaskList(emplId, false));
......@@ -75,10 +75,10 @@ public class WeCommunityH5Controller extends BaseController {
// 全部数据
List todoList = new ArrayList();
List doneList = new ArrayList();
todoList.addAll(tagGroupTaskService.getEmplTaskList(emplId, false));
todoList.addAll(tagGroupTaskService.getFollowerTaskList(emplId, 0));
todoList.addAll(sopService.getEmplTaskList(emplId, false));
res.put("todo", todoList);
doneList.addAll(tagGroupTaskService.getEmplTaskList(emplId, true));
doneList.addAll(tagGroupTaskService.getFollowerTaskList(emplId, 1));
doneList.addAll(sopService.getEmplTaskList(emplId, true));
res.put("done", doneList);
}
......@@ -99,11 +99,11 @@ public class WeCommunityH5Controller extends BaseController {
@GetMapping("/changeStatus")
public AjaxResult changeStatus(@RequestParam("taskId") Long taskId, @RequestParam("emplId") String emplId, @RequestParam("type") Integer type) {
if (type.equals(0)) {
return toAjax(tagGroupTaskService.updateEmplTaskStatus(taskId, emplId));
return toAjax(tagGroupTaskService.updateFollowerTaskStatus(taskId, emplId));
} else {
return toAjax(sopService.updateChatSopStatus(taskId, emplId));
}
}
/**
......
......@@ -100,7 +100,7 @@ public class WeCommunityNewGroupController extends BaseController {
.map(e -> {
WeEmpleCode code = weEmpleCodeService.getById(e.getEmplCodeId());
Map<String, String> fileMap = new HashMap<>();
fileMap.put("fileName", code.getUseUserName() + "-" + code.getScenario()+".jpg");
fileMap.put("fileName", code.getScenario()+".jpg");
fileMap.put("url", code.getQrCode());
return fileMap;
})
......
......@@ -2,50 +2,49 @@ package com.linkwechat.web.controller.wecom;
import com.linkwechat.common.constant.HttpStatus;
import com.linkwechat.common.constant.WeConstans;
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.utils.SecurityUtils;
import com.linkwechat.common.utils.StringUtils;
import com.linkwechat.common.utils.bean.BeanUtils;
import com.linkwechat.wecom.domain.WePresTagGroupTask;
import com.linkwechat.wecom.domain.dto.WePresTagGroupTaskDto;
import com.linkwechat.wecom.domain.vo.WePresTagGroupTaskStatVo;
import com.linkwechat.wecom.domain.WePresTagGroupTaskStat;
import com.linkwechat.wecom.domain.vo.WePresTagGroupTaskVo;
import com.linkwechat.wecom.domain.vo.WePresTagTaskListVO;
import com.linkwechat.wecom.service.IWePresTagGroupTaskService;
import com.linkwechat.wecom.service.IWeGroupCodeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
@Api("老客标签建群接口")
@RestController
@RequestMapping(value = "/wecom/communityPresTagGroup")
public class WeCommunityPresTagGroupController extends BaseController {
@Autowired
private IWePresTagGroupTaskService taskService;
IWePresTagGroupTaskService taskService;
@Autowired
private IWeGroupCodeService groupCodeService;
/**
* 获取老客标签建群列表数据
*/
// @PreAuthorize("@ss.hasPermi('wecom:communitytagGroup:list')")
@GetMapping(path = "/list")
public TableDataInfo<List<WePresTagGroupTaskVo>> getList(
@ApiOperation(value = "获取老客标签建群任务分页数据", httpMethod = "GET")
public TableDataInfo<List<WePresTagTaskListVO>> getPage(
@RequestParam(value = "taskName", required = false) String taskName,
@RequestParam(value = "sendType", required = false) Integer sendType,
@RequestParam(value = "createBy", required = false) String createBy,
@RequestParam(value = "beginTime", required = false) String beginTime,
@RequestParam(value = "endTime", required = false) String endTime) {
startPage();
List<WePresTagGroupTaskVo> wePresTagGroupTaskVoList = taskService.selectTaskList(taskName, sendType, createBy, beginTime, endTime);
return getDataTable(wePresTagGroupTaskVoList);
List<WePresTagTaskListVO> result = taskService.selectTaskList(taskName, sendType, createBy, beginTime, endTime);
return getDataTable(result);
}
/**
......@@ -53,28 +52,16 @@ public class WeCommunityPresTagGroupController extends BaseController {
*/
// @PreAuthorize("@ss.hasPermi('wecom:communitytagGroup:add')")
@PostMapping
public AjaxResult addTask(@RequestBody @Validated WePresTagGroupTaskDto wePresTagGroupTaskDto) {
if (null == groupCodeService.getById(wePresTagGroupTaskDto.getGroupCodeId())) {
return AjaxResult.error(HttpStatus.NOT_FOUND, "群活码不存在");
}
WePresTagGroupTask task = new WePresTagGroupTask();
BeanUtils.copyProperties(wePresTagGroupTaskDto, task);
@ApiOperation(value = "新建老客标签建群任务", httpMethod = "POST")
public AjaxResult add(@RequestBody @Validated WePresTagGroupTask task) {
// 检测任务名是否可用
if (taskService.isNameOccupied(task)) {
return AjaxResult.error("任务名已存在");
}
task.setCreateBy(SecurityUtils.getUsername());
List<String> tagList = wePresTagGroupTaskDto.getTagList();
List<String> scopeList = wePresTagGroupTaskDto.getScopeList();
int affectedRows = taskService.add(task, tagList, scopeList);
if (affectedRows > 0) {
boolean hasScope = StringUtils.isNotEmpty(wePresTagGroupTaskDto.getScopeList());
boolean hasTag = StringUtils.isNotEmpty(wePresTagGroupTaskDto.getTagList());
List<String> externalIds = taskService
.selectExternalUserIds(task.getTaskId(), hasScope, hasTag, wePresTagGroupTaskDto.getSendScope(),
wePresTagGroupTaskDto.getCusBeginTime(), wePresTagGroupTaskDto.getCusEndTime());
taskService.sendMessage(task, externalIds);
}
int affectedRows = taskService.add(task);
// 再发送消息
if (affectedRows > 0) taskService.sendMessage(task);
return toAjax(affectedRows);
}
......@@ -83,7 +70,8 @@ public class WeCommunityPresTagGroupController extends BaseController {
*/
// @PreAuthorize("@ss.hasPermi('wecom:communitytagGroup:query')")
@GetMapping(path = "/{id}")
public AjaxResult getTask(@PathVariable("id") Long id) {
@ApiOperation(value = "根据获取任务详细信息", httpMethod = "GET")
public AjaxResult getInfo(@PathVariable("id") Long id) {
WePresTagGroupTaskVo taskVo = taskService.getTaskById(id);
if (StringUtils.isNull(taskVo)) {
return AjaxResult.error(HttpStatus.NOT_FOUND, "群活码不存在");
......@@ -96,11 +84,20 @@ public class WeCommunityPresTagGroupController extends BaseController {
*/
// @PreAuthorize("@ss.hasPermi('wecom:communitytagGroup:edit')")
@PutMapping(path = "/{id}")
public AjaxResult updateTask(@PathVariable("id") Long id, @RequestBody @Validated WePresTagGroupTaskDto wePresTagGroupTaskDto) {
if (null == groupCodeService.getById(wePresTagGroupTaskDto.getGroupCodeId())) {
return AjaxResult.error(HttpStatus.NOT_FOUND, "群活码不存在");
@ApiOperation(value = "更新任务信息", httpMethod = "PUT")
public AjaxResult update(@PathVariable("id") Long id, @RequestBody @Validated WePresTagGroupTask task) {
try {
// 保存新任务
task.setTaskId(id);
task.setUpdateBy(SecurityUtils.getUsername());
task.setUpdateTime(new Date());
taskService.updateTaskAndSendMsg(task);
}catch (Exception e){
return AjaxResult.error(e.getMessage());
}
return toAjax(taskService.updateTask(id, wePresTagGroupTaskDto));
return AjaxResult.success();
}
/**
......@@ -108,7 +105,8 @@ public class WeCommunityPresTagGroupController extends BaseController {
*/
// @PreAuthorize("@ss.hasPermi('wecom:communitytagGroup:remove')")
@DeleteMapping(path = "/{ids}")
public AjaxResult batchRemoveTask(@PathVariable("ids") Long[] ids) {
@ApiOperation(value = "批量删除老客标签建群任务", httpMethod = "DELETE")
public AjaxResult batchRemove(@PathVariable("ids") Long[] ids) {
return toAjax(taskService.batchRemoveTaskByIds(ids));
}
......@@ -117,16 +115,17 @@ public class WeCommunityPresTagGroupController extends BaseController {
*/
// @PreAuthorize("@ss.hasPermi('wecom:communitytagGroup:query')")
@GetMapping(path = "/stat/{id}")
public TableDataInfo<List<WePresTagGroupTaskStatVo>> getStatInfo(
public TableDataInfo<List<WePresTagGroupTaskStat>> getStatInfo(
@PathVariable("id") Long id,
@RequestParam(value = "customerName", required = false) String customerName,
@RequestParam(value = "isInGroup", required = false) Integer isInGroup,
@RequestParam(value = "isSent", required = false) Integer isSent
) {
WePresTagGroupTask task = taskService.getById(id);
startPage();
List<WePresTagGroupTaskStatVo> statVoList = taskService.getStatByTaskId(id);
return getDataTable(statVoList);
List<WePresTagGroupTaskStat> stats = taskService.getTaskStat(id, customerName, isInGroup, isSent, task.getSendType());
return getDataTable(stats);
}
......
......@@ -6,13 +6,14 @@ import com.linkwechat.common.annotation.Log;
import com.linkwechat.common.constant.WeConstans;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.PageDomain;
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.core.page.TableSupport;
import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.common.exception.CustomException;
import com.linkwechat.common.utils.StringUtils;
import com.linkwechat.wecom.constants.SynchRecordConstants;
import com.linkwechat.wecom.domain.*;
import com.linkwechat.wecom.domain.vo.WeLeaveUserInfoAllocateVo;
import com.linkwechat.wecom.domain.vo.WeMakeCustomerTag;
import com.linkwechat.wecom.domain.vo.WeOnTheJobCustomerVo;
import com.linkwechat.wecom.service.IWeCustomerService;
......@@ -22,7 +23,6 @@ import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.web.bind.annotation.*;
import java.util.Date;
import java.util.List;
/**
......@@ -54,15 +54,19 @@ public class WeCustomerController extends BaseController
*********************************************************************************/
/**
* 查询企业微信客户列表(分页)
* 查询企业微信客户列表(分页),优化百万数据分页查询,没有用框架自带分页
*/
@GetMapping("/findWeCustomerList")
@ApiOperation("查询企业微信客户列表")
public TableDataInfo findWeCustomerList(WeCustomerList weCustomerList)
{
startPage();
List<WeCustomerList> list = weCustomerService.findWeCustomerList(weCustomerList);
List<WeCustomerList> list = weCustomerService.findWeCustomerList(weCustomerList,TableSupport.buildPageRequest());
TableDataInfo dataTable = getDataTable(list);
//设置总条数
dataTable.setTotal(
weCustomerService.countWeCustomerList(weCustomerList)
);
dataTable.setLastSyncTime(
iWeSynchRecordService.findUpdateLatestTime(SynchRecordConstants.SYNCH_CUSTOMER)
);//最近同步时间
......@@ -82,7 +86,7 @@ public class WeCustomerController extends BaseController
public AjaxResult findAllWeCustomerList(WeCustomerList weCustomerList)
{
return AjaxResult.success(
weCustomerService.findWeCustomerList(weCustomerList)
weCustomerService.findWeCustomerList(weCustomerList,null)
);
}
......@@ -209,14 +213,9 @@ public class WeCustomerController extends BaseController
startPage();
List<WeCustomerTrajectory> weCustomerTrajectories = iWeCustomerTrajectoryService
.list(new LambdaQueryWrapper<WeCustomerTrajectory>()
.eq(trajectoryType !=null,WeCustomerTrajectory::getTrajectoryType,trajectoryType)
.eq(StringUtils.isNotEmpty(externalUserid),WeCustomerTrajectory::getExternalUserid, externalUserid)
.eq(StringUtils.isNotEmpty(userId),WeCustomerTrajectory::getUserId, userId)
.orderByDesc(WeCustomerTrajectory::getTrackTime)
);
return getDataTable(weCustomerTrajectories);
.followUpRecord(externalUserid, userId, trajectoryType);
return getDataTable(weCustomerTrajectories);
}
......
......@@ -4,6 +4,7 @@ import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.linkwechat.common.constant.Constants;
import com.linkwechat.common.constant.WeConstans;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo;
......@@ -30,13 +31,14 @@ public class WeCustomerPortraitController extends BaseController {
private IWeCustomerService iWeCustomerService;
@Autowired
private IWeTagGroupService weTagGroupService;
@Autowired
private IWeTagService iWeTagService;
@Autowired
private IWeTagGroupService iWeTagGroupService;
@Autowired
private IWeUserService iWeUserService;
......@@ -51,6 +53,11 @@ public class WeCustomerPortraitController extends BaseController {
private IWeCustomerTrajectoryService iWeCustomerTrajectoryService;
@Autowired
IWeMomentsService iWeMomentsService;
/**
* 根据客户id和当前企业员工id获取客户详细信息
* @param externalUserid
......@@ -89,21 +96,30 @@ public class WeCustomerPortraitController extends BaseController {
/**
* 获取当前系统所有可用标签
* @param groupTagType 标签分组类型(1:客户标签;2:群标签)
* @param userId 员工id
* @return
*/
@GetMapping(value = "/findAllTags")
public AjaxResult findAllTags(Integer groupTagType,String userId){
if(groupTagType.equals(new Integer(1))){//企业标签
return AjaxResult.success(
iWeTagGroupService.selectWeTagGroupList(
WeTagGroup.builder()
.groupTagType(1)
.build()
)
);
}
return AjaxResult.success(
weTagGroupService.selectWeTagGroupList(
WeTagGroup.builder()
.groupTagType(groupTagType)
.owner(userId)
.build()
iWeTagService.list(
new LambdaQueryWrapper<WeTag>()
.eq(WeTag::getDelFlag,new Integer(0))
.eq(WeTag::getOwner,userId)
)
);
}
......@@ -114,7 +130,6 @@ public class WeCustomerPortraitController extends BaseController {
*/
@PostMapping("/addOrUpdatePersonTags")
public AjaxResult addOrUpdatePersonTags(@RequestBody WeTagGroup weTagGroup){
if(weTagGroupService.saveOrUpdate(weTagGroup)){
List<WeTag> weTags = weTagGroup.getWeTags();
if(CollectionUtil.isNotEmpty(weTags)){
weTags.stream().forEach(k->{
......@@ -123,7 +138,6 @@ public class WeCustomerPortraitController extends BaseController {
});
iWeTagService.saveOrUpdateBatch(weTags);
}
}
return AjaxResult.success();
}
......@@ -210,7 +224,7 @@ public class WeCustomerPortraitController extends BaseController {
/**
* 添加或编辑轨迹
*编辑跟进动态
* @param trajectory
* @return
*/
......@@ -218,7 +232,7 @@ public class WeCustomerPortraitController extends BaseController {
public AjaxResult addOrEditWaitHandle(@RequestBody WeCustomerTrajectory trajectory){
iWeCustomerTrajectoryService.saveOrUpdate(trajectory);
iWeCustomerService.addOrEditWaitHandle(trajectory);
return AjaxResult.success();
}
......@@ -255,6 +269,19 @@ public class WeCustomerPortraitController extends BaseController {
/**
* 个人朋友圈互动数据同步
* @param userId
* @return
*/
@GetMapping("/synchMomentsInteracte/{userId}")
public AjaxResult synchMomentsInteracte(@PathVariable String userId){
iWeMomentsService.synchMomentsInteracte(CollectionUtil.newArrayList(userId));
return AjaxResult.success(WeConstans.SYNCH_TIP);
}
......
......@@ -11,6 +11,7 @@ import com.linkwechat.common.exception.CustomException;
import com.linkwechat.common.utils.DateUtils;
import com.linkwechat.common.utils.SnowFlakeUtil;
import com.linkwechat.common.utils.StringUtils;
import com.linkwechat.common.utils.ValidateUtils;
import com.linkwechat.common.utils.poi.ExcelUtil;
import com.linkwechat.wecom.domain.WeCustomerSeas;
import com.linkwechat.wecom.domain.vo.CustomerSeasRecordVo;
......@@ -71,8 +72,16 @@ public class WeCustomerSeasController extends BaseController {
if(StringUtils.isEmpty(weCustomerSea.getAddUserName())&&StringUtils.isEmpty(weCustomerSea.getAddUserId())){
return AjaxResult.error("分配人不可为空!");
}
//过滤不符合规范的手机号
List<WeCustomerSeas> noRuleWeCustomerSeas
= weCustomerSeas.stream().filter(s -> ValidateUtils.isMobile(s.getPhone())).collect(Collectors.toList());
if(CollectionUtil.isEmpty(noRuleWeCustomerSeas)){
return AjaxResult.error("请传入合法手机号!");
}
//过滤字段为空的数据
List<WeCustomerSeas> deduplicationSeas = weCustomerSeas.stream().filter(s -> StringUtils.isNotEmpty(s.getCustomerName())
List<WeCustomerSeas> deduplicationSeas = noRuleWeCustomerSeas.stream().filter(s -> StringUtils.isNotEmpty(s.getCustomerName())
|| StringUtils.isNotEmpty(s.getPhone())).collect(Collectors.toList());
if(CollectionUtil.isEmpty(deduplicationSeas)){
return AjaxResult.error("导入用户数据不能为空!");
......@@ -98,41 +107,41 @@ public class WeCustomerSeasController extends BaseController {
}
if(CollectionUtil.isNotEmpty(deduplicationSeasNoRepeat)){
if(CollectionUtil.isNotEmpty(deduplicationSeasNoRepeat)){
Long tabaleExcelId= SnowFlakeUtil.nextId();
Long tabaleExcelId= SnowFlakeUtil.nextId();
List<String> userIds = ListUtil.toList(weCustomerSea.getAddUserId().split(","));
List<String> userNames = ListUtil.toList(weCustomerSea.getAddUserName().split(","));
List<String> userIds = ListUtil.toList(weCustomerSea.getAddUserId().split(","));
List<String> userNames = ListUtil.toList(weCustomerSea.getAddUserName().split(","));
IntStream.range(0,deduplicationSeasNoRepeat.size()).forEach(i->{
WeCustomerSeas k = deduplicationSeasNoRepeat.get(i);
if(Objects.nonNull(k)){
k.setTagIds(weCustomerSea.getTagIds());
k.setTagNames(weCustomerSea.getTagNames());
k.setAddUserId( userIds.get(Math.floorMod(i, userIds.size())));
k.setAddUserName(userNames.get(Math.floorMod(i, userNames.size())));
k.setTableExcelName(file.getOriginalFilename());
k.setTableExcelId(tabaleExcelId);
}
});
if(iWeCustomerSeasService.saveBatch(deduplicationSeasNoRepeat)){
//发送提醒
deduplicationSeasNoRepeat.stream().collect(Collectors.groupingBy(WeCustomerSeas::getAddUserId)).forEach((k,v)->{
IntStream.range(0,deduplicationSeasNoRepeat.size()).forEach(i->{
WeCustomerSeas k = deduplicationSeasNoRepeat.get(i);
if(Objects.nonNull(k)){
k.setTagIds(weCustomerSea.getTagIds());
k.setTagNames(weCustomerSea.getTagNames());
k.setAddUserId( userIds.get(Math.floorMod(i, userIds.size())));
k.setAddUserName(userNames.get(Math.floorMod(i, userNames.size())));
k.setTableExcelName(file.getOriginalFilename());
k.setTableExcelId(tabaleExcelId);
}
});
if(iWeCustomerSeasService.saveBatch(deduplicationSeasNoRepeat)){
//发送提醒
deduplicationSeasNoRepeat.stream().collect(Collectors.groupingBy(WeCustomerSeas::getAddUserId)).forEach((k,v)->{
iWeCustomerSeasService.remidUser(ListUtil.toList(k),v.size());
iWeCustomerSeasService.remidUser(ListUtil.toList(k),v.size());
});
});
}
}
tip = MessageFormat.format(tip, new Object[]{new Integer(deduplicationSeasNoRepeat.size()).toString(),
new Integer( weCustomerSeas.size()-deduplicationSeasNoRepeat.size()).toString()});
tip = MessageFormat.format(tip, new Object[]{new Integer(deduplicationSeasNoRepeat.size()).toString(),
new Integer( weCustomerSeas.size()-deduplicationSeasNoRepeat.size()).toString()});
}else{
tip = MessageFormat.format(tip, new Object[] { "0",weCustomerSeas.size() });
}
}else{
tip = MessageFormat.format(tip, new Object[] { "0",weCustomerSeas.size() });
}
;
......@@ -250,7 +259,20 @@ public class WeCustomerSeasController extends BaseController {
}
/**
* 设置公海客户状态
* @return
*/
@PostMapping("/setState")
public AjaxResult setState(@RequestBody WeCustomerSeas weCustomerSea){
if(StringUtils.isEmpty(weCustomerSea.getPhone())){
return AjaxResult.error("手机号不可为空");
}
iWeCustomerSeasService.update(WeCustomerSeas.builder().addState(new Integer(1)).build()
,new LambdaQueryWrapper<WeCustomerSeas>().eq(WeCustomerSeas::getPhone,weCustomerSea.getPhone()));
return AjaxResult.success();
}
......
package com.linkwechat.web.controller.wecom;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.linkwechat.common.annotation.Log;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
......@@ -23,7 +24,11 @@ import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Base64;
import java.util.List;
import java.util.stream.Collectors;
......@@ -42,7 +47,7 @@ public class WeMaterialController extends BaseController {
@Autowired
private IWeMaterialService materialService;
@Resource
@Autowired
private IWePosterService wePosterService;
......@@ -50,11 +55,11 @@ public class WeMaterialController extends BaseController {
@GetMapping("/list")
@ApiOperation("查询素材列表")
public TableDataInfo list(@RequestParam(value = "categoryId", required = false) String categoryId
, @RequestParam(value = "search", required = false) String search,@RequestParam(value = "mediaType") String mediaType) {
, @RequestParam(value = "search", required = false) String search,@RequestParam(value = "mediaType") String mediaType,Integer status) {
startPage();
return getDataTable(
StringUtils.isNotBlank(mediaType) && mediaType.equals(MediaType.POSTER.getType())?
wePosterService.findWePosterToWeMaterial(categoryId,search):
wePosterService.findWePosterToWeMaterial(categoryId,search,status):
materialService.findWeMaterials(categoryId, search,mediaType)
);
}
......@@ -132,10 +137,15 @@ public class WeMaterialController extends BaseController {
@Log(title = "获取素材media_id", businessType = BusinessType.OTHER)
@GetMapping("/temporaryMaterialMediaId")
@ApiOperation("H5端发送获取素材media_id")
public AjaxResult temporaryMaterialMediaId(String url,String type,String name){
public AjaxResult temporaryMaterialMediaId(String url,String type,String name) throws UnsupportedEncodingException {
// Base64.Encoder encoder = Base64.getEncoder();
// byte[] textByte = name.getBytes("UTF-8");
// String encodedText = encoder.encodeToString(textByte);
WeMediaDto weMediaDto = materialService.uploadTemporaryMaterial(url,
type
,name);
, name+"."+url .substring( url .lastIndexOf(".") + 1, url.length()));
return AjaxResult.success(weMediaDto);
}
......
package com.linkwechat.web.controller.wecom;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.linkwechat.common.constant.Constants;
import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.enums.MediaType;
......@@ -45,21 +47,13 @@ public class WePosterController extends BaseController {
@PostMapping(value = "insert")
@ApiOperation("创建海报")
// @PreAuthorize("@ss.hasAnyPermi('wecom:poster:insert')")
@Transactional(rollbackFor = RuntimeException.class)
public AjaxResult insert(@RequestBody WePoster poster) {
wePosterService.generateSimpleImg(poster);
poster.setId(SnowFlakeUtil.nextId());
poster.setDelFlag(0);
poster.setMediaType(MediaType.POSTER.getType());
/*if(poster.getCategoryId() == null){
return AjaxResult.error("请选择海报分类");
}*/
wePosterService.saveOrUpdate(poster);
if(!CollectionUtils.isEmpty(poster.getPosterSubassemblyList())) {
if(CollectionUtil.isNotEmpty(poster.getPosterSubassemblyList())) {
poster.getPosterSubassemblyList().forEach(wePosterSubassembly -> {
wePosterSubassembly.setDelFlag(0);
wePosterSubassembly.setId(SnowFlakeUtil.nextId());
wePosterSubassembly.setPosterId(poster.getId());
});
wePosterSubassemblyService.saveBatch(poster.getPosterSubassemblyList());
......@@ -86,9 +80,7 @@ public class WePosterController extends BaseController {
List<WePosterSubassembly> updateList = new ArrayList<>();
poster.getPosterSubassemblyList().forEach(wePosterSubassembly -> {
if (wePosterSubassembly.getId() == null) {
wePosterSubassembly.setId(SnowFlakeUtil.nextId());
wePosterSubassembly.setPosterId(poster.getId());
wePosterSubassembly.setDelFlag(0);
insertList.add(wePosterSubassembly);
} else {
posterSubassemblyMap.remove(wePosterSubassembly.getId());
......@@ -109,17 +101,7 @@ public class WePosterController extends BaseController {
return AjaxResult.success("修改成功");
}
/*@GetMapping(value = "list")
@ApiOperation("列表查询海报")
public AjaxResult list(Long categoryId,String name){
List<WePoster> fontList = wePosterService.lambdaQuery()
.eq(WePoster::getDelFlag,0)
.eq(categoryId != null,WePoster::getCategoryId,categoryId)
.like(StringUtils.isNotBlank(name),WePoster::getTitle,name)
.orderByDesc(WePoster::getCreateTime)
.list();
return AjaxResult.success(fontList);
}*/
@GetMapping(value = "entity/{id}")
// @PreAuthorize("@ss.hasAnyPermi('wecom:poster:entity')")
......
......@@ -31,8 +31,6 @@ public class WePosterFontController extends BaseController {
@ApiOperation("创建海报字体")
@Transactional(rollbackFor = RuntimeException.class)
public AjaxResult insertPosterFont(@RequestBody WePosterFont posterFont) {
posterFont.setId(SnowFlakeUtil.nextId());
posterFont.setDelFlag(0);
posterFont.setMediaType(MediaType.POSTER_FONT.getType());
wePosterFontService.save(posterFont);
return AjaxResult.success("创建成功");
......
......@@ -113,7 +113,7 @@ public class WeQrCodeController extends BaseController {
Map<String, String> fileMap = new HashMap<>();
List<WeQrScopeUserVo> userVoList = item.getQrUserInfos().stream().map(WeQrScopeVo::getWeQrUserList).flatMap(Collection::stream).collect(Collectors.toList());
String fileName = userVoList.stream().map(WeQrScopeUserVo::getUserName).collect(Collectors.joining(","));
fileMap.put("fileName", fileName + ".jpg");
fileMap.put("fileName", fileName + "-" + item.getName() + ".jpg");
fileMap.put("url", item.getQrCode());
return fileMap;
}).collect(Collectors.toList());
......
......@@ -69,7 +69,7 @@ public class WeTaskFissionController extends BaseController {
@ApiOperation(value = "查询任务宝列表", httpMethod = "GET")
// @PreAuthorize("@ss.hasPermi('wecom:fission:list')")
@GetMapping("/list")
public TableDataInfo<List<WeTaskFission>> list(WeTaskFission weTaskFission) throws ParseException {
public TableDataInfo<List<WeTaskFission>> list(WeTaskFission weTaskFission){
startPage();
List<WeTaskFission> list = weTaskFissionService.selectWeTaskFissionList(weTaskFission);
return getDataTable(list);
......@@ -106,7 +106,7 @@ public class WeTaskFissionController extends BaseController {
// @PreAuthorize("@ss.hasPermi('wecom:fission:export')")
@Log(title = "任务宝", businessType = BusinessType.EXPORT)
@GetMapping("/export")
public AjaxResult export(WeTaskFission weTaskFission) throws ParseException {
public AjaxResult export(WeTaskFission weTaskFission) {
List<WeTaskFission> list = weTaskFissionService.selectWeTaskFissionList(weTaskFission);
ExcelUtil<WeTaskFission> util = new ExcelUtil<WeTaskFission>(WeTaskFission.class);
return util.exportExcel(list, "fission");
......@@ -130,13 +130,8 @@ public class WeTaskFissionController extends BaseController {
@Log(title = "任务宝", businessType = BusinessType.INSERT)
@PostMapping("/add")
public AjaxResult add(@RequestBody WeTaskFission weTaskFission) {
Long fissionTaskId = weTaskFissionService.insertWeTaskFission(weTaskFission);
if (fissionTaskId != null) {
JSONObject json = new JSONObject();
json.put("id", fissionTaskId);
return AjaxResult.success(json.toJSONString());
}
return AjaxResult.error();
weTaskFissionService.insertWeTaskFission(weTaskFission);
return AjaxResult.success();
}
/**
......@@ -183,14 +178,13 @@ public class WeTaskFissionController extends BaseController {
/**
* 发送裂变任务
*/
@ApiOperation(value = "发送裂变任务", httpMethod = "GET")
// @PreAuthorize("@ss.hasPermi('wecom:fission:send')")
/*@ApiOperation(value = "发送裂变任务", httpMethod = "GET")
@Log(title = "发送裂变任务", businessType = BusinessType.OTHER)
@GetMapping("/send/{id}")
public AjaxResult send(@PathVariable Long id) throws Exception {
weTaskFissionService.sendWeTaskFission(id);
return AjaxResult.success();
}
}*/
/**
* 添加群裂变完成记录
......
......@@ -158,7 +158,7 @@ public class WeUserController extends BaseController {
@Log(title = "离职分配", businessType = BusinessType.UPDATE)
@PutMapping({"/allocateLeaveUserAboutData"})
public AjaxResult allocateLeaveUserAboutData(@RequestBody WeLeaveUserInfoAllocateVo weLeaveUserInfoAllocateVo) {
weLeaveUserInfoAllocateVo.setExtentType(new Integer(0));
weUserService.allocateLeaveUserAboutData(weLeaveUserInfoAllocateVo);
return AjaxResult.success("离职分配成功");
......
# 项目相关配置
ruoyi:
# 名称
name: RuoYi
name: LinkWeChat
# 版本
version: 3.1.0
# 版权年份
copyrightYear: 2019
copyrightYear: 2021
startTenant: false
editPwd: false
# 实例演示开关
demoEnabled: true
# 是否开启文件云上传(使用的是腾讯云,如果开启了,则需要配置腾讯云存储相关信息;如果关闭了则文件存储再本地,需要配置本地路径)
# 目前只支持腾讯云上传
file:
startCosUpload: true
#如果startCosUpload为false时必须设置,则文件资源放在本地服务器上,该配置为文件访问前缀,配置到nginx上可以直接访问
imgUrlPrefix: /lwImg
#腾讯云对象存储
cos:
secretId:
secretKey:
#link-wechat-1251309172.cos.ap-nanjing.myqcloud.com
region:
bucketName:
cosImgUrlPrefix:
# 文件路径 示例( Windows配置D:/ruoyi/uploadPath,Linux配置 /app/project/pic)
profile: /app/pic
# 获取ip地址开关
addressEnabled: true
# 验证码类型 math 数组计算 char 字符验证
......@@ -67,13 +62,14 @@ ruoyi:
- /wecom/material/temporaryMaterialMediaId
- /common/findFile
- /wecom/seas/findEmployeeCustomer
- /wecom/seas/setState
# 开发环境配置
server:
# 服务器的HTTP端口,默认为8090
port: 8070
port: 8090
servlet:
# 应用的访问路径
context-path: /
......@@ -92,10 +88,10 @@ logging:
#H5地址路径
H5:
domainPrefix: http://linkwechat.cn/
domainPrefix: http://demo.linkwechat.cn/
url: http://h5.linkwechat.cn/index.html
fissionUrl: http://h5.linkwechat.cn/index.html
fissionGroupUrl: http://h5.linkwechat.cn/fission.html
fissionUrl: http://demo.linkwechat.cn/taskMobile/index.html?fissionId={}&fissionTargetId={}&posterId={} #任务宝
fissionGroupUrl: http://demo.linkwechat.cn/taskMobile/fission.html?fissionId={}&recordId={} #群裂变
# Spring配置
spring:
# 资源信息
......@@ -108,7 +104,7 @@ spring:
druid:
# 主库数据源
master:
url: jdbc:p6spy:mysql://127.0.0.1:10179/link-wechat-dev2.0?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
url: jdbc:p6spy:mysql://127.0.0.1:10179/link-wechat-prod?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&rewriteBatchedStatements=true
username: root
password: root
# 从库数据源
......@@ -194,6 +190,12 @@ spring:
max-active: 8
# #连接池最大阻塞等待时间(使用负值表示没有限制)
max-wait: -1ms
cluster:
refresh:
#自适应拓扑刷新
adaptive: true
#定时拓扑刷新
period: 10
# token配置
......@@ -209,22 +211,10 @@ mybatis-plus:
mapper-locations: classpath*:mapper/**/*Mapper.xml
type-aliases-package: com.linkwechat.**.domain
type-handlers-package: com.linkwechat.framework.handler.GenericTypeHandler,com.linkwechat.framework.handler.StringArrayJoinTypeHandler
#global-config:
#db-config:
#logic-delete-field: delFlag
#logic-delete-value: 1
#logic-not-delete-value: 0
mpp:
entityBasePath: com.linkwechat.**.domain
## MyBatis配置
#mybatis:
# # 搜索指定包别名
# typeAliasesPackage: com.linkwechat.**.domain
# # 配置mapper的扫描,找到所有的mapper.xml映射文件
# mapperLocations: classpath*:mapper/**/*Mapper.xml
# # 加载全局的配置文件
# configLocation: classpath:mybatis/mybatis-config.xml
# PageHelper分页插件
pagehelper:
......@@ -249,25 +239,22 @@ xss:
# 匹配链接
urlPatterns: /system/*,/monitor/*,/tool/*
# elasticsearch配置
elasticsearch:
schema: http
address:
userName: "elastic"
password: "0p-0p-0p-"
connectTimeout: 10000
socketTimeout: 10000
connectionRequestTimeout: 10000
maxConnectNum: 100
maxConnectPerRoute: 100
# forest配置
forest:
backend: httpclient
retry-count: 1 # 请求失败后重试次数,默认为0次不重试
max-retry-count: 3 # 请求失败后重试次数,默认为0次不重试
max-retry-interval: 1000 #重试间隔时间
connect-timeout: 3000 #链接超时时间
timeout: 3000 # 请求超时时间
## 日志总开关,打开/关闭Forest请求/响应日志(默认为 true)
log-enabled: true
## 打开/关闭Forest请求日志(默认为 true)
log-request: true
## 打开/关闭Forest响应状态日志(默认为 true)
log-response-status: true
## 打开/关闭Forest响应内容日志(默认为 false)
log-response-content: true
variables:
weComServerUrl: https://qyapi.weixin.qq.com/
weComePrefix: cgi-bin
......@@ -275,77 +262,9 @@ forest:
wxPrefix: sns
wecome:
chatKey: finance_new
serverUrl: https://qyapi.weixin.qq.com/
weComePrefix: cgi-bin
noAccessTokenUrl:
- /gettoken
- /service/get_provider_token
- /wecom/chat/side/list
- /wecom/chat/item/list
- /wecom/chat/collection/addCollection
- /wecom/chat/collection/cancleCollection
- /wecom/chat/collection/list
needContactTokenUrl:
- /externalcontact/get_follow_user_list
- /externalcontact/add_contact_way
- /externalcontact/update_contact_way
- /externalcontact/add_corp_tag
- /externalcontact/get_corp_tag_list
- /externalcontact/del_corp_tag
- /externalcontact/edit_corp_tag
- /externalcontact/list
- /externalcontact/get
- /externalcontact/batch/get_by_user
- /externalcontact/groupchat/list
- /externalcontact/groupchat/get
- /externalcontact/mark_tag
- /externalcontact/transfer
- /externalcontact/groupchat/transfer
- /externalcontact/get_unassigned_list
- /externalcontact/send_welcome_msg
- /externalcontact/unionid_to_external_userid
- /externalcontact/add_msg_template
- /externalcontact/get_group_msg_result
- /externalcontact/get_user_behavior_data
- /externalcontact/groupchat/statistic
- /externalcontact/groupchat/statistic_group_by_day
fileUplodUrl: /media/upload,/media/uploadimg
needProviderTokenUrl:
- /service/get_login_info
needChatTokenUrl:
- /msgaudit/get_permit_user_list
- /msgaudit/check_single_agree
- /msgaudit/check_room_agree
- /msgaudit/groupchat/get
thirdAppUrl:
- /user/getuserinfo
- /get_jsapi_ticket
- /ticket/get
- /agent/list
- /message/send
- /agent/get
- /agent/set
needTenant:
- we_department
- we_user
- we_customer
- we_flower_customer_rel
- we_flower_customer_tag_rel
- we_group
- we_group_member
- we_tag_group
- we_tag
#企微回调通知配置
callBack:
appIdOrCorpId:
token:
encodingAesKey:
# JS SDK 身份校验url
#authorizeUrl: https://open.weixin.qq.com/connect/oauth2/authorize
# JS SDK身份校验成功后的redirect url
#authorizeRedirectUrl: http://www.linkwechat.cn/mobile/#/task
weNeedRetryErrorCodes: -1,42001,42009,40082,40014
welcome-msg-default: "您好,欢迎关注LinkWechat,如果对您有帮助,麻烦在码云上帮我们点个star,谢谢!"
weixin:
appid:
secret:
\ No newline at end of file
appid: #公众号appid
secret: #公众号密钥
\ No newline at end of file
......@@ -2,4 +2,4 @@ linkwechat.nacos.host=
linkwechat.nacos.port=
linkwechat.nacos.namespace=
linkwechat.nacos.username=
linkwechat.nacos.password=
\ No newline at end of file
linkwechat.nacos.password=
......@@ -167,6 +167,18 @@ public class Constants
/**
* 正常状态(未删除)
*/
public static final Integer COMMON_STATE = 0;
/**
* 删除移除状态
*/
public static final Integer DELETE_STATE = 1;
......
......@@ -64,6 +64,10 @@ public class WeConstans {
* 活码前缀
*/
public static final String WE_QR_CODE_PREFIX = "we_qr";
/**
* 新客拉群
*/
public static final String WE_QR_XKLQ_PREFIX = "we_xklq";
/**
......@@ -123,7 +127,7 @@ public class WeConstans {
/**
* 已离职
*/
public static final Integer WE_USER_IS_LEAVE = 6;
public static final Integer WE_USER_IS_LEAVE = 5;
/**
......@@ -407,4 +411,10 @@ public class WeConstans {
* 群发消息任务开关
*/
public static Boolean WEGROUPMSGTIMEDTASK_SWITCH = true;
/**
* 老客标签建群企业群发消息模板
*/
public static final String MSG_TEMPLATE = "你有一个新社群运营任务,<a href='%s?appid=%s&redirect_uri=%s&response_type=code&scope=snsapi_base&state=STATE#wechat_redirect'>请点击此链接查看详情</a>";
}
package com.linkwechat.common.enums;
/**
* 群分配状态
*/
public enum AllocateGroupStatus {
ALLOCATE_GROUP_STATUS_BJTCG(0,"被接替成功"),
ALLOCATE_GROUP_STATUS_DJT(1,"待接替"),
ALLOCATE_GROUP_STATUS_JTSB(2,"接替失败"),
ALLOCATE_GROUP_STATUS_ZCZT(3,"正常状态");
private Integer key;
private String val;
AllocateGroupStatus(Integer key,String val){
this.key=key;
this.val=val;
}
public Integer getKey() {
return key;
}
public void setKey(Integer key) {
this.key = key;
}
public String getVal() {
return val;
}
public void setVal(String val) {
this.val = val;
}
}
package com.linkwechat.common.enums;
import java.util.stream.Stream;
/**
* 客户添加方式
*/
public enum CustomerAddWay {
ADD_WAY_WZLY(0,"未知来源"),
ADD_WAY_SMEWM(1,"扫描二维码"),
ADD_WAY_SSSJH(2,"搜索手机号"),
ADD_WAY_MPFX(3,"名片分享"),
ADD_WAY_QL(4,"群聊"),
ADD_WAY_SJTXL(5,"手机通讯录"),
ADD_WAY_WXLXR(6,"微信联系人"),
ADD_WAY_LZWXTJHY(7,"来自微信的添加好友申请"),
ADD_WAY_KFRY(8,"安装第三方应用时自动添加的客服人员"),
ADD_WAY_SSYX(9,"搜索邮箱"),
ADD_WAY_SPHZYTJ(10,"视频号主页添加"),
ADD_WAY_LBCYGX(201,"内部成员共享"),
ADD_WAY_GLYFP(202,"管理员/负责人分配");
private Integer key;
private String val;
CustomerAddWay(Integer key,String val){
this.key=key;
this.val=val;
}
public Integer getKey() {
return key;
}
public void setKey(Integer key) {
this.key = key;
}
public String getVal() {
return val;
}
public void setVal(String val) {
this.val = val;
}
public static CustomerAddWay of(Integer type){
return Stream.of(values()).filter(s->s.getKey().equals(type)).findFirst().orElseGet(null);
}
}
package com.linkwechat.common.enums;
public enum TrackState {
//跟踪状态 1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
STATE_DGJ(1,"待跟进"),
STATE_GJZ(2,"跟进中"),
STATE_JCJ(3,"已成交"),
STATE_WYX(4,"无意向"),
STATE_YLS(5,"已流失");
private String name;
private Integer type;
TrackState(Integer type,String name){
this.name=name;
this.type=type;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
}
package com.linkwechat.common.enums;
import java.util.stream.Stream;
public enum TrajectorySceneType {
TRAJECTORY_TYPE_XXDT_BCZL(TrajectoryType.TRAJECTORY_TYPE_XXDT.getType(),"信息动态-补充资料",1),
TRAJECTORY_TYPE_XXDT_SZBQ(TrajectoryType.TRAJECTORY_TYPE_XXDT.getType(),"信息动态-设置标签",2);
TRAJECTORY_TITLE_TJYG(1,"添加员工","%s通过:%s 方式添加员工:%s"),
TRAJECTORY_TITLE_SCYG(2,"删除员工","%s删除员工%s"),
TRAJECTORY_TITLE_JRQL(3,"加入群聊","{客户名}通过{添加的方式}加入群聊{群名}"),
TRAJECTORY_TITLE_TCQL(4,"退出群聊","{客户名}退出群聊{员工名}"),
TRAJECTORY_TITLE_GXQYBQ(5,"更新企业标签","员工:%s,更新客户标签:%s"),
TRAJECTORY_TITLE_GXGRBQ(6,"更新个人标签","员工:%s,更新个人标签:%s"),
TRAJECTORY_TITLE_BJBQ(7,"编辑信息","员工:%s 编辑了:%s的详细资料"),
TRAJECTORY_TITLE_TJGJ(8,"添加跟进","员工%s添加跟进:%s"),
TRAJECTORY_TITLE_DZPYQ(9,"点赞朋友圈","%s点赞了员工%s的朋友圈"),
TRAJECTORY_TITLE_PLPYQ(10,"评论朋友圈","%s评论了员工%s的朋友圈");
private String name;
private Integer type;
private String msgTpl;
private Integer key;
TrajectorySceneType( Integer type,String name,Integer key) {
TrajectorySceneType( Integer type,String name,String msgTpl) {
this.name = name;
this.type = type;
this.key=key;
this.msgTpl=msgTpl;
}
......@@ -37,11 +48,15 @@ public enum TrajectorySceneType {
this.type = type;
}
public Integer getKey() {
return key;
public String getMsgTpl() {
return msgTpl;
}
public void setMsgTpl(String msgTpl) {
this.msgTpl = msgTpl;
}
public void setKey(Integer key) {
this.key = key;
public static TrajectorySceneType of(Integer type){
return Stream.of(values()).filter(s->s.getType().equals(type)).findFirst().orElseGet(null);
}
}
......@@ -11,12 +11,12 @@ import java.util.stream.Stream;
public enum TrajectoryType {
TRAJECTORY_TYPE_XXDT(1,"信息动态"),
TRAJECTORY_TYPE_SJDT(2,"社交动态"),
TRAJECTORY_TYPE_XXDT(1,"客户动态"),
TRAJECTORY_TYPE_SJDT(2,"员工动态"),
TRAJECTORY_TYPE_HDGZ(3,"活动规则"),
TRAJECTORY_TYPE_HDGZ(3,"互动动态"),
TRAJECTORY_TYPE_DBDT(4,"待办动态");
TRAJECTORY_TYPE_DBDT(4,"跟进动态");
private String name;
......
package com.linkwechat.common.utils;
import org.apache.commons.io.Charsets;
import org.apache.commons.io.IOUtils;
import java.io.*;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Map;
public class Aa {
/**
* 模拟上传文件(远程URL)
*
* @Title uploadFile
* @param uploadUrl 上传路径
* @param picUrl 远程图片URL
* @param params 参数内容
* @return
* @throws IOException
* @author zh
* @date 2016年6月30日 下午4:22:10
*/
public static String uploadFile(String uploadUrl, URL picUrl, Map<String,String> params) throws IOException {
return uploadFile(uploadUrl, picUrl.openStream(), "回话存档", params);
}
/**
* 模拟上传文件(本地文件)
*
* @Title uploadFile
* @param uploadUrl 上传路径
* @param params 参数内容
* @return
* @throws IOException
* @author zh
* @date 2016年6月30日 下午4:23:15
*/
public static String uploadFile(String uploadUrl, File file, Map<String,String> params) throws IOException {
return uploadFile(uploadUrl, new FileInputStream(file), file.getName(), params);
}
/**
* 模拟上传文件(输入流)
*
* @Title uploadFile
* @param uploadUrl 上传链接
* @param is 输入流
* @param filename 文件名
* @param params 参数
* @return
* @throws IOException
* @author zh
* @date 2016年6月30日 下午4:08:52
*/
public static String uploadFile(String uploadUrl, InputStream is, String filename, Map<String,String> params) throws IOException {
URL urlGet = new URL(uploadUrl);
HttpURLConnection conn = (HttpURLConnection) urlGet.openConnection();
conn.setDoOutput(true);
conn.setDoInput(true);
conn.setUseCaches(false);
conn.setRequestMethod("POST");
conn.setRequestProperty("connection", "Keep-Alive");
conn.setRequestProperty("user-agent", "DEFAULT_USER_AGENT");
conn.setRequestProperty("Charsert", "UTF-8");
// 定义数据分隔线
String BOUNDARY = "----WebKitFormBoundary7blBEBTiZtWOX8LI";
conn.setRequestProperty("Content-Type", "multipart/form-data; boundary=" + BOUNDARY);
OutputStream out = new DataOutputStream(conn.getOutputStream());
// 文件内容
StringBuilder contentBody = new StringBuilder();
contentBody.append("--").append(BOUNDARY).append("\r\n");
contentBody.append("Content-Disposition: form-data;name=\"media\";filename=\""+ filename + "\"\r\n");
contentBody.append("Content-Type:application/octet-stream\r\n\r\n");
System.out.println(contentBody);
out.write(contentBody.toString().getBytes());
DataInputStream fs = new DataInputStream(is);
int bytes = 0;
byte[] bufferOut = new byte[1024];
while ((bytes = fs.read(bufferOut)) != -1) {
out.write(bufferOut, 0, bytes);
}
IOUtils.closeQuietly(fs);
// 参数内容
if (params != null && params.size() > 0) {
for (String key : params.keySet()) {
StringBuilder paramData = new StringBuilder();
paramData.append("\r\n").append("--").append(BOUNDARY).append("\r\n");
paramData.append("Content-Disposition: form-data;name=\""+key+"\";");
paramData.append("\r\n");
paramData.append("\r\n");
paramData.append("\""+params.get(key)+"\"");
System.out.println(paramData);
out.write(paramData.toString().getBytes());
}
}
// 最后一个片段结尾要用--表示
byte[] end_data = ("\r\n--" + BOUNDARY + "--\r\n").getBytes();
out.write(end_data);
out.flush();
IOUtils.closeQuietly(out);
// 定义BufferedReader输入流来读取URL的响应
InputStream in = conn.getInputStream();
BufferedReader read = new BufferedReader(new InputStreamReader(in, Charsets.UTF_8));
String valueString = null;
StringBuffer bufferRes = null;
bufferRes = new StringBuffer();
while ((valueString = read.readLine()) != null){
bufferRes.append(valueString);
}
IOUtils.closeQuietly(in);
// 关闭连接
if (conn != null) {
conn.disconnect();
}
return bufferRes.toString();
}
public static void main(String[] args) throws Exception {
// File file = new File("E:\\中文图片.jpg");
// String access_token = "AasbMO9SCcF3HO0jVLnddQuZo4pUmSYHieqC56vQbBvQgqGWW8spQG5CtWT6Vcjh";
String uploadUrl = "https://qyapi.weixin.qq.com/cgi-bin/media/upload?type=file&access_token=otMTtJ_G_cCjHs1JOU9sI90xC8xDUMBbvgiDSCfY__ZHIgIwnf3hSOWenZzUHEITOXU9EUILBcIdoFIPR4LMo7ngTw_3ty-sXTrm8BLw9He5AEJKykCw3detu3ckEt7QDzFL1aP3l9VswzWrBm8_I-JIflWSOy0WOhyWRK11zvQw8FpQ26PInGWjSS718A2LJexK6Rf2liA8sM7J11Ysqg";
// // 本地文件
// String upload_response = uploadFile(uploadUrl, file, null);
// System.out.println(upload_response);
// 远程URL文件提交上传
URL url = new URL("https://link-wechat-1251309172.cos.ap-nanjing.myqcloud.com/2021/12/30/c3fb815b-68a1-4df9-8781-4b203b92a5bf.doc");
String upload_response2 = uploadFile(uploadUrl, url, null);
System.out.println(upload_response2);
}
}
......@@ -201,6 +201,7 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils
public static int getAge(Date birthDay) throws Exception {
Calendar cal = Calendar.getInstance();
if (cal.before(birthDay)) { //出生日期晚于当前时间,无法计算
......
package com.linkwechat.common.utils;
import java.util.regex.Pattern;
public class ValidateUtils {
private static final String REGEX_MOBILE ="((\\+86|0086)?\\s*)((134[0-8]\\d{7})|(((13([0-3]|[5-9]))|(14[5-9])|15([0-3]|[5-9])|(16(2|[5-7]))|17([0-3]|[5-8])|18[0-9]|19(1|[8-9]))\\d{8})|(14(0|1|4)0\\d{7})|(1740([0-5]|[6-9]|[10-12])\\d{7}))";
/**
* 判断是否是手机号
* @param tel 手机号
* @return boolean true:是 false:否
*/
public static boolean isMobile(String tel) {
if (StringUtils.isEmpty(tel)){ return false;}
return Pattern.matches(REGEX_MOBILE, tel);
}
}
package com.linkwechat.common.utils.file;
import cn.hutool.core.io.FileUtil;
import cn.hutool.core.util.ObjectUtil;
import com.linkwechat.common.utils.StringUtils;
import org.springframework.web.multipart.MultipartFile;
......@@ -8,8 +10,10 @@ import java.net.HttpURLConnection;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.servlet.http.HttpServletRequest;
......@@ -86,10 +90,20 @@ public class FileUtils extends org.apache.commons.io.FileUtils
*/
public static void batchDownloadFile(List<Map<String, String>> fileList, OutputStream os) {
try {
Map<String, Integer> fileNameCountMap = fileList.stream().collect(Collectors
.toMap(item -> item.get("fileName"), item -> 0, (key, value) -> key));
ZipOutputStream zos = new ZipOutputStream(os);
for (Map<String, String> fileInfo: fileList) {
String fileName = fileInfo.get("fileName");
String url = fileInfo.get("url");
if(fileNameCountMap.containsKey(fileName)){
Integer count = fileNameCountMap.get(fileName);
if(count > 0){
String tempName = FileUtil.getPrefix(fileName) + "(" + count + ")";
fileName = fileName.replaceAll(FileUtil.getPrefix(fileName),tempName);
}
fileNameCountMap.put(fileName,count+1);
}
// 跳过不包含指定键位的对象
if (StringUtils.isEmpty(url) || StringUtils.isEmpty(fileName)){
continue;
......@@ -267,22 +281,5 @@ public class FileUtils extends org.apache.commons.io.FileUtils
}
/**
* 获取视频或者语音时长
* @param multiFile
* @return
* @throws IOException
*/
public static long getVideoOrVoice(MultipartFile multiFile) throws IOException {
long duration_new =0;
// 将MultipartFile file转换成为File
File f_file = MultipartFileToFile(multiFile);
String path = f_file.getCanonicalPath();
duration_new = VideoUtil.getDuration(path);
f_file.delete();
return duration_new;
}
}
......@@ -18,10 +18,6 @@ export default {
type: String,
default: '0'
},
userId: {
type: String,
default: ''
},
keyword: {
type: String,
default: ''
......@@ -52,7 +48,11 @@ export default {
this.getList(1)
}
},
computed: {},
computed: {
userId() {
return this.$store.state.userId
}
},
created() {
this.getList()
// this.userId && this.getCollectionList()
......@@ -252,7 +252,19 @@ export default {
:src="item.materialUrl"
/>
<!-- 视频 -->
<van-image v-if="item.mediaType == 2" width="80" height="80" :src="item.coverUrl" />
<video
v-if="item.mediaType == 2"
class="video"
controls
webkit-playsinline="true"
playsinline="true"
:autoplay="false"
preload="auto"
:poster="item.coverUrl"
>
<source :src="item.materialUrl" type="video/mp4" />
</video>
<!-- <van-image v-if="item.mediaType == 2" width="80" height="80" :src="item.coverUrl" /> -->
<span class="title">
{{ item.mediaType == 4 ? item.content : item.materialName }}
</span>
......@@ -277,8 +289,11 @@ export default {
<style lang="less" scoped>
.content {
// display: flex;
.van-image {
.van-image,
.video {
float: left;
width: 80px;
height: 80px;
margin: 0 10px 5px 0;
border: 1px solid #eee;
}
......
......@@ -28,7 +28,7 @@ export default {
beforeCreate() {},
created() {
// this.$toast('userId:' + this.$store.state.userId)
this.getList()
this.userId && this.getList()
},
mounted() {},
methods: {
......@@ -79,7 +79,6 @@ export default {
ref="list"
:sideId="item.sideId"
:mediaType="item.mediaType"
:userId="userId"
:keyword="keyword"
@collect="refreshCollect"
></List>
......
......@@ -2,7 +2,6 @@ package com.linkwechat.quartz.task;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.date.Week;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSONObject;
import com.linkwechat.common.utils.StringUtils;
......@@ -10,6 +9,7 @@ import com.linkwechat.wecom.client.WeExternalContactClient;
import com.linkwechat.wecom.domain.WeQrCode;
import com.linkwechat.wecom.domain.dto.WeContactWayDto;
import com.linkwechat.wecom.domain.dto.WeExternalContactDto;
import com.linkwechat.wecom.domain.query.qr.WeQrCodeEventQuery;
import com.linkwechat.wecom.domain.vo.qr.WeQrScopePartyVo;
import com.linkwechat.wecom.domain.vo.qr.WeQrScopeUserVo;
import com.linkwechat.wecom.domain.vo.qr.WeQrScopeVo;
......@@ -17,7 +17,10 @@ import com.linkwechat.wecom.service.IWeQrCodeService;
import com.linkwechat.wecom.service.IWeQrScopeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;
import java.util.Arrays;
import java.util.Date;
......@@ -43,19 +46,19 @@ public class WeQrCodeUpdateTask {
@Autowired
private WeExternalContactClient externalContactClient;
public void qrCodeUpdateTask() {
List<WeQrScopeVo> weQrScopeList = weQrScopeService.getWeQrScopeByTime(DateUtil.formatDateTime(new Date()));
public void qrCodeUpdateTask(String qrCodeId) {
List<WeQrScopeVo> weQrScopeList = weQrScopeService.getWeQrScopeByTime(DateUtil.formatDateTime(new Date()),qrCodeId);
log.info("活码使用范围修改任务 weQrScopeList {}", JSONObject.toJSONString(weQrScopeList));
if (CollectionUtil.isNotEmpty(weQrScopeList)) {
Map<Long, List<WeQrScopeVo>> qrCodeMap = weQrScopeList.stream().collect(Collectors.groupingBy(WeQrScopeVo::getQrId));
qrCodeMap.forEach((qrId,scopeList) ->{
WeQrCode weQrCode = weQrCodeService.getById(qrId);
WeQrScopeVo weCustomizeQrScope = weQrScopeList.stream()
WeQrScopeVo weCustomizeQrScope = scopeList.stream()
.filter(item -> ObjectUtil.equal(1, item.getType())).findFirst().orElse(null);
if(weCustomizeQrScope != null){
extracted(weCustomizeQrScope,weQrCode.getConfigId());
}else {
WeQrScopeVo weDefaultQrScope = weQrScopeList.stream()
WeQrScopeVo weDefaultQrScope = scopeList.stream()
.filter(item -> ObjectUtil.equal(0, item.getType())).findFirst().orElse(null);
extracted(weDefaultQrScope,weQrCode.getConfigId());
}
......@@ -101,4 +104,17 @@ public class WeQrCodeUpdateTask {
}
}
}
@Service
public static class RefreshQrCodeHandle implements ApplicationListener<WeQrCodeEventQuery>{
@Autowired
private WeQrCodeUpdateTask weQrCodeUpdateTask;
@Async
@Override
public void onApplicationEvent(WeQrCodeEventQuery weQrCodeEventQuery) {
weQrCodeUpdateTask.qrCodeUpdateTask(weQrCodeEventQuery.getQrId());
}
}
}
This diff could not be displayed because it is too large.
......@@ -23,7 +23,7 @@
"style-loader": "^1.2.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^4.1.0",
"vconsole": "^3.4.0",
"vconsole": "^3.11.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "3.11.0",
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
<meta name="viewport"
content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
<title>linke-wechat</title>
</head>
<body>
<div class="container">
<img src='' class='posterImg'/>
<img src='' class='posterImg' />
<div class="footerLink">
<div class="sharePic" >分享图片</div>
<div class="sharePic">分享图片</div>
<div class="myTaskDetail">我的邀请任务进度</div>
</div>
</div>
</body>
</html>
\ No newline at end of file
// import vconsole from 'vconsole'
import vconsole from 'vconsole'
$(function () {
var dpr, rem, scale
var docEl = document.documentElement
......@@ -31,6 +31,5 @@ $(function () {
window.dpr = dpr
window.rem = rem
// var myConsole = new vconsole()
console.log('hello')
new vconsole()
})
......@@ -23,7 +23,7 @@ const request = (url, params, method = 'get') => {
},
error(err) {
// console.log(err.status)
alert(url + err.status)
alert(url + ',错误码:' + err.status)
reject(err)
}
})
......
import config from './contant'
export function getUrlParam (name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
export function getUrlParam(name) {
let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)')
let r = window.location.search.substr(1).match(reg)
if (r != null) {
return unescape(r[2])
}
return null
}
export function getWxCode(){
let appid = "wxa57479bcd3f15461";
let code = getUrlParam("code"); //是否存在code
let local = window.location.origin.includes('localhost')?'http://h5.linkwechat.cn/test.html': window.location.href;
// let local = 'http://h5.x*****o.com/'
if (code == null || code === "") {
//不存在就打开上面的地址进行授权
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
export function getWxCode() {
let appid = 'wx8bfe6bc2ca5c45ae' // 公众号appid
let code = getUrlParam('code') //是否存在code
let local = window.location.origin.includes('localhost')
? 'http://h5.linkwechat.cn/test.html'
: window.location.href
// let local = 'http://h5.x*****o.com/'
if (code == null || code === '') {
//不存在就打开上面的地址进行授权
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(
local
)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
return false
// window.location.href =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`;
}else{
config.code = code
}
}
\ No newline at end of file
return false
// window.location.href =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`;
} else {
config.code = code
}
}
......@@ -93,7 +93,7 @@ export default {
this.listOneArray = []
this.list.forEach((element) => {
element.weTags.forEach((d) => {
this.listOneArray.push(d)
this.listOneArray.push({ tagId: d.tagId, name: d.name })
})
})
})
......@@ -103,7 +103,11 @@ export default {
// this.msgError('请至少选择一个标签')
// return
// }
this.$emit('success', JSON.parse(JSON.stringify(this.selectedList)))
// 统一数据格式
let selected = this.listOneArray.filter((i) =>
this.selectedList.some((e) => e.tagId === i.tagId)
)
this.$emit('success', selected)
this.Pvisible = false
},
onSelectTag(tag) {
......@@ -114,11 +118,8 @@ export default {
this.selectedList.push(tag)
}
},
toJson(data) {
return JSON.stringify(data)
},
setTagSelect(data) {
return this.checkedTagMap.has(data.tagId) || this.checkedTagMap.has(data.tagName)
return this.checkedTagMap.has(data.tagId) || this.checkedTagMap.has(data.name)
}
}
}
......
......@@ -29,12 +29,19 @@ export default {
<template>
<div class="tag-ellipsis">
<template v-for="(item, index) in list">
<el-tag size="medium" v-if="index < limit" :key="index">
{{ item[defaultProps] || item }}
</el-tag>
</template>
<el-tag v-if="list.length && list.length > limit">...</el-tag>
<el-popover placement="bottom" trigger="hover" :disabled="list.length <= +limit">
<div>
<el-tag v-for="(item, unique) in list" :key="unique">
{{ item[defaultProps] || item }}
</el-tag>
</div>
<div slot="reference">
<el-tag v-for="(item, unique) in list.slice(0, +limit)" :key="unique">
{{ item[defaultProps] || item }}
</el-tag>
<el-tag key="a" v-if="list.length > +limit">...</el-tag>
</div>
</el-popover>
</div>
</template>
......
......@@ -20,7 +20,6 @@ import config from '@/config'
import App from './App'
import store from './store'
import router from './router'
import directive from './directive'
import './assets/icons' // icon
import './permission' // permission control
......@@ -37,10 +36,19 @@ import {
} from '@/utils/common'
import Pagination from '@/components/Pagination'
//自定义表格工具扩展
import RightToolbar from '@/components/RightToolbar'
import RightToolbar from '@/components/RightToolbar' //自定义表格工具扩展
import Upload from '@/components/Upload'
import ButtonSync from '@/components/ButtonSync'
import TagEllipsis from '@/components/TagEllipsis'
// 全局组件挂载
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)
Vue.component('Upload', Upload)
Vue.component('ButtonSync', ButtonSync)
Vue.component(TagEllipsis.name, TagEllipsis)
import directive from './directive'
Vue.use(directive)
// 全局方法挂载
Vue.prototype.getDicts = getDicts
......@@ -91,13 +99,6 @@ VueAMap.initAMapApiLoader({
],
v: '1.4.4'
})
// 全局组件挂载
Vue.component('Pagination', Pagination)
Vue.component('RightToolbar', RightToolbar)
Vue.component('Upload', Upload)
Vue.component('ButtonSync', ButtonSync)
Vue.use(directive)
/**
* If you don't want to use mock-server
......
......@@ -289,19 +289,7 @@ export default {
</el-table-column>
<el-table-column label="客户标签" align="center">
<div v-if="row.tagList" slot-scope="{ row }">
<el-popover placement="bottom" trigger="hover" :disabled="row.tagList.length < 3">
<div>
<el-tag v-for="(unit, unique) in row.tagList" :key="unique">
{{ unit.name }}
</el-tag>
</div>
<div slot="reference">
<el-tag v-for="(unit, unique) in row.tagList.slice(0, 2)" :key="unique">
{{ unit.name }}
</el-tag>
<el-tag key="a" v-if="row.tagList.length > 2">...</el-tag>
</div>
</el-popover>
<TagEllipsis :list="row.tagList"></TagEllipsis>
</div>
<span v-else>无标签</span>
......@@ -401,22 +389,14 @@ export default {
<el-table-column label="客户名" align="center" prop="customerName"></el-table-column>
<el-table-column prop="sent" label="送达状态" align="center">
<template #default="{ row }">
<template v-if="row.sent">
已送达
</template>
<template v-else>
未送达
</template>
<template v-if="row.sent"> 已送达 </template>
<template v-else> 未送达 </template>
</template>
</el-table-column>
<el-table-column prop="inGroup" label="是否在群" align="center">
<template #default="{ row }">
<template v-if="row.inGroup">
在群
</template>
<template v-else>
不在群
</template>
<template v-if="row.inGroup"> 在群 </template>
<template v-else> 不在群 </template>
</template>
</el-table-column>
</el-table>
......
......@@ -431,7 +431,7 @@ export default {
<template slot-scope="{ row }">
<div class="cp flex aic" @click="goRoute(row)">
<el-image
style="width: 50px; height: 50px; flex:none;"
style="width: 50px; height: 50px; flex: none"
:src="row.avatar"
fit="fit"
></el-image>
......@@ -447,19 +447,7 @@ export default {
</el-table-column>
<el-table-column prop="tagNames" label="客户标签" align="center" width="220">
<div v-if="row.tagNames" slot-scope="{ row }">
<el-popover placement="bottom" trigger="hover" :disabled="row.tagNames.length < 3">
<div>
<el-tag v-for="(unit, unique) in row.tagNames" :key="unique">
{{ unit }}
</el-tag>
</div>
<div slot="reference">
<el-tag v-for="(unit, unique) in row.tagNames.slice(0, 2)" :key="unique">
{{ unit }}
</el-tag>
<el-tag key="a" v-if="row.tagNames.length > 2">...</el-tag>
</div>
</el-popover>
<TagEllipsis :list="row.tagNames"></TagEllipsis>
</div>
<span v-else>无标签</span>
</el-table-column>
......
......@@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.linkwechat.common.exception.CustomException;
import com.linkwechat.common.utils.DateUtils;
import com.linkwechat.wecom.annotation.SynchRecord;
import com.linkwechat.wecom.constants.SynchRecordConstants;
import com.linkwechat.wecom.domain.WeSynchRecord;
import com.linkwechat.wecom.service.IWeSynchRecordService;
import org.aspectj.lang.JoinPoint;
......@@ -40,6 +41,7 @@ public class SynchRecordAop {
public void doBefore(ProceedingJoinPoint joinPoint) throws Throwable {
SynchRecord annotationLog = getAnnotationLog(joinPoint);
if(null != annotationLog){
List<WeSynchRecord> weSynchRecords = iWeSynchRecordService.list(new LambdaQueryWrapper<WeSynchRecord>()
.eq(WeSynchRecord::getSynchType,annotationLog.synchType())
.between(WeSynchRecord::getSynchTime,DateUtils.getBeforeByHourTime(2)
......
......@@ -40,6 +40,7 @@ public interface WeMediaClient {
/**
* 上传附件资源
* Inputstream 对象
......
......@@ -2,6 +2,7 @@ package com.linkwechat.wecom.client;
import com.dtflys.forest.annotation.*;
import com.linkwechat.wecom.domain.dto.*;
import com.linkwechat.wecom.domain.dto.customer.AllocateGroupDto;
import com.linkwechat.wecom.domain.dto.customer.JobExtendsCustomer;
import com.linkwechat.wecom.interceptor.WeAccessTokenInterceptor;
import com.linkwechat.wecom.interceptor.WeAppAccessTokenInterceptor;
......@@ -13,7 +14,7 @@ import com.linkwechat.wecom.retry.WeCommonRetryWhen;
* @author: HaoN
* @create: 2020-08-27 16:42
**/
@BaseRequest(baseURL = "${weComServerUrl}${weComePrefix}", interceptor = WeAccessTokenInterceptor.class)
@BaseRequest(baseURL = "${weComServerUrl}${weComePrefix}", interceptor = WeCommonAccessTokenInterceptor.class)
@Retry(maxRetryCount = "3", maxRetryInterval = "1000", condition = WeCommonRetryWhen.class)
public interface WeUserClient {
......@@ -73,10 +74,10 @@ public interface WeUserClient {
/**
* 分配客户(离职继承分配客户)
* 离职继承分配客户
* @return
*/
@Request(url="/externalcontact/resigned/transfer_customer", type = "POST")
@Request(url="/externalcontact/resigned/transfer_customer", type = "POST",interceptor = WeAccessTokenInterceptor.class)
WeResultDto allocateCustomer(@JSONBody AllocateWeCustomerDto allocateWeCustomerDto);
......@@ -86,7 +87,7 @@ public interface WeUserClient {
* @param allocateWeCustomerDto
* @return
*/
@Request(url = "/externalcontact/transfer_customer", type = "POST")
@Request(url = "/externalcontact/transfer_customer", type = "POST",interceptor = WeAccessTokenInterceptor.class)
JobExtendsCustomer transferCustomer(@JSONBody AllocateWeCustomerDto allocateWeCustomerDto);
......@@ -95,7 +96,7 @@ public interface WeUserClient {
* @param jobExtendsParam
* @return
*/
@Post(url = "externalcontact/transfer_result")
@Post(url = "externalcontact/transfer_result",interceptor = WeAccessTokenInterceptor.class)
JobExtendsCustomer transferResult(@JSONBody JobExtendsCustomer.JobExtendsParam jobExtendsParam);
......@@ -105,8 +106,8 @@ public interface WeUserClient {
* 分配成员群
* @return
*/
@Request(url="/externalcontact/groupchat/transfer", type = "POST")
WeResultDto allocateGroup(@JSONBody AllocateWeGroupDto allocateWeGroupDto);
@Request(url="/externalcontact/groupchat/transfer", type = "POST",interceptor = WeAccessTokenInterceptor.class)
AllocateGroupDto allocateGroup(@JSONBody AllocateWeGroupDto allocateWeGroupDto);
/**
......@@ -125,4 +126,13 @@ public interface WeUserClient {
*/
@Request(url = "/user/getuserinfo",interceptor = WeAppAccessTokenInterceptor.class)
WeUserInfoDto getUserInfo(@Query("code")String code,@Header("agentId")String agentId);
/**
* 获取离职成员待分配客户
* @param checkParm
* @return
*/
@Post(url = "/externalcontact/get_unassigned_list",interceptor = WeAccessTokenInterceptor.class)
AllocateWeCustomerDto getUnassignedList(@JSONBody AllocateWeCustomerDto.CheckParm checkParm);
}
......@@ -11,4 +11,5 @@ public class SynchRecordConstants {
public static final int SYNCH_CUSTOMER_PERSON_MOMENTS=4;//个人朋友圈
public static final int SYNCH_CUSTOMER_ENTERPRISE_MOMENTS=5;//企业朋友圈
public static final int SYNCH_CUSTOMER_TAG=6;//企业标签同步
public static final int SYNCH_MOMENTS_INTERACTE=7;//同步指定员工个人朋友圈互动情况
}
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
......@@ -24,8 +25,6 @@ public class WeAllocateCustomer
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 接替成员的userid */
private String takeoverUserid;
......
......@@ -25,8 +25,6 @@ public class WeAllocateGroup
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id= SnowFlakeUtil.nextId();
/** 分配的群id */
private String chatId;
......@@ -41,5 +39,11 @@ public class WeAllocateGroup
@JsonFormat(pattern = "yyyy-MM-dd")
private Date allocateTime;
//0:被接替成功 1:待接替 2:接替失败 3:正常状态
private Integer status;
private String errMsg;
}
......@@ -101,6 +101,11 @@ public class WeCustomer extends BaseEntity {
private String takeoverUserId;
private String tagIds;
......
......@@ -122,7 +122,7 @@ public class WeCustomerDetail {
public static class CompanyOrPersonTag{
private String userName;
private String tagsNames;
private String tagNames;
private String tagIds;
......
......@@ -45,7 +45,7 @@ public class WeCustomerList {
//跟进人id
private String firstUserId;
//跟踪状态
//跟踪状态 1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
private Integer trackState;
//添加方式
......@@ -93,8 +93,23 @@ public class WeCustomerList {
private String departmentIds;
private String remark;
private String phone;
private String email;
private String address;
private String qq;
private String position;
private String corpName;
private String otherDescr;
//0正常;1:删除;
private Integer delFlag=new Integer(0);
private Integer delFlag;
}
......@@ -70,4 +70,7 @@ public class WeCustomerPortrait {
//客户类型 1表示该外部联系人是微信用户,2表示该外部联系人是企业微信用户
private Integer customerType;
//跟进动态
private String content;
}
......@@ -5,13 +5,20 @@ import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linkwechat.common.annotation.Excel;
import com.linkwechat.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;
/**
* 客户公海实体
*/
@Data
@TableName("we_customer_seas")
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class WeCustomerSeas extends BaseEntity {
//主键
@TableId
......
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linkwechat.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -11,6 +13,7 @@ import lombok.experimental.SuperBuilder;
import java.sql.Time;
import java.util.Date;
import java.util.List;
/**
* 活动轨迹相关
......@@ -23,24 +26,16 @@ import java.util.Date;
public class WeCustomerTrajectory extends BaseEntity {
@TableId
private String id;
//轨迹类型(1:信息动态;2:社交动态;3:跟进动态;4:待办动态)
private Integer trajectoryType;
//外部联系人id
private String externalUserid;
//文案内容
private String content;
//处理日期
private Date createDate;
//处理开始时间
private String startTime;
//处理结束时间
private String endTime;
@TableField(exist = false)
private String trackContent;
//文案子内容
private String contentSub;
......@@ -51,16 +46,34 @@ public class WeCustomerTrajectory extends BaseEntity {
private String userId;
//当前应用的id
private String agentId;
//1:跟踪中;2:待跟进;3:已拒绝;4:已成交;
//1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
private Integer trackState;
//跟进内容
private String trackContent;
//跟进时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
private Date trackTime;
//是否来自同步:1是;0否
private Boolean isSynch;
//标题
private String title;
@TableField(exist = false)
private String userName;
@TableField(exist = false)
private List<TrajectRel> trajectRelList;
@Data
@Builder
public static class TrajectRel{
private String userId;
private String customerId;
}
}
......@@ -129,6 +129,9 @@ public class WeGroup extends BaseEntity{
@TableField(exist = false)
private Integer toDayMemberNum;
@TableLogic
private Integer delFlag=new Integer(0);
}
......@@ -77,4 +77,14 @@ public class WeGroupMessageTask extends BaseEntity{
@ApiModelProperty("企业服务人员名称")
@TableField(exist = false)
private String userName;
@ApiModelProperty(value = "待发送客户",hidden = true)
@TableField(exist = false)
private String toBeCustomerName;
@ApiModelProperty(value = "已发送客户",hidden = true)
@TableField(exist = false)
private String alreadyCustomerName;
}
......@@ -71,4 +71,23 @@ public class WeGroupMessageTemplate extends BaseEntity {
@ApiModelProperty("状态 -1:失败 0:未执行 1:完成 2:取消")
@Excel(name = "是否执行 -1:失败 0:未执行 1:完成 2:取消")
private Integer status;
/**
* 来源 0 群发 1 其他
*/
@ApiModelProperty("来源 0 群发 1 其他")
private Integer source;
/**
* 业务id
*/
@ApiModelProperty("业务id")
private Long businessId;
/**
* 刷新时间
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("刷新时间")
private Date refreshTime;
}
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linkwechat.common.core.domain.BaseEntity;
import com.linkwechat.common.utils.SnowFlakeUtil;
import io.swagger.annotations.ApiModel;
......@@ -14,6 +15,7 @@ import lombok.Data;
**/
@ApiModel
@Data
@TableName("we_material")
public class WeMaterial extends BaseEntity {
private static final long serialVersionUID = 1L;
......
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.linkwechat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.*;
import lombok.experimental.SuperBuilder;
import java.util.List;
/**
* 海报
*
* @author ws
*/
@EqualsAndHashCode(callSuper = true)
@Data
@TableName(value = "we_poster")
@ApiModel(value = "海报")
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class WePoster extends BaseEntity {
@TableId
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id")
private Long id;
......@@ -53,10 +59,6 @@ public class WePoster extends BaseEntity {
private Long type;
@TableField
@ApiModelProperty(value = "海报状态 0 启用 1 关闭")
private Integer delFlag;
@TableField
@ApiModelProperty(value = "海报背景宽度")
private Integer width;
......@@ -76,11 +78,16 @@ public class WePoster extends BaseEntity {
@ApiModelProperty("其他字段")
private String otherField;
@ApiModelProperty("状态 0-启用 1-不启用")
private Integer status;
@ApiModelProperty(value = "删除状态 0-正常 1-删除")
private Integer delFlag;
/**
* 海报组件数组
*/
@TableField(exist = false)
private List<WePosterSubassembly> posterSubassemblyList;
}
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -22,7 +23,7 @@ public class WePosterFont extends BaseEntity {
/**
* id
*/
@TableId
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id")
private Long id;
......
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
......@@ -19,7 +20,7 @@ import lombok.EqualsAndHashCode;
@ApiModel(value = "海报组成部件")
public class WePosterSubassembly extends BaseEntity {
@TableId
@TableId(type = IdType.AUTO)
@ApiModelProperty(value = "id")
private Long id;
......
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.linkwechat.common.core.domain.BaseEntity;
import com.linkwechat.common.utils.SnowFlakeUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;
import java.util.List;
@ApiModel
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("we_pres_tag_group")
......@@ -19,57 +27,104 @@ public class WePresTagGroupTask extends BaseEntity {
/**
*主键ID
*/
@ApiModelProperty("id")
@TableId
private Long taskId = SnowFlakeUtil.nextId();
/**
* 任务名称
*/
@ApiModelProperty("任务名")
@NotNull(message = "任务名称不能为空")
private String taskName;
/**
* 加群引导语
*/
@ApiModelProperty("加群引导语")
@Size(max = 64, message = "引导与不能超过64字符")
@NotBlank(message = "引导语不能为空")
private String welcomeMsg;
/**
* 发送方式 0: 企业群发 1:个人群发
*/
@ApiModelProperty("加群引导语")
@NotNull(message = "发送方式不能为空")
private Integer sendType;
/**
* 群活码id
*/
@ApiModelProperty("群活码id")
@NotNull(message = "活码不能为空")
private Long groupCodeId;
/**
* 发送范围 0: 全部客户 1:部分客户
*/
@ApiModelProperty("发送范围 0: 全部客户 1:部分客户")
private Integer sendScope;
/**
* 发送性别 0: 全部 1: 男 2: 女 3:未知
*/
@ApiModelProperty("发送性别 0: 全部 1: 男 2: 女 3:未知")
private Integer sendGender;
/**
* 目标客户被添加起始时间
*/
private String cusBeginTime;
@ApiModelProperty("目标客户被添加起始时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Date cusBeginTime;
/**
* 目标客户被添加结束时间
*/
private String cusEndTime;
@ApiModelProperty("目标客户被添加结束时间")
@JsonFormat(pattern = "yyyy-MM-dd")
@TableField(updateStrategy = FieldStrategy.IGNORED)
private Date cusEndTime;
/**
* 企业群发消息的id
* 群发消息id
*/
private String msgid;
@ApiModelProperty(value = "目标客户被添加结束时间", hidden = true)
private Long messageTemplateId;
/**
* 逻辑删除字段
*/
@TableLogic(value = "0", delval = "1")
private Integer delFlag;
@ApiModelProperty(value = "逻辑删除字段", hidden = true)
private Integer delFlag = 0;
/**
* 客户标签
*/
@ApiModelProperty("客户标签id列表")
@TableField(exist = false)
private List<String> tagList;
/**
* 选择员工
*/
@ApiModelProperty("员工id列表")
@TableField(exist = false)
private List<String> scopeList;
/**
* 群活码链接
*/
@ApiModelProperty("群活码链接")
@TableField(exist = false)
private String codeUrl;
/**
* 当前群总人数
*/
@ApiModelProperty("当前群总人数")
@TableField(exist = false)
private Integer totalNumber;
}
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.linkwechat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* 老客户标签建群任务使用人对象
*/
@ApiModel("老客户标签建群跟进者")
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("we_pres_tag_group_scope")
public class WePresTagGroupTaskScope {
public class WePresTagGroupTaskScope extends BaseEntity {
private static final long serialVersionUID = 86648978618184060L;
/**
* 老客户标签建群任务id
*/
@ApiModelProperty("老客户标签建群任务id")
private Long taskId;
/**
* 任务目标员工id
*/
@ApiModelProperty("任务目标员工id")
private String weUserId;
/**
* 是否已处理
*/
private boolean isDone;
@ApiModelProperty(value = "有效标识", hidden = true)
@JsonIgnore
private Integer delFlag = 0;
}
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.linkwechat.common.core.domain.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.NoArgsConstructor;
/**
* 老客户标签建群客户统计
* 老客户标签建群客户统计(用于个人群发类型的统计)
*/
@ApiModel("老客标签建群发送统计对象")
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@TableName("we_pres_tag_group_stat")
public class WePresTagGroupTaskStat extends BaseEntity {
private static final long serialVersionUID = 504772877084507165L;
/**
* 老客户标签建群任务id
*/
@ApiModelProperty("老客户标签建群任务id")
private Long taskId;
/**
* 客户id
* 客户名称
*/
@ApiModelProperty("客户名称")
@TableField(exist = false)
private String customerName;
/**
* 跟进者id
*/
@ApiModelProperty("跟进者")
private String userId;
/**
* 客户external_id
*/
@ApiModelProperty("老客户标签建群任务id")
@TableField(value = "external_userid")
private String externalUserId;
/**
* 是否已送达
*/
private boolean isSent;
@ApiModelProperty("老客户标签建群任务id")
private Integer sent = 0;
/**
* 是否已经在群
*/
private boolean isInGroup;
@ApiModelProperty("老客户标签建群任务id")
@TableField(exist = false)
private Integer inGroup = 0;
@ApiModelProperty(value = "有效标识", hidden = true)
@JsonIgnore
private Integer delFlag = 0;
}
package com.linkwechat.wecom.domain;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.linkwechat.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
/**
* 老客标签建群任务标签关联对象
*/
@ApiModel("老客标签建群标签")
@EqualsAndHashCode(callSuper = true)
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("we_pres_tag_group_tag")
public class WePresTagGroupTaskTag {
public class WePresTagGroupTaskTag extends BaseEntity {
private static final long serialVersionUID = 4859443233276436220L;
/**
* 老客建群任务id
*/
@ApiModelProperty("老客建群任务id")
private Long taskId;
/**
* 标签id
*/
@ApiModelProperty("标签id")
private String tagId;
/**
* 有效标识
*/
@ApiModelProperty("有效标识")
@JsonIgnore
private Integer delFlag = 0;
}
......@@ -16,6 +16,7 @@ import java.util.List;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import lombok.Builder;
import lombok.Data;
/**
......
......@@ -46,6 +46,9 @@ public class WeTag implements Serializable
private Integer tagType;
/**所属人*/
private String owner;
......
......@@ -58,8 +58,7 @@ public class WeTagGroup extends BaseEntity
private Integer groupTagType;
/**所属人*/
private String owner;
......
......@@ -161,7 +161,7 @@ public class WeTaskFission extends BaseEntity {
* 任务裂变活动状态,1 进行中 2 已结束
*/
@Excel(name = "任务裂变活动状态,1 进行中 2 已结束")
@ApiModelProperty(value = "任务裂变活动状态,1 进行中 2 已结束")
@ApiModelProperty(value = "任务裂变活动状态,-1-发送失败 0-待发送 1-进行中 2-已结束")
private Integer fissStatus;
/**
......
......@@ -6,6 +6,8 @@ import lombok.experimental.SuperBuilder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @description: 分配客户
* @author: HaoN
......@@ -15,7 +17,7 @@ import lombok.NoArgsConstructor;
@SuperBuilder
@AllArgsConstructor
@NoArgsConstructor
public class AllocateWeCustomerDto{
public class AllocateWeCustomerDto extends WeResultDto{
/**外部联系人的userid,注意不是企业成员的帐号*/
private String handover_userid;
......@@ -31,4 +33,38 @@ public class AllocateWeCustomerDto{
private List<Info> info;
//是否是最后一条记录
private Boolean is_last;
private String next_cursor;
@Data
@Builder
public static class CheckParm{
private Integer page_id;
private Integer page_size;
private String cursor;
}
@Data
public static class Info{
//离职成员的userid
private String handover_userid;
//外部联系人userid
private String external_userid;
//成员离职时间
private Long dimission_time;
}
}
package com.linkwechat.wecom.domain.dto.customer;
import com.linkwechat.wecom.domain.dto.WeResultDto;
import lombok.Data;
import java.util.List;
@Data
public class AllocateGroupDto extends WeResultDto {
private List<FailedChatList> failed_chat_list;
@Data
public static class FailedChatList{
private String chat_id;
private Integer errcode;
private String errmsg;
}
}
......@@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.linkwechat.wecom.domain.dto.WeResultDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;
......@@ -53,11 +55,13 @@ public class CustomerGroupDetail extends WeResultDto {
*/
@AllArgsConstructor
@Data
public class Params{
@Builder
@NoArgsConstructor
public static class Params{
private String chat_id;
//是否需要返回群成员的名字group_chat.member_list.name。0-不返回;1-返回。默认不返回
private Integer need_name;
}
......
package com.linkwechat.wecom.domain.dto.customer;
import com.linkwechat.wecom.domain.dto.WeResultDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;
......@@ -19,12 +22,17 @@ public class CustomerGroupList extends WeResultDto {
*/
private List<GroupChat> groupChatList;
private String next_cursor;
/**
* 请求参数
*/
@Data
public class Params{
@Builder
@AllArgsConstructor
@NoArgsConstructor
public static class Params{
/**群状态过滤: 0 - 所有列表;1 - 离职待继承;2 - 离职继承中;3 - 离职继承完成; */
......@@ -36,6 +44,10 @@ public class CustomerGroupList extends WeResultDto {
/**分页,预期请求的数据量,取值范围 1 ~ 1000 */
private Integer limit=new Integer(1000);
private String cursor;
private String owner_filter;
}
......
......@@ -93,6 +93,8 @@ public class ExternalUserDetail extends WeResultDto {
private String oper_userid;
/**标签**/
private String[] tag_id;
/** 企业自定义的state参数,用于区分客户具体是通过哪个「联系我」添加,由企业通过创建「联系我」方式指定 */
private String state;
}
}
......@@ -19,7 +19,7 @@ import java.util.List;
public class WeAddGroupMessageQuery extends WeGroupMessageTemplate {
@ApiModelProperty("是否全部发送")
private Boolean isAll;
private Boolean isAll=true;
/**
* 指定接收消息的成员及对应客户列表
*/
......
......@@ -71,6 +71,10 @@ public class WeAddMsgTemplateQuery {
} else if (ObjectUtil.equal(MessageType.FILE.getMessageType(), messageTemplate.getMsgType())) {
Attachments files = new Files(messageTemplate.getMsgType(), messageTemplate.getMediaId());
attachments.add(files);
}else if (ObjectUtil.equal(MessageType.TEXT.getMessageType(), messageTemplate.getMsgType())) {
Text text = new Text();
text.setContent(messageTemplate.getContent());
this.text = text;
}
});
}
......
package com.linkwechat.wecom.domain.query;
import org.springframework.context.ApplicationEvent;
/**
* @author danmo
* @description
* @date 2021/11/21 19:52
**/
public class WeTaskEventQuery extends ApplicationEvent {
private Long businessId;
private Integer taskSource;
private Integer resultCode;
public WeTaskEventQuery(Object source, Long businessId, Integer taskSource, Integer resultCode) {
super(source);
this.businessId = businessId;
this.taskSource = taskSource;
this.resultCode = resultCode;
}
public Long getBusinessId() {
return businessId;
}
public void setBusinessId(Long businessId) {
this.businessId = businessId;
}
public Integer getTaskSource() {
return taskSource;
}
public void setTaskSource(Integer taskSource) {
this.taskSource = taskSource;
}
public Integer getResultCode() {
return resultCode;
}
public void setResultCode(Integer resultCode) {
this.resultCode = resultCode;
}
}
package com.linkwechat.wecom.domain.query.qr;
import org.springframework.context.ApplicationEvent;
/**
* @author danmo
* @description
* @date 2021/11/21 19:52
**/
public class WeQrCodeEventQuery extends ApplicationEvent {
private String qrId;
public WeQrCodeEventQuery(Object source, String qrId) {
super(source);
this.qrId = qrId;
}
public String getQrId() {
return qrId;
}
public void setQrId(String qrId) {
this.qrId = qrId;
}
}
package com.linkwechat.wecom.domain.vo;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
@Data
public class SenderInfo implements Serializable {
private static final long serialVersionUID = 3912731370147355807L;
/**
* 跟进员工user_id
*/
private String userId;
/**
* 客户external_userid
*/
private String customerList;
}
......@@ -28,4 +28,9 @@ public class WeAllocateCustomersVo extends BaseEntity {
/**原拥有着*/
private String handoverUserId;
private String externalUserid;
private String userId;
}
package com.linkwechat.wecom.domain.vo;
import com.linkwechat.wecom.domain.vo.tag.WeTagVo;
import lombok.Data;
import java.util.List;
/**
* 社区运营 新客自动拉群
*/
@Data
public class WeCommunityWeComeMsgVo {
private Long id;
/**
* 群活码路径
*/
private String codeUrl;
/**
* 欢迎语
*/
private String welcomeMsg;
/**
* 客户标签列表
*/
private List<WeTagVo> tagList;
}
......@@ -28,6 +28,10 @@ public class WeGroupMessageDetailVo {
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date sendTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@ApiModelProperty("刷新时间")
private Date refreshTime;
@ApiModelProperty("附件")
private List<WeGroupMessageAttachments> attachments;
......
package com.linkwechat.wecom.domain.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
@ApiModel("老客标签建群列表接口简略信息")
@Data
public class WePresTagTaskListVO implements Serializable {
private static final long serialVersionUID = -2266869943970611146L;
@ApiModelProperty("任务id")
private Long taskId;
@ApiModelProperty("任务名")
private String taskName;
@ApiModelProperty("标签名列表")
private List<String> tagList;
@ApiModelProperty("发送类型 0: 企业群发 1: 个人群发")
private Integer sendType;
// @ApiModelProperty("群活码id")
// private String codeId;
//
// @ApiModelProperty("群活码URL")
// private String codeUrl;
@ApiModelProperty("当前群人数")
private Integer totalMember;
@ApiModelProperty("创建时间")
@JsonFormat(pattern = "yyyy-MM-dd")
private Date createTime;
@ApiModelProperty("创建者")
@JsonFormat(pattern = "yyyy-MM-dd")
private String createBy;
@JsonIgnore
private String tagListStr;
}
package com.linkwechat.wecom.factory.impl.customer;
import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.linkwechat.common.constant.WeConstans;
import com.linkwechat.common.core.domain.entity.WeCorpAccount;
import com.linkwechat.common.enums.MessageType;
import com.linkwechat.common.enums.TrackState;
import com.linkwechat.common.enums.TrajectorySceneType;
import com.linkwechat.common.enums.TrajectoryType;
import com.linkwechat.wecom.domain.*;
import com.linkwechat.wecom.domain.callback.WeBackBaseVo;
import com.linkwechat.wecom.domain.callback.WeBackCustomerVo;
import com.linkwechat.wecom.client.WeMessagePushClient;
import com.linkwechat.wecom.domain.WeCustomer;
import com.linkwechat.wecom.domain.WeSensitiveAct;
import com.linkwechat.wecom.domain.WeSensitiveActHit;
import com.linkwechat.wecom.domain.WeUser;
import com.linkwechat.wecom.domain.dto.WeMessagePushDto;
import com.linkwechat.wecom.domain.dto.message.TextMessageDto;
import com.linkwechat.wecom.factory.WeEventStrategy;
import com.linkwechat.wecom.service.IWeCorpAccountService;
import com.linkwechat.wecom.service.IWeCustomerService;
import com.linkwechat.wecom.service.IWeSensitiveActHitService;
import com.linkwechat.wecom.service.IWeUserService;
import com.linkwechat.wecom.service.*;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
......@@ -45,6 +43,9 @@ public class WeCallBackDelFollowUserImpl extends WeEventStrategy {
@Autowired
private IWeUserService weUserService;
@Autowired
private IWeCustomerTrajectoryService iWeCustomerTrajectoryService;
@Override
public void eventHandle(WeBackBaseVo message) {
WeBackCustomerVo customerInfo = (WeBackCustomerVo) message;
......@@ -57,30 +58,48 @@ public class WeCallBackDelFollowUserImpl extends WeEventStrategy {
}
WeCustomer customer = new WeCustomer();
customer.setDelFlag(1);
weCustomerService.update(customer,new LambdaQueryWrapper<WeCustomer>().eq(WeCustomer::getFirstUserId,customerInfo.getUserID())
.eq(WeCustomer::getExternalUserid,customerInfo.getExternalUserID()).eq(WeCustomer::getDelFlag,0));
WeCorpAccount validWeCorpAccount = weCorpAccountService.findValidWeCorpAccount();
Optional.ofNullable(validWeCorpAccount).ifPresent(weCorpAccount -> {
String customerChurnNoticeSwitch = weCorpAccount.getCustomerChurnNoticeSwitch();
if (WeConstans.DEL_FOLLOW_USER_SWITCH_OPEN.equals(customerChurnNoticeSwitch)) {
String content = "您已经被客户@" + weCustomer.getCustomerName() + "删除!";
TextMessageDto textMessageDto = new TextMessageDto();
textMessageDto.setContent(content);
WeMessagePushDto weMessagePushDto = new WeMessagePushDto();
weMessagePushDto.setMsgtype(MessageType.TEXT.getMessageType());
weMessagePushDto.setTouser(customerInfo.getUserID());
weMessagePushDto.setText(textMessageDto);
Optional.ofNullable(validWeCorpAccount).map(WeCorpAccount::getAgentId).ifPresent(agentId -> {
weMessagePushDto.setAgentid(Integer.valueOf(agentId));
});
weMessagePushClient.sendMessageToUser(weMessagePushDto,weMessagePushDto.getAgentid().toString());
}
});
extracted(message, customerInfo, weCustomer);
customer.setTrackState(TrackState.STATE_YLS.getType());
if(weCustomerService.update(customer,new LambdaQueryWrapper<WeCustomer>().eq(WeCustomer::getFirstUserId,customerInfo.getUserID())
.eq(WeCustomer::getExternalUserid,customerInfo.getExternalUserID()).eq(WeCustomer::getDelFlag,0))){
//添加跟进动态
iWeCustomerTrajectoryService.createTrajectory( ListUtil.toList(WeCustomerTrajectory.TrajectRel.builder()
.customerId(weCustomer.getExternalUserid())
.userId(weCustomer.getFirstUserId())
.build()), TrajectoryType.TRAJECTORY_TYPE_XXDT.getType(), TrajectorySceneType.TRAJECTORY_TITLE_SCYG.getType(),null,
null
);
WeCorpAccount validWeCorpAccount = weCorpAccountService.findValidWeCorpAccount();
Optional.ofNullable(validWeCorpAccount).ifPresent(weCorpAccount -> {
String customerChurnNoticeSwitch = weCorpAccount.getCustomerChurnNoticeSwitch();
if (WeConstans.DEL_FOLLOW_USER_SWITCH_OPEN.equals(customerChurnNoticeSwitch)) {
String content = "您已经被客户@" + weCustomer.getCustomerName() + "删除!";
TextMessageDto textMessageDto = new TextMessageDto();
textMessageDto.setContent(content);
WeMessagePushDto weMessagePushDto = new WeMessagePushDto();
weMessagePushDto.setMsgtype(MessageType.TEXT.getMessageType());
weMessagePushDto.setTouser(customerInfo.getUserID());
weMessagePushDto.setText(textMessageDto);
Optional.ofNullable(validWeCorpAccount).map(WeCorpAccount::getAgentId).ifPresent(agentId -> {
weMessagePushDto.setAgentid(Integer.valueOf(agentId));
});
weMessagePushClient.sendMessageToUser(weMessagePushDto,weMessagePushDto.getAgentid().toString());
}
});
extracted(message, customerInfo, weCustomer);
}
}
} catch (Exception e) {
log.error("删除跟进成员事件>>>>>>>>>>>>>param:{},ex:{}", JSONObject.toJSONString(message), e);
......
......@@ -41,19 +41,22 @@ public class WeCallBackUpdateGroupImpl extends WeEventStrategy {
@Autowired
private IWeGroupMemberService groupMemberService;
@Override
public void eventHandle(WeBackBaseVo message) {
WeBackCustomerGroupVo customerGroupInfo = (WeBackCustomerGroupVo) message;
try {
weGroupService.updateWeGroup(customerGroupInfo.getChatId());
String updateDetail = customerGroupInfo.getUpdateDetail();
if (updateDetail.equals(CallbackEventUpdateDetail.ADD_MEMBER.getType())) {
if (updateDetail.equals(CallbackEventUpdateDetail.ADD_MEMBER.getType())) { //成员入群
// 添加成员,该群的实际群活码扫码次数需要加1
groupCodeActualService.updateScanTimesByChatId(customerGroupInfo.getChatId());
ThreadUtil.execAsync(() ->{
groupFissionEnterCheck(customerGroupInfo.getChatId());
});
}
} catch (Exception e) {
e.printStackTrace();
log.error("update>>>>>>>>>param:{},ex:{}",customerGroupInfo.getChatId(),e);
......
......@@ -11,6 +11,7 @@ import com.dtflys.forest.http.ForestResponse;
import com.dtflys.forest.interceptor.Interceptor;
import com.linkwechat.common.config.WeComeConfig;
import com.linkwechat.common.enums.WeErrorCodeEnum;
import com.linkwechat.common.exception.wecom.WeComException;
import com.linkwechat.common.utils.StringUtils;
import com.linkwechat.wecom.domain.dto.WeResultDto;
import com.linkwechat.wecom.service.IWeAccessTokenService;
......@@ -75,10 +76,10 @@ public class WeAccessTokenInterceptor implements Interceptor<WeResultDto> {
@Override
public void onSuccess(WeResultDto resultDto, ForestRequest forestRequest, ForestResponse forestResponse) {
log.info("url:{},result:{}", forestRequest.getUrl(), forestResponse.getContent());
/*if (null != resultDto.getErrcode() && !ObjectUtil.equal(WeErrorCodeEnum.ERROR_CODE_0.getErrorCode(), resultDto.getErrcode())
if (null != resultDto.getErrcode() && !ObjectUtil.equal(WeErrorCodeEnum.ERROR_CODE_0.getErrorCode(), resultDto.getErrcode())
&& !weComeConfig.getWeNeedRetryErrorCodes().contains(resultDto.getErrcode())) {
throw new ForestRuntimeException(WeErrorCodeEnum.parseEnum(resultDto.getErrcode()).getErrorMsg());
}*/
throw new WeComException(WeErrorCodeEnum.parseEnum(resultDto.getErrcode()).getErrorMsg());
}
}
/**
......
......@@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
/**
* @description: 微信token拦截器(外部联系人)
* @description: 微信token拦截器(通讯录,等相关常用的)
* @author: HaoN
* @create: 2020-08-27 22:36
**/
......
......@@ -2,6 +2,9 @@ package com.linkwechat.wecom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WeAllocateCustomer;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 离职分配的客户列Mapper接口
......@@ -12,4 +15,5 @@ import com.linkwechat.wecom.domain.WeAllocateCustomer;
public interface WeAllocateCustomerMapper extends BaseMapper<WeAllocateCustomer>
{
void batchAddOrUpdate(@Param("weAllocateCustomers") List<WeAllocateCustomer> weAllocateCustomer);
}
......@@ -2,6 +2,9 @@ package com.linkwechat.wecom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WeAllocateGroup;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 分配的群租Mapper接口
......@@ -11,5 +14,5 @@ import com.linkwechat.wecom.domain.WeAllocateGroup;
*/
public interface WeAllocateGroupMapper extends BaseMapper<WeAllocateGroup>
{
void batchAddOrUpdate(@Param("weAllocateGroupList") List<WeAllocateGroup> weAllocateGroupList);
}
......@@ -3,6 +3,7 @@ package com.linkwechat.wecom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WeCommunityNewGroup;
import com.linkwechat.wecom.domain.vo.WeCommunityNewGroupVo;
import com.linkwechat.wecom.domain.vo.WeCommunityWeComeMsgVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
......@@ -22,10 +23,10 @@ public interface WeCommunityNewGroupMapper extends BaseMapper<WeCommunityNewGrou
/**
* 查询新客自动拉群列表
*
* @param emplCodeName 员工名称
* @param createBy 创建人
* @param beginTime 开始时间
* @param endTime 结束时间
* @param /emplCodeName 员工名称
* @param /createBy 创建人
* @param /beginTime 开始时间
* @param /endTime 结束时间
* @return {WeCommunityNewGroupVo}s 列表
*/
// List<WeCommunityNewGroupVo> selectWeCommunityNewGroupList(@Param("emplCodeName") String emplCodeName, @Param("createBy") String createBy
......@@ -61,4 +62,6 @@ public interface WeCommunityNewGroupMapper extends BaseMapper<WeCommunityNewGrou
* @return 结果
*/
int removeWeCommunityNewGroupByEmplCodeId(@Param("emplCodeId") Long emplCodeId);
WeCommunityWeComeMsgVo getWelcomeMsgByState(@Param("state") String state);
}
......@@ -3,6 +3,7 @@ package com.linkwechat.wecom.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.common.core.page.PageDomain;
import com.linkwechat.wecom.domain.*;
import com.linkwechat.wecom.domain.vo.CusertomerBelongUserInfo;
import org.apache.ibatis.annotations.Param;
......@@ -22,10 +23,17 @@ public interface WeCustomerMapper extends BaseMapper<WeCustomer>
* @param weCustomerList
* @return
*/
List<WeCustomerList> findWeCustomerList(@Param("weCustomerList") WeCustomerList weCustomerList);
List<WeCustomerList> findWeCustomerList(@Param("weCustomerList") WeCustomerList weCustomerList,@Param("pageDomain") PageDomain pageDomain);
/**
* 客户总数统计
* @param weCustomerList
* @return
*/
long countWeCustomerList(@Param("weCustomerList") WeCustomerList weCustomerList);
/**
* 获取客户所在群
* @param userId
* @return
......@@ -77,4 +85,7 @@ public interface WeCustomerMapper extends BaseMapper<WeCustomer>
long noRepeatCountCustomer(@Param("weCustomerList") WeCustomerList weCustomerList);
}
......@@ -2,8 +2,16 @@ package com.linkwechat.wecom.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WeCustomerTrajectory;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface WeCustomerTrajectoryMapper extends BaseMapper<WeCustomerTrajectory> {
void deleteSynchTrajectory();
List<WeCustomerTrajectory> followUpRecord(@Param("externalUserid") String externalUserid,
@Param("userId") String userId,@Param("trajectoryType") Integer trajectoryType);
}
......@@ -13,5 +13,5 @@ import java.util.List;
* @author ws
*/
public interface WePosterMapper extends BaseMapper<WePoster> {
List<WeMaterial> findWePosterToWeMaterial(@Param("categoryId") String categoryId,@Param("name") String name);
List<WeMaterial> findWePosterToWeMaterial(@Param("categoryId") String categoryId,@Param("name") String name,@Param("status") Integer status);
}
package com.linkwechat.wecom.mapper;
import com.linkwechat.wecom.domain.WeCustomer;
import com.linkwechat.wecom.domain.vo.SenderInfo;
import com.linkwechat.wecom.domain.vo.WePresTagGroupTaskVo;
import com.linkwechat.wecom.domain.vo.WePresTagTaskListVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.linkwechat.wecom.domain.WePresTagGroupTask;
import org.springframework.security.core.parameters.P;
import java.util.List;
......@@ -16,19 +18,22 @@ import java.util.List;
public interface WePresTagGroupTaskMapper extends BaseMapper<WePresTagGroupTask> {
/**
* 添加新任务
* @param task 老客标签建群任务
* 根据条件查询老客标签建群任务
*
* @param taskName 任务名称
* @param createBy 创建人
* @param beginTime 开始时间
* @param endTime 结束时间
* @param sendType 发送方式
* @return 结果
*/
int insertTask(WePresTagGroupTask task);
List<WePresTagTaskListVO> selectListVO(@Param("taskName") String taskName,
@Param("sendType") Integer sendType,
@Param("createBy") String createBy,
@Param("beginTime") String beginTime,
@Param("endTime") String endTime);
/**
* 更新任务
* @param task 建群任务信息
* @return 结果
*/
int updateTask(WePresTagGroupTask task);
/**
* 获取老客户标签建群任务
*
* @param taskId 任务id
......@@ -36,46 +41,54 @@ public interface WePresTagGroupTaskMapper extends BaseMapper<WePresTagGroupTask>
*/
WePresTagGroupTaskVo selectTaskById(Long taskId);
/**
* 根据条件查询老客标签建群任务
* 获取某员工的任务
*
* @param taskName 任务名称
* @param createBy 创建人
* @param beginTime 开始时间
* @param endTime 结束时间
* @param sendType 发送方式
* @param followerId 员工id
* @param isDone 已完成的还是待处理
* @return 结果
*/
List<WePresTagGroupTaskVo> selectTaskList(
@Param("taskName") String taskName,
@Param("sendType") Integer sendType,
@Param("createBy") String createBy,
@Param("beginTime") String beginTime,
@Param("endTime") String endTime
);
List<WePresTagGroupTaskVo> getTaskListByFollowerId(@Param("followerId") String followerId, @Param("isDone") Integer isDone);
/**
* 获取某员工的任务
* 获取指定条件的外部联系人id,且需要排除已经在群的客户
*
* @param emplId 员工id
* @param isDone 已完成的还是待处理
* @return 结果
* @param taskId 标签建群任务id
* @return 客户的external_userids字段值数组
*/
List<WePresTagGroupTaskVo> getTaskListByEmplId(@Param("emplId") String emplId, @Param("isDone") boolean isDone);
List<WeCustomer> selectTaskExternalIds(@Param("taskId") Long taskId);
/**
* 根据task获取员工信息
* @param task
* @return
* 获取指定条件的外部联系人id,且需要排除已经在群的客户
*
* @param taskId 标签建群任务id
* @return 客户的external_userids字段值数组
*/
List<SenderInfo> selectSenderInfo(@Param("taskId") Long taskId);
/**
* 获取指定条件的员工id
*
* @param taskId 标签建群任务id
* @return 获取目标客户对应员工的id数组
*/
List<String> selectStaffList(WePresTagGroupTask task);
List<String> selectTaskFollowerIds(@Param("taskId") Long taskId);
List<String> selectExternalUserIds(
@Param("taskId") Long taskId,
@Param("hasScope") boolean hasScope,
@Param("hasTag") boolean hasTag,
@Param("gender") Integer gender,
@Param("beginTime") String beginTime,
@Param("endTime") String endTime
);
/**
* 根据任务id和员工id获取客户的external_id
*
* @param taskId 任务id
* @param followerId 跟进者user_id字段
* @return 客户external_id列表
*/
List<String> selectTaskExternalByFollowerId(@Param("taskId") Long taskId, @Param("followerId") String followerId);
/**
* 通过taskId获取所有对应群聊的客户的external_id, 用于个人群发的统计
*
* @param taskId 老客标签建群任务id
* @return 结果
*/
List<String> getGroupMemberExternalIdsByTaskId(Long taskId);
}
......@@ -28,12 +28,4 @@ public interface WePresTagGroupTaskScopeMapper extends BaseMapper<WePresTagGroup
*/
int batchBindsTaskScopes(List<WePresTagGroupTaskScope> taskScopeList);
/**
* 员工发送信息后,变更其任务状态为 "完成"
*
* @param taskId 任务id
* @param emplId 员工id
* @return 结果
*/
int updateEmplTaskStatus(@Param("taskId") Long taskId, @Param("emplId") String emplId);
}
......@@ -11,22 +11,21 @@ import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface WePresTagGroupTaskStatMapper extends BaseMapper<WePresTagGroupTaskStat> {
int batchSave(List<WePresTagGroupTaskStat> stats);
/**
* 根据 老客标签建群任务id及附属相关属性条件获取任务对应的客户统计
*
* @param taskId 任务id
* @return 客户统计列表
* 获取老客标签建群任务的消息发送结果
* @param stat 过滤条件
* @return 发送结果列表
*/
List<WePresTagGroupTaskStatVo> selectStatInfoByTaskId(@Param("taskId") Long taskId);
List<WePresTagGroupTaskStat> cropSendResultList(WePresTagGroupTaskStat stat);
/**
* 通过taskId获取所有外部联系人id
*
* @param taskId 老客标签建群任务id
* @return 结果
* 获取老客标签建群任务的消息发送结果
* @param stat 过滤条件
* @return 发送结果列表
*/
List<String> getAllExternalIdByTaskId(Long taskId);
List<WePresTagGroupTaskStat> singleSendResultList(WePresTagGroupTaskStat stat);
}
......@@ -24,6 +24,6 @@ public interface WeQrScopeMapper extends BaseMapper<WeQrScope> {
List<WeQrScopeVo> getWeQrScopeByQrIds(@Param("qrIds") List<Long> qrIds);
List<WeQrScopeVo> getWeQrScopeByTime(@Param("formatTime") String formatTime);
List<WeQrScopeVo> getWeQrScopeByTime(@Param("formatTime") String formatTime,@Param("qrId") String qrId);
}
......@@ -2,6 +2,7 @@ package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeAllocateCustomer;
import java.util.List;
/**
* 离职分配的客户列Service接口
......@@ -11,5 +12,5 @@ import com.linkwechat.wecom.domain.WeAllocateCustomer;
*/
public interface IWeAllocateCustomerService extends IService<WeAllocateCustomer>
{
void batchAddOrUpdate(List<WeAllocateCustomer> weAllocateCustomer);
}
......@@ -2,6 +2,9 @@ package com.linkwechat.wecom.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeAllocateGroup;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 分配的群租Service接口
......@@ -11,5 +14,5 @@ import com.linkwechat.wecom.domain.WeAllocateGroup;
*/
public interface IWeAllocateGroupService extends IService<WeAllocateGroup>
{
void batchAddOrUpdate(List<WeAllocateGroup> weAllocateGroupList);
}
......@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.extension.service.IService;
import com.linkwechat.wecom.domain.WeCommunityNewGroup;
import com.linkwechat.wecom.domain.dto.WeCommunityNewGroupDto;
import com.linkwechat.wecom.domain.vo.WeCommunityNewGroupVo;
import com.linkwechat.wecom.domain.vo.WeCommunityWeComeMsgVo;
import java.util.List;
import java.util.Optional;
......@@ -73,4 +74,5 @@ public interface IWeCommunityNewGroupService extends IService<WeCommunityNewGrou
*/
List<WeCommunityNewGroupVo> selectWeCommunityNewGroupByIds(List<Long> ids);
WeCommunityWeComeMsgVo getWelcomeMsgByState(String state);
}
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!