|
@@ -5,18 +5,13 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
5
|
5
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
6
|
6
|
import com.huiju.estateagents.base.BaseController;
|
7
|
7
|
import com.huiju.estateagents.base.ResponseBean;
|
|
8
|
+import com.huiju.estateagents.service.IMiniAppService;
|
8
|
9
|
import com.huiju.estateagents.third.entity.TaThirdPartyMiniappConfig;
|
9
|
10
|
import com.huiju.estateagents.third.service.ITaThirdPartyMiniappConfigService;
|
10
|
11
|
import org.slf4j.Logger;
|
11
|
12
|
import org.slf4j.LoggerFactory;
|
12
|
13
|
import org.springframework.beans.factory.annotation.Autowired;
|
13
|
|
-import org.springframework.web.bind.annotation.PathVariable;
|
14
|
|
-import org.springframework.web.bind.annotation.RequestBody;
|
15
|
|
-import org.springframework.web.bind.annotation.RequestMapping;
|
16
|
|
-import org.springframework.web.bind.annotation.RequestMethod;
|
17
|
|
-import org.springframework.web.bind.annotation.RequestParam;
|
18
|
|
-import org.springframework.web.bind.annotation.ResponseBody;
|
19
|
|
-import org.springframework.web.bind.annotation.RestController;
|
|
14
|
+import org.springframework.web.bind.annotation.*;
|
20
|
15
|
|
21
|
16
|
import javax.servlet.http.HttpServletRequest;
|
22
|
17
|
|
|
@@ -37,6 +32,8 @@ public class TaThirdPartyMiniappConfigController extends BaseController {
|
37
|
32
|
@Autowired
|
38
|
33
|
public ITaThirdPartyMiniappConfigService iTaThirdPartyMiniappConfigService;
|
39
|
34
|
|
|
35
|
+ @Autowired
|
|
36
|
+ private IMiniAppService miniAppService;
|
40
|
37
|
|
41
|
38
|
/**
|
42
|
39
|
* 分页查询列表
|
|
@@ -148,4 +145,23 @@ public class TaThirdPartyMiniappConfigController extends BaseController {
|
148
|
145
|
}
|
149
|
146
|
return responseBean;
|
150
|
147
|
}
|
|
148
|
+
|
|
149
|
+ /**
|
|
150
|
+ * 第三方生成二维码
|
|
151
|
+ * @return
|
|
152
|
+ */
|
|
153
|
+ @PostMapping("/third/qrcode")
|
|
154
|
+ public ResponseBean thirdQrcode(@RequestBody String paramsStr, HttpServletRequest request) {
|
|
155
|
+ //获取H5项目相关信息
|
|
156
|
+ String xAppid = request.getHeader("x-appid");
|
|
157
|
+ QueryWrapper<TaThirdPartyMiniappConfig> taThirdPartyMiniappConfigQueryWrapper = new QueryWrapper<>();
|
|
158
|
+
|
|
159
|
+ taThirdPartyMiniappConfigQueryWrapper.eq("appid", xAppid);
|
|
160
|
+ TaThirdPartyMiniappConfig taThirdPartyMiniappConfig = iTaThirdPartyMiniappConfigService.getOne(taThirdPartyMiniappConfigQueryWrapper);
|
|
161
|
+ if (null == taThirdPartyMiniappConfig){
|
|
162
|
+ return ResponseBean.error("不存在的H5活动",ResponseBean.ERROR_UNAVAILABLE);
|
|
163
|
+ }
|
|
164
|
+ String appid = request.getHeader("appid");
|
|
165
|
+ return miniAppService.getQrCode(paramsStr, appid);
|
|
166
|
+ }
|
151
|
167
|
}
|