| | |
| | | import org.springframework.util.ObjectUtils; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.text.DateFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | page.setSize(pageSize); |
| | | page.setCurrent(pageNum); |
| | | IPage<PartyBuildingActivityVO> iPage = comBpActivityDAO.pageActivity(page, partyBuildingActivityVO); |
| | | List<PartyBuildingActivityVO> records = iPage.getRecords(); |
| | | if (!ObjectUtils.isEmpty(records)) { |
| | | DateFormat formatTo = new SimpleDateFormat("M月d ahh:mm"); |
| | | records.forEach(partyBuildingActivityVO1 -> { |
| | | Date activityTimeBegin = partyBuildingActivityVO1.getActivityTimeBegin(); |
| | | if (!ObjectUtils.isEmpty(activityTimeBegin)) { |
| | | partyBuildingActivityVO1.setActivityTimeBeginFormat(formatTo.format(activityTimeBegin)); |
| | | } |
| | | }); |
| | | } |
| | | return R.ok(iPage); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | DateFormat formatTo = new SimpleDateFormat("M月d ahh:mm"); |
| | | String format = formatTo.format(new Date()); |
| | | System.out.println(format); |
| | | } |
| | | |
| | | } |