Bläddra i källkod

roos页面统计

huangzhiguo 2 år sedan
förälder
incheckning
d2ab25e3fd

+ 2 - 0
src/main/java/com/caimei/modules/order/service/CmPayShopService.java

@@ -317,6 +317,8 @@ public class CmPayShopService extends CrudService<CmPayShopDao, CmPayShop> {
                         //子订单佣金
 
                         mum -= so.getShopOtherFee() + Double.valueOf(getShouldPayShopAmount.toString());
+                        // 子订单佣金减供应商运费
+                        mum -= so.getShopPostFee();
                         so.setBrokerage(mum);
                     } else {
                         so.setBrokerage(null);

+ 2 - 2
src/main/java/com/caimei/modules/order/service/NewShopOrderService.java

@@ -455,13 +455,13 @@ public class NewShopOrderService extends CrudService<NewShopOrderDao, NewShopOrd
                 order.setSettleAmount(newOrderDao.findSettleAmount(order.getOrderID()));
             }
             if (orderIds != null && orderIds.contains(order.getOrderID())) {
-                order.setRebateOrder("1");
+//                order.setRebateOrder("1");
                 order.setReceiptStatus("4");
                 order.setAlreadyReceipt("----");
                 order.setPayStatus("4");
                 order.setPaid("----");
             } else {
-                order.setRebateOrder("0");
+//                order.setRebateOrder("0");
                 //统计该主订单的收款金额
                 Double receiptTotalFee = cmReceiptOrderRelationDao.findPayFeeByOrderID(order.getOrderID().toString());
                 if (receiptTotalFee == null) receiptTotalFee = 0d;

+ 27 - 0
src/main/java/com/caimei/modules/user/entity/CmBehaviorRecord.java

@@ -36,9 +36,12 @@ public class CmBehaviorRecord extends DataEntity<CmBehaviorRecord> {
     private Integer numbers;    //访问页面总数
     private String userIdentity; //公司类型
 
+    private Integer clubID; // 机构ID
     private String name; // 机构公司名称
+    private String cSname;  // 机构简称
     private String linkMan; //机构联系人
     private String contractMobile;  //联系手机
+    private String userName; //用户名
 
     private String sname; // 供应商公司名称
     private String slinkMan; //供应商联系人
@@ -188,6 +191,14 @@ public class CmBehaviorRecord extends DataEntity<CmBehaviorRecord> {
         this.userIdentity = userIdentity;
     }
 
+    public Integer getClubID() {
+        return clubID;
+    }
+
+    public void setClubID(Integer clubID) {
+        this.clubID = clubID;
+    }
+
     public String getName() {
         return name;
     }
@@ -196,6 +207,14 @@ public class CmBehaviorRecord extends DataEntity<CmBehaviorRecord> {
         this.name = name;
     }
 
+    public String getcSname() {
+        return cSname;
+    }
+
+    public void setcSname(String cSname) {
+        this.cSname = cSname;
+    }
+
     public String getLinkMan() {
         return linkMan;
     }
@@ -212,6 +231,14 @@ public class CmBehaviorRecord extends DataEntity<CmBehaviorRecord> {
         this.contractMobile = contractMobile;
     }
 
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
     public String getSname() {
         return sname;
     }

+ 27 - 1
src/main/java/com/caimei/modules/user/web/CmUserBehaviorRecordController.java

@@ -4,12 +4,16 @@ import com.caimei.modules.user.dao.CmBehaviorRecordDao;
 import com.caimei.modules.user.entity.CmBehaviorRecord;
 import com.caimei.modules.user.entity.CmPageType;
 import com.caimei.modules.user.service.CmBehaviorRecordService;
+import com.thinkgem.jeesite.common.config.Global;
 import com.thinkgem.jeesite.common.persistence.Page;
+import com.thinkgem.jeesite.common.utils.ObjectUtils;
 import com.thinkgem.jeesite.common.utils.StringUtils;
+import com.thinkgem.jeesite.common.web.BaseController;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.servlet.mvc.support.RedirectAttributes;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -23,7 +27,8 @@ import java.util.List;
  */
 @Controller
 @RequestMapping(value = "${adminPath}/user/behavior/record")
-public class CmUserBehaviorRecordController {
+public class CmUserBehaviorRecordController extends BaseController {
+
 
     @Autowired private CmBehaviorRecordService cmBehaviorRecordService;
 
@@ -83,4 +88,25 @@ public class CmUserBehaviorRecordController {
         return "modules/user/behaviorRecordDetailsList";
     }
 
+    /**
+     * 跳转机构、供应商编辑页
+     * @param cmBehaviorRecord
+     * @param model
+     * @param redirectAttributes
+     * @return
+     */
+    @RequestMapping("/clubOrShop")
+    public String clubOrShop(CmBehaviorRecord cmBehaviorRecord,Model model, RedirectAttributes redirectAttributes){
+
+        System.out.println(ObjectUtils.isEmpty(cmBehaviorRecord.getClubID()));
+        if (!ObjectUtils.isEmpty(cmBehaviorRecord.getClubID())) {
+            return "redirect:" + Global.getAdminPath() + "/new/user/agency/form?id="+cmBehaviorRecord.getClubID()+"&source=1";
+        }
+        if (!ObjectUtils.isEmpty(cmBehaviorRecord.getShopID())) {
+            return "redirect:" + Global.getAdminPath() + "/user/newCmShop/form?id=+"+cmBehaviorRecord.getShopID()+"&editStatus=1";
+        }
+        addMessage(redirectAttributes,"查看失败");
+        return "redirect:" + Global.getAdminPath() + "/user/behavior/record/list";
+    }
+
 }

+ 1 - 1
src/main/resources/mappings/modules/order/OrderMapper.xml

@@ -644,7 +644,7 @@
     </update>
 
     <select id="findOrderList" resultType="NewOrder" parameterType="NewOrder">
-        SELECT co.*, bou.name AS buyer,s.name AS shopName,c.name AS clubName
+        SELECT co.*, bou.name AS buyer,s.name AS shopName,c.name AS clubName,co.rebateFlag AS rebateOrder
         FROM cm_order co
         LEFT JOIN cm_shop_order cso ON co.orderID = cso.orderID
         LEFT JOIN bp_order_userinfo bou ON bou.orderId = co.orderID

+ 1 - 1
src/main/resources/mappings/modules/order/ShopOrderMapper.xml

@@ -831,7 +831,7 @@
                 and a.payStatus = 3 and co.status NOT IN (6,7)
             </if>
             and co.delFlag = 0
-            and not (co.secondHandOrderFlag=1 AND co.rebateFlag=1)
+#             and not (co.secondHandOrderFlag=1 AND co.rebateFlag=1)
             and a.delFlag = 0
             and a.shopID != 998
             and co.orderID not in (

+ 12 - 3
src/main/resources/mappings/modules/user/CmBehaviorRecordMapper.xml

@@ -17,6 +17,8 @@
           <include refid="behaviorRecord"/>
           ,SUM(b.accessDuration) AS accessDuration,
           u.userIdentity,
+          u.userName,
+          c.sname AS cSname,
           c.name,
           c.linkMan,
           c.contractMobile,
@@ -25,6 +27,8 @@
           s.name AS sname,
           s.linkMan AS slinkMan,
           s.contractMobile AS scontractMobile,
+          c.clubID as clubID,
+          s.shopID as shopID,
           (SELECT CASE STATUS WHEN 91 THEN '采美默认协销经理(官方账号)' ELSE linkMan END FROM serviceprovider WHERE serviceProviderID = c.spID) AS spName,
           COUNT(b.IP) as numbers
         FROM cm_behavior_record b
@@ -34,12 +38,14 @@
         LEFT JOIN serviceprovider sp on c.spID = sp.serviceProviderID
         LEFT JOIN cm_roos_information cri on b.IP = cri.IP
         <where>
-            b.behaviorType = #{behaviorType}
+            <if test="behaviorType == 2">
+                AND b.behaviorType = #{behaviorType}
+            </if>
             <if test="IP != null and IP != ''">
                 AND b.IP = #{IP}
             </if>
             <if test="name != null and name != ''">
-                AND u.name = #{name}
+                AND c.sname = #{name} or s.name = #{name}
             </if>
             <if test="userIdentity != null and userIdentity != ''">
                 <if test="userIdentity == 2">
@@ -90,7 +96,10 @@
         LEFT JOIN product p ON b.productID = p.productID
         LEFT JOIN cm_page_type pt ON b.pageType = pt.id
         <where>
-            b.IP = #{IP} AND b.accessDate = #{accessDate} AND b.userID = #{userID} AND behaviorType = #{behaviorType}
+            b.IP = #{IP} AND b.accessDate = #{accessDate} AND b.userID = #{userID}
+            <if test="behaviorType == 2">
+                AND behaviorType = #{behaviorType}
+            </if>
             <if test="pageType != null and pageType != ''">
                 AND b.pageType = #{pageType}
             </if>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/cmPayShopDetail.jsp

@@ -711,7 +711,7 @@
             totalComissionEle.each(function () {
                 totalComissionVal += Number($(this).text().replace(',', ''));
             })
-            resVal = (totalComissionVal - thirdPartyVal - eachDiscount).toFixed(2);
+            resVal = (totalComissionVal - freightVal - thirdPartyVal - eachDiscount).toFixed(2);
             comissionEle.text(resVal);
         })
 

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/order/cmPayShopForm.jsp

@@ -958,7 +958,7 @@
                 totalComissionVal += Number($(this).text().replace(',', ''));
             })
             // 子订单佣金=单个商品总佣金+机构运费-付第三方-供应商运费-子订单分摊优惠
