修改版本号
authorqiaowei <jov123@163.com>
Wed, 13 May 2020 07:04:40 +0000 (15:04 +0800)
committerqiaowei <jov123@163.com>
Wed, 13 May 2020 07:04:40 +0000 (15:04 +0800)
payapi/src/main/kotlin/com/supwisdom/dlpay/mobile/MobileApi.kt

index 08cfbc8..299fd7f 100644 (file)
@@ -621,7 +621,7 @@ class ApiV1 {
      * 查询账单
      * */
     @RequestMapping("/bills")
-    fun bills(pageno: Int,platform: String?): JsonResult {
+    fun bills(pageno: Int,platform: String?,type:String?): JsonResult {
         val p = SecurityContextHolder.getContext().authentication
         val user = mobileApiService.findUserById(p.name)
                 ?: return JsonResult.error("用户不存在,请注册")
@@ -672,9 +672,14 @@ class ApiV1 {
         var versionurl:String?=""
         if(!platform.isNullOrEmpty()){
             var map= mutableMapOf<String,Any>()
+            var key=""
             if(platform.toLowerCase().contains("android")){
-                dictionaryProxy.refreshDictionary("androidapp")
-                map = dictionaryProxy.getDictionaryAsMap("androidapp")
+                key="androidapp"
+                if(!type.isNullOrEmpty()){
+                    key+= "_$type"
+                }
+                dictionaryProxy.refreshDictionary(key)
+                map = dictionaryProxy.getDictionaryAsMap(key)
                 if(map["androidversion"]!=null){
                     version = map["androidversion"] as String
                 }
@@ -689,7 +694,12 @@ class ApiV1 {
                 }
 
             }else if(platform.toLowerCase().contains("iphone")){
-                map = dictionaryProxy.getDictionaryAsMap("iosapp")
+                key="iosapp"
+                if(!type.isNullOrEmpty()){
+                    key+= "_$type"
+                }
+                dictionaryProxy.refreshDictionary(key)
+                map = dictionaryProxy.getDictionaryAsMap(key)
                 if(map["iosversion"]!=null){
                     version = map["iosversion"] as String
                 }