|
@@ -3,6 +3,7 @@ package com.qs.mp.web.controller.api.user;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.alibaba.fastjson.JSONObject;
|
|
import com.qs.mp.common.core.domain.AjaxResult;
|
|
import com.qs.mp.common.core.domain.AjaxResult;
|
|
import com.qs.mp.common.core.domain.AjaxResult.Type;
|
|
import com.qs.mp.common.core.domain.AjaxResult.Type;
|
|
|
|
+import com.qs.mp.common.enums.AppSourceEnum;
|
|
import com.qs.mp.framework.service.IWxUrlLinkService;
|
|
import com.qs.mp.framework.service.IWxUrlLinkService;
|
|
import com.qs.mp.user.domain.vo.UserShareVO;
|
|
import com.qs.mp.user.domain.vo.UserShareVO;
|
|
import com.qs.mp.utils.SecurityUtils;
|
|
import com.qs.mp.utils.SecurityUtils;
|
|
@@ -45,13 +46,16 @@ public class UserShareController extends BaseApiController {
|
|
public AjaxResult generateInviteCode(@RequestBody JSONObject jsonObject) {
|
|
public AjaxResult generateInviteCode(@RequestBody JSONObject jsonObject) {
|
|
String boxId = jsonObject.getString("boxId"); // 票组ID
|
|
String boxId = jsonObject.getString("boxId"); // 票组ID
|
|
String type = jsonObject.getString("type"); // 分享类型,1/2
|
|
String type = jsonObject.getString("type"); // 分享类型,1/2
|
|
|
|
+ Integer appSource = jsonObject.getInteger("appSource");
|
|
|
|
+ AppSourceEnum appSourceEnum = AppSourceEnum.getByValue(appSource);
|
|
|
|
+ String appId = appSourceEnum.getAppId();
|
|
Long userId = SecurityUtils.getUserId();
|
|
Long userId = SecurityUtils.getUserId();
|
|
if (UserShareVO.SHARE_TYPE_SITE.equals(type) && StringUtils.isBlank(boxId)) {
|
|
if (UserShareVO.SHARE_TYPE_SITE.equals(type) && StringUtils.isBlank(boxId)) {
|
|
// 经销商分享,默认到盲票小程序首页
|
|
// 经销商分享,默认到盲票小程序首页
|
|
- String rst = wxUrlLinkService.generateUnlimitCode("", userId + "&" + type, userAppId);
|
|
|
|
|
|
+ String rst = wxUrlLinkService.generateUnlimitCode("", userId + "&" + type, appId);
|
|
return new AjaxResult(Type.SUCCESS, "", rst);
|
|
return new AjaxResult(Type.SUCCESS, "", rst);
|
|
}
|
|
}
|
|
- String rst = wxUrlLinkService.generateUnlimitCode("pages/ticketBox/detail", boxId + "&" + userId + "&" + type, userAppId);
|
|
|
|
|
|
+ String rst = wxUrlLinkService.generateUnlimitCode("pages/ticketBox/detail", boxId + "&" + userId + "&" + type, appId);
|
|
return new AjaxResult(Type.SUCCESS, "", rst);
|
|
return new AjaxResult(Type.SUCCESS, "", rst);
|
|
}
|
|
}
|
|
}
|
|
}
|