fix + 枚举,仓库数据等
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.EnumInfoDO;
|
||||
import com.cool.store.mapper.EnumInfoDOMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/08/15:22
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Repository
|
||||
public class EnumInfoDAO {
|
||||
@Resource
|
||||
private EnumInfoDOMapper enumInfoDOMapper;
|
||||
|
||||
public List<EnumInfoDO> getByTypeCode(String typeCode) {
|
||||
Example example = new Example(EnumInfoDO.class);
|
||||
example.createCriteria().andEqualTo("typeCode", typeCode).andEqualTo("deleted", 0);
|
||||
return enumInfoDOMapper.selectByExample(example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.EnumInfoDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/08/15:19
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface EnumInfoDOMapper extends Mapper<EnumInfoDO> {
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.WarehouseInfoDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/08/15:07
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public interface WarehouseInfoMapper extends Mapper<WarehouseInfoDO> {
|
||||
|
||||
List<WarehouseInfoDO> getAllAndActive();
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?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">
|
||||
<!--mybatis-3-mapper.dtd:约束文件的名称,限制和检查在当前文件中出现的标签和属性符合mybatis的要求-->
|
||||
<!--namespace:命名空间,要有唯一的值,要求使用dao接口的权限定名称(一个dao接口对应一个mapper,namespace指明对应哪个dao接口)-->
|
||||
<mapper namespace="com.cool.store.mapper.EnumInfoDOMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.EnumInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="type_code" jdbcType="VARCHAR" property="typeCode" />
|
||||
<result column="sys_key" jdbcType="VARCHAR" property="sysKey" />
|
||||
<result column="sys_value" jdbcType="VARCHAR" property="sysValue" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?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">
|
||||
<!--mybatis-3-mapper.dtd:约束文件的名称,限制和检查在当前文件中出现的标签和属性符合mybatis的要求-->
|
||||
<!--namespace:命名空间,要有唯一的值,要求使用dao接口的权限定名称(一个dao接口对应一个mapper,namespace指明对应哪个dao接口)-->
|
||||
<mapper namespace="com.cool.store.mapper.WarehouseInfoMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.WarehouseInfoDO">
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="warehouse_code" jdbcType="VARCHAR" property="warehouseCode" />
|
||||
<result column="warehouse_name" jdbcType="VARCHAR" property="warehouseName" />
|
||||
<result column="warehouse_remark" jdbcType="VARCHAR" property="warehouseRemark" />
|
||||
<result column="warehouse_branches" jdbcType="VARCHAR" property="warehouseBranches" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</resultMap>
|
||||
<select id="getAllAndActive" resultType="com.cool.store.entity.WarehouseInfoDO">
|
||||
select * from xfsg_warehouse_info where deleted = 0
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user