Browse Source

修改国家数据结构,添加产品线

master
Claude Lee 2 months ago
parent
commit
cb529fe09e
  1. 14
      ruoyi-plan/src/main/java/com/ruoyi/dhc/domain/DhcCountry.java
  2. 7
      ruoyi-plan/src/main/resources/mapper/dhc/DhcCountryMapper.xml
  3. 1
      sql/基础功能.sql

14
ruoyi-plan/src/main/java/com/ruoyi/dhc/domain/DhcCountry.java

@ -26,6 +26,9 @@ public class DhcCountry extends BaseEntity @@ -26,6 +26,9 @@ public class DhcCountry extends BaseEntity
@Excel(name = "国家名称")
private String countryName;
@Excel(name = "产品线编码")
private String productLineCode;
/** 销售大区id */
@Excel(name = "销售大区id")
private Long areaIdLarge;
@ -72,12 +75,21 @@ public class DhcCountry extends BaseEntity @@ -72,12 +75,21 @@ public class DhcCountry extends BaseEntity
{
return countryName;
}
public String getProductLineCode() {
return productLineCode;
}
public void setProductLineCode(String productLineCode) {
this.productLineCode = productLineCode;
}
public void setAreaIdLarge(Long areaIdLarge)
{
this.areaIdLarge = areaIdLarge;
}
public Long getAreaIdLarge()
public Long getAreaIdLarge()
{
return areaIdLarge;
}

7
ruoyi-plan/src/main/resources/mapper/dhc/DhcCountryMapper.xml

@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="countryId" column="country_id" />
<result property="countryCode" column="country_code" />
<result property="countryName" column="country_name" />
<result property="productLineCode" column="product_line_code" />
<result property="areaIdLarge" column="area_id_large" />
<result property="areaNameLarge" column="area_name_large" />
<result property="areaIdSmall" column="area_id_small" />
@ -20,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -20,7 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectDhcCountryVo">
select country_id, country_code, country_name, area_id_large, area_name_large, area_id_small, area_name_small, del_flag, create_by, create_time, update_by, update_time from dhc_country
select country_id, country_code, country_name, product_line_code, area_id_large, area_name_large, area_id_small, area_name_small, del_flag, create_by, create_time, update_by, update_time from dhc_country
</sql>
<select id="selectDhcCountryList" parameterType="DhcCountry" resultMap="DhcCountryResult">
@ -29,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -29,6 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
<if test="countryCode != null and countryCode != ''"> and country_code like concat('%', #{countryCode}, '%')</if>
<if test="countryName != null and countryName != ''"> and country_name like concat('%', #{countryName}, '%')</if>
<if test="productLineCode != null and productLineCode != ''">and product_line_code = #{productLineCode}</if>
<if test="areaIdLarge != null "> and area_id_large = #{areaIdLarge}</if>
<if test="areaNameLarge != null and areaNameLarge != ''"> and area_name_large = #{areaNameLarge}</if>
<if test="areaIdSmall != null "> and area_id_small = #{areaIdSmall}</if>
@ -46,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -46,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="countryCode != null">country_code,</if>
<if test="countryName != null">country_name,</if>
<if test="productLineCode != null">product_line_code,</if>
<if test="areaIdLarge != null">area_id_large,</if>
<if test="areaNameLarge != null">area_name_large,</if>
<if test="areaIdSmall != null">area_id_small,</if>
@ -59,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -59,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="countryCode != null">#{countryCode},</if>
<if test="countryName != null">#{countryName},</if>
<if test="productLineCode != null">#{productLineCode},</if>
<if test="areaIdLarge != null">#{areaIdLarge},</if>
<if test="areaNameLarge != null">#{areaNameLarge},</if>
<if test="areaIdSmall != null">#{areaIdSmall},</if>
@ -76,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" @@ -76,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="countryCode != null">country_code = #{countryCode},</if>
<if test="countryName != null">country_name = #{countryName},</if>
<if test="productLineCode != null">product_line_code = #{productLineCode},</if>
<if test="areaIdLarge != null">area_id_large = #{areaIdLarge},</if>
<if test="areaNameLarge != null">area_name_large = #{areaNameLarge},</if>
<if test="areaIdSmall != null">area_id_small = #{areaIdSmall},</if>

1
sql/基础功能.sql

@ -66,6 +66,7 @@ create table dhc_country ( @@ -66,6 +66,7 @@ create table dhc_country (
country_id bigint(20) not null auto_increment comment '国家id',
country_code varchar(32) default '' comment '国家编码',
country_name varchar(64) default '' comment '国家名称',
product_line_code varchar(32) NOT NULL comment '产品线编码',
area_id_large bigint(20) comment '销售大区id',
area_name_large varchar(64) default '' comment '销售大区名称',
area_id_small bigint(20) comment '销售小区id',

Loading…
Cancel
Save