|
|
@@ -8,10 +8,8 @@ import com.uas.platform.b2bManage.dao.UserBaseInfoDao;
|
|
|
import com.uas.platform.b2bManage.model.*;
|
|
|
import com.uas.platform.b2bManage.page.exception.IllegalOperatorException;
|
|
|
import com.uas.platform.b2bManage.service.InviteService;
|
|
|
-import com.uas.platform.b2bManage.support.MyException;
|
|
|
-import com.uas.platform.b2bManage.support.MyThread;
|
|
|
-import com.uas.platform.b2bManage.support.MyThreadPoolExecutor;
|
|
|
-import com.uas.platform.b2bManage.support.StringUtil;
|
|
|
+import com.uas.platform.b2bManage.service.ProductService;
|
|
|
+import com.uas.platform.b2bManage.support.*;
|
|
|
import com.uas.platform.core.model.PageInfo;
|
|
|
import com.uas.platform.core.model.Status;
|
|
|
import com.uas.platform.core.persistence.criteria.CriterionExpression;
|
|
|
@@ -34,6 +32,7 @@ import java.text.ParseException;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.Date;
|
|
|
import java.util.List;
|
|
|
+import java.util.Map;
|
|
|
import java.util.concurrent.*;
|
|
|
|
|
|
|
|
|
@@ -58,6 +57,9 @@ public class InviteServiceImpl extends BaseService implements InviteService {
|
|
|
@Autowired
|
|
|
private InvitationRecordDao recordDao;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private ProductService productService;
|
|
|
+
|
|
|
/**
|
|
|
* 通过分页信息获取邀请注册记录
|
|
|
*
|
|
|
@@ -103,17 +105,11 @@ public class InviteServiceImpl extends BaseService implements InviteService {
|
|
|
return null;
|
|
|
}
|
|
|
}, info);
|
|
|
+ Map<Long, InviteProdInfo> map = productService.findByEnUUList(CollectionUtil.getKeyCollection(invites.getContent()));
|
|
|
for (Invite invite : invites) {
|
|
|
- Integer count = jdbcTemplate.queryForInt("select count(1) from products where pr_enuu = ?", invite.getUu());
|
|
|
- invite.setProductCount(count);
|
|
|
- if (count >= 0) {
|
|
|
- Date date = jdbcTemplate.queryForObject("select max(pr_erpdate) from products where pr_enuu = " + invite.getUu(), Date.class);
|
|
|
- invite.setLastProductDate(date);
|
|
|
- }
|
|
|
- if (null == invite.getLastProductDate()) {
|
|
|
- Date date = jdbcTemplate.queryForObject("select max(pr_create_time) from products where pr_enuu = " + invite.getUu(), Date.class);
|
|
|
- invite.setLastProductDate(date);
|
|
|
- }
|
|
|
+ InviteProdInfo prodInfo = map.get(invite.getUu());
|
|
|
+ invite.setProductCount(prodInfo.getCount());
|
|
|
+ invite.setLastProductDate(prodInfo.getLastDate());
|
|
|
}
|
|
|
return invites;
|
|
|
}
|