浏览代码

* 新需求

顾绍勇 5 年前
父节点
当前提交
109c6b1ea6

+ 2
- 0
src/main/java/com/huiju/estateagents/entity/TaMiniappQrcode.java 查看文件

55
      */
55
      */
56
     private String qrCode;
56
     private String qrCode;
57
 
57
 
58
+    private Integer targetId;
59
+
58
 }
60
 }

+ 13
- 3
src/main/java/com/huiju/estateagents/service/impl/MiniAppServiceImpl.java 查看文件

335
         String scene = params.getString("scene");
335
         String scene = params.getString("scene");
336
         String page = StringUtils.ifNull(params.getString("page"), "");
336
         String page = StringUtils.ifNull(params.getString("page"), "");
337
         Integer width = params.getInteger("width");
337
         Integer width = params.getInteger("width");
338
-        if (null == width) width = 430;
338
+        if (null == width) {
339
+            width = 430;
340
+        }
339
 
341
 
340
         Boolean autoColor = params.getBoolean("auto_color");
342
         Boolean autoColor = params.getBoolean("auto_color");
341
-        if (null == autoColor) autoColor = false;
343
+        if (null == autoColor) {
344
+            autoColor = false;
345
+        }
342
 
346
 
343
         String lineColorStr = StringUtils.ifNull(params.getString("line_color"), "{\"r\":0,\"g\":0,\"b\":0}");
347
         String lineColorStr = StringUtils.ifNull(params.getString("line_color"), "{\"r\":0,\"g\":0,\"b\":0}");
344
         WxMaCodeLineColor lineColor = JSONObject.parseObject(lineColorStr, WxMaCodeLineColor.class);
348
         WxMaCodeLineColor lineColor = JSONObject.parseObject(lineColorStr, WxMaCodeLineColor.class);
345
         Boolean isHyaline = params.getBoolean("is_hyaline");
349
         Boolean isHyaline = params.getBoolean("is_hyaline");
346
-        if (null == isHyaline) isHyaline = true;
350
+        if (null == isHyaline) {
351
+            isHyaline = true;
352
+        }
347
 
353
 
348
         try {
354
         try {
349
 
355
 
352
             taQrcode.setCreateDate(LocalDateTime.now());
358
             taQrcode.setCreateDate(LocalDateTime.now());
353
             taQrcode.setExpireDate(LocalDateTime.now().plusDays(7));
359
             taQrcode.setExpireDate(LocalDateTime.now().plusDays(7));
354
             taQrcode.setQrParams(paramsStr);
360
             taQrcode.setQrParams(paramsStr);
361
+            JSONObject sceneObj = JSONObject.parseObject(scene);
362
+            if (!StringUtils.isEmpty(sceneObj.getString("qrCodeId"))) {
363
+                taQrcode.setTargetId(Integer.parseInt(sceneObj.getString("qrCodeId")));
364
+            }
355
 
365
 
356
             boolean success = taMiniappQrcodeMapper.insert(taQrcode) > 0;
366
             boolean success = taMiniappQrcodeMapper.insert(taQrcode) > 0;
357
             if (!success) {
367
             if (!success) {