Bläddra i källkod

用户行为记录优化修复

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

+ 5 - 0
src/main/java/com/caimei/modules/user/service/CmBehaviorRecordService.java

@@ -85,8 +85,13 @@ public class CmBehaviorRecordService extends CrudService<CmBehaviorRecordDao, Cm
                 list.addAll(listData);
             } else {
                 listData = cmBehaviorRecordDao.findListBefore(cmBehaviorRecord);
+                Double doubles = 0.0;
                 if (listData.size() != 0) {
                     CmBehaviorRecord behaviorRecord = listData.get(0);
+                    for (CmBehaviorRecord recordList: listData) {
+                        doubles += Double.parseDouble(recordList.getAccessDuration());
+                    }
+                    behaviorRecord.setAccessDuration(doubles.toString());
                     listDataMerge.add(behaviorRecord);
                     listData = listDataMerge;
                 }

+ 12 - 109
src/main/webapp/WEB-INF/views/modules/user/behaviorRecordAgency.jsp

@@ -235,18 +235,16 @@
                     <label class="control-label"><b>地址:</b></label>
                     <div class="controls">
                         <form:select path="provinceID" class="input-xlarge" id="province"
-                                     onchange="loadCity()" style="width:100px;">
+                                     onchange="loadCity()" disabled="true" style="width:100px;">
                             <form:option value="" label="省" provinceId=""/>
                         </form:select>
-                        <form:select path="cityID" class="input-xlarge" id="city" onchange="loadTown()"
+                        <form:select path="cityID" class="input-xlarge" id="city" onchange="loadTown()" disabled="true"
                                      style="width:100px;">
                             <form:option value="" label="市" cityId=""/>
                         </form:select>
-                        <form:select path="townID" class="input-xlarge" id="town" style="width:100px;">
+                        <form:select path="townID" class="input-xlarge" id="town" disabled="true" style="width:100px;">
                             <form:option value="" label="区"/>
                         </form:select>
-                        <%--<form:input path="address" id="address" name="address" class="input-xlarge userAddress" width="20px" maxlength="60"
-                                    placeholder="请填写会所详细的地址"/>--%>
                         ${newCmClub.address}
                     </div>
                 </div>
@@ -265,23 +263,12 @@
                 <div class="control-group">
                     <label class="control-label"><b>营业执照:</b></label>
                     <img width="100" height="100" src="${newCmClub.businessLicenseImage}">
-                    <%--<div class="controls">
-                        <form:hidden id="businessLicenseImage" name="businessLicenseImage" path="businessLicenseImage" htmlEscape="false"
-                                     maxlength="255" class="input-xlarge required"/>
-                        <sys:ckfinder input="businessLicenseImage" type="images" uploadPath="/photo"
-                                      selectMultiple="false" maxWidth="100" maxHeight="100"/>
-                    </div>--%>
                 </div>
             </td>
             <td>
                 <div class="control-group">
                     <label class="control-label"><b>门头照:</b></label>
                     <img width="100" height="100" src="${newCmClub.headpic}">
-                    <%--<div class="controls">
-                        <form:hidden id="headpic" name="headpic" path="headpic" htmlEscape="false" maxlength="255"
-                                     class="input-xlarge"/>
-                        <sys:ckfinder input="headpic" type="images" uploadPath="/photo" maxWidth="100" maxHeight="100"/>
-                    </div>--%>
                 </div>
             </td>
         </tr>
@@ -305,67 +292,11 @@
                             <c:if test="${cmClubinfo.secondClubType eq '5'}"> - 美容院</c:if>
                             <c:if test="${cmClubinfo.secondClubType eq '6'}"> - 养生馆</c:if>
                             <c:if test="${cmClubinfo.secondClubType eq '7'}"> - 其他</c:if>
-<%--                            <input name="firstClubType" value="1" type="radio" ${cmClubinfo.firstClubType == "1" ? "checked" : ""}/>医美--%>
                         </div>
-                        <%--<div class="raw-beauty">
-                            <input name="firstClubType" value="2" type="radio" ${cmClubinfo.firstClubType == "2" ? "checked" : ""}/>生美
-                        </div>
-                        <div class="raw-beauty">
-                            <input name="firstClubType" value="3" type="radio" ${cmClubinfo.firstClubType == "3" ? "checked" : ""}/>项目公司
-                        </div>
-                        <div class="raw-beauty">
-                            <input name="firstClubType" value="4" type="radio" ${cmClubinfo.firstClubType == "4" ? "checked" : ""}/>个人
-                        </div>
-                        <div class="raw-beauty">
-                            <input name="firstClubType" value="5" type="radio" ${cmClubinfo.firstClubType == "5" ? "checked" : ""}/>其他
-                        </div>--%>
                     </div>
-                    <span class="err-tip"></span>
-                    <div class="med-option the-oradio" style="display: none" id="ejf">
-                        <div class="med-beauty">
-                            <%--<c:if test="${cmClubinfo.secondClubType eq '1'}">-诊所</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '2'}">-门诊</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '3'}">-医院</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '4'}">-其他</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '5'}">-美容院</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '6'}">-养生馆</c:if>
-                            <c:if test="${cmClubinfo.secondClubType eq '7'}">-其他</c:if>--%>
-<%--                            <input name="secondClubType" value="1"--%>
-<%--                                                       type="radio"  ${cmClubinfo.secondClubType == "1" ? "checked" : ""}/>诊所--%>
-                        </div>
-                        <%--<div class="med-beauty"><input name="secondClubType" value="2"
-                                                       type="radio"  ${cmClubinfo.secondClubType == "2" ? "checked" : ""}/>门诊
-                        </div>
-                        <div class="med-beauty"><input name="secondClubType" value="3"
-                                                       type="radio" ${cmClubinfo.secondClubType == "3" ? "checked" : ""}/>医院
-                        </div>
-                        <div class="med-beauty"><input name="secondClubType" value="4"
-                                                       type="radio" ${cmClubinfo.secondClubType == "4" ? "checked" : ""}/>其他
-                        </div>
-                        <span class="err-tip"></span>--%>
-                    </div>
-                    <%--<div class="raw-option the-oradio" style="display: none" id="ej">
-                        <div class="med-beauty"><input name="secondClubType" value="5"
-                                                       type="radio"  ${cmClubinfo.secondClubType == "5" ? "checked" : ""}/>美容院
-                        </div>
-                        <div class="med-beauty"><input name="secondClubType" value="6"
-                                                       type="radio"  ${cmClubinfo.secondClubType == "6" ? "checked" : ""}/>养生馆
-                        </div>
-                        <div class="med-beauty"><input name="secondClubType" value="7"
-                                                       type="radio" ${cmClubinfo.secondClubType == "7" ? "checked" : ""}/>其他
-                        </div>
-                        <span class="err-tip"></span>
-                    </div>--%>
                     <div class="qualification control-group" style="display: none">
                         <label class="control-label"><b>医疗许可证:</b></label>
                         <img width="100" height="100" src="${cmClubinfo.medicalPracticeLicenseImg}">
