groovy-map.each{}

 

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里边的值,进行处理

posted @ 2018-11-26 15:36  darling331  阅读(564)  评论(0编辑  收藏  举报