فهرست منبع

手机端增加证书认证查询接口

Memory_LG 3 ماه پیش
والد
کامیت
c2fdd837a2

+ 24 - 0
src/main/java/com/sooka/module/api/ContentApiController.java

@@ -18,6 +18,8 @@ import io.swagger.annotations.ApiOperation;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.util.HashMap;
+import java.util.List;
 import java.util.Map;
 
 /**
@@ -80,4 +82,26 @@ public class ContentApiController {
         return JsonUtil.toSuccessResultJSON("请求成功",result);
     }
 
+    /**
+     * 证书认证查询接口
+     * username
+     * telephone
+     * certificateType
+     * siteId
+     * @return
+     */
+    @GetMapping("/zsrz/list")
+    public List<TCmsContent> queryList(@RequestParam("siteId") String siteId,
+                                               @RequestParam("username") String username,
+                                               @RequestParam(value = "telephone") String telephone,
+                                               @RequestParam(value = "categoryId") String categoryId){
+
+        Map<String, Object> map = new HashMap<>();
+        map.put("title", username);
+        map.put("telephone", telephone);
+        map.put("siteId", siteId);
+        map.put("categoryId", categoryId);
+        return contentService.certificateQueryList(map);
+    }
+
 }

+ 3 - 0
src/main/java/com/sooka/module/web/cms/service/ContentService.java

@@ -66,4 +66,7 @@ public interface  ContentService extends BaseService<TCmsContent,Long> {
     PageInfo<TCmsContent> SearchTitleFor(int pageNumber,Map<String,Object> map);
 
     PageInfo<TCmsContent> certificateQuery(Integer pageNumber, Map<String, Object> map);
+
+
+    List<TCmsContent> certificateQueryList(Map<String, Object> map);
 }

+ 11 - 0
src/main/java/com/sooka/module/web/cms/service/impl/ContentServiceImpl.java

@@ -588,4 +588,15 @@ public class ContentServiceImpl implements ContentService {
         PageInfo pageInfo=new PageInfo(tCmsContents);
         return pageInfo;
     }
+
+    @Override
+    public List<TCmsContent> certificateQueryList(Map<String, Object> map) {
+        TCmsCategory category = categoryService.findById(Long.parseLong(map.get("categoryId").toString()));
+        if(CmsUtil.isNullOrEmpty(category)) {
+            throw new CmsException("栏目["+Long.parseLong(map.get("categoryId").toString())+"]不存在!");
+        }
+        TCmsModel model = modelService.findById(category.getModelId());
+        map.put("tableName", model.getTableName());
+        return contentMapper.certificateQuery(map);
+    }
 }