-                        <%--<div class="controls" style="margin-bottom: 10px">
-                            <form:hidden id="medicalPracticeLicenseImg" path="medicalPracticeLicenseImg"
-                                         htmlEscape="false" maxlength="255"
-                                         class="input-xlarge"/>
-                            <sys:ckfinder input="medicalPracticeLicenseImg" type="images" uploadPath="/photo"
-                                          maxWidth="100" maxHeight="100"/>
-                        </div>--%>
                     </div>
                 </div>
                 <div class="control-group epart" style="display: none">
@@ -377,10 +308,7 @@
                 </div>
                 <div class="control-group" >
                     <label class="control-label"><b>主营内容:</b></label>
-<%--                    <div class="tags-area" id="clubArea"></div>--%>
-<%--                    <span class="err-tip" style="display: inline-block;margin-left:-55px;"></span>--%>
                     <font size="3">${cmClubinfo.mainpro}</font>
-<%--                    <input type="hidden" name="mainpro" value="${cmClubinfo.mainpro}" id="cMainPro">--%>
                 </div>
             </td>
         </tr>
@@ -421,20 +349,17 @@
             <table border="0" cellspacing="0" cellpadding="0" width="100%">
                 <tr height="28">
                     <th>机构面积:</th>
-                    <td>${cmClubinfo.area}<%--<form:input path="area" name="area" htmlEscape="false" class="input-medium" onkeyup="num(this)"/>--%>
+                    <td>${cmClubinfo.area}
                     </td>
                 </tr>
                 <tr height="28">
                     <th>美容床数:</th>
-                    <td>${cmClubinfo.bedNums}<%--<form:input path="bedNums" name="bedNums" htmlEscape="false" maxlength="11" class="input-medium"
-                                    onkeyup="int(this)"/>--%>
-                            <%--<input type="text" name="bedNums" value="${clubInfo.bedNums}">--%>
+                    <td>${cmClubinfo.bedNums}
                     </td>
                 </tr>
                 <tr height="28">
                     <th>美容师数:</th>
-                    <td>${cmClubinfo.beauticians}<%--<form:input path="beauticians" name="beauticians" htmlEscape="false" maxlength="11" class="input-medium"
-                                    onkeyup="int(this)"/>--%>
+                    <td>${cmClubinfo.beauticians}
                     </td>
                 </tr>
             </table>
@@ -444,20 +369,17 @@
             <table border="0" cellspacing="0" cellpadding="0" width="100%">
                 <tr height="28">
                     <th>月业绩:</th>
