diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java b/pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java index 224ada5..8e964e4 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/portrait/manage/TagManage.java @@ -10,6 +10,7 @@ import com.ningdatech.basic.model.PageVo; import com.ningdatech.basic.util.CollUtils; import com.ningdatech.pmapi.common.constant.BizConst; import com.ningdatech.pmapi.common.constant.RegionConst; +import com.ningdatech.pmapi.common.helper.RegionCacheHelper; import com.ningdatech.pmapi.gov.model.entity.GovBizProjectBaseinfo; import com.ningdatech.pmapi.gov.service.IGovBizProjectBaseinfoService; import com.ningdatech.pmapi.portrait.model.dto.TagDTO; @@ -22,6 +23,7 @@ import com.ningdatech.pmapi.portrait.service.IProjectTagService; import com.ningdatech.pmapi.portrait.service.ITagService; import com.ningdatech.pmapi.projectlib.model.entity.Project; import com.ningdatech.pmapi.projectlib.service.IProjectService; +import com.ningdatech.pmapi.sys.model.dto.RegionDTO; import com.ningdatech.pmapi.user.security.auth.model.UserInfoDetails; import com.ningdatech.pmapi.user.util.LoginUserUtil; import lombok.AllArgsConstructor; @@ -53,6 +55,8 @@ public class TagManage { private final IGovBizProjectBaseinfoService baseinfoService; + private final RegionCacheHelper regionCacheHelper; + /** * 标签分页 * @param areaCode @@ -60,8 +64,9 @@ public class TagManage { * @return */ public PageVo list(String areaCode, TagPageReq req) { + RegionDTO regionDto = regionCacheHelper.getByCodeAndLevel(areaCode, RegionConst.RL_COUNTY); LambdaQueryWrapper query = Wrappers.lambdaQuery(Tag.class) - .eq(Tag::getAreaCode, areaCode) + .eq(Objects.nonNull(regionDto),Tag::getAreaCode, regionDto.getRegionCode()) .like(StringUtils.isNotBlank(req.getName()),Tag::getName,req.getName()) .orderByDesc(Tag::getUpdateOn); checkAuth(query,LoginUserUtil.loginUserDetail()); diff --git a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java index 20805cb..611b657 100644 --- a/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java +++ b/pmapi/src/main/java/com/ningdatech/pmapi/provincial/service/impl/JoinReviewProvincialBureauServiceImpl.java @@ -152,6 +152,7 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc @Override public List searchGovUnits() { Long timeStamp = System.currentTimeMillis(); + Long timeSeconds = System.currentTimeMillis()/1000; String appSecret = govAppSecret; String appKey = govAppKey; String method = HttpMethod.POST.name(); @@ -165,10 +166,10 @@ public class JoinReviewProvincialBureauServiceImpl implements IJoinReviewProvinc restTemplate = new RestTemplate(); } - String authSignature = getSha256(timeStamp/1000,provincialProperties.getDomainUrl(), HttpMethod.POST.name(), + String authSignature = getSha256(timeSeconds,provincialProperties.getDomainUrl(), HttpMethod.POST.name(), provincialProperties.getKey(),provincialProperties.getSecret()); String url = govUrl + "?appKey=" + appKey + - "×tamp=" + timeStamp/1000 + "&sign=" + sign + + "×tamp=" + timeSeconds + "&sign=" + sign + "&authKey=" + provincialProperties.getKey() + "&authSignature=" + authSignature + "&requestTime=" + timeStamp; log.info("gov search url :{}",url); diff --git a/pmapi/src/test/java/com/ningdatech/pmapi/projectCollection/ProjectRemoveTest.java b/pmapi/src/test/java/com/ningdatech/pmapi/projectCollection/ProjectRemoveTest.java index 18b044b..0996b7f 100644 --- a/pmapi/src/test/java/com/ningdatech/pmapi/projectCollection/ProjectRemoveTest.java +++ b/pmapi/src/test/java/com/ningdatech/pmapi/projectCollection/ProjectRemoveTest.java @@ -109,7 +109,7 @@ public class ProjectRemoveTest extends AppTests { @Test public void test(){ - List projectCodes = Lists.newArrayList("33112100020230100002"); + List projectCodes = Lists.newArrayList("33110000020230100078","33110000020230100077"); for(String projectCode : projectCodes){ //项目