Browse Source

修改订单搜索客户接口

anderx 1 year ago
parent
commit
945e34b8d3

+ 2 - 1
src/main/java/com/goafanti/common/dao/RestrictProjectMapper.java

@@ -44,5 +44,6 @@ public interface RestrictProjectMapper {
 
     void updateRefreshLockTime(@Param("uid") String uid, @Param("pid") String pid, @Param("aid") String aid);
 
-    Object selectRestrictProjectUser(List<String> list);
+
+    void deleteByPram(RestrictProject restrictProject);
 }

+ 5 - 0
src/main/java/com/goafanti/common/mapper/RestrictProjectMapper.xml

@@ -33,6 +33,11 @@
         delete from restrict_project
         where  id = #{id,jdbcType=INTEGER} 
     </delete>
+    <delete id="deleteByPram">
+        delete from restrict_project
+        where  uid = #{uid}
+        and pid = #{pid}
+    </delete>
     <insert id="insert" keyColumn="id" keyProperty="id" parameterType="com.goafanti.common.model.RestrictProject" useGeneratedKeys="true">
         insert into restrict_project
         ( id,pid,uid

+ 8 - 4
src/main/java/com/goafanti/common/mapper/UserMapperExt.xml

@@ -1535,13 +1535,17 @@
 
     <select id="selectSignedCustomerByName"  resultType="com.goafanti.customer.bo.CustomerSimpleBo">
    	 	select b.id,b.nickname as name from user b
-	where b.status = 0 and  b.new_channel=0
-	<if test="type==2">
-	and b.channel=1
+	where b.status = 0
+	<if test="type==0">
+	and  b.new_channel=0
 	</if>
 	<if test="type==1">
-	and b.share_type=2
+		and b.share_type=2
 	</if>
+	<if test="type==2">
+	and b.new_channel=1
+	</if>
+
 	and b.aid = #{aid}  and b.nickname like concat('%',#{name},'%')
     </select>
 

+ 8 - 0
src/main/java/com/goafanti/common/model/RestrictProject.java

@@ -56,6 +56,14 @@ public class RestrictProject implements Serializable {
 
     private static final long serialVersionUID = 1L;
 
+    public RestrictProject(String buyerId, String commodityId) {
+        setUid(buyerId);
+        setPid(commodityId);
+    }
+
+    public RestrictProject() {
+    }
+
     /**
      * 
      */

+ 1 - 0
src/main/java/com/goafanti/order/service/impl/OrderProjectServiceImpl.java

@@ -187,6 +187,7 @@ public class OrderProjectServiceImpl extends BaseMybatisDao<TOrderTaskMapper> im
 				log.setRemarks("签单触发锁定限时项目");
 				userTransferLogMapper.insertSelective(log);
 			} else {
+				restrictProjectMapper.deleteByPram(new RestrictProject(tn.getBuyerId(),t.getCommodityId()));
 				RestrictProject newRP=new RestrictProject();
 				newRP.setUid(tn.getBuyerId());
 				newRP.setAid(TokenManager.getAdminId());