-                    <td>${cmClubinfo.monthAchievement}<%--<form:input path="monthAchievement" name="monthAchievement" htmlEscape="false" maxlength="63" class="input-medium"
-                                    onkeyup="num(this)"/>--%>
+                    <td>${cmClubinfo.monthAchievement}
                     </td>
                 </tr>
                 <tr height="28">
                     <th>促销业绩:</th>
-                    <td>${cmClubinfo.promotionAchievement}<%--<form:input path="promotionAchievement" name="promotionAchievement" htmlEscape="false" maxlength="63" class="input-medium"
-                                    onkeyup="num(this)"/>--%>
+                    <td>${cmClubinfo.promotionAchievement}
                     </td>
                 </tr>
                 <tr height="28">
                     <th>年业绩:</th>
-                    <td>${cmClubinfo.yearAchievement}<%--<form:input path="yearAchievement" name="yearAchievement" htmlEscape="false" maxlength="63" class="input-medium"
-                                    onkeyup="num(this)"/>--%>
+                    <td>${cmClubinfo.yearAchievement}
                     </td>
                 </tr>
             </table>
@@ -467,26 +389,17 @@
             <table border="0" cellspacing="0" cellpadding="0" width="100%">
                 <tr height="28">
                     <th>A类会员:</th>
-                    <td colspan="3" style="padding-top: 6px;">
-                        <%--<form:input path="cateA" name="cateA" htmlEscape="false" maxlength="11" class="cut-input-medium"
-                                    onkeyup="int(this)"/>--%>${cmClubinfo.cateA}人&nbsp;
-                        <%--<form:input path="consumeA" name="consumeA" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>--%>${cmClubinfo.consumeA}元
+                    <td colspan="3" style="padding-top: 6px;">${cmClubinfo.cateA}人&nbsp;${cmClubinfo.consumeA}元
                     </td>
                 </tr>
                 <tr height="28">
                     <th>B类会员:</th>
-                    <td colspan="3" style="padding-top: 6px;">
-                        <%--<form:input path="cateB" name="cateB"  htmlEscape="false" maxlength="11" class="cut-input-medium"
-                                    onkeyup="int(this)"/>--%>${cmClubinfo.cateB}人&nbsp;
-                        <%--<form:input path="consumeB" name="consumeB" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>--%>${cmClubinfo.consumeB}元
+                    <td colspan="3" style="padding-top: 6px;">${cmClubinfo.cateB}人&nbsp;${cmClubinfo.consumeB}元
                     </td>
                 </tr>
                 <tr height="28">
                     <th>C类会员:</th>
-                    <td colspan="3" style="padding-top: 6px;">
-                        <%--<form:input path="cateC" name="cateC" htmlEscape="false" maxlength="11" class="cut-input-medium"
-                                    onkeyup="int(this)"/>--%>${cmClubinfo.cateC}人&nbsp;
-                        <%--<form:input path="consumeC" name="consumeC" htmlEscape="false" class="cut-input-medium" onkeyup="num(this)"/>--%>${cmClubinfo.consumeC}元
+                    <td colspan="3" style="padding-top: 6px;">${cmClubinfo.cateC}人&nbsp;${cmClubinfo.consumeC}元
                     </td>
                 </tr>
             </table>
@@ -497,22 +410,16 @@
                 <tr height="28">
                     <th>最高业绩:</th>
                     <td>${cmClubinfo.highestAchievement}
-                        <%--<form:input path="highestAchievement" name="highestAchievement" htmlEscape="false" maxlength="63" class="input-medium"
-                                    onkeyup="num(this)"/>--%>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>到店人数:</th>
                     <td>${cmClubinfo.reachPepole}
-                        <%--<form:input path="reachPepole" name="reachPepole" htmlEscape="false" maxlength="11" class="input-medium"
-                                    onkeyup="int(this)"/>--%>
                     </td>
                 </tr>
                 <tr height="28">
                     <th>成交人数:</th>
                     <td>${cmClubinfo.clinchPepole}
-                        <%--<form:input path="clinchPepole" htmlEscape="false" maxlength="11" class="input-medium"
-                                    onkeyup="int(this)"/>--%>
                     </td>
                 </tr>
             </table>
@@ -521,13 +428,9 @@
             <tr height="28">
                 <th>店内所经营品牌及推广优势:</th>
                 <td colspan="10" width="25%">${cmClubinfo.brandSuperiority}
-                    <%--<form:textarea rows="7" cols="80" path="brandSuperiority" htmlEscape="false" cssStyle="width:90%;"
-                                   maxlength="200"/>--%>
                 </td>
                 <th>临近一次促销的模式及达成业绩:</th>
                 <td colspan="10" width="25%">${cmClubinfo.lastPromotion}
-                    <%--<form:textarea rows="7" cols="80" path="lastPromotion" htmlEscape="false" cssStyle="width:90%;"
-                                   maxlength="200"/>--%>
                 </td>
             </tr>
         </table>