| | |
| | | import javax.servlet.http.HttpSession; |
| | | import java.lang.reflect.Type; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | } catch (ParamsException e) { |
| | | e.printStackTrace(); |
| | | return JsonUtil.loadFalseResult(e.getMessage()); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return JsonUtil.loadFalseResult(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | long count = goldCornGetRecordService.countUidsByDay(record.getDay()); |
| | | int pageSize = 1000; |
| | | int pageSize = 16; |
| | | int page = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1); |
| | | try { |
| | | for (int i = 0; i < page; i++) { |
| | | List<Long> list = goldCornGetRecordService.getUidsByDay(record.getDay(), i + 1, pageSize); |
| | | List<GoldCornSettleMQMsg> msgList = new ArrayList<>(); |
| | | for (Long uid : list) { |
| | | msgList.add(new GoldCornSettleMQMsg(record.getId(), uid, record.getDay(), System.currentTimeMillis())); |
| | | } |
| | | //加入到CMQ |
| | | CMQManager.getInstance().addGoldCornSettleMsg(new GoldCornSettleMQMsg(record.getId(), uid, record.getDay(), System.currentTimeMillis())); |
| | | CMQManager.getInstance().addGoldCornSettleMsg(msgList); |
| | | } |
| | | } catch (Exception e) { |
| | | return JsonUtil.loadFalseResult(e.getMessage()); |
| | | } |
| | | |
| | | return JsonUtil.loadTrueResult(gson.toJson(record)); |
| | | } |
| | | |