ZeroLiYi 1 年之前
父節點
當前提交
9e3b3ea7f9

+ 2 - 1
src/main/java/com/chinaitop/depot/sqr/mapper/BizSqrEnterpriseMapper.java

@@ -14,6 +14,7 @@ package com.chinaitop.depot.sqr.mapper;
14
 
14
 
15
 
15
 
16
 import com.chinaitop.depot.sqr.model.BizSqrEnterprise;
16
 import com.chinaitop.depot.sqr.model.BizSqrEnterprise;
17
+import org.apache.ibatis.annotations.Param;
17
 
18
 
18
 import java.util.List;
19
 import java.util.List;
19
 
20
 
@@ -39,5 +40,5 @@ public interface BizSqrEnterpriseMapper {
39
 
40
 
40
     BizSqrEnterprise fibdByEnterprise(String unitInfoId);
41
     BizSqrEnterprise fibdByEnterprise(String unitInfoId);
41
 
42
 
42
-	BizSqrEnterprise findById(String id);
43
+	BizSqrEnterprise findById(@Param("id") String id);
43
 }
44
 }

+ 1 - 1
src/main/java/com/chinaitop/depot/sqr/mapper/BizSqrEnterpriseMapper.xml

@@ -130,7 +130,7 @@
130
                              dict.DICT_LABEL
130
                              dict.DICT_LABEL
131
                       from province_all.biz_unit_info bui
131
                       from province_all.biz_unit_info bui
132
                                left join province_all.dev_dict dict on bui.dwlx = dict.id
132
                                left join province_all.dev_dict dict on bui.dwlx = dict.id
133
-        ) A ON bse.unit_info_id = A.id where A.id = #{id}
133
+        ) A ON bse.unit_info_id = A.id where bse.status in(2,3)   and A.id = #{id}
134
    </select>
134
    </select>
135
 
135
 
136
 </mapper>
136
 </mapper>

+ 5 - 2
src/main/java/com/chinaitop/depot/sqr/service/impl/BizSqrEnterpriseServiceImpl.java

@@ -57,8 +57,11 @@ public class BizSqrEnterpriseServiceImpl implements BizSqrEnterpriseService {
57
 
57
 
58
 	@Override
58
 	@Override
59
 	public BizSqrEnterprise findById(String id) {
59
 	public BizSqrEnterprise findById(String id) {
60
-		// TODO Auto-generated method stub
61
-		return bizSqrEnterpriseMapper.findById(id);
60
+        BizSqrEnterprise bizSqrEnterprise= bizSqrEnterpriseMapper.findById(id);
61
+        if(bizSqrEnterprise!=null){
62
+            return bizSqrEnterprise;
63
+        }
64
+		return null;
62
 	}
65
 	}
63
 
66
 
64
 
67