-            resVal = (totalComissionVal - thirdPartyVal - eachDiscount).toFixed(2);
+            resVal = (totalComissionVal - freightVal - thirdPartyVal - eachDiscount).toFixed(2);
             comissionEle.text(resVal);
         })
 

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/product/cmSecondHandDetailForm.jsp

@@ -601,7 +601,7 @@
                         class="input-xlarge"/>
         </div>
     </div>
-    <div class="control-group">
+    <div class="control-group" hidden>
         <label class="control-label">商品类型:</label>
         <div class="controls" style="margin-top: 5px">
             <form:radiobutton path="secondProductType" value="1" label="医美"/>

+ 1 - 1
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordDetailsList.jsp

@@ -32,7 +32,7 @@
     <li class="active"><a href="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&behaviorType=${cmBehaviorRecord.behaviorType}">查看详情</a></li>
 
 </ul>
-<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}" method="post" class="breadcrumb form-search">
+<form:form id="searchForm" modelAttribute="cmBehaviorRecord" action="${ctx}/user/behavior/record/recordList?IP=${cmBehaviorRecord.IP}&accessDate=${cmBehaviorRecord.accessDate}&userID=${cmBehaviorRecord.userID}&behaviorType=${cmBehaviorRecord.behaviorType}" method="post" class="breadcrumb form-search">
     <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
     <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
     <div class="ul-form">

