liu 9 tháng trước cách đây
mục cha
commit
11a80332db

+ 8 - 4
src/main/java/com/sqx/modules/callBack/controller/CallBackController.java

@@ -320,6 +320,7 @@ public class CallBackController {
         String userName = address.getUserName();
         if (ObjectUtils.isNotEmpty(userName)) {
             try {
+                userName=userName.replaceAll("\\r\\n|\\n|\\r", " ");
                 userName = URLEncoder.encode(userName, "UTF-8");
             } catch (UnsupportedEncodingException e) {
                 throw new RuntimeException(e);
@@ -328,7 +329,7 @@ public class CallBackController {
         }
         body.put("customer_name", userName);
 
-        String userPhone = tbOrder.getPhone();
+        String userPhone = address.getUserPhone();
         if (ObjectUtils.isNotEmpty(userPhone)) {
             try {
                 userPhone = URLEncoder.encode(userPhone, "UTF-8");
@@ -448,12 +449,15 @@ public class CallBackController {
 
 
 //        String userName = address.getUserName();
-
-        body2.put("customer_name", address.getUserName());
+        String userName1 = address.getUserName();
+        if (ObjectUtils.isNotEmpty(userName1)) {
+            userName1=userName1.replaceAll("\\r\\n|\\n|\\r", " ");
+        }
+        body2.put("customer_name", userName1);
 
 //        String userPhone = address.getUserPhone();
 
-        body2.put("customer_tel", tbOrder.getPhone());
+        body2.put("customer_tel", address.getUserPhone());
 
 
 //        String addressDetail = address.getAddressDetail();

+ 3 - 0
src/main/java/com/sqx/modules/datacentre/entity/SysUserShop.java

@@ -40,4 +40,7 @@ public class SysUserShop implements Serializable {
     @TableField(exist = false)
     private Integer bannedFlag;
 
+    @TableField(exist = false)
+    private String shopTypeId;
+
 }

+ 8 - 4
src/main/java/com/sqx/modules/errand/service/impl/TbIndentServiceImpl.java

@@ -524,6 +524,7 @@ public class TbIndentServiceImpl extends ServiceImpl<TbIndentDao, TbIndent> impl
         String userName = address.getUserName();
         if (ObjectUtils.isNotEmpty(userName)) {
             try {
+                userName=userName.replaceAll("\\r\\n|\\n|\\r", " ");
                 userName = URLEncoder.encode(userName, "UTF-8");
             } catch (UnsupportedEncodingException e) {
                 throw new RuntimeException(e);
@@ -532,7 +533,7 @@ public class TbIndentServiceImpl extends ServiceImpl<TbIndentDao, TbIndent> impl
         }
         body.put("customer_name", userName);
 
-        String userPhone = tbOrder.getPhone();
+        String userPhone = address.getUserPhone();
         if (ObjectUtils.isNotEmpty(userPhone)) {
             try {
                 userPhone = URLEncoder.encode(userPhone, "UTF-8");
@@ -652,12 +653,15 @@ public class TbIndentServiceImpl extends ServiceImpl<TbIndentDao, TbIndent> impl
 
 
 //        String userName = address.getUserName();
-
-        body2.put("customer_name", address.getUserName());
+        String userName1 = address.getUserName();
+        if (ObjectUtils.isNotEmpty(userName1)) {
+            userName1=userName1.replaceAll("\\r\\n|\\n|\\r", " ");
+        }
+        body2.put("customer_name", userName1);
 
 //        String userPhone = address.getUserPhone();
 
-        body2.put("customer_tel", tbOrder.getPhone());
+        body2.put("customer_tel", address.getUserPhone());
 
 
 //        String addressDetail = address.getAddressDetail();

+ 4 - 4
src/main/java/com/sqx/modules/invite/controller/InviteController.java

@@ -60,14 +60,14 @@ public class InviteController {
 
     @GetMapping("/shopQr")
     @ApiOperation("门店二维码")
-    public void shopQr(String shopId, HttpServletResponse response) {
-        SenInfoCheckUtil.getShopQr(shopId,response);
+    public void shopQr(String shopId,String shopTypeId, HttpServletResponse response) {
+        SenInfoCheckUtil.getShopQr(shopId,shopTypeId,response);
     }
 
     @GetMapping("/shopQr2")
     @ApiOperation("门店二维码")
-    public void shopQr2(String shopId, HttpServletResponse response) {
-        SenInfoCheckUtil.getShopQr2(shopId,response);
+    public void shopQr2(String shopId,String shopTypeId, HttpServletResponse response) {
+        SenInfoCheckUtil.getShopQr2(shopId,shopTypeId,response);
     }
 
 

+ 7 - 6
src/main/java/com/sqx/modules/utils/SenInfoCheckUtil.java

@@ -173,12 +173,13 @@ public class SenInfoCheckUtil {
     /**
      * 获取二维码图片
      */
-    public static void getShopQr(String shopId, HttpServletResponse response){
+    public static void getShopQr(String shopId,String shopTypeId, HttpServletResponse response){
         String mpToken = getMpToken();
         //获取二维码数据
         String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="+mpToken;
         Map<String,Object> map = Maps.newHashMap();
-        map.put("scene",shopId);
+
+        map.put("scene","shopId="+shopId+"&shopTypeId="+shopTypeId);
         CommonInfo one = commonInfoService.findOne(261);
         if("是".equals(one.getValue())){
             map.put("page","pages/index/index");
@@ -201,18 +202,18 @@ public class SenInfoCheckUtil {
     /**
      * 获取二维码图片
      */
-    public static void getShopQr2(String shopId, HttpServletResponse response){
+    public static void  getShopQr2(String shopId,String shopTypeId, HttpServletResponse response){
         String mpToken = getMpToken();
         //获取二维码数据
         String url = "https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="+mpToken;
         Map<String,Object> map = Maps.newHashMap();
-        map.put("scene",shopId);
+        map.put("scene","shopId="+shopId+"&shopTypeId="+shopTypeId);
         CommonInfo one = commonInfoService.findOne(261);
         if("是".equals(one.getValue())){
             map.put("page","my/index/shop/index2");
         }
-        map.put("check_path",false);
-        map.put("env_version","trial");
+//        map.put("check_path",false);
+//        map.put("env_version","trial");
         map.put("width", 280);
         String jsonString = JSON.toJSONString(map);
         InputStream inputStream = sendPostBackStream(url, jsonString);

+ 2 - 1
src/main/resources/mapper/sys/SysShopDao.xml

@@ -8,7 +8,8 @@
     </select>
 
     <select id="selectShopId" resultType="com.sqx.modules.datacentre.entity.SysUserShop">
-        select sus.*, gs.shop_name as shopName, gs.shop_cover as shopCover, gs.putaway_flag as putawayFlag, gs.banned_flag as bannedFlag from sys_user_shop sus
+        select sus.*, gs.shop_name as shopName, gs.shop_cover as shopCover, gs.putaway_flag as putawayFlag, gs.banned_flag as bannedFlag,gs.shop_type_id as shopTypeId
+        from sys_user_shop sus
         left join goods_shop gs on sus.shop_id = gs.shop_id where sus.user_id = #{userId}
     </select>