|
|
@@ -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);
|
|
|
+ }
|
|
|
+
|
|
|
}
|