|
|
@@ -26,6 +26,7 @@
|
|
|
<result property="rakuuruCartPwd" column="rakuuru_cart_pwd"/>
|
|
|
<result property="userPassword" column="user_password"/>
|
|
|
<result property="discontinuedFlg" column="discontinued_flg"/>
|
|
|
+ <result property="discontinuedFlgLabel" column="discontinued_flg_label"/>
|
|
|
<result property="discontinuedDate" column="discontinued_date"/>
|
|
|
<result property="createTime" column="create_time"/>
|
|
|
<result property="createBy" column="create_by"/>
|
|
|
@@ -39,115 +40,118 @@
|
|
|
|
|
|
<sql id="selectMastFarmerVo">
|
|
|
select
|
|
|
- id,
|
|
|
- farmer_id,
|
|
|
- farmer_name,
|
|
|
- farmer_name_kn,
|
|
|
- phone_number,
|
|
|
- mail_address,
|
|
|
- postal_code,
|
|
|
- prefecture,
|
|
|
- city,
|
|
|
- town_street_area,
|
|
|
- building_etc,
|
|
|
- address,
|
|
|
- representative_name,
|
|
|
- representative_name_kn,
|
|
|
- issued_by,
|
|
|
- issued_date,
|
|
|
- login_cnt,
|
|
|
- rakuuru_cart_id,
|
|
|
- rakuuru_cart_pwd,
|
|
|
- user_password,
|
|
|
- discontinued_flg,
|
|
|
- discontinued_date,
|
|
|
- create_time,
|
|
|
- create_by,
|
|
|
- create_pg_id,
|
|
|
- update_time,
|
|
|
- update_by,
|
|
|
- update_pg_id,
|
|
|
- version
|
|
|
- from mast_farmer
|
|
|
+ mf.id,
|
|
|
+ mf.farmer_id,
|
|
|
+ mf.farmer_name,
|
|
|
+ mf.farmer_name_kn,
|
|
|
+ mf.phone_number,
|
|
|
+ mf.mail_address,
|
|
|
+ mf.postal_code,
|
|
|
+ mf. prefecture,
|
|
|
+ mf. city,
|
|
|
+ mf.town_street_area,
|
|
|
+ mf.building_etc,
|
|
|
+ mf.address,
|
|
|
+ mf.representative_name,
|
|
|
+ mf.representative_name_kn,
|
|
|
+ mf.issued_by,
|
|
|
+ mf.issued_date,
|
|
|
+ mf.login_cnt,
|
|
|
+ mf.rakuuru_cart_id,
|
|
|
+ mf.rakuuru_cart_pwd,
|
|
|
+ mf.user_password,
|
|
|
+ mf.discontinued_flg,
|
|
|
+ mf.discontinued_date,
|
|
|
+ mf.create_time,
|
|
|
+ mf.create_by,
|
|
|
+ mf.create_pg_id,
|
|
|
+ mf.update_time,
|
|
|
+ mf.update_by,
|
|
|
+ mf.update_pg_id,
|
|
|
+ mf. version,
|
|
|
+ sdd.dict_label as discontinued_flg_label
|
|
|
+ from mast_farmer mf inner join sys_dict_data sdd
|
|
|
+ on CAST(mf.discontinued_flg AS VARCHAR) = sdd.dict_value and sdd.dict_type = 'usage_status_type'
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectList" parameterType="MastFarmer" resultMap="MastFarmerResult">
|
|
|
<include refid="selectMastFarmerVo"/>
|
|
|
<where>
|
|
|
+ sdd.dict_type = 'usage_status_type'
|
|
|
<if test="id != null and id != ''">
|
|
|
- and id = #{id}
|
|
|
+ and mf.id = #{id}
|
|
|
</if>
|
|
|
<if test="farmerId != null and farmerId != ''">
|
|
|
- and farmer_id = #{farmerId}
|
|
|
+ and mf.farmer_id = #{farmerId}
|
|
|
</if>
|
|
|
<if test="farmerName != null and farmerName != ''">
|
|
|
- and farmer_name like '%' || #{farmerName} || '%'
|
|
|
+ and mf.farmer_name like '%' || #{farmerName} || '%'
|
|
|
</if>
|
|
|
<if test="farmerNameKn != null and farmerNameKn != ''">
|
|
|
- and farmer_name_kn = #{farmerNameKn}
|
|
|
+ and mf.farmer_name_kn = #{farmerNameKn}
|
|
|
</if>
|
|
|
<if test="phoneNumber != null and phoneNumber != ''">
|
|
|
- and phone_number = #{phoneNumber}
|
|
|
+ and mf.phone_number = #{phoneNumber}
|
|
|
</if>
|
|
|
<if test="mailAddress != null and mailAddress != ''">
|
|
|
- and mail_address = #{mailAddress}
|
|
|
+ and mf.mail_address = #{mailAddress}
|
|
|
</if>
|
|
|
<if test="prefecture != null and prefecture != ''">
|
|
|
- and prefecture = #{prefecture}
|
|
|
+ and mf.prefecture = #{prefecture}
|
|
|
</if>
|
|
|
<if test="city != null and city != ''">
|
|
|
- and city = #{city}
|
|
|
+ and mf.city = #{city}
|
|
|
</if>
|
|
|
<if test="townStreetArea != null and townStreetArea != ''">
|
|
|
- and town_street_area = #{townStreetArea}
|
|
|
+ and mf.town_street_area = #{townStreetArea}
|
|
|
</if>
|
|
|
<if test="buildingEtc != null and buildingEtc != ''">
|
|
|
- and building_etc = #{buildingEtc}
|
|
|
+ and mf.building_etc = #{buildingEtc}
|
|
|
</if>
|
|
|
<if test="address != null and address != ''">
|
|
|
- and address = #{address}
|
|
|
+ and mf.address = #{address}
|
|
|
</if>
|
|
|
<if test="representativeName != null and representativeName != ''">
|
|
|
- and representative_name = #{representativeName}
|
|
|
+ and mf.representative_name like '%' || #{representativeName} || '%'
|
|
|
</if>
|
|
|
<if test="representativeNameKn != null and representativeNameKn != ''">
|
|
|
- and representative_name_kn = #{representativeNameKn}
|
|
|
+ and mf.representative_name_kn = #{representativeNameKn}
|
|
|
</if>
|
|
|
<if test="issuedBy != null and issuedBy != ''">
|
|
|
- and issued_by = #{issuedBy}
|
|
|
+ and mf.issued_by = #{issuedBy}
|
|
|
</if>
|
|
|
<if test="issuedDate != null and issuedDate != ''">
|
|
|
- and issued_date = #{issuedDate}
|
|
|
+ and mf.issued_date = #{issuedDate}
|
|
|
</if>
|
|
|
<if test="loginCnt != null ">
|
|
|
- and login_cnt = #{loginCnt}
|
|
|
+ and mf.login_cnt = #{loginCnt}
|
|
|
</if>
|
|
|
<if test="rakuuruCartId != null and rakuuruCartId != ''">
|
|
|
- and rakuuru_cart_id = #{rakuuruCartId}
|
|
|
+ and mf.rakuuru_cart_id = #{rakuuruCartId}
|
|
|
</if>
|
|
|
<if test="rakuuruCartPwd != null and rakuuruCartPwd != ''">
|
|
|
- and rakuuru_cart_pwd = #{rakuuruCartPwd}
|
|
|
+ and mf.rakuuru_cart_pwd = #{rakuuruCartPwd}
|
|
|
</if>
|
|
|
<if test="userPassword != null and userPassword != ''">
|
|
|
- and user_password = #{userPassword}
|
|
|
+ and mf.user_password = #{userPassword}
|
|
|
</if>
|
|
|
<if test="discontinuedFlg != null ">
|
|
|
- and discontinued_flg = #{discontinuedFlg}
|
|
|
+ and mf.discontinued_flg = #{discontinuedFlg}
|
|
|
</if>
|
|
|
<if test="discontinuedDate != null and discontinuedDate != ''">
|
|
|
- and discontinued_date = #{discontinuedDate}
|
|
|
+ and mf.discontinued_date = #{discontinuedDate}
|
|
|
</if>
|
|
|
<if test="postalCode != null and postalCode != ''">
|
|
|
- and postal_code = #{postalCode}
|
|
|
+ and mf.postal_code = #{postalCode}
|
|
|
</if>
|
|
|
|
|
|
</where>
|
|
|
- order by farmer_id asc
|
|
|
+ order by mf.farmer_id asc
|
|
|
</select>
|
|
|
|
|
|
<select id="selectById" parameterType="String" resultMap="MastFarmerResult">
|
|
|
<include refid="selectMastFarmerVo"/>
|
|
|
- where id = #{id}
|
|
|
+ where mf.id = #{id}
|
|
|
|
|
|
</select>
|
|
|
|