diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml index da00fb8..66651c4 100644 --- a/ruoyi-admin/src/main/resources/application-druid.yml +++ b/ruoyi-admin/src/main/resources/application-druid.yml @@ -12,10 +12,10 @@ spring: # 从库数据源 slave: # 从数据源开关/默认关闭 - enabled: false - url: - username: - password: + enabled: true + url: jdbc:mysql://1.13.177.47:3306/bg_wheel_chocks?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 + username: root + password: Haiwei123456 # 初始连接数 initialSize: 5 # 最小连接池数量 diff --git a/ruoyi-device/src/main/java/com/ruoyi/device/domain/LundangBaseStore.java b/ruoyi-device/src/main/java/com/ruoyi/device/domain/LundangBaseStore.java new file mode 100644 index 0000000..b4c74d6 --- /dev/null +++ b/ruoyi-device/src/main/java/com/ruoyi/device/domain/LundangBaseStore.java @@ -0,0 +1,41 @@ +package com.ruoyi.device.domain; + +import com.ruoyi.common.annotation.Excel; + +public class LundangBaseStore { + + /** 仓库id */ + private Long storeId; + + /** 仓库编号 */ + @Excel(name = "仓库编号") + private String storeCode; + + /** 仓库名称 */ + @Excel(name = "仓库名称") + private String storeName; + + public Long getStoreId() { + return storeId; + } + + public void setStoreId(Long storeId) { + this.storeId = storeId; + } + + public String getStoreCode() { + return storeCode; + } + + public void setStoreCode(String storeCode) { + this.storeCode = storeCode; + } + + public String getStoreName() { + return storeName; + } + + public void setStoreName(String storeName) { + this.storeName = storeName; + } +} diff --git a/ruoyi-device/src/main/java/com/ruoyi/device/mapper/LundangMapper.java b/ruoyi-device/src/main/java/com/ruoyi/device/mapper/LundangMapper.java new file mode 100644 index 0000000..37815f8 --- /dev/null +++ b/ruoyi-device/src/main/java/com/ruoyi/device/mapper/LundangMapper.java @@ -0,0 +1,11 @@ +package com.ruoyi.device.mapper; + +import com.ruoyi.device.domain.LundangBaseStore; +import org.springframework.stereotype.Repository; + +import java.util.List; + +@Repository +public interface LundangMapper { + List selectLundangBaseStoreList(); +} diff --git a/ruoyi-device/src/main/java/com/ruoyi/device/service/impl/Lundang_BaseStoreServiceImpl.java b/ruoyi-device/src/main/java/com/ruoyi/device/service/impl/Lundang_BaseStoreServiceImpl.java new file mode 100644 index 0000000..a241bee --- /dev/null +++ b/ruoyi-device/src/main/java/com/ruoyi/device/service/impl/Lundang_BaseStoreServiceImpl.java @@ -0,0 +1,21 @@ +package com.ruoyi.device.service.impl; + +import com.ruoyi.common.annotation.DataSource; +import com.ruoyi.common.enums.DataSourceType; +import com.ruoyi.device.domain.LundangBaseStore; +import com.ruoyi.device.mapper.LundangMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +@Service("lundang") +@DataSource(value = DataSourceType.SLAVE) +public class Lundang_BaseStoreServiceImpl { + @Autowired + private LundangMapper lundangMapper; + public List selectLundangBaseStoreList() { + return lundangMapper.selectLundangBaseStoreList(); + } + +} diff --git a/ruoyi-device/src/main/resources/mapper/lundang/LundangMapper.xml b/ruoyi-device/src/main/resources/mapper/lundang/LundangMapper.xml new file mode 100644 index 0000000..e8c8366 --- /dev/null +++ b/ruoyi-device/src/main/resources/mapper/lundang/LundangMapper.xml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ruoyi-device/src/main/resources/templates/device/base_info/add.html b/ruoyi-device/src/main/resources/templates/device/base_info/add.html index 91486fd..4799151 100644 --- a/ruoyi-device/src/main/resources/templates/device/base_info/add.html +++ b/ruoyi-device/src/main/resources/templates/device/base_info/add.html @@ -36,8 +36,13 @@
- + +
+ +
diff --git a/ruoyi-device/src/main/resources/templates/device/base_info/edit.html b/ruoyi-device/src/main/resources/templates/device/base_info/edit.html index ca1bf6c..a2ff0cd 100644 --- a/ruoyi-device/src/main/resources/templates/device/base_info/edit.html +++ b/ruoyi-device/src/main/resources/templates/device/base_info/edit.html @@ -58,7 +58,10 @@
- + +