md
This commit is contained in:
parent
f0f63c7810
commit
ed21620e2b
@ -58,15 +58,13 @@ public class EmisCustomerAddressController extends BaseController
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
|
||||
|
||||
startPage();
|
||||
List<EmisCustomerAddress> list = emisCustomerAddressService.selectEmisCustomerAddressList(emisCustomerAddress);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
// @PreAuthorize("@ss.hasPermi('emis:emisCustomerAddress:list')")
|
||||
@JacksonFilter(include= {"country","name","phone","province","city","district","town","address","postCode","email","company","blDefaultFlag","orderNum","createTime","remark"},value= EmisCustomerAddress.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
@JacksonFilter(include= {"id","name","phone","country","province","city","district","countryName","provinceName","cityName","districtName","address","postCode","email","company","blDefaultFlag","orderNum","createTime","remark"},value= EmisCustomerAddress.class,type= JacksonFilter.JscksonFilterType.RESPONSE)
|
||||
@RequestMapping("/listSimple")
|
||||
public TableDataInfo listSimple(EmisCustomerAddress emisCustomerAddress)
|
||||
{
|
||||
|
||||
@ -49,7 +49,7 @@ public class EmisCustomerAddress extends BaseEntity
|
||||
/* 市 */
|
||||
private String city;
|
||||
/* 区 */
|
||||
private String district;
|
||||
private String county;
|
||||
/* 城镇 */
|
||||
private String town;
|
||||
/* 地址 */
|
||||
@ -73,4 +73,11 @@ public class EmisCustomerAddress extends BaseEntity
|
||||
/* 更新网点 */
|
||||
private String updateSite;
|
||||
|
||||
|
||||
private String countryName;
|
||||
private String provinceName;
|
||||
private String cityName;
|
||||
private String countyName;
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
<result property="phone" column="phone" />
|
||||
<result property="province" column="province" />
|
||||
<result property="city" column="city" />
|
||||
<result property="district" column="district" />
|
||||
<result property="county" column="county" />
|
||||
<result property="town" column="town" />
|
||||
<result property="address" column="address" />
|
||||
<result property="postCode" column="post_code" />
|
||||
@ -34,12 +34,26 @@
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createSite" column="create_site" />
|
||||
<result property="updateSite" column="update_site" />
|
||||
|
||||
<association property="countryName" column="country" select="selectCountryNameByCode"/>
|
||||
<association property="provinceName" column="province" select="selectRegionNameByCode"/>
|
||||
<association property="cityName" column="city" select="selectRegionNameByCode"/>
|
||||
<association property="countyName" column="county" select="selectRegionNameByCode"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectEmisCustomerAddressVo">
|
||||
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, district, town, address, post_code, email, company, bl_default_flag, order_num, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_customer_address
|
||||
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, county, town, address, post_code, email, company, bl_default_flag, order_num, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site from emis_customer_address
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="selectCountryNameByCode" parameterType="String" resultType="string">
|
||||
select a.name from emis_country a where a.code = #{code} limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectRegionNameByCode" parameterType="String" resultType="string">
|
||||
select a.region_name from emis_region a where a.region_code = #{code} limit 1
|
||||
</select>
|
||||
|
||||
<select id="selectEmisCustomerAddressList" parameterType="EmisCustomerAddress" resultMap="EmisCustomerAddressResult">
|
||||
<include refid="selectEmisCustomerAddressVo"/>
|
||||
<where>
|
||||
@ -54,7 +68,7 @@
|
||||
<if test="phone != null and phone != ''"> and phone like concat('%', #{phone}, '%')</if>
|
||||
<if test="province != null and province != ''"> and province like concat('%', #{province}, '%')</if>
|
||||
<if test="city != null and city != ''"> and city like concat('%', #{city}, '%')</if>
|
||||
<if test="district != null and district != ''"> and district like concat('%', #{district}, '%')</if>
|
||||
<if test="county != null and county != ''"> and county like concat('%', #{county}, '%')</if>
|
||||
<if test="town != null and town != ''"> and town like concat('%', #{town}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address like concat('%', #{address}, '%')</if>
|
||||
<if test="postCode != null and postCode != ''"> and post_code like concat('%', #{postCode}, '%')</if>
|
||||
@ -77,11 +91,13 @@
|
||||
</select>
|
||||
|
||||
<select id="selectEmisCustomerAddressById" parameterType="Long" resultMap="EmisCustomerAddressResult">
|
||||
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, district, town, address, post_code, email, company, bl_default_flag, order_num, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
select id, user_id, customer_code, short_name, alias, address_type, country, name, phone, province, city, county, town, address, post_code, email, company, bl_default_flag, order_num, use_site, use_site_code, del_flag, create_by, create_time, update_by, update_time, remark, create_site, update_site
|
||||
from emis_customer_address a
|
||||
where a.id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
<insert id="insertEmisCustomerAddress" parameterType="EmisCustomerAddress">
|
||||
insert into emis_customer_address
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@ -96,7 +112,7 @@
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="province != null and province != ''">province,</if>
|
||||
<if test="city != null and city != ''">city,</if>
|
||||
<if test="district != null and district != ''">district,</if>
|
||||
<if test="county != null and county != ''">county,</if>
|
||||
<if test="town != null and town != ''">town,</if>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="postCode != null and postCode != ''">post_code,</if>
|
||||
@ -127,7 +143,7 @@
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="province != null and province != ''">#{province},</if>
|
||||
<if test="city != null and city != ''">#{city},</if>
|
||||
<if test="district != null and district != ''">#{district},</if>
|
||||
<if test="county != null and county != ''">#{county},</if>
|
||||
<if test="town != null and town != ''">#{town},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="postCode != null and postCode != ''">#{postCode},</if>
|
||||
@ -161,7 +177,7 @@
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="province != null and province != ''">province = #{province},</if>
|
||||
<if test="city != null and city != ''">city = #{city},</if>
|
||||
<if test="district != null and district != ''">district = #{district},</if>
|
||||
<if test="county != null and county != ''">county = #{county},</if>
|
||||
<if test="town != null and town != ''">town = #{town},</if>
|
||||
<if test="address != null and address != ''">address = #{address},</if>
|
||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user