Browse Source

修复会员列表添加查询报错问题

auqfypeu 4 years ago
parent
commit
effe732b12

+ 3 - 0
member-services/src/main/java/com/liangjian/dataplatform/member/controller/MrugTakeInfoController.java

@@ -3,6 +3,7 @@ package com.liangjian.dataplatform.member.controller;
 import com.liangjian.dataplatform.member.entity.po.secondary.FiltersData;
 import com.liangjian.dataplatform.member.service.IMrugTakeInfoService;
 import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
 import io.swagger.annotations.ApiParam;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
@@ -19,12 +20,14 @@ public class MrugTakeInfoController {
 
 
     @PostMapping("/getProductUsageList")
+    @ApiOperation(value = "获取药品说明信息")
     public Map<String, Object> getProductUsageList(@ApiParam(value = "参数", required = true) @RequestBody FiltersData data){
 
         return mrugTakeInfoService.getProductUsageList(data);
     }
 
     @PostMapping("/updateTakeInfo")
+    @ApiOperation(value = "修改药品说明")
     public Map<String, Object> updateTakeInfo(@ApiParam(value = "参数", required = true) @RequestBody Map<String, Object> data){
 
         return mrugTakeInfoService.updateTakeInfo(data);

+ 5 - 6
member-services/src/main/java/com/liangjian/dataplatform/member/service/impl/MemberListService.java

@@ -35,7 +35,6 @@ public class MemberListService implements IMemberListService {
 
     @Override
     public String index(FiltersData data) {
-        String aaa = JSONObject.fromObject(data).toString();
         int start = 0;
         String filterStr = null;
         String query = null;
@@ -50,7 +49,7 @@ public class MemberListService implements IMemberListService {
                     String value = filter.getValue();
                     if("MemUsualPhone".equals(fieId.trim()) && null != value && !"".equals(value.trim())){
                         phonesSearch.add(value);
-                        String[] encryption = getPhoneEncrypt((String[])phonesSearch.toArray(), true);
+                        String[] encryption = getPhoneEncrypt(phonesSearch, true);
                         value = encryption[0];
                     }
 
@@ -184,7 +183,7 @@ public class MemberListService implements IMemberListService {
                 phones.add("");
             }
         }
-        String[] phones1 = getPhoneEncrypt(phones.toArray(String[]::new),false);
+        String[] phones1 = getPhoneEncrypt(phones,false);
         for (int i = 0; i <items.size() ; i++) {
             Map<String, Object> maps = (Map<String, Object>)items.get(i);
             if(null != maps.get("MemUsualPhone") && maps.get("MemUsualPhone").toString().length() == 32){
@@ -216,14 +215,14 @@ public class MemberListService implements IMemberListService {
 
 
     // 加密
-    public String[] getPhoneEncrypt(String[] MemPhones, boolean sign){
-        int len = MemPhones.length;
+    public String[] getPhoneEncrypt(List<String> memPhones, boolean sign){
+        int len = memPhones.size();
         String[] phones = new String[len];
         StringBuilder sb = new StringBuilder();
         sb.append("select ");
 
         for (int i = 0;i<len;i++){
-           String number = MemPhones[i];
+           String number = memPhones.get(i);
            if(!StringUtil.isEmpty(number)){
                Map<String, Object> map = null;
                if(sign){// 加密