Просмотр исходного кода

发起客户档案完善修改

anderx 1 год назад
Родитель
Сommit
2d66b1fbc8

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

@@ -3,9 +3,9 @@ package com.goafanti.common.dao;
 import com.goafanti.common.model.OrganizationContactBook;
 import com.goafanti.common.model.OrganizationContactBookExample;
 import com.goafanti.user.bo.InputUserChannel;
+import org.apache.ibatis.annotations.Param;
 
 import java.util.List;
-import org.apache.ibatis.annotations.Param;
 
 public interface OrganizationContactBookMapper {
 
@@ -77,7 +77,7 @@ public interface OrganizationContactBookMapper {
 	 */
 	int updateByPrimaryKey(OrganizationContactBook record);
 
-	int checkContacts(@Param("uid")String uid,@Param("mobile")String mobile,@Param("aid")String aid);
+	Integer checkContacts(@Param("uid")String uid,@Param("mobile")String mobile,@Param("aid")String aid);
 
 	int updateMainContact(@Param("ocbId")String ocbId);
 	

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

@@ -446,10 +446,14 @@
 			count( 0 )
 		from
 			organization_contact_book
-		where
-			aid = #{aid,jdbcType=VARCHAR}
-			and uid = #{uid,jdbcType=VARCHAR}
+		where aid = #{aid,jdbcType=VARCHAR}
+		  <if test="mobile != null">
 			and mobile = #{mobile,jdbcType=VARCHAR}
+		</if>
+		  <if test="uid != null">
+			and uid = #{uid,jdbcType=VARCHAR}
+		  </if>
+
   </select>
   
   <update id="updateSubContact">

+ 6 - 0
src/main/java/com/goafanti/weChat/service/impl/PublicReleaseServiceImpl.java

@@ -1101,7 +1101,13 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
 			}
 		}else {
 			OrganizationIdentity organizationIdentity = organizationIdentityMapper.selectOrgIdentityByUserId(uid);
+			Integer i = organizationContactBookMapper.checkContacts(uid, null, user.getAid());
+			if (i==null||i<1){
+				return false;
+			}
 			if (userArchives==null||
+					userArchives.getEnterpriseCount()==0||
+					StringUtils.isBlank(userArchives.getInterviewDistribution())||
 					StringUtils.isBlank(organizationIdentity.getIntendedProject())||
 					StringUtils.isBlank(userArchives.getChannelIndicators())||
 					StringUtils.isBlank(userArchives.getInterviewIdeas())){