Browse Source

生成分享码

chunping 3 years ago
parent
commit
1de18d3187

+ 2 - 2
mp-admin/src/main/java/com/qs/mp/web/controller/api/user/UserShareController.java

@@ -40,9 +40,9 @@ public class UserShareController extends BaseApiController {
 	@PostMapping("/code/generate")
 	public AjaxResult generateInviteCode(@RequestBody  JSONObject jsonObject) {
 		String boxId = jsonObject.getString("boxId"); // 票组ID
-		String type = jsonObject.getString("type"); // 分享类型,channel/user
+		String type = jsonObject.getString("type"); // 分享类型,1/2
 		Long userId = SecurityUtils.getUserId();
-		String rst = wxUrlLinkService.generateUnlimitCode("pages/ticketBox/detail", "boxId=" + boxId + "&suid=" + userId + "&type=" + type, userAppId);
+		String rst = wxUrlLinkService.generateUnlimitCode("pages/ticketBox/detail", boxId + "&" + userId + "&" + type, userAppId);
 		return new AjaxResult(Type.SUCCESS, "", rst);
 	}
 }

+ 2 - 2
mp-service/src/main/java/com/qs/mp/user/domain/vo/UserShareVO.java

@@ -11,6 +11,6 @@ public class UserShareVO {
   private Long suid; // 分享者uid
   private String type; // 分享者类型
 
-  public static final String SHARE_TYPE_USER = "user"; // 用户分享
-  public static final String SHARE_TYPE_SITE = "site"; // 经销商分享
+  public static final String SHARE_TYPE_USER = "1"; // 用户分享
+  public static final String SHARE_TYPE_SITE = "2"; // 经销商分享
 }