Browse Source

Merge remote-tracking branch 'origin/developerA' into developerA

chao 3 years ago
parent
commit
8049dcc746

+ 2 - 1
src/main/java/com/caimei/modules/utils/DateUtil.java

@@ -26,7 +26,7 @@ public class DateUtil {
     }
 
     /*
-    输入日期字符串,返回月底0点
+    输入日期字符串,返回下个月1号0点
     */
     public static Date getMaxDay(String month) {
         try {
@@ -34,6 +34,7 @@ public class DateUtil {
             calendar = Calendar.getInstance();
             calendar.setTime(nowDate);
             calendar.set(Calendar.DAY_OF_MONTH, calendar.getActualMaximum(Calendar.DAY_OF_MONTH));
+            calendar.add(Calendar.DAY_OF_MONTH,1);
             return calendar.getTime();
         } catch (ParseException e) {
             e.printStackTrace();

+ 8 - 6
src/main/resources/mappings/modules/super/CmSvipHistoryMapper.xml

@@ -80,9 +80,9 @@
         select
         cs.userId,
         cs.packageId,
-        cb.name as clubName,
-        cb.linkMan1 as linkMan,
-        cb.contractMobile1 as mobile,
+        u.name as clubName,
+        u.userName as linkMan,
+        u.bindMobile as mobile,
         cs.beginTime,
         cs.price,
         cs.payWay,
@@ -92,6 +92,7 @@
         cs.endTime
         from cm_svip_history cs
         LEFT JOIN club cb ON cs.userId = cb.userId
+        left join user u on cs.userId = u.userID
         where cs.userId = #{userId}
         <if test="startPayTime != null and startPayTime != '' and endPayTime != null and endPayTime != ''">
             and (payTime between #{startPayTime} and #{endPayTime})
@@ -127,15 +128,16 @@
         FROM cm_svip_history cs
         LEFT JOIN club cb ON cs.userId = cb.userId
         LEFT JOIN cm_svip_user cu ON cs.userId = cu.userId
+        left join user u on cs.userId = u.userID
         <where>
             <if test="clubName != null and clubName != ''">
-                and cb.name like concat('%',#{clubName},'%')
+                and u.name like concat('%',#{clubName},'%')
             </if>
             <if test="linkMan != null and linkMan != ''">
-                and cb.linkMan1 like concat('%',#{linkMan},'%') or linkMan2 like concat('%',#{linkMan},'%')
+                and u.username like concat('%',#{linkMan},'%')
             </if>
             <if test="mobile != null and mobile != ''">
-                and cb.contractMobile1=#{mobile}
+                and u.bindMobile LIKE concat('%',#{mobile},'%')
             </if>
             <if test="startPayTime !=null and startPayTime != '' and endPayTime !=null and endPayTime!=''">
                 and (payTime between #{startPayTime} and #{endPayTime})

+ 0 - 1
src/main/webapp/WEB-INF/views/modules/super/cmSvipPackageForm.jsp

@@ -74,7 +74,6 @@
     </div>
     <div class="form-actions">
         <input id="btnSubmit" class="btn btn-primary" type="submit" value="保 存"/>&nbsp;
-        <input id="btnCancel" class="btn" type="button" value="返 回" onclick="history.go(-1)"/>
     </div>
 </form:form>
 </body>

+ 5 - 4
src/main/webapp/WEB-INF/views/modules/svip/cmSvipHistoryForm.jsp

@@ -107,10 +107,10 @@
                     <c:if test="${cmSvipHistory.packageId eq '3'}">1个月</c:if>
             </td>
             <td>
-                <c:if test="${cmSvipHistory.payWay eq '0'}">${cmSvipHistory.price}</c:if>
-                <c:if test="${cmSvipHistory.payWay eq '1'}">${cmSvipHistory.price}</c:if>
-                <c:if test="${cmSvipHistory.payWay eq '2'}">${cmSvipHistory.price}</c:if>
-                <c:if test="${cmSvipHistory.payWay eq '3'}">${cmSvipHistory.price}</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '0'}">${cmSvipHistory.price}</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '1'}">${cmSvipHistory.price}</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '2'}">${cmSvipHistory.price}</c:if>
+                <c:if test="${cmSvipHistory.payWay eq '3'}">${cmSvipHistory.price}</c:if>
                 <c:if test="${cmSvipHistory.payWay eq '4'}"><fmt:formatNumber value="${cmSvipHistory.userBeans}" pattern="#" type="number"/>采美豆</c:if>
             </td>
             <td>
@@ -123,6 +123,7 @@
             <td>
                 <c:if test="${cmSvipHistory.status eq '1'}"><font color="green">已生效</font> </c:if>
                 <c:if test="${cmSvipHistory.status eq '2'}"><font color="red">已过期</font> </c:if>
+                <c:if test="${cmSvipHistory.status eq '3'}"><font color="Orange">暂未生效</font> </c:if>
             </td>
             <td><fmt:formatDate value="${cmSvipHistory.payTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
             <td><fmt:formatDate value="${cmSvipHistory.endTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>