+ 19 - 15
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordList.jsp

@@ -27,6 +27,10 @@
         .ys-kin input,span{
             margin-left: 10px;
         }
+        .aCss {
+            color: #0d0d0d;
+            text-decoration: underline;
+        }
     </style>
 </head>
 <body>
@@ -109,24 +113,24 @@
             </c:if>
             <c:if test="${cmBehaviorRecord.userID != '0'}">
                <td>
-                <c:if test="${cmBehaviorRecord.userIdentity eq 2}">
-                    ${cmBehaviorRecord.name}
-                </c:if>
-                <c:if test="${cmBehaviorRecord.userIdentity eq 4}">
-                    ${cmBehaviorRecord.linkMan}
-                </c:if>
-                <c:if test="${cmBehaviorRecord.userIdentity eq 3}">
-                    ${cmBehaviorRecord.sname}
-                </c:if>
-               </td>
-               <td>
-                   <c:if test="${cmBehaviorRecord.userIdentity eq 2 || cmBehaviorRecord.userIdentity eq 4}">
-                       ${cmBehaviorRecord.linkMan}
+                   <c:if test="${cmBehaviorRecord.userIdentity eq 2}">
+                       ${cmBehaviorRecord.cSname}
                    </c:if>
-                   <c:if test="${cmBehaviorRecord.userIdentity eq 3}">
-                       ${cmBehaviorRecord.slinkMan}
+                   <c:if test="${cmBehaviorRecord.userIdentity eq 4}">
+                       <c:if test="${cmBehaviorRecord.cSname ne cmBehaviorRecord.userName}">
+                           ${cmBehaviorRecord.cSname}
+                       </c:if>
+                       <c:if test="${cmBehaviorRecord.cSname eq cmBehaviorRecord.userName}">
+                           ---
+                       </c:if>
+                   </c:if>
+                   <c:if test="${cmBehaviorRecord.sname ne null || cmBehaviorRecord.sname eq ''}">
+                       ${cmBehaviorRecord.sname}
                    </c:if>
                </td>
