From 162fd6cf9cc47858c29d0b488bd7f018b77a56b4 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 06 Apr 2021 11:29:49 +0800
Subject: [PATCH] Merge branch 'score_shop' of http://120.27.238.55:7000/r/beauty-erp into score_shop

---
 zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java            |   69 +---------------------------------
 zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java       |    8 ---
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java |    4 +-
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html           |    2 
 zq-erp/src/main/resources/static/js/function/vip.js                                 |    4 +-
 zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html    |    4 +-
 zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java                    |    2 
 zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java         |    7 +++
 8 files changed, 19 insertions(+), 81 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
index 155bb91..00b210a 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/action/ProjServiceController.java
@@ -186,13 +186,7 @@
         AjaxResult result = AjaxResult.buildSuccessInstance("查询成功");
 
         SysProjUse queryUse = new SysProjUse();
-        if(Objects.nonNull(vipId)){
-            queryUse.setVipId(vipId);
-        }else{
-            SysVipInfo vipInfo = getCurrentVioInfo();
-            queryUse.setVipId(vipInfo.getId());
-        }
-
+        queryUse.setVipId(vipId);
         queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM);
         queryUse.setTaocanId(-1L);
         queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
diff --git a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
index 3a4f2bf..72f4119 100644
--- a/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
+++ b/zq-erp/src/main/java/com/matrix/system/hive/bean/SysVipInfo.java
@@ -261,7 +261,7 @@
 	/**
 	 * 性别 1、男  2、女  0、未知
 	 */
-	private String  gender;
+	private Integer  gender;
 
 	/**
 	 * 用户所在国家
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
index 696e9aa..ec2b34a 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
@@ -105,7 +105,7 @@
         }
         ShopShareQrcord queryOrcode = new ShopShareQrcord();
         queryOrcode.setProductId(qrcodeVo.getProductId());
-        queryOrcode.setUserId(loginUser.getOpenId());
+        queryOrcode.setUserId(loginUser.getId());
 
         if (isGroupProduct ) {
             queryOrcode.setProductId(Integer.parseInt(qrcodeVo.getActId() + ""));
@@ -120,7 +120,7 @@
             //如果未查询到就先插入数据再更新数据
             shareQrcord.setCreateBy(loginUser.getOpenId());
             shareQrcord.setUpdateBy(loginUser.getOpenId());
-            shareQrcord.setUserId(loginUser.getOpenId());
+            shareQrcord.setUserId(loginUser.getId());
             shareQrcord.setShopId(qrcodeVo.getShopId());
             //拼团活动
             if (isGroupProduct ) {
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
index 4ccb773..82aea50 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
@@ -174,8 +174,15 @@
         SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class);
         SysVipInfo sysVipInfo=new SysVipInfo();
         sysVipInfo.setId(loginUser.getId());
+
         BeanUtil.copyProperties(xcxUserSaveUserInfoDto,sysVipInfo);
         sysVipInfo.setPhone(xcxUserSaveUserInfoDto.getPhoneNumber());
+        if(StringUtils.isBlank(loginUser.getVipName())){
+            sysVipInfo.setVipName(xcxUserSaveUserInfoDto.getNickName());
+        }
+        if(StringUtils.isBlank(loginUser.getSex())){
+            sysVipInfo.setSex(xcxUserSaveUserInfoDto.getGender()==1?"男":"女");
+        }
 
         int i = sysVipInfoDao.update(sysVipInfo);
 
diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java
index 84e645b..0fdbf69 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java
@@ -1,10 +1,12 @@
 package com.matrix.system.shopXcx.bean;
 
 import com.matrix.system.common.bean.EntityDTOExt;
+import lombok.Data;
 
 /**
  * 分享二维码
  */
+@Data
 public class  ShopShareQrcord extends EntityDTOExt {
 
 
@@ -23,7 +25,7 @@
     /**
      * 用户ID
      */
-    private String  userId;
+    private Long  userId;
 
 
     /**
@@ -55,69 +57,4 @@
      */
     private Long shopId;
 
-    public Long getShopId() {
-        return shopId;
-    }
-
-    public void setShopId(Long shopId) {
-        this.shopId = shopId;
-    }
-
-
-
-    public String getId() {
-        return id;
-    }
-
-    public void setId(String id) {
-        this.id = id;
-    }
-
-    public Integer getProductId() {
-        return productId;
-    }
-
-    public void setProductId(Integer productId) {
-        this.productId = productId;
-    }
-
-    public String getUserId() {
-        return userId;
-    }
-
-    public void setUserId(String userId) {
-        this.userId = userId;
-    }
-
-    public Integer getStatus() {
-        return status;
-    }
-
-    public void setStatus(Integer status) {
-        this.status = status;
-    }
-
-    public Integer getVisitorCount() {
-        return visitorCount;
-    }
-
-    public void setVisitorCount(Integer visitorCount) {
-        this.visitorCount = visitorCount;
-    }
-
-    public String getRemark() {
-        return remark;
-    }
-
-    public void setRemark(String remark) {
-        this.remark = remark;
-    }
-
-    public String getQrcodeUrl() {
-        return qrcodeUrl;
-    }
-
-    public void setQrcodeUrl(String qrcodeUrl) {
-        this.qrcodeUrl = qrcodeUrl;
-    }
 }
diff --git a/zq-erp/src/main/resources/static/js/function/vip.js b/zq-erp/src/main/resources/static/js/function/vip.js
index 06e6fd5..a1a4475 100644
--- a/zq-erp/src/main/resources/static/js/function/vip.js
+++ b/zq-erp/src/main/resources/static/js/function/vip.js
@@ -222,13 +222,13 @@
 }
 
 
-function openAddService() {
+function openAddService(id) {
     layer.full(layer.open({
         type: 2,
         title: "添加服务单",
         maxmin: true,
         area: [MUI.SIZE_L, '500px'],
-        content: [basePath + '/admin/redirect/hive/beautySalon/servicceAddForm']
+        content: [basePath + '/admin/redirect/hive/beautySalon/servicceAddForm?id='+id]
     }));
 }
 
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
index 6bdb364..474b61e 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
@@ -928,10 +928,10 @@
                                 let count = parseFloat(item.count);
                                 let zkPrice = parseFloat(item.zkPrice);
 
-                                if (optionType != 1) {
+                                // if (optionType != 1) {
                                     //直接修改支付金额不重置支付金额
                                     item.payMoney = zkPrice * count;
-                                }
+                                // }
                                 _this.order.payMoney += parseFloat(item.payMoney);
 
                                 //重新计算业绩金额
diff --git a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
index 15d5daa..ce54cfa 100644
--- a/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
+++ b/zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
@@ -1535,7 +1535,7 @@
                     return;
                 }
                 vipId = this.vipInfo.id;
-                openAddService();
+                openAddService(vipId);
             },
             // 开订单
             addOrder() {

--
Gitblit v1.9.1