Commit dae07c9e by huangZW

111

parent 9d287ae0
......@@ -5,6 +5,7 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import org.apache.commons.lang3.StringUtils;
......@@ -70,6 +71,17 @@ public class AuditApiServiceImpl implements AuditApiService{
}
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
com.github.pagehelper.Page<TabHaobanAudit> page = auditMapper.page(auditType, storeIds, staffIds, wxEnterpriseId,enterpriseId,auditStatus,auditFlag);
// List<TabHaobanAudit> list = page.getResult();
if(CollectionUtil.isNotEmpty( page.getResult())){
List<String> commitStaffIds = page.getResult().stream().map(s->s.getCommitStaffId()).collect(Collectors.toList());
List<TabHaobanStaff> staffList = staffMapper.listByIds(commitStaffIds);
Map<String,TabHaobanStaff> map = com.gic.commons.util.CollectionUtil.toMap(staffList, "staffId");
for(TabHaobanAudit tab: page.getResult()){
String commitStaffId = tab.getCommitStaffId();
map.get(commitStaffId).getStaffName();
tab.setCommitName(map.get(commitStaffId)==null?"":map.get(commitStaffId).getStaffName());
}
}
return PageUtil.changePageHelperToCurrentPage( page,AuditDTO.class);
}
@Transactional
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment