瀏覽代碼

生成盲票详情小程序码

cup 3 年之前
父節點
當前提交
4695d34f4c
共有 1 個文件被更改,包括 4 次插入1 次删除
  1. 4 1
      mp-admin/src/main/java/com/qs/mp/web/controller/api/user/UserShareController.java

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

@@ -8,6 +8,7 @@ import com.qs.mp.user.domain.vo.UserShareVO;
 import com.qs.mp.utils.SecurityUtils;
 import com.qs.mp.web.controller.common.BaseApiController;
 import io.swagger.annotations.Api;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Component;
@@ -16,6 +17,8 @@ import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.util.Objects;
+
 /**
  * @auther zhongcp
  * @create 2022-02-28 16:17:48
@@ -43,7 +46,7 @@ public class UserShareController extends BaseApiController {
 		String boxId = jsonObject.getString("boxId"); // 票组ID
 		String type = jsonObject.getString("type"); // 分享类型,1/2
 		Long userId = SecurityUtils.getUserId();
-		if (UserShareVO.SHARE_TYPE_SITE.equals(type)) {
+		if (UserShareVO.SHARE_TYPE_SITE.equals(type) && StringUtils.isBlank(boxId)) {
 			// 经销商分享,默认到盲票小程序首页
 			String rst = wxUrlLinkService.generateUnlimitCode("", userId + "&" + type, userAppId);
 			return new AjaxResult(Type.SUCCESS, "", rst);