|
|
@@ -108,8 +108,19 @@ public class InviteRecordServiceImpl implements InviteRecordService {
|
|
|
*/
|
|
|
@Override
|
|
|
public List<Invitation> getCountGroupByDate(Long userUU, Long enUU, String year) {
|
|
|
- String sql = "SELECT a.time,v.count todoCount, a.count count FROM v$invitation V LEFT JOIN v$invitation_all A ON V.USERUU = A.USERUU AND A.TIME = V.TIME WHERE v.active = 0" +
|
|
|
- "and a.time like '%" + year + "%' and a.useruu = " + userUU;
|
|
|
- return commonDao.query(sql, Invitation.class);
|
|
|
+ String sql = "select time, count, 0 as doneCount from v$invitation_all where time like '%" + year + "%' and useruu = " + userUU;
|
|
|
+ List<Invitation> all = commonDao.query(sql, Invitation.class);
|
|
|
+ String sql1 = "select time, count doneCount from v$invitation where time like'%" + year + "%' and useruu = " + userUU + "and active = 1";
|
|
|
+ List<Invitation> done = commonDao.query(sql1, Invitation.class);
|
|
|
+ if (!CollectionUtils.isEmpty(all) && !CollectionUtils.isEmpty(done)) {
|
|
|
+ for (Invitation a : all) {
|
|
|
+ for (Invitation d : done) {
|
|
|
+ if (a.getTime().equals(d.getTime())) {
|
|
|
+ a.setDoneCount(d.getDoneCount());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ return all;
|
|
|
}
|
|
|
}
|