wanghui il y a 7 ans
Parent
commit
453d9baf03

+ 0 - 2
src/main/java/com/goafanti/achievement/service/AchievementService.java

@@ -66,10 +66,8 @@ public interface AchievementService {
 
 	AchievementUserOwnerDetailBo selectAppUserOwnerDetail(String id);
 
-
 	int saveAppAchievement(Achievement a, String[] keywords);
 
-
 	public List<AchievementObject> recentAchievements(int size,String url,String showLocation);
 	
 	public List<AchievementObject>getHotAchievements(int size,String url,String showLocation);

+ 12 - 9
src/main/java/com/goafanti/achievement/service/impl/AchievementServiceImpl.java

@@ -67,6 +67,7 @@ import com.goafanti.demand.bo.DemandAchievementListBo;
 import com.goafanti.portal.bo.AchievementDetailBo;
 import com.goafanti.portal.bo.AchievementObject;
 import com.goafanti.portal.bo.AchievementPortalDetailBo;
+import com.goafanti.portal.bo.AchievementResultObject;
 
 @Service
 public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> implements AchievementService {
@@ -191,7 +192,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@Override
 	public Achievement selectByPrimaryKey(String id) {
-		return achievementMapper.selectByPrimaryKey(id);
+		return achievementMapper.selectByPrimaryKey(id);  
 	}
 
 	@Override
@@ -228,7 +229,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		return (Pagination<AchievementListBo>) findPage("listMyAchievementByPage", "listMyAchievementCount",params,
 				pNo, pSize);
 	}
-
+	
 	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,
 			String releaseDateStartDate, String releaseDateEndDate,String createDateStartDate, String createDateEndDate, Integer releaseStatus, Integer type,
@@ -396,7 +397,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@Override
 	public int updateReleaseStatus(Achievement a) {
-		a.setAuditStatus(AchievementAuditStatus.AUDITED.getCode());
+		a.setAuditStatus(AchievementAuditStatus.REVOKE.getCode());
 		if(a.getReleaseStatus()==1){
 			Calendar now = Calendar.getInstance();
 			now.set(Calendar.MILLISECOND, 0);
@@ -404,6 +405,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		}
 		achievementDemandMapper.deleteByAchievementId(a.getId());
 		achievementKeywordMapper.batchDeleteByAchievementId(a.getId());
+		achievementPublishMapper.batchDeleteByAchievementId(a.getId());
 		int i=0;
 		i=achievementMapper.updateByPrimaryKeySelective(a);
 		if (StringUtils.isNotBlank(a.getOwnerId())) {
@@ -466,7 +468,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 			a.setId(UUID.randomUUID().toString());
 			a.setDeletedSign(DeleteStatus.UNDELETE.getCode());
 			a.setCreateTime(now.getTime());
-			a.setAuditStatus(AchievementAuditStatus.INAUDIT.getCode());
+			a.setAuditStatus(AchievementAuditStatus.SUBMIT.getCode());
 			a.setReleaseStatus(AchievementReleaseStatus.UNRELEASE.getCode());
 			a.setTechBrokerId(techBrokerId);
 			List<String> keywordsList = bo.getKeywords();
@@ -617,7 +619,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 
 	@Override
 	public int updateByPrimaryKeySelective(Achievement a) {
-		return achievementMapper.updateByPrimaryKey(a);
+		return achievementMapper.updateByPrimaryKeySelective(a);
 	}
 
 	@CacheEvict(value = "internationalAchievementList", allEntries = true)
@@ -689,7 +691,7 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		if (AchievementAuditStatus.SUBMIT.getCode().equals(a.getAuditStatus())) {
 			createAuditorNotice(a);
 		} else {
-			a.setAuditStatus(AchievementAuditStatus.INAUDIT.getCode());
+			a.setAuditStatus(AchievementAuditStatus.SUBMIT.getCode());
 		}
 		if (null!=TokenManager.getUserId()) {
 			a.setOwnerId(TokenManager.getUserId());
@@ -761,11 +763,12 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		// TODO Auto-generated method stub
 		return achievementMapper.getAchievementDetailById(id);
 	}
-	
+
 	@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) {
+			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);
@@ -777,5 +780,5 @@ public class AchievementServiceImpl extends BaseMybatisDao<AchievementMapper> im
 		return (Pagination<AchievementListBo>) findPage("listMyAchievementByPage", "listMyAchievementCount",params,
 				pageNo, pageSize);
 	}
-	
+
 }