浏览代码

finikes alpha 24

finikes 2 年之前
父节点
当前提交
bc5b0d74b1

+ 7 - 0
src/main/java/com/finikes/oc/estate/controller/HouseRelationController.java

@@ -7,6 +7,7 @@ import com.finikes.oc.management.HouseRelationViewDto;
 import com.finikes.oc.management.dao.HouseRelationDAO;
 import com.github.pagehelper.Page;
 import com.github.pagehelper.PageHelper;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.web.bind.annotation.*;
 
 import javax.validation.Valid;
@@ -17,6 +18,9 @@ public class HouseRelationController {
 
     private final HouseRelationDAO houseRelationDAO;
 
+    @Value("${host}")
+    private String host;
+
     public HouseRelationController(HouseRelationDAO houseRelationDAO) {
         this.houseRelationDAO = houseRelationDAO;
     }
@@ -35,6 +39,9 @@ public class HouseRelationController {
                                   @RequestParam(name = "state") Integer state) {
         try (Page<HouseRelationViewDto> page = PageHelper.startPage(pageNum, pageCapacity)) {
             List<HouseRelationViewDto> viewDtos = houseRelationDAO.selectByState(state);
+            for (HouseRelationViewDto dto : viewDtos) {
+                dto.setCertificateUrl(host + "/upload/" + dto.getCertificateUrl());
+            }
             PageResponse<HouseRelationViewDto> pageResponse = new PageResponse<>();
             pageResponse.setPageQuantity(page.getPageNum());
             pageResponse.setList(viewDtos);

+ 10 - 0
src/main/java/com/finikes/oc/management/HouseRelationViewDto.java

@@ -12,6 +12,16 @@ public class HouseRelationViewDto {
 
     private String realName;
 
+    private String idNumber;
+
+    public String getIdNumber() {
+        return idNumber;
+    }
+
+    public void setIdNumber(String idNumber) {
+        this.idNumber = idNumber;
+    }
+
     @Override
     public String toString() {
         return "HouseRelationViewDto{" +

+ 2 - 1
src/main/resources/application.yml

@@ -29,4 +29,5 @@ logging:
           base:
             dao: debug
           vote:
-            dao: debug
+            dao: debug
+host: http://matrix34.tpddns.cn:60001

+ 2 - 1
src/main/resources/mapper/HouseRelationMapper.xml

@@ -44,7 +44,8 @@
         t_house_relation.state,
         certificateNo,
         certificateUrl,
-        name realName
+        name realName,
+               idNumber
         FROM t_house_relation,
         t_passport
         WHERE t_passport.id = t_house_relation.passportId