wanghui vor 7 Jahren
Ursprung
Commit
59584704f2

+ 3 - 3
GeneratorConfig.xml

@@ -8,8 +8,8 @@
     <jdbcConnection connectionURL="jdbc:mysql://192.168.1.213:3306/aft" 
     	driverClass="com.mysql.jdbc.Driver" password="123456" userId="dev" />
    <javaModelGenerator targetPackage="com.goafanti.common.model" targetProject="jitao-server" />
-   <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="jitao-server" />
-   <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="jitao-server" type="XMLMAPPER" />
-    <table schema="aft" tableName="user_interest"/> 
+  <!--  <sqlMapGenerator targetPackage="com.goafanti.common.mapper" targetProject="jitao-server" />
+   <javaClientGenerator targetPackage="com.goafanti.common.dao" targetProject="jitao-server" type="XMLMAPPER" /> -->
+    <table schema="aft" tableName="achievement"/> 
   </context>
 </generatorConfiguration>

+ 8 - 0
src/main/java/com/goafanti/achievement/controller/AdminAchievementApiController.java

@@ -65,6 +65,14 @@ public class AdminAchievementApiController extends CertifyApiController {
         res.setData(userService.selectAchievementOrgOwner(name));
         return res;
     }
+    
+    @RequestMapping(value = "/list")
+    public Result list(String name,String ownerName,Integer category,Integer dataCategory,String startDate,String endDate){
+    	Result res = new Result();
+    	
+    	return res;
+    }
+    
     /**
      * 个人成果详情详情
      */

+ 2 - 2
src/main/java/com/goafanti/achievement/controller/UserAchievementApiController.java

@@ -106,12 +106,12 @@ public class UserAchievementApiController extends CertifyApiController {
 	 */
 	@RequestMapping(value = "/list", method = RequestMethod.GET)
 	private Result list(Integer auditStatus, String name, Integer dataCategory,
-		 String releaseDateStartDate, String releaseDateEndDate,
+		 String startDate, String endDate,
 		 Integer pageNo, Integer pageSize) {
 		Result res = new Result();
 		
 		res.setData(achievementService.listMyAchievement(auditStatus, name, dataCategory,
-				 releaseDateStartDate, releaseDateEndDate, pageNo, pageSize));
+				 startDate, endDate, pageNo, pageSize));
 		return res;
 	}
 

