groovy-map.each{}

本文介绍了一个基于特定会话和标识符获取EDI_URL配置的方法,并实现通过这些配置来删除转换文件的功能。通过遍历配置项,根据预设条件选择合适的URL进行文件删除操作。

ConfigDetail postEdiUrl(TtxSession sess, String code) {
    return cdSvc.getByRecordTypeAndIdentifier(sess, 'EDI_URL', code)
}

 ResponseMessage deleteTransformFile(TtxSession sess, String code, List<String> ids) {
        ResponseEntity rsp
        Map maps=beanToMap(postEdiUrl(sess, code))
        maps.each {
            if(it.key=="value1"||it.key=="value2"||it.key=="value3"||it.key=="value4"){
                if(it.value){
                    rsp = WebUtil.postJson(it.value.toString() + 'api/edi/erp/deleteTransformFile', ids)
                }}
        }
//        ResponseEntity rsp = WebUtil.postJson(postEdiUrl(sess, code) + 'api/edi/erp/deleteTransformFile', ids)
        return JSON.readValue(rsp.getBody().toString(), ResponseMessage.class)
    }


//用each去循环遍历map里边的值,进行处理

jiejiatao@jiejiataodeMacBook-Pro wuyang_android % ./gradlew :module_common:dependencies --configuration api > Configure project :app EcLicensePlugin :当前工程的gradle版本为: 7.5 app添加编译模块:module_aar app添加编译模块:module_account app添加编译模块:module_car_service app添加编译模块:module_carInfo app添加编译模块:module_equipment app添加编译模块:module_main app添加编译模块:module_mall app添加编译模块:module_showroom app添加编译模块:module_thirdPlatform app添加编译模块:module_web app添加编译模块:resource EcLicensePlugin :packageName: null EcLicensePlugin :variant: formalDebug appPackageName: null flavorPackageName: com.whmapp.wuyang.honda EcLicensePlugin :variant: uatDebug appPackageName: null flavorPackageName: com.whmappcs.wuyang.honda EcLicensePlugin :variant: developDebug appPackageName: null flavorPackageName: com.whmappcs.wuyang.honda EcLicensePlugin :variant: formalRelease appPackageName: null flavorPackageName: com.whmapp.wuyang.honda EcLicensePlugin :variant: uatRelease appPackageName: null flavorPackageName: com.whmappcs.wuyang.honda EcLicensePlugin :variant: developRelease appPackageName: null flavorPackageName: com.whmappcs.wuyang.honda --W- The variant: formalDebug, There's no json file --W- The variant: uatDebug, There's no json file --W- The variant: developDebug, There's no json file --W- The variant: formalRelease, There's no json file --W- The variant: uatRelease, There's no json file --W- The variant: developRelease, There's no json file > Configure project :module_common module_common: 'annotationProcessor' dependencies won't be recognized as kapt annotation processors. Please change the configuration name to 'kapt' for these artifacts: 'com.github.bumptech.glide:compiler:4.9.0'. > Task :module_common:dependencies ------------------------------------------------------------ Project ':module_common' ------------------------------------------------------------ api - API dependencies for 'main' sources. (n) +--- unspecified (n) +--- unspecified (n) +--- androidx.databinding:viewbinding:8.3.2 (n) +--- com.blankj:utilcodex:1.31.1 (n) +--- org.jetbrains.kotlin:kotlin-stdlib:1.7.10 (n) +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.6.0 (n) +--- androidx.core:core-ktx:1.6.0 (n) +--- com.squareup.okhttp3:okhttp:4.9.0 (n) +--- com.squareup.okhttp3:logging-interceptor:4.9.0 (n) +--- io.reactivex.rxjava2:rxjava:2.2.19 (n) +--- com.squareup.retrofit2:retrofit:2.9.0 (n) +--- io.reactivex.rxjava2:rxandroid:2.1.0 (n) +--- com.squareup.retrofit2:converter-gson:2.9.0 (n) +--- com.squareup.retrofit2:adapter-rxjava2:2.4.0 (n) +--- com.google.code.gson:gson:2.10.1 (n) +--- org.greenrobot:eventbus:3.2.0 (n) +--- com.geyifeng.immersionbar:immersionbar:3.2.2 (n) +--- com.guolindev.permissionx:permissionx:1.6.0 (n) +--- com.github.li-xiaojun:XPopup:2.10.0 (n) +--- com.github.bumptech.glide:glide:4.14.2 (n) +--- jp.wasabeef:glide-transformations:4.3.0 (n) +--- com.github.zjupure:webpdecoder:2.0.4.12.0 (n) +--- io.github.scwang90:refresh-layout-kernel:2.1.0 (n) +--- io.github.scwang90:refresh-header-classics:2.1.0 (n) +--- io.github.scwang90:refresh-footer-classics:2.1.0 (n) +--- com.github.JessYanCoding:AndroidAutoSize:v1.2.1 (n) +--- com.android.support:appcompat-v7:27.+ (n) +--- com.android.support:design:27.+ (n) +--- com.orhanobut:hawk:2.0.1 (n) +--- com.baidu.lbsyun:baidu-lbs-aar:1.5 (n) +--- com.baidu.lbsyun:java-poet:1.1 (n) +--- com.baidu.lbsyun:onsdk_all:1.7.1 (n) +--- com.baidu.lbsyun:protobuf_gens-map:1.4 (n) +--- cn.jiguang.sdk:jpush:5.7.0 (n) +--- com.huawei.hms:push:6.13.0.300 (n) +--- cn.jiguang.sdk.plugin:huawei:5.7.0 (n) +--- cn.jiguang.sdk.plugin:vivo:5.7.0 (n) +--- cn.jiguang.sdk.plugin:xiaomi:5.7.0 (n) +--- cn.jiguang.sdk.plugin:oppo:5.7.0 (n) +--- commons-codec:commons-codec:1.6 (n) +--- androidx.annotation:annotation:1.1.0 (n) +--- cn.jiguang.sdk.plugin:honor:5.7.0 (n) +--- cn.jiguang.sdk:jverification:3.2.5 (n) +--- com.tencent.bugly:crashreport:latest.release (n) +--- io.github.idisfkj:android-startup:1.1.0 (n) +--- com.auth0:java-jwt:4.4.0 (n) +--- io.jsonwebtoken:jjwt:0.9.1 (n) +--- com.github.lzyzsd:jsbridge:1.0.4 (n) +--- com.google.android.material:material:1.6.0 (n) +--- unspecified (n) +--- com.github.yyued:SVGAPlayer-Android:2.6.1 (n) +--- unspecified (n) +--- com.google.android.exoplayer:exoplayer:2.18.1 (n) +--- io.github.youth5201314:banner:2.2.3 (n) +--- com.github.zhpanvip:bannerviewpager:3.5.12 (n) +--- com.github.getActivity:XXPermissions:20.0 (n) +--- com.airbnb.android:lottie:5.2.0 (n) +--- com.huawei.hms:scanplus:2.12.0.300 (n) +--- net.easyconn:ec:12.2.1.0415 (n) +--- net.easyconn:common:12.2.1.0415 (n) +--- net.easyconn:carmanble:12.2.1.0415 (n) +--- net.easyconn:rotation:12.2.1.0415 (n) +--- net.easyconn:speech_iflytek:12.2.1.0415 (n) +--- net.easyconn:theme_main:+ (n) +--- net.easyconn:carman_baidumap:0.6.16.2 (n) +--- com.huawei.hms:scanplus:2.8.0.300 (n) +--- com.github.hackware1993:MagicIndicator:1.6.0 (n) +--- com.github.hackware1993:MagicIndicator:1.7.0 (n) +--- project module_aar (n) +--- project resource (n) +--- com.ligo:LogRecord:1.0.5 (n) +--- com.sensorsdata.analytics.android:SensorsAnalyticsSDK:6.8.4 (n) \--- androidx.databinding:viewbinding:7.1.0 (n) (n) - Not resolved (configuration is not meant to be resolved) A web-based, searchable dependency report is available by adding the --scan option. Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. See https://docs.gradle.org/7.5/userguide/command_line_interface.html#sec:command_line_warnings BUILD SUCCESSFUL in 686ms 1 actionable task: 1 executed 只列出有哪些依赖,但是无法出现依赖的大小
06-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值