Compare commits

..

No commits in common. '1714892f3f182a72332e0b89c50b24d06f18578b' and '81646ec56957c7029a8ef8266e876224ecedc3d4' have entirely different histories.

  1. 4
      bweb/src/main/java/com/hfkj/controller/partner/PartnerController.java
  2. 2
      service/src/main/java/com/hfkj/service/partner/Impl/BsPartnerUserRecordServiceImpl.java
  3. 15
      service/src/main/java/com/hfkj/service/partner/Impl/PartnerServiceImpl.java
  4. 2
      service/src/main/java/com/hfkj/service/partner/PartnerService.java

@ -31,8 +31,8 @@ import java.util.List;
import java.util.Map;
@Controller
@RequestMapping(value = "/partnerData")
@Api(value = "合伙人统计")
@RequestMapping(value = "/partner")
@Api(value = "合伙人")
public class PartnerController {
private static final Logger log = LoggerFactory.getLogger(PartnerController.class);

@ -96,6 +96,6 @@ public class BsPartnerUserRecordServiceImpl implements BsPartnerUserRecordServic
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
}
return bsPartnerUserRecordMapper.selectByExample(example);
return Collections.emptyList();
}
}

@ -417,23 +417,12 @@ public class PartnerServiceImpl implements PartnerService {
}
@Override
public List<JSONObject> dividendData(Long startTime, Long endTime) throws Exception {
public JSONObject dividendData(Long startTime, Long endTime) throws Exception {
Map<String, Object> params = new HashMap<>();
params.put("startTime", startTime);
params.put("endTime", endTime);
params.put("type", 1);
List<BsPartnerUserRecord> userRecords = bsPartnerUserRecordService.queryAllList(params);
Map<Integer, List<BsPartnerUserRecord>> collect = userRecords.stream().collect(Collectors.groupingBy(BsPartnerUserRecord::getLevel));
List<JSONObject> countRecords = collect.keySet().stream().map(key -> {
JSONObject goodObject = new JSONObject(true);
goodObject.put("level",key);
List<BsPartnerUserRecord> pres = collect.get(key);
goodObject.put("dividendCount", pres.size());
goodObject.put("dividendGoldCoin", pres.stream().map(BsPartnerUserRecord::getGoldCoin).reduce(BigDecimal.ZERO, BigDecimal::add));
return goodObject;
}).collect(Collectors.toList());
return countRecords;
return null;
}
// 竞选成功返利

@ -53,5 +53,5 @@ public interface PartnerService {
* @Author: Sum1Dream
* @Date: 2024/10/18 下午2:25
*/
List<JSONObject> dividendData(Long startTime, Long endTime) throws Exception;
JSONObject dividendData(Long startTime, Long endTime) throws Exception;
}

Loading…
Cancel
Save