|
@@ -1,10 +1,13 @@
|
|
|
package com.qs.mp.web.controller.common;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.qs.mp.channel.domain.Channel;
|
|
|
import com.qs.mp.common.core.domain.AjaxResult;
|
|
|
import com.qs.mp.common.core.domain.AjaxResult.Type;
|
|
|
import com.qs.mp.framework.service.IWxUrlLinkService;
|
|
|
+import com.qs.mp.utils.SecurityUtils;
|
|
|
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;
|
|
@@ -42,4 +45,16 @@ public class WxServerController extends BaseApiController {
|
|
|
String rst = wxUrlLinkService.generateUrlSchema(path, query, userAppId);
|
|
|
return new AjaxResult(Type.SUCCESS, "", rst);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 生成盲票购买小程序码
|
|
|
+ *
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ @PostMapping("code/generate")
|
|
|
+ public AjaxResult generateInviteCode(@RequestBody JSONObject jsonObject) {
|
|
|
+ String id = jsonObject.getString("id");
|
|
|
+ String rst = wxUrlLinkService.generateCode("pages/index/index", "id=" + id, userAppId);
|
|
|
+ return new AjaxResult(Type.SUCCESS, "", rst);
|
|
|
+ }
|
|
|
}
|