This commit is contained in:
linfso 2024-05-26 09:24:35 +08:00
parent 9f2e721f86
commit fb19ee1859
2 changed files with 13 additions and 1 deletions

View File

@ -157,5 +157,9 @@ public class EmisCustomerUser extends BaseEntity
/* 专属业务员 */
private String opEmpName;
// 最近下单时间
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date lastOrderTime;
}

View File

@ -73,7 +73,9 @@
<association property="payeeName" column="payee" select="selectEmpNameByCode"/>
<association property="salesmenName" column="salesmen" select="selectEmpNameByCode"/>
<association property="opEmpName" column="op_emp_code" select="selectEmpNameByCode"/>
<!-- <association property="opEmpName" column="op_emp_code" select="selectEmpNameByCode"/>-->
<association property="lastOrderTime" column="customer_code" select="selectLastOrderTimeByCustomerCode"/>
</resultMap>
@ -82,6 +84,12 @@
select a.name from emis_country a where a.code = #{code} limit 1
</select>
<select id="selectLastOrderTimeByCustomerCode" parameterType="String" resultType="date">
select send_date from emis_waybill where customer_code=#{code} order by send_date desc 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