Skip to content

Commit

Permalink
Merge branch 'gitee-master' into github-master
Browse files Browse the repository at this point in the history
  • Loading branch information
HaoNanSheng committed Feb 17, 2023
2 parents 5208f34 + 6888d96 commit 1e1e49a
Show file tree
Hide file tree
Showing 13 changed files with 308 additions and 40 deletions.
Binary file modified config/lw_nacos_config.zip
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.common.exception.CustomException;
import com.linkwechat.domain.WeCustomer;
import com.linkwechat.domain.customer.WeBacthMakeCustomerTag;
import com.linkwechat.domain.customer.WeMakeCustomerTag;
import com.linkwechat.domain.customer.query.WeCustomersQuery;
import com.linkwechat.domain.customer.query.WeOnTheJobCustomerQuery;
Expand Down Expand Up @@ -257,6 +258,20 @@ public AjaxResult checkByCondition(@RequestBody WeCustomersQuery query){
return AjaxResult.success(result);
}

/**
* 批量添加或删除客户标签
* @param makeCustomerTags
* @return
*/
@Log(title = "批量添加或删除客户标签", businessType = BusinessType.UPDATE)
@PostMapping("/batchMakeLabel")
public AjaxResult batchMakeLabel(@RequestBody WeBacthMakeCustomerTag makeCustomerTags){

weCustomerService.batchMakeLabel(makeCustomerTags);

return AjaxResult.success();
}




Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.common.exception.CustomException;
import com.linkwechat.common.exception.wecom.WeComException;
import com.linkwechat.common.utils.StringUtils;
import com.linkwechat.common.utils.file.FileUtils;
import com.linkwechat.domain.qr.query.WeQrAddQuery;
Expand All @@ -26,10 +27,7 @@
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;

/**
Expand Down Expand Up @@ -58,6 +56,9 @@ public AjaxResult addQrCode(@RequestBody @Validated WeQrAddQuery weQrAddQuery) {
@Log(title = "活码管理", businessType = BusinessType.UPDATE)
@PutMapping("/update")
public AjaxResult updateQrCode(@RequestBody @Validated WeQrAddQuery weQrAddQuery) {
if(Objects.isNull(weQrAddQuery.getQrId())){
throw new WeComException("活码ID不能为空!");
}
weQrCodeService.updateQrCode(weQrAddQuery);
return AjaxResult.success();
}
Expand Down
2 changes: 2 additions & 0 deletions linkwe-api/src/main/resources/templates/jump.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,10 @@
// "type":"0-文章 1-公众号二维码 2-个人二维码 3-群二维码 4-员工活码 5-客群活码 6-门店导购活码 7-个人小程序 8-门店群活码 9-企业小程序 10-小程序二维码"
if (window.data.errorMsg) {
alert('发生错误:' + window.data.errorMsg)
return
} else if (window.data.type == 0) {
location.href = (window.data.linkPath)
return
}

if (isWeixin) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,16 @@ public Queue quQrCodeChange() {
return new Queue(rabbitMQSettingConfig.getWeQrCodeChangeQu());
}

/**
* 活码删除队列
*
* @return
*/
@Bean
public Queue quQrCodeDel() {
return new Queue(rabbitMQSettingConfig.getWeQrCodeDelQu());
}

/**
* 同步商品图册队列
*
Expand Down Expand Up @@ -513,7 +523,7 @@ public Binding bindingExchangeChatMsgCheck() {
}

/**
* 活码队列绑定交换机
* 活码变更队列绑定交换机
*
* @return
*/
Expand All @@ -522,6 +532,16 @@ public Binding bindingExchangeQrCodeChange() {
return BindingBuilder.bind(quQrCodeChange()).to(qrCodeChangeEx()).with(rabbitMQSettingConfig.getWeQrCodeChangeRk()).noargs();
}

/**
* 活码删除队列绑定交换机
*
* @return
*/
@Bean
public Binding bindingExchangeQrCodeDel() {
return BindingBuilder.bind(quQrCodeDel()).to(qrCodeChangeEx()).with(rabbitMQSettingConfig.getWeQrCodeDelRk()).noargs();
}


/**
* 同步商品图册绑定交换机
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ public class RabbitMQSettingConfig {
@Value("${wecom.mq.route.qr-code-change:Rk_QrCodeChange}")
private String weQrCodeChangeRk;

//活码删除路由
@Value("${wecom.mq.route.qr-code-del:Rk_QrCodeDel}")
private String weQrCodeDelRk;

//商品图册同步路由
@Value("${wecom.mq.route.sync.product:Rk_Product}")
private String weProductRk;
Expand Down Expand Up @@ -242,6 +246,10 @@ public class RabbitMQSettingConfig {
@Value("${wecom.mq.queue.qr-code-change:Qu_QrCodeChange}")
private String weQrCodeChangeQu;

//活码删除队列
@Value("${wecom.mq.queue.qr-code-del:Qu_QrCodeDel}")
private String weQrCodeDelQu;

//商品图册同步队列
@Value("${wecom.mq.queue.sync.product:Qu_Product}")
private String weProductQu;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
package com.linkwechat.domain.customer;


import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;


/**
* 客户批量编辑标签实体
*/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class WeBacthMakeCustomerTag {


private List<WeMakeCustomerTag> weMakeCustomerTagList;


//true 批量打标签 false 批量移除标签
private boolean addOrRemove;


}
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,7 @@ public class WeCustomersQuery {

//渠道值
private List<String> stateList;

//是否按照无标签查询 true:是 false:不是
private boolean noTagCheck=false;
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ public class WeCustomersVo {
private Integer addMethod;

//添加时间
@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date firstAddTime;


@JsonFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date birthday;

//0-未知 1-男性 2-女性
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.domain.WeCustomer;
import com.linkwechat.domain.WeCustomerTrackRecord;
import com.linkwechat.domain.customer.WeBacthMakeCustomerTag;
import com.linkwechat.domain.customer.WeMakeCustomerTag;
import com.linkwechat.domain.customer.query.WeCustomersQuery;
import com.linkwechat.domain.customer.query.WeOnTheJobCustomerQuery;
Expand Down Expand Up @@ -228,4 +229,11 @@ public interface IWeCustomerService extends IService<WeCustomer> {
List<String> findWeUserIds();

List<WeCustomersVo> findWeCustomerList(List<String> customerIds);


/**
* 批量编辑标签
* @param makeCustomerTags
*/
void batchMakeLabel(WeBacthMakeCustomerTag makeCustomerTags);
}
Loading

0 comments on commit 1e1e49a

Please sign in to comment.