Przeglądaj źródła

Merge branch 'master' of https://172.16.32.165/lighter/web-server

DESKTOP-0GD05B0\Administrator 3 lat temu
rodzic
commit
beb5bfca1a

+ 32 - 0
src/main/java/thyyxxk/webserver/controller/readcard/ReadCardController.java

@@ -0,0 +1,32 @@
+package thyyxxk.webserver.controller.readcard;
+
+import com.alibaba.fastjson.JSONObject;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+import thyyxxk.webserver.config.auth.PassToken;
+import thyyxxk.webserver.dao.his.readcard.ReadCardDao;
+import thyyxxk.webserver.entity.readcard.SiBusinessAddress;
+
+@RestController
+@RequestMapping("/readCard")
+public class ReadCardController {
+    private final ReadCardDao dao;
+
+    @Autowired
+    public ReadCardController(ReadCardDao dao) {
+        this.dao = dao;
+    }
+
+    @PassToken
+    @GetMapping("/getSiBusinessAddress")
+    public String getSiBusinessAddress() {
+        SiBusinessAddress siBusinessAddress = dao.getSiBusinessAddress();
+        if (null == siBusinessAddress) {
+            siBusinessAddress = new SiBusinessAddress();
+            siBusinessAddress.setValidFlag(0);
+        }
+        return JSONObject.toJSONStringWithDateFormat(siBusinessAddress, "yyyy-MM-dd HH:mm:ss");
+    }
+}

+ 12 - 0
src/main/java/thyyxxk/webserver/dao/his/readcard/ReadCardDao.java

@@ -0,0 +1,12 @@
+package thyyxxk.webserver.dao.his.readcard;
+
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Select;
+import thyyxxk.webserver.entity.readcard.SiBusinessAddress;
+
+@Mapper
+public interface ReadCardDao {
+
+    @Select("select * from t_readcard_business_address where valid_flag=1")
+    SiBusinessAddress getSiBusinessAddress();
+}

+ 19 - 0
src/main/java/thyyxxk/webserver/entity/readcard/SiBusinessAddress.java

@@ -0,0 +1,19 @@
+package thyyxxk.webserver.entity.readcard;
+
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class SiBusinessAddress {
+    private String readSiCardUrl;
+    private String readSiCardUser;
+    private Integer readSiCardBuffSize;
+    private String readIdCardUrl;
+    private String readIdCardUser;
+    private Integer readIdCardBuffSize;
+    private String readQrEcTokenUrl;
+    private String organizationId;
+    private Date createDatetime;
+    private Integer validFlag;
+}