@ -48,6 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property= "auditStatus" column= "audit_status" />
<result property= "useStatus" column= "use_status" />
<result property= "customerRemarks" column= "customer_remarks" />
<result property= "createBy" column= "create_by" />
<result property= "updateBy" column= "update_by" />
<result property= "customerSign" column= "customer_sign" />
<result property= "instanceId" column= "instance_id" />
@ -64,7 +65,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property= "rmbFlag" column= "rmb_flag" />
<result property= "usdFlag" column= "usd_flag" />
<result property= "cancelRemark" column= "cancel_remark" />
</resultMap>
<sql id= "selectSysCustomerVo" >
select id,enterprise_code,enterprise_name,english_name,customer_abbreviation ,customer_purser ,
@ -74,7 +74,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax,
delivery_address_id,delivery_customer_person,delivery_customer_phone,
delivery_address,delivery_customer_postal,delivery_customer_fax,business_members,
identifying_people,first_add_time,update_info_time, create_time ,audit_status,use_status,update_by, update_time,rmb_flag,usd_flag, cancel_remark,
identifying_people,first_add_time,update_info_time, create_time ,audit_status,use_status,update_by, create_by, update_time,rmb_flag,usd_flag, cancel_remark,
apply_user,apply_time , instance_id , instance_type from sys_customer
</sql>
@ -86,7 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
customer_contact_id,customer_contact,customer_office,contact_number,customer_email,customer_fax,
delivery_address_id,delivery_customer_person,delivery_customer_phone,
delivery_address,delivery_customer_postal,delivery_customer_fax,business_members,rmb_flag,usd_flag,
identifying_people,first_add_time,update_info_time,audit_status,use_status, create_time,update_time from
identifying_people,first_add_time,update_info_time,audit_status,use_status, create_by,create_ time,update_time from
sys_customer
<where >
and audit_status = '1' and use_status = '1'
@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
s.customs_code,s.customer_contact_id,s.customer_contact,s.customer_office,s.contact_number,s.customer_email,
s.customer_fax,s.delivery_address_id,s.delivery_customer_person,s.delivery_customer_phone,s.delivery_address,
s.delivery_customer_postal,s.delivery_customer_fax,s.business_members,s.identifying_people,s.first_add_time,
s.update_info_time,s.audit_status,s.use_status,s.update_by,s.instance_id, s.instance_type,p.dict_value as instance_type_name,
s.update_info_time,s.audit_status,s.use_status,s.update_by, s.create_by, s.instance_id, s.instance_type,p.dict_value as instance_type_name,
s.submit_instance_id, s.cancel_instance_id, s.restore_instance_id, s.apply_title, s.apply_user, s.apply_time ,s.create_time,s.update_time ,s.rmb_flag,s.usd_flag
from sys_customer as s
left join(
@ -122,6 +122,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "deliveryAddress != null and deliveryAddress != ''" > and s.delivery_address like concat('%', #{deliveryAddress}, '%')</if>
<if test= "params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''" > and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime}</if>
<if test= "customerSign != null and customerSign != ''" > and s.customer_sign = #{customerSign}</if>
<!-- 添加权限控制逻辑 -->
<if test= "allowedCreators != null and !allowedCreators.isEmpty()" >
and s.create_by in (<foreach item= "item" index= "index" collection= "allowedCreators" open= "" close= "" separator= "," >
#{item}
</foreach> )
</if>
</where>
order by s.audit_status asc, s.create_time desc
</select>
@ -225,6 +231,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "usdFlag != null" > usd_flag,</if>
<if test= "cancelRemark != null" > cancel_remark,</if>
<if test= "customerSign != null" > customer_sign,</if>
<if test= "createBy != null" > create_by,</if>
</trim>
<trim prefix= "values (" suffix= ")" suffixOverrides= "," >
<if test= "enterpriseCode!=null and enterpriseCode != ''" > #{enterpriseCode},</if>
@ -281,6 +288,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test= "usdFlag != null" > #{usdFlag}, </if>
<if test= "cancelRemark != null" > #{cancelRemark},</if>
<if test= "customerSign != null" > #{customerSign},</if>
<if test= "createBy != null" > #{createBy},</if>
</trim>
</insert>