Browse Source

Merge branch 'test' of jishutao/kede-server into prod

anderx 3 years ago
parent
commit
a432ebad55

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

@@ -795,9 +795,12 @@
         <if test="o.projectType != null and o.projectType != &quot;&quot;">
           and a.project_type = #{o.projectType}
         </if>
-        <if test="o.approval != null and o.approval != &quot;&quot;">
+        <if test="o.approval != null and o.approval &lt; 3">
           and o.approval = #{o.approval}
         </if>
+        <if test="o.approval != null and o.approval ==4">
+          and o.approval in (1,2)
+        </if>
 	  	<if test="o.buyerName != null and o.buyerName != &quot;&quot;">
 	  	<bind name="n" value="'%' + o.buyerName + '%'" />
 	  	and u.nickname  like #{n,jdbcType=VARCHAR}
@@ -869,9 +872,12 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     <if test="o.projectType != null and o.projectType != &quot;&quot;">
       and a.project_type = #{o.projectType}
     </if>
-    <if test="o.approval != null and o.approval != &quot;&quot;">
+    <if test="o.approval != null and o.approval &lt; 3">
       and o.approval = #{o.approval}
     </if>
+    <if test="o.approval != null and o.approval ==4">
+      and o.approval in (1,2)
+    </if>
 	  	<if test="o.buyerName != null and o.buyerName != &quot;&quot;">
 	  	<bind name="n" value="'%' + o.buyerName + '%'" />
 	  	and u.nickname  like #{n,jdbcType=VARCHAR}
@@ -945,9 +951,11 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.outsource= #{outsource,jdbcType=INTEGER}
   	</if>
   	<if test="specially == 0">
-  	and a.order_status not in(3,5,6,7) and a.approval in(0,1,2)
+  	  <if test="approval ==null">
+  	  and a.approval in(0,1,2)
+      </if>
+  	and a.order_status  in(0,1,2,4)
   	and a.salesman_id = #{aid,jdbcType=VARCHAR}
-
   	</if>
   	<if test="specially == 1">
   	and a.process_status = 1  and a.order_status = 1
@@ -979,6 +987,12 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
           and a.approval = 0
         </if>
         <if test="approval ==1">
+          and a.approval =1
+        </if>
+        <if test="approval ==2">
+          and a.approval =2
+        </if>
+        <if test="approval ==4">
           and a.approval in (1,2)
         </if>
       </if>
@@ -1091,15 +1105,12 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
   	and a.outsource= #{outsource,jdbcType=INTEGER}
   	</if>
   	<if test="specially == 0">
-  	and a.order_status not in(3,5,6,7) and a.approval in(0,1,2)
-  	and a.salesman_id = #{aid,jdbcType=VARCHAR}
-      <if test="approval ==0">
-        and a.approval = 0
+      <if test="approval ==null">
+        and a.approval in(0,1,2)
       </if>
-      <if test="approval ==1">
-        and a.approval in (1,2)
-      </if>
-  	</if>
+      and a.order_status  in(0,1,2,4)
+      and a.salesman_id = #{aid,jdbcType=VARCHAR}
+    </if>
   	<if test="specially == 1">
   	and a.process_status = 1  and a.order_status = 1
   	<!-- and c.department_id in (#{deps,jdbcType=VARCHAR}) -->
@@ -1130,6 +1141,12 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
          and a.approval = 0
        </if>
        <if test="approval ==1">
+         and a.approval =1
+       </if>
+       <if test="approval ==2">
+         and a.approval =2
+       </if>
+       <if test="approval ==4">
          and a.approval in (1,2)
        </if>
      </if>
@@ -1446,9 +1463,12 @@ left join department d on o.order_dep = d.id   left join t_order_mid a on o.orde
     <if test="o.projectType != null and o.projectType != &quot;&quot;">
       and a.project_type = #{o.projectType}
     </if>
-    <if test="o.approval != null and o.approval != &quot;&quot;">
+    <if test="o.approval != null and o.approval &lt; 3">
       and o.approval = #{o.approval}
     </if>
+    <if test="o.approval != null and o.approval ==4">
+      and o.approval in (1,2)
+    </if>
     <if test="o.buyerName != null and o.buyerName != &quot;&quot;">
       <bind name="n" value="'%' + o.buyerName + '%'" />
       and u.nickname  like #{n,jdbcType=VARCHAR}

+ 1 - 1
src/main/java/com/goafanti/customer/service/impl/CustomerServiceImpl.java

@@ -215,7 +215,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
 			//处理为空报错
 			params.put("role", 0);
 			String [] names =pushNames(cli.getName());
-			if (names.length>1){
+			if (names.length>0){
 				params.put("names", names);
 			}else {
 				return new Pagination<>();