|
|
@@ -548,5 +548,37 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
return publicReleaseMapper.publicByOrder(orderNo);
|
|
|
}
|
|
|
|
|
|
+ @Override
|
|
|
+ public Object getMyNewPublic() {
|
|
|
+ List<OutPublicReleaseList> myPublic = getMyPublic(0,0);
|
|
|
+ if (myPublic.isEmpty()){
|
|
|
+ List<OutPublicReleaseList> myPublic2 = getMyPublic(3,0);
|
|
|
+ if (!myPublic2.isEmpty()){
|
|
|
+ return myPublic2.get(0);
|
|
|
+ }else {
|
|
|
+ List<OutPublicReleaseList> myPublic3 = getMyPublic(0,0);
|
|
|
+ if(!myPublic3.isEmpty())return myPublic3.get(0);
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ return myPublic.get(0);
|
|
|
+ }
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+
|
|
|
+ public List<OutPublicReleaseList>getMyPublic(Integer type,Integer dateType){
|
|
|
+ InputPublicReleaseList in=new InputPublicReleaseList();
|
|
|
+ if (type==null)type=0;
|
|
|
+ in.setType(type);
|
|
|
+ if (dateType==1){
|
|
|
+ Date date = new Date();
|
|
|
+ String clockTime=DateUtils.formatDate(date,AFTConstants.YYYYMMDDHHMMSS);
|
|
|
+ in.setClockTime(clockTime);
|
|
|
+ }
|
|
|
+ in.setPageNo(1);
|
|
|
+ in.setPageSize(1);
|
|
|
+ Pagination<OutPublicReleaseList> p= (Pagination<OutPublicReleaseList>) listPublicRelease(in);
|
|
|
+ List<OutPublicReleaseList> list = (List<OutPublicReleaseList>) p.getList();
|
|
|
+ return list;
|
|
|
+ }
|
|
|
|
|
|
}
|