Browse Source

新增奖金统计订单编号筛选

limin 7 years ago
parent
commit
b1f9ed1d70

+ 13 - 0
src/main/java/com/goafanti/common/mapper/TOrderBonusMapper.xml

@@ -379,6 +379,9 @@
   		<if test="b.grantStatus != null">
 		and b.grant_status = #{b.grantStatus,jdbcType=INTEGER}
 		</if>
+		<if test='b.orderNo != null and b.orderNo !=""'>
+		and b.order_no = #{b.orderNo,jdbcType=VARCHAR}
+		</if>
   		<if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
   		<bind name="a" value="b.startTime +'-01'"/>
   		<bind name="e" value="b.endTime +'-31'"/>
@@ -414,6 +417,10 @@
   		<if test="b.grantStatus != null">
 		and b.grant_status = #{b.grantStatus,jdbcType=INTEGER}
 		</if>
+  		<if test='b.orderNo != null and b.orderNo !=""'>
+		and b.order_no = #{b.orderNo,jdbcType=VARCHAR}
+		</if>
+		
   		<if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
   		<bind name="a" value="b.startTime +'-01'"/>
   		<bind name="e" value="b.endTime +'-31'"/>
@@ -448,6 +455,9 @@
 	<if test="b.grantStatus != null">
 	and b.grant_status = #{b.grantStatus,jdbcType=INTEGER}
 	</if>
+	<if test='b.orderNo != null and b.orderNo !=""'>
+	and b.order_no = #{b.orderNo,jdbcType=VARCHAR}
+	</if>
 	<if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
 	<bind name="a" value="b.startTime +'-01'"/>
 	<bind name="e" value="b.endTime +'-31'"/>
@@ -479,6 +489,9 @@
 	<if test="b.grantStatus != null">
 	and b.grant_status = #{b.grantStatus,jdbcType=INTEGER}
 	</if>
+	<if test='b.orderNo != null and b.orderNo !=""'>
+	and b.order_no = #{b.orderNo,jdbcType=VARCHAR}
+	</if>
 	<if test='b.startTime != null and b.startTime != "" and b.endTime != null and b.endTime != ""'>
 	<bind name="a" value="b.startTime +'-01'"/>
 	<bind name="e" value="b.endTime +'-31'"/>

+ 3 - 3
src/main/java/com/goafanti/common/mapper/TOrderNewMapper.xml

@@ -849,10 +849,10 @@
   	and o.sign_time between #{a,jdbcType=VARCHAR} and #{b,jdbcType=VARCHAR}
   	</if>
   	<if test="ob == 1">
-  	order by o.sign_time
+  	order by o.sign_time desc
   	</if>
   	<if test="ob == 2">
-  	order by o.liquidation_status,o.sign_time
+  	order by o.liquidation_status,o.sign_time desc
   	</if>
 	<if test="page_sql != null">
 		${page_sql}
@@ -992,7 +992,7 @@
 	  	<bind name="b" value="o.endTime + ' 23:59:59'"/>
 	  	and o.sign_time between #{a,jdbcType=VARCHAR} and #{b,jdbcType=VARCHAR}
 	  	</if>
-	  	order by o.liquidation_status, o.sign_time
+	  	order by o.liquidation_status, o.sign_time desc
 	  	<if test="page_sql != null">
 			${page_sql}
 		</if>

+ 11 - 9
src/main/java/com/goafanti/order/service/impl/FundManagerOrderServiceImpl.java

@@ -335,15 +335,17 @@ public class FundManagerOrderServiceImpl extends BaseMybatisDao<TOrderNewMapper>
 				email = email.substring(0, email.indexOf(","));
 				String sale = o.getSalesmanName();
 				sale = sale.substring(0,sale.indexOf(","));
-				EmailBo emailBo = new EmailBo("拒绝退单",email, sale, a.getDepartmentName(), a.getName(), content);
-				try {
-					SendEmailUtil.getInstance().send(emailBo);
-				} catch (UnsupportedEncodingException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
-				} catch (MessagingException e) {
-					// TODO Auto-generated catch block
-					e.printStackTrace();
+				if(email.matches("[\\w\\.\\-]+@([\\w\\-]+\\.)+[\\w\\-]+")){//email格式校验
+					EmailBo emailBo = new EmailBo("拒绝退单",email, sale, a.getDepartmentName(), a.getName(), content);
+					try {
+						SendEmailUtil.getInstance().send(emailBo);
+					} catch (UnsupportedEncodingException e) {
+						// TODO Auto-generated catch block
+						e.printStackTrace();
+					} catch (MessagingException e) {
+						// TODO Auto-generated catch block
+						e.printStackTrace();
+					}
 				}
 			}
 		}