Browse Source

专家列表BUG修复

anderx 8 years ago
parent
commit
33fb604c23

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

@@ -58,4 +58,6 @@ public interface DemandMapper {
 	List<DemandInterestBo> demandInterest(String uid);
 
 	Demand selectDemandDetail(String id);
+
+	DemandListBo selectAppByPrimaryKey(String id);
 }

+ 6 - 0
src/main/java/com/goafanti/common/mapper/DemandMapper.xml

@@ -54,6 +54,12 @@
     audit_status, tech_broker_id,boutique,urgent_money,urgent_days
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
+    select 
+    <include refid="Base_Column_List" />
+    from demand
+    where id = #{id,jdbcType=VARCHAR}
+  </select>
+  <select id="selectAppByPrimaryKey" resultType="com.goafanti.demand.bo.DemandListBo" parameterType="java.lang.String" >
      select 
     d.id, d.serial_number AS serialNumber, d.data_category AS dataCategory, d.name, d.keyword, d.info_sources AS infoSources, d.industry_category_a AS industryCategoryA, 
     d.industry_category_b AS industryCategoryB, d.industry_category_c AS industryCategoryC, d.demand_type AS demandType, d.problem_des AS problemDes, d.technical_requirements AS technicalRequirements, 

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

@@ -1079,9 +1079,12 @@
   
   <select id="findUserIdentityCount" parameterType="String" resultType="java.lang.Integer">
   	select count(0) 
-   from user u left JOIN user_identity t
-	on t.uid = u.id
-	where 1=1
+   from user_identity t left JOIN user u on t.uid = u.id
+	left join (select count(0) as x,seller_id from t_order
+				where order_status != 4
+				group by  seller_id ) o on t.uid=o.seller_id
+	where expert=1
+	and u.status !=1
     <if test="industry != null">
         and t.industry = #{industry,jdbcType=VARCHAR}
     </if>

+ 2 - 3
src/main/java/com/goafanti/demand/service/impl/DemandServiceImpl.java

@@ -787,9 +787,8 @@ public class DemandServiceImpl extends BaseMybatisDao<DemandMapper> implements D
 
 	@Override
 	public DemandListBo selectDemandDetail(String id ) {
-		Demand d1=demandMapper.selectByPrimaryKey(id);
-		DemandListBo d=new DemandListBo();
-		BeanUtils.copyProperties(d1, d);
+		DemandListBo d=demandMapper.selectAppByPrimaryKey(id);
+		
 		if (null!=d.getIndustryCategoryA()) {
 			d.setIndustryCategory1(fieldGlossoryMapper.selectByPrimaryKey(d.getIndustryCategoryA()).getName());
 		}