This commit is contained in:
linfso 2023-12-13 13:52:14 +08:00
parent fa7e67866a
commit c8c940a06f
3 changed files with 17 additions and 18 deletions

View File

@ -53,11 +53,10 @@ public class EmisRegionController extends BaseController
*/ */
@PreAuthorize("@ss.hasPermi('emis:emisRegion:list')") @PreAuthorize("@ss.hasPermi('emis:emisRegion:list')")
@GetMapping("/list") @GetMapping("/list")
public TableDataInfo list(EmisRegion emisRegion) public AjaxResult list(EmisRegion emisRegion)
{ {
startPage();
List<EmisRegion> list = emisRegionService.selectEmisRegionList(emisRegion); List<EmisRegion> list = emisRegionService.selectEmisRegionList(emisRegion);
return getDataTable(list); return AjaxResult.success(list);
} }
/** /**

View File

@ -1,10 +1,10 @@
/** /**
* @Project: emis * @Project: emis
* @Title: EmisRegion.java * @Title: EmisRegion.java
* @author linfso * @author linfso
* @date 2023-11-16 16:18:40 * @date 2023-12-13 05:49:14
* @Copyright: ShangHai Duta 2022 All rights reserved. * @Copyright: ShangHai Duta 2022 All rights reserved.
* @version v1.0 * @version v1.0
* @Description: <p> 四级省市区镇表 实体类 </p> * @Description: <p> 四级省市区镇表 实体类 </p>
*/ */
@ -25,9 +25,9 @@ import lombok.Data;
* @ClassName EmisRegion * @ClassName EmisRegion
* @Description 四级省市区镇表 * @Description 四级省市区镇表
* @author linfso * @author linfso
* @date 2023-11-16 16:18:40 * @date 2023-12-13 05:49:14
*/ */
@Data @Data
public class EmisRegion extends BaseEntity public class EmisRegion extends BaseEntity
{ {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;

View File

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper <!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd"> "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.xdadan.erp.emis.mapper.EmisRegionMapper"> <mapper namespace="com.xdadan.erp.emis.mapper.EmisRegionMapper">
<resultMap type="EmisRegion" id="EmisRegionResult"> <resultMap type="EmisRegion" id="EmisRegionResult">
<result property="id" column="id" /> <result property="id" column="id" />
<result property="regionName" column="region_name" /> <result property="regionName" column="region_name" />
@ -33,7 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectEmisRegionList" parameterType="EmisRegion" resultMap="EmisRegionResult"> <select id="selectEmisRegionList" parameterType="EmisRegion" resultMap="EmisRegionResult">
<include refid="selectEmisRegionVo"/> <include refid="selectEmisRegionVo"/>
<where> <where>
<if test="id != null "> and id = #{id}</if> <if test="id != null "> and id = #{id}</if>
<if test="regionName != null and regionName != ''"> and region_name like concat('%', #{regionName}, '%')</if> <if test="regionName != null and regionName != ''"> and region_name like concat('%', #{regionName}, '%')</if>
<if test="regionNameEn != null and regionNameEn != ''"> and region_name_en like concat('%', #{regionNameEn}, '%')</if> <if test="regionNameEn != null and regionNameEn != ''"> and region_name_en like concat('%', #{regionNameEn}, '%')</if>
@ -57,13 +57,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</where> </where>
order by create_time desc order by create_time desc
</select> </select>
<select id="selectEmisRegionById" parameterType="Integer" resultMap="EmisRegionResult"> <select id="selectEmisRegionById" parameterType="Integer" resultMap="EmisRegionResult">
select id, region_name, region_name_en, short_name, parent_id, code, country_id, country_area_id, region_type, zip_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, area_name, country_code, country_name select id, region_name, region_name_en, short_name, parent_id, code, country_id, country_area_id, region_type, zip_code, remark, tenant_id, del_flag, create_by, create_time, update_by, update_time, area_name, country_code, country_name
from emis_region a from emis_region a
where a.id = #{id} where a.id = #{id}
</select> </select>
<insert id="insertEmisRegion" parameterType="EmisRegion"> <insert id="insertEmisRegion" parameterType="EmisRegion">
insert into emis_region insert into emis_region
<trim prefix="(" suffix=")" suffixOverrides=","> <trim prefix="(" suffix=")" suffixOverrides=",">
@ -87,7 +87,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaName != null and areaName != ''">area_name,</if> <if test="areaName != null and areaName != ''">area_name,</if>
<if test="countryCode != null and countryCode != ''">country_code,</if> <if test="countryCode != null and countryCode != ''">country_code,</if>
<if test="countryName != null and countryName != ''">country_name,</if> <if test="countryName != null and countryName != ''">country_name,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">#{id},</if> <if test="id != null">#{id},</if>
<if test="regionName != null and regionName != ''">#{regionName},</if> <if test="regionName != null and regionName != ''">#{regionName},</if>
@ -109,7 +109,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="areaName != null and areaName != ''">#{areaName},</if> <if test="areaName != null and areaName != ''">#{areaName},</if>
<if test="countryCode != null and countryCode != ''">#{countryCode},</if> <if test="countryCode != null and countryCode != ''">#{countryCode},</if>
<if test="countryName != null and countryName != ''">#{countryName},</if> <if test="countryName != null and countryName != ''">#{countryName},</if>
</trim> </trim>
</insert> </insert>
<update id="updateEmisRegion" parameterType="EmisRegion"> <update id="updateEmisRegion" parameterType="EmisRegion">
@ -143,7 +143,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</delete> </delete>
<delete id="deleteEmisRegionByIds" parameterType="String"> <delete id="deleteEmisRegionByIds" parameterType="String">
delete from emis_region where id in delete from emis_region where id in
<foreach item="id" collection="array" open="(" separator="," close=")"> <foreach item="id" collection="array" open="(" separator="," close=")">
#{id} #{id}
</foreach> </foreach>