+               <td>
+                   ${cmBehaviorRecord.userName}
+               </td>
                <td>
                    <c:if test="${cmBehaviorRecord.userIdentity eq 2 || cmBehaviorRecord.userIdentity eq 4}">
                        ${cmBehaviorRecord.contractMobile}

+ 20 - 15
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordRoosList.jsp

@@ -27,6 +27,10 @@
         .ys-kin input,span{
             margin-left: 10px;
         }
+        .aCss {
+            color: #0d0d0d;
+            text-decoration: underline;
+        }
     </style>
 </head>
 <body>
@@ -112,22 +116,22 @@
             <c:if test="${cmBehaviorRecord.userID != '0'}">
                 <td>
                     <c:if test="${cmBehaviorRecord.userIdentity eq 2}">
-                        ${cmBehaviorRecord.name}
+                        ${cmBehaviorRecord.cSname}
                     </c:if>
                     <c:if test="${cmBehaviorRecord.userIdentity eq 4}">
-                        ${cmBehaviorRecord.linkMan}
+                        <c:if test="${cmBehaviorRecord.cSname ne cmBehaviorRecord.userName}">
+                            ${cmBehaviorRecord.cSname}
+                        </c:if>
+                        <c:if test="${cmBehaviorRecord.cSname eq cmBehaviorRecord.userName}">
+                            ---
+                        </c:if>
                     </c:if>
-                    <c:if test="${cmBehaviorRecord.userIdentity eq 3}">
+                    <c:if test="${cmBehaviorRecord.sname ne null || cmBehaviorRecord.sname eq ''}">
                         ${cmBehaviorRecord.sname}
                     </c:if>
                 </td>
                 <td>
-                    <c:if test="${cmBehaviorRecord.userIdentity eq 2 || cmBehaviorRecord.userIdentity eq 4}">
-                        ${cmBehaviorRecord.linkMan}
-                    </c:if>
-                    <c:if test="${cmBehaviorRecord.userIdentity eq 3}">
-                        ${cmBehaviorRecord.slinkMan}
-                    </c:if>
+                        ${cmBehaviorRecord.userName}
                 </td>
                 <td>
                     <c:if test="${cmBehaviorRecord.userIdentity eq 2 || cmBehaviorRecord.userIdentity eq 4}">
@@ -146,17 +150,18 @@
                     </c:if></td>
             </c:if>
             <td>
-                <c:if test="${cmBehaviorRecord.consultName eq null}">
+                <c:if test="${cmBehaviorRecord.consultName eq null || cmBehaviorRecord.consultName eq '' || cmBehaviorRecord.userID ne '0'}">
                     ---
                 </c:if>
-                <c:if test="${cmBehaviorRecord.consultName ne null}">
+                <c:if test="${cmBehaviorRecord.consultName ne null && cmBehaviorRecord.userID eq '0'}">
                     ${cmBehaviorRecord.consultName}
                 </c:if>
             </td>
-            <td><c:if test="${cmBehaviorRecord.consultMobile eq null}">
-                ---
-            </c:if>
-                <c:if test="${cmBehaviorRecord.consultMobile ne null}">
+            <td>
+                <c:if test="${cmBehaviorRecord.consultMobile eq null || cmBehaviorRecord.consultName eq '' || cmBehaviorRecord.userID ne '0'}">
+                    ---
+                </c:if>
+                <c:if test="${cmBehaviorRecord.consultMobile ne null && cmBehaviorRecord.userID eq '0'}">
                     ${cmBehaviorRecord.consultMobile}
                 </c:if>
             </td>