增加 从数据查询机坪
parent
99594c0359
commit
db2f62ba57
@ -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;
|
||||||
|
}
|
||||||
|
}
|
@ -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<LundangBaseStore> selectLundangBaseStoreList();
|
||||||
|
}
|
@ -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<LundangBaseStore> selectLundangBaseStoreList() {
|
||||||
|
return lundangMapper.selectLundangBaseStoreList();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper
|
||||||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.device.mapper.LundangMapper">
|
||||||
|
|
||||||
|
<resultMap type="com.ruoyi.device.domain.LundangBaseStore" id="LundangResult">
|
||||||
|
<result property="storeId" column="store_id" />
|
||||||
|
<result property="storeCode" column="store_code" />
|
||||||
|
<result property="storeName" column="store_name" />
|
||||||
|
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<select id="selectLundangBaseStoreList" resultMap="LundangResult">
|
||||||
|
select store_id, store_code, store_name from base_store
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
Loading…
Reference in New Issue