+ 5 - 3
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -25,10 +25,12 @@ public interface AchievementService {
 
 	int deleteByPrimaryKey(List<String> asList);
 
-	Pagination<AchievementListBo> listMyAchievement(Integer auditStatus, String name,
-		 Integer dataCategory,  String releaseDateStartDate,
-			String releaseDateEndDate,  Integer pNo, Integer pSize);
+	Pagination<AchievementListBo> listMyAchievement(Integer auditStatus, String name,Integer dataCategory,  String startDate,
+			String endDate,  Integer pNo, Integer pSize);
 
+	Pagination<AchievementListBo> listAchievement(String name,String ownerName,Integer category,Integer dataCategory,Integer auditStatus, 
+			String startDate,String endDate,Integer pageNo,Integer pageSize);
+	
 	int updateAuditAchievement(Achievement a, String techBroderId, Integer auditStatus);
 
 	int updateReleaseStatus(Achievement a);

+ 25 - 55
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -217,59 +217,17 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@SuppressWarnings("unchecked")
 	@Override
-	public Pagination<AchievementListBo> listMyAchievement(Integer auditStatus, String name,
-		Integer dataCategory,  String releaseDateStartDate,
-			String releaseDateEndDate, Integer pNo, Integer pSize) {
-		return (Pagination<AchievementListBo>) findPage("listMyAchievementByPage", "listMyAchievementCount",
-				disposeParams( TokenManager.getUserId(), auditStatus,   dataCategory,name,
-						releaseDateStartDate, releaseDateEndDate),
+	public Pagination<AchievementListBo> listMyAchievement(Integer auditStatus, String name,Integer dataCategory, 
+			String startDate,String endDate, Integer pNo, Integer pSize) {
+		Map<String,Object> params = new HashMap<>();
+		params.put("ownerId", TokenManager.getUserId());
+		if (null != startDate) params.put("startDate", startDate);
+		if (null != endDate) params.put("endDate", endDate);
+		if (null != auditStatus) params.put("auditStatus", auditStatus);
+		if (!StringUtils.isBlank(name)) params.put("name", name);
+		return (Pagination<AchievementListBo>) findPage("listMyAchievementByPage", "listMyAchievementCount",params,
 				pNo, pSize);
 	}
-	
-	
-	private Map<String, Object> disposeParams( String ownerId,Integer auditStatus,Integer dataCategory,String name, 
-			String releaseDateStartDate, String releaseDateEndDate) {
-		Map<String, Object> params = new HashMap<>();
-		Date rStart = null;
-		Date rEnd = null;
-
-		if (null != dataCategory) {
-			params.put("dataCategory", dataCategory);
-		}
-
-		if (!StringUtils.isBlank(releaseDateStartDate)) {
-			try {
-				rStart = DateUtils.parseDate(releaseDateStartDate, AFTConstants.YYYYMMDD);
-			} catch (ParseException e) {
-			}
-		}
-
-		if (!StringUtils.isBlank(releaseDateEndDate)) {
-			try {
-				rEnd = DateUtils.addDays(DateUtils.parseDate(releaseDateEndDate, AFTConstants.YYYYMMDD), 1);
-			} catch (ParseException e) {
-			}
-		}
-	
-		if (!StringUtils.isBlank(ownerId)) {
-			params.put("ownerId", ownerId);
-		}
-		if (null != rStart) {
-			params.put("rStart", rStart);
-		}
-
-		if (null != rEnd) {
-			params.put("rEnd", rEnd);
-		}		
-
-		if (null != auditStatus) {
-			params.put("auditStatus", auditStatus);
-		}	
-		if (!StringUtils.isBlank(name)) {
-			params.put("name", name);
-		}
-		return params;
-	}
 
 	private Map<String, Object> disposeParams(Integer ownerType,String username, String ownerName, String ownerId, Integer auditStatus,
 			Integer serialNumber, String name, String keyword, Integer category, Integer status,
@@ -797,9 +755,21 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		// TODO Auto-generated method stub
 		return achievementMapper.guessYouLike(size);
 	}
-	
-	
-	
-	
 
+	@SuppressWarnings("unchecked")
+	@Override
+	public Pagination<AchievementListBo> listAchievement(String name, String ownerName, Integer category,
+			Integer dataCategory, Integer auditStatus, String startDate, String endDate,Integer pageNo,Integer pageSize) {
+		Map<String,Object> params = new HashMap<>();
+		if (null != startDate) params.put("startDate", startDate);
+		if (null != endDate) params.put("endDate", endDate);
+		if (null != auditStatus) params.put("auditStatus", auditStatus);
+		if (null != category) params.put("category", category);
+		if (null != dataCategory) params.put("dataCategory", dataCategory);
+		if (StringUtils.isNotBlank(name)) params.put("name", name);
+		if (StringUtils.isNotBlank(ownerName)) params.put("ownerName", ownerName);
+		return (Pagination<AchievementListBo>) findPage("listMyAchievementByPage", "listMyAchievementCount",params,
+				pageNo, pageSize);
+	}
+	
 }

Datei-Diff unterdrückt, da er zu groß ist
+ 175 - 231
src/main/java/com/goafanti/common/model/Achievement.java


+ 6 - 6
src/main/java/com/goafanti/common/model/AchievementWithBLOBs.java

@@ -4,19 +4,19 @@ public class AchievementWithBLOBs extends Achievement {
 
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column achievement.introduction
-	 * @mbg.generated  Fri Jun 15 08:46:05 CST 2018
+	 * @mbg.generated  Fri Jun 15 10:39:21 CST 2018
 	 */
 	private String introduction;
 	/**
 	 * This field was generated by MyBatis Generator. This field corresponds to the database column achievement.maturity_picture_url
-	 * @mbg.generated  Fri Jun 15 08:46:05 CST 2018
+	 * @mbg.generated  Fri Jun 15 10:39:21 CST 2018
 	 */
 	private String maturityPictureUrl;
 
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column achievement.introduction
 	 * @return  the value of achievement.introduction
-	 * @mbg.generated  Fri Jun 15 08:46:05 CST 2018
+	 * @mbg.generated  Fri Jun 15 10:39:21 CST 2018
 	 */
 	public String getIntroduction() {
 		return introduction;
@@ -25,7 +25,7 @@ public class AchievementWithBLOBs extends Achievement {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column achievement.introduction
 	 * @param introduction  the value for achievement.introduction
-	 * @mbg.generated  Fri Jun 15 08:46:05 CST 2018
+	 * @mbg.generated  Fri Jun 15 10:39:21 CST 2018
 	 */
 	public void setIntroduction(String introduction) {
 		this.introduction = introduction;
@@ -34,7 +34,7 @@ public class AchievementWithBLOBs extends Achievement {
 	/**
 	 * This method was generated by MyBatis Generator. This method returns the value of the database column achievement.maturity_picture_url
 	 * @return  the value of achievement.maturity_picture_url
-	 * @mbg.generated  Fri Jun 15 08:46:05 CST 2018
+	 * @mbg.generated  Fri Jun 15 10:39:21 CST 2018
 	 */
 	public String getMaturityPictureUrl() {
 		return maturityPictureUrl;
@@ -43,7 +43,7 @@ public class AchievementWithBLOBs extends Achievement {
 	/**
 	 * This method was generated by MyBatis Generator. This method sets the value of the database column achievement.maturity_picture_url
 	 * @param maturityPictureUrl  the value for achievement.maturity_picture_url
-	 * @mbg.generated  Fri Jun 15 08:46:05 CST 2018
+	 * @mbg.generated  Fri Jun 15 10:39:21 CST 2018
 	 */
 	public void setMaturityPictureUrl(String maturityPictureUrl) {
 		this.maturityPictureUrl = maturityPictureUrl;