|
@@ -719,10 +719,12 @@ public class LoginServiceImpl implements LoginService {
|
|
*
|
|
*
|
|
* @param userId
|
|
* @param userId
|
|
* @param link
|
|
* @param link
|
|
|
|
+ * @param accessType
|
|
|
|
+ * @param accessClient
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@Override
|
|
@Override
|
|
- public ResponseJson clubBehaviorInfo(Integer userId, String link) {
|
|
|
|
|
|
+ public ResponseJson clubBehaviorInfo(Integer userId, String link, Integer accessType, Integer accessClient) {
|
|
// 行为记录
|
|
// 行为记录
|
|
try {
|
|
try {
|
|
if (null == userId) {
|
|
if (null == userId) {
|
|
@@ -732,16 +734,19 @@ public class LoginServiceImpl implements LoginService {
|
|
UserLoginVo user = loginMapper.getLoginUserByUserId(userId);
|
|
UserLoginVo user = loginMapper.getLoginUserByUserId(userId);
|
|
if (null != user) {
|
|
if (null != user) {
|
|
// 记录
|
|
// 记录
|
|
- link = wwwDomain + link;
|
|
|
|
|
|
+ // 网站需要加上域名,小程序不需要域名,无法访问
|
|
|
|
+ if (0 == accessClient) {
|
|
|
|
+ link = wwwDomain + link;
|
|
|
|
+ }
|
|
CmBehaviorInfoPo behaviorInfo = clubMapper.getClubSpId(userId);
|
|
CmBehaviorInfoPo behaviorInfo = clubMapper.getClubSpId(userId);
|
|
- setBehaviorInfo(behaviorInfo, link);
|
|
|
|
|
|
+ setBehaviorInfo(behaviorInfo, link, accessType);
|
|
if (1 == user.getUserIdentity()) {
|
|
if (1 == user.getUserIdentity()) {
|
|
behaviorInfo.setSpId(user.getServiceProviderId());
|
|
behaviorInfo.setSpId(user.getServiceProviderId());
|
|
} else {
|
|
} else {
|
|
behaviorInfo.setClubId(user.getClubId());
|
|
behaviorInfo.setClubId(user.getClubId());
|
|
}
|
|
}
|
|
behaviorInfo.setOperateObject(1);
|
|
behaviorInfo.setOperateObject(1);
|
|
- behaviorInfo.setType(2);
|
|
|
|
|
|
+
|
|
clubMapper.insertBehaviorInfo(behaviorInfo);
|
|
clubMapper.insertBehaviorInfo(behaviorInfo);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
@@ -1333,8 +1338,8 @@ public class LoginServiceImpl implements LoginService {
|
|
String openid = messageCenterMapper.getOpenidListByPermission(unionId);
|
|
String openid = messageCenterMapper.getOpenidListByPermission(unionId);
|
|
String time = current;
|
|
String time = current;
|
|
String remarkText = "绑定成功后,您可通过微信直接访问采美商城进行采购。";
|
|
String remarkText = "绑定成功后,您可通过微信直接访问采美商城进行采购。";
|
|
- // 跳转到【小程序付款-选择支付方式页面】
|
|
|
|
- String pagePath = "https://www.caimei365.com/";
|
|
|
|
|
|
+ // 绑定运营人员
|
|
|
|
+ String pagePath = "/pages/user/operator/list?userBehaviorType=model";
|
|
// sendTemplateMsg(openid, 标题, 金额, 收款日期, 备注, 跳转链接
|
|
// sendTemplateMsg(openid, 标题, 金额, 收款日期, 备注, 跳转链接
|
|
log.error("获取openid>>>>>" + openid);
|
|
log.error("获取openid>>>>>" + openid);
|
|
weChatService.sendTemplateMessg(accessToken, openid, nickName, time, remarkText, pagePath);
|
|
weChatService.sendTemplateMessg(accessToken, openid, nickName, time, remarkText, pagePath);
|
|
@@ -1738,70 +1743,117 @@ public class LoginServiceImpl implements LoginService {
|
|
return map;
|
|
return map;
|
|
}
|
|
}
|
|
|
|
|
|
- private void setBehaviorInfo(CmBehaviorInfoPo behaviorInfo, String link) {
|
|
|
|
|
|
+ /**
|
|
|
|
+ * 站内信链接标签处理
|
|
|
|
+ * @param behaviorInfo
|
|
|
|
+ * @param link
|
|
|
|
+ */
|
|
|
|
+ private void setBehaviorInfo(CmBehaviorInfoPo behaviorInfo, String link, Integer accessType) {
|
|
Pattern compile = Pattern.compile("^[0-9]+$");
|
|
Pattern compile = Pattern.compile("^[0-9]+$");
|
|
behaviorInfo.setPagePath(link);
|
|
behaviorInfo.setPagePath(link);
|
|
String labels = "";
|
|
String labels = "";
|
|
Integer id = 0;
|
|
Integer id = 0;
|
|
- // 文章详情
|
|
|
|
- // https://www.caimei365.com/info/detail-7855-1.html
|
|
|
|
- if (link.contains("info") && link.contains("detail")) {
|
|
|
|
- behaviorInfo.setPageType("文章详情");
|
|
|
|
- String[] split = link.split("-");
|
|
|
|
- for (String s : split) {
|
|
|
|
- if (compile.matcher(s).matches()) {
|
|
|
|
- id = Integer.parseInt(s);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- // 获取文章标签
|
|
|
|
- labels = clubMapper.getInfoLabels(id);
|
|
|
|
- }
|
|
|
|
- // 商品详情
|
|
|
|
- id = 0;
|
|
|
|
- if (link.contains("product")) {
|
|
|
|
- behaviorInfo.setPageType("商品详情");
|
|
|
|
- String[] split = link.split("-");
|
|
|
|
- // https://www.caimei365.com/product-7729.html
|
|
|
|
- if (split.length <= 2) {
|
|
|
|
- for (String s : split) {
|
|
|
|
- String str = s.substring(0, s.lastIndexOf(".html"));
|
|
|
|
- if (compile.matcher(str).matches()) {
|
|
|
|
- id = Integer.parseInt(str);
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- // https://www.caimei365.com/product-7729-1.html
|
|
|
|
|
|
+ if ( 2 == accessType ) {
|
|
|
|
+ // 文章详情
|
|
|
|
+ // https://www.caimei365.com/info/detail-7855-1.html
|
|
|
|
+ if (link.contains("info") && link.contains("detail")) {
|
|
|
|
+ behaviorInfo.setPageType("文章详情");
|
|
|
|
+ String[] split = link.split("-");
|
|
for (String s : split) {
|
|
for (String s : split) {
|
|
if (compile.matcher(s).matches()) {
|
|
if (compile.matcher(s).matches()) {
|
|
id = Integer.parseInt(s);
|
|
id = Integer.parseInt(s);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ // 获取文章标签
|
|
|
|
+ labels = clubMapper.getInfoLabels(id);
|
|
}
|
|
}
|
|
- // 获取商品标签
|
|
|
|
- labels = clubMapper.getProductLabels(id);
|
|
|
|
- }
|
|
|
|
- // 网页
|
|
|
|
- id = 0;
|
|
|
|
- // https://www.caimei365.com/page-375.html
|
|
|
|
- if (link.contains("topic") || link.contains("equipment") || link.contains("page") || link.contains("product/type") || link.contains("product/activity")
|
|
|
|
- || link.contains("product/beauty") || link.contains("quickOperation/operation") || link.contains("cmpage/info")) {
|
|
|
|
- behaviorInfo.setPageType("网页列表");
|
|
|
|
- String[] split = link.split("-");
|
|
|
|
- if (split.length <= 2) {
|
|
|
|
- for (String s : split) {
|
|
|
|
- String str = s.substring(0, s.lastIndexOf(".html"));
|
|
|
|
- if (compile.matcher(str).matches()) {
|
|
|
|
- id = Integer.parseInt(str);
|
|
|
|
|
|
+ // 商品详情
|
|
|
|
+ id = 0;
|
|
|
|
+ if (link.contains("product")) {
|
|
|
|
+ behaviorInfo.setPageType("商品详情");
|
|
|
|
+ String[] split = link.split("-");
|
|
|
|
+ // https://www.caimei365.com/product-7729.html
|
|
|
|
+ if (split.length <= 2) {
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ String str = s.substring(0, s.lastIndexOf(".html"));
|
|
|
|
+ if (compile.matcher(str).matches()) {
|
|
|
|
+ id = Integer.parseInt(str);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ // https://www.caimei365.com/product-7729-1.html
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ if (compile.matcher(s).matches()) {
|
|
|
|
+ id = Integer.parseInt(s);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- } else {
|
|
|
|
- for (String s : split) {
|
|
|
|
- if (compile.matcher(s).matches()) {
|
|
|
|
- id = Integer.parseInt(s);
|
|
|
|
|
|
+ // 获取商品标签
|
|
|
|
+ labels = clubMapper.getProductLabels(id);
|
|
|
|
+ }
|
|
|
|
+ // 网页
|
|
|
|
+ id = 0;
|
|
|
|
+ // https://www.caimei365.com/page-375.html
|
|
|
|
+ if (link.contains("topic") || link.contains("equipment") || link.contains("page") || link.contains("product/type") || link.contains("product/activity")
|
|
|
|
+ || link.contains("product/beauty") || link.contains("quickOperation/operation") || link.contains("cmpage/info")) {
|
|
|
|
+ behaviorInfo.setPageType("网页列表");
|
|
|
|
+ String[] split = link.split("-");
|
|
|
|
+ if (split.length <= 2) {
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ String str = s.substring(0, s.lastIndexOf(".html"));
|
|
|
|
+ if (compile.matcher(str).matches()) {
|
|
|
|
+ id = Integer.parseInt(str);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ for (String s : split) {
|
|
|
|
+ if (compile.matcher(s).matches()) {
|
|
|
|
+ id = Integer.parseInt(s);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ labels = clubMapper.getPageLabels(id);
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("caimei-paylist")) {
|
|
|
|
+ behaviorInfo.setPageType("线上支付");
|
|
|
|
+ labels = "线上支付";
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("caimei-payunder")) {
|
|
|
|
+ behaviorInfo.setPageType("线下支付");
|
|
|
|
+ labels = "线下支付";
|
|
}
|
|
}
|
|
- labels = clubMapper.getPageLabels(id);
|
|
|
|
|
|
+ if (link.contains("user/order/detail")) {
|
|
|
|
+ behaviorInfo.setPageType("机构订单详情");
|
|
|
|
+ labels = "机构订单详情";
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("/user/member")) {
|
|
|
|
+ behaviorInfo.setPageType("超级会员");
|
|
|
|
+ labels = "超级会员";
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("/user/coupon")) {
|
|
|
|
+ behaviorInfo.setPageType("优惠券");
|
|
|
|
+ labels = "优惠券";
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("/info/detail")) {
|
|
|
|
+ behaviorInfo.setPageType("文章中心");
|
|
|
|
+ labels = "文章中心";
|
|
|
|
+ }
|
|
|
|
+ behaviorInfo.setType(2);
|
|
|
|
+ } else {
|
|
|
|
+ if (link.contains("/member/member")) {
|
|
|
|
+ behaviorInfo.setPageType("超级会员");
|
|
|
|
+ labels = "超级会员";
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("/operator/list")) {
|
|
|
|
+ behaviorInfo.setPageType("添加运营人员");
|
|
|
|
+ labels = "添加运营人员";
|
|
|
|
+ }
|
|
|
|
+ if (link.contains("/login/apply")) {
|
|
|
|
+ behaviorInfo.setPageType("升级审核");
|
|
|
|
+ labels = "升级审核";
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ behaviorInfo.setType(3);
|
|
}
|
|
}
|
|
behaviorInfo.setLabel(labels);
|
|
behaviorInfo.setLabel(labels);
|
|
}
|
|
}
|