历史数据兼容
This commit is contained in:
parent
8e39bfdd1f
commit
6f7178593b
@ -37,6 +37,8 @@ import org.springframework.data.mongodb.core.query.Query;
|
|||||||
import org.springframework.data.mongodb.core.query.Update;
|
import org.springframework.data.mongodb.core.query.Update;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import static com.red.circle.other.infra.database.mongo.service.team.TeamBillCycleUtils.getCalcBillBelong;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户账单目标.
|
* 用户账单目标.
|
||||||
*
|
*
|
||||||
@ -256,7 +258,14 @@ public class TeamMemberTargetServiceImpl implements TeamMemberTargetService {
|
|||||||
.and("teamId").is(teamId);
|
.and("teamId").is(teamId);
|
||||||
|
|
||||||
if (billBelong != null) {
|
if (billBelong != null) {
|
||||||
criteria.and("billBelong").is(billBelong);
|
int rangeStart = billBelong * 100; // 例如:202509 * 100 = 20250900
|
||||||
|
int rangeEnd = billBelong * 100 + 99; // 例如:202509 * 100 + 99 = 20250999
|
||||||
|
|
||||||
|
criteria.orOperator(
|
||||||
|
Criteria.where("billBelong").is(billBelong),
|
||||||
|
Criteria.where("billBelong").gte(rangeStart).lte(rangeEnd)
|
||||||
|
);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return mongoTemplate.find(Query.query(criteria)
|
return mongoTemplate.find(Query.query(criteria)
|
||||||
@ -562,7 +571,7 @@ public class TeamMemberTargetServiceImpl implements TeamMemberTargetService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Integer nowMonthBillBelong() {
|
private Integer nowMonthBillBelong() {
|
||||||
return ZonedDateTimeAsiaRiyadhUtils.nowYearMonthToInt();
|
return getCalcBillBelong();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user