perf:场地日志

This commit is contained in:
Xiang
2026-03-25 10:51:20 +08:00
parent 1634565e92
commit 4f07b22919
3 changed files with 17 additions and 2 deletions

View File

@@ -1,7 +1,6 @@
package com.xiang.app.module.jntyzx.pojo.req; package com.xiang.app.module.jntyzx.pojo.req;
import lombok.Data; import lombok.Data;
import org.checkerframework.checker.units.qual.N;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;

View File

@@ -4,15 +4,29 @@ import com.xiang.app.module.jntyzx.pojo.resp.JtUserVo;
import com.xiang.app.modules.jntyzx.entity.pojo.UserTokenInfoDO; import com.xiang.app.modules.jntyzx.entity.pojo.UserTokenInfoDO;
import org.mapstruct.Mapper; import org.mapstruct.Mapper;
import org.mapstruct.Mapping; import org.mapstruct.Mapping;
import org.mapstruct.Named;
import org.mapstruct.factory.Mappers; import org.mapstruct.factory.Mappers;
import java.util.List; import java.util.List;
import java.util.Objects;
@Mapper @Mapper(componentModel = "spring")
public interface UserConverter { public interface UserConverter {
UserConverter INSTANCE = Mappers.getMapper(UserConverter.class); UserConverter INSTANCE = Mappers.getMapper(UserConverter.class);
@Mapping(source = "id", target = "userId") @Mapping(source = "id", target = "userId")
@Mapping(source = "isOrder", target = "isOrder", qualifiedByName = "isOrder")
@Mapping(source = "isRestriction", target = "isRestriction", qualifiedByName = "isRestrict")
JtUserVo convert(UserTokenInfoDO userTokenInfoDO); JtUserVo convert(UserTokenInfoDO userTokenInfoDO);
List<JtUserVo> convert(List<UserTokenInfoDO> userTokenInfoDOs); List<JtUserVo> convert(List<UserTokenInfoDO> userTokenInfoDOs);
@Named("isOrder")
default Boolean isOrder(Integer value) {
return Objects.nonNull(value) && Objects.equals(value, 1);
}
@Named("isRestrict")
default Boolean isRestrict(Integer value) {
return Objects.nonNull(value) && Objects.equals(value, 0);
}
} }

View File

@@ -1,5 +1,6 @@
package com.xiang.app.schedule.jntyzx; package com.xiang.app.schedule.jntyzx;
import com.alibaba.fastjson.JSON;
import com.xiang.app.common.service.dingtalk.JtDingTalkFactory; import com.xiang.app.common.service.dingtalk.JtDingTalkFactory;
import com.xiang.app.modules.jntyzx.constants.RedisKeyConstant; import com.xiang.app.modules.jntyzx.constants.RedisKeyConstant;
import com.xiang.app.modules.jntyzx.entity.pojo.UserTokenInfoDO; import com.xiang.app.modules.jntyzx.entity.pojo.UserTokenInfoDO;
@@ -57,6 +58,7 @@ public class JtVenueSubscribeTask {
users.parallelStream().forEach(user -> { users.parallelStream().forEach(user -> {
try { try {
List<String> placeNameList = venueInfoMap.keySet().stream().sorted(Comparator.comparing(VenueInfoUtils::sortVenueInfo)).toList(); List<String> placeNameList = venueInfoMap.keySet().stream().sorted(Comparator.comparing(VenueInfoUtils::sortVenueInfo)).toList();
log.info("场地排序后的集合:{}", JSON.toJSONString(placeNameList));
for (String placeName : placeNameList) { for (String placeName : placeNameList) {
List<VenueInfoDO> venueInfoDOList = venueInfoMap.get(placeName); List<VenueInfoDO> venueInfoDOList = venueInfoMap.get(placeName);
for (int i = 0; i < 10; i++) { for (int i = 0; i < 10; i++) {