瀏覽代碼

心愿管理显示学生心愿列表问题

yanliming 1 年之前
父節點
當前提交
73ac0df539

+ 2 - 0
common/src/main/java/com/jpsoft/employment/modules/base/dao/StudentAspirationsDAO.java

@@ -16,4 +16,6 @@ public interface StudentAspirationsDAO {
 	List<StudentAspirations> list();
 	List<StudentAspirations> search(Map<String, Object> searchParams, List<Sort> sortList);
 	List<StudentAspirations> findByWish(String wishInfoId);
+	List<StudentAspirations> listByWishInfo(String wishInfoId);
+
 }

+ 1 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/StudentAspirationsService.java

@@ -15,4 +15,5 @@ public interface StudentAspirationsService {
 	List<StudentAspirations> list();
 	Page<StudentAspirations> pageSearch(Map<String, Object> searchParams, int pageNum, int pageSize, boolean count, List<Sort> sortList);
 	List<StudentAspirations> findByWish(String wishInfoId);
+	List<StudentAspirations> listByWishInfo(String wishInfoId);
 }

+ 6 - 0
common/src/main/java/com/jpsoft/employment/modules/base/service/impl/StudentAspirationsServiceImpl.java

@@ -73,4 +73,10 @@ public class StudentAspirationsServiceImpl implements StudentAspirationsService
 		// TODO Auto-generated method stub
 		return studentAspirationsDAO.findByWish(wishInfoId);
 	}
+
+	@Override
+	public List<StudentAspirations> listByWishInfo(String wishInfoId) {
+		// TODO Auto-generated method stub
+		return studentAspirationsDAO.listByWishInfo(wishInfoId);
+	}
 }

+ 3 - 0
common/src/main/resources/mapper/base/StudentAspirations.xml

@@ -79,6 +79,9 @@
 	<select id="list" resultMap="StudentAspirationsMap">
 		select * from base_student_aspirations
 	</select>
+	<select id="listByWishInfo" resultMap="StudentAspirationsMap">
+		select * from base_student_aspirations WHERE del_flag = 0 AND wish_info_id = #{0}
+	</select>
 	<select id="findByWish" parameterType="string" resultMap="StudentAspirationsMap">
 		SELECT * FROM base_student_aspirations
 		WHERE del_flag = 0

+ 1 - 1
web/src/main/java/com/jpsoft/employment/modules/base/controller/WishInfoController.java

@@ -98,7 +98,7 @@ public class WishInfoController {
             WishInfo wishInfo = wishInfoService.get(id);
 
             if (wishInfo != null) {
-                List<StudentAspirations> studentAspirationsList = studentAspirationsService.findByWish(wishInfo.getId());
+                List<StudentAspirations> studentAspirationsList = studentAspirationsService.listByWishInfo(wishInfo.getId());
                 if(studentAspirationsList!=null){
                     wishInfo.setStudentAspirationsList(studentAspirationsList);
                 }