fix: code & vm
This commit is contained in:
@@ -0,0 +1,91 @@
|
||||
<?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.starry.admin.modules.platform.mapper.SysTenantMapper">
|
||||
<resultMap type="com.starry.admin.modules.platform.entity.SysTenantEntity" id="SysTenantResult">
|
||||
<result property="tenantId" column="tenant_id"/>
|
||||
<result property="tenantType" column="tenant_type"/>
|
||||
<result property="tenantStatus" column="tenant_status"/>
|
||||
<result property="tenantCode" column="tenant_code"/>
|
||||
<result property="tenantName" column="tenant_name"/>
|
||||
<result property="tenantLogo" column="tenant_logo"/>
|
||||
<result property="sortOrder" column="sort_order"/>
|
||||
<result property="homeUrl" column="home_url"/>
|
||||
<result property="phone" column="phone"/>
|
||||
<result property="fax" column="fax"/>
|
||||
<result property="email" column="email"/>
|
||||
<result property="address" column="address"/>
|
||||
<result property="userName" column="user_name"/>
|
||||
<result property="userPwd" column="user_pwd"/>
|
||||
<result property="packageId" column="package_id"/>
|
||||
<result property="tenantTime" column="tenant_time"/>
|
||||
<result property="remarks" column="remarks"/>
|
||||
<result property="updatedTime" column="updated_time"/>
|
||||
<result property="updatedBy" column="updated_by"/>
|
||||
<result property="createdTime" column="created_time"/>
|
||||
<result property="createdBy" column="created_by"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
<result property="version" column="version"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysTenantVo">
|
||||
select tenant_id,
|
||||
tenant_type,
|
||||
tenant_status,
|
||||
tenant_code,
|
||||
tenant_name,
|
||||
tenant_logo,
|
||||
sort_order,
|
||||
home_url,
|
||||
phone,
|
||||
fax,
|
||||
email,
|
||||
address,
|
||||
user_name,
|
||||
user_pwd,
|
||||
package_id,
|
||||
tenant_time,
|
||||
remarks,
|
||||
updated_time,
|
||||
updated_by,
|
||||
created_time,
|
||||
created_by,
|
||||
deleted,
|
||||
version
|
||||
from sys_tenant
|
||||
</sql>
|
||||
|
||||
<select id="selectSysTenantList" resultType="com.starry.admin.modules.platform.vo.TenantResultVo">
|
||||
<include refid="selectSysTenantVo"/>
|
||||
<where>
|
||||
deleted = 0
|
||||
</where>
|
||||
<if test="vo.tenantName != null and vo.tenantName != ''">
|
||||
AND tenant_name like concat('%', #{vo.tenantName}, '%')
|
||||
</if>
|
||||
<if test="vo.tenantStatus != null and vo.tenantStatus != ''">
|
||||
AND tenant_status = #{vo.tenantStatus}
|
||||
</if>
|
||||
<if test="vo.beginTime != null and vo.beginTime != ''">
|
||||
<!-- 开始时间检索 -->
|
||||
AND date_format(tenant_time,'%y%m%d') >= date_format(#{vo.beginTime},'%y%m%d')
|
||||
</if>
|
||||
<if test="vo.endTime != null and vo.endTime != ''">
|
||||
<!-- 结束时间检索 -->
|
||||
AND date_format(tenant_time,'%y%m%d') <= date_format(#{vo.endTime},'%y%m%d')
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSysTenantByTenantId" parameterType="String" resultMap="SysTenantResult">
|
||||
<include refid="selectSysTenantVo"/>
|
||||
where tenant_id = #{tenantId}
|
||||
</select>
|
||||
|
||||
<delete id="deleteTenantByIds" parameterType="String">
|
||||
delete from sys_tenant where tenant_id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
@@ -0,0 +1,59 @@
|
||||
<?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.starry.admin.modules.platform.mapper.SysTenantPackageMapper">
|
||||
<resultMap type="com.starry.admin.modules.platform.entity.SysTenantPackageEntity" id="SysTenantPackageResult">
|
||||
<result property="packageId" column="package_id"/>
|
||||
<result property="packageName" column="package_name"/>
|
||||
<result property="menuIds" column="menu_ids"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="remarks" column="remarks"/>
|
||||
<result property="updatedTime" column="updated_time"/>
|
||||
<result property="updatedBy" column="updated_by"/>
|
||||
<result property="createdTime" column="created_time"/>
|
||||
<result property="createdBy" column="created_by"/>
|
||||
<result property="deleted" column="deleted"/>
|
||||
<result property="version" column="version"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectSysTenantPackageVo">
|
||||
select package_id,
|
||||
package_name,
|
||||
menu_ids,
|
||||
status,
|
||||
remarks,
|
||||
updated_time,
|
||||
updated_by,
|
||||
created_time,
|
||||
created_by,
|
||||
deleted,
|
||||
version
|
||||
from sys_tenant_package
|
||||
</sql>
|
||||
|
||||
<select id="selectSysTenantPackageList" resultMap="SysTenantPackageResult">
|
||||
<include refid="selectSysTenantPackageVo"/>
|
||||
<where>
|
||||
deleted = 0
|
||||
</where>
|
||||
<if test="vo.packageName != null and vo.packageName != ''">
|
||||
AND package_name like concat('%', #{vo.packageName}, '%')
|
||||
</if>
|
||||
<if test="vo.status != null and vo.status != ''">
|
||||
AND status = #{vo.status}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSysTenantPackageByPackageId" parameterType="String" resultMap="SysTenantPackageResult">
|
||||
<include refid="selectSysTenantPackageVo"/>
|
||||
where package_id = #{packageId}
|
||||
</select>
|
||||
|
||||
<select id="getSimpleList" resultType="com.starry.admin.modules.platform.vo.SimplePackage">
|
||||
select package_id as id, package_name as name
|
||||
from sys_tenant_package
|
||||
where deleted = 0
|
||||
and status = '0'
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user