| | |
| | | <result property="sTitle" column="s_title" /> |
| | | <result property="discountExplain" column="discount_explain" /> |
| | | <result property="discountAmount" column="discount_amount" /> |
| | | <result property="payType" column="pay_type" /> |
| | | </resultMap> |
| | | |
| | | <!-- 定义ShopOrderDetails 的复杂map --> |
| | |
| | | <result property="sTitle" column="s_title" /> |
| | | <result property="discountExplain" column="discount_explain" /> |
| | | <result property="discountAmount" column="discount_amount" /> |
| | | <result property="payType" column="pay_type" /> |
| | | <!--产品信息--> |
| | | <association property="shopProduct" column="p_id" |
| | | select="com.matrix.system.shopXcx.dao.ShopProductDao.selectById"/> |
| | |
| | | select="selectProductionEnterpriseByPid"/> |
| | | </resultMap> |
| | | |
| | | <!--查询产品生产企业--> |
| | | <select id="selectProductionEnterpriseByPid" resultType="java.lang.String"> |
| | | select ifnull(param_value, '') from shop_product_param_ref |
| | | where p_id = ${pId} and param_name = '生产企业' |
| | | </select> |
| | | |
| | | <!-- 字段sql --> |
| | | <sql id="columns"> |
| | |
| | | total_price, |
| | | s_title, |
| | | discount_explain, |
| | | discount_amount |
| | | discount_amount, |
| | | pay_type |
| | | </sql> |
| | | |
| | | <!-- 属性sql --> |
| | |
| | | #{item.totalPrice}, |
| | | #{item.sTitle}, |
| | | #{item.discountExplain}, |
| | | #{item.discountAmount} |
| | | #{item.discountAmount}, |
| | | #{item.payType} |
| | | </sql> |
| | | |
| | | <!-- where sql --> |
| | |
| | | <if test="(record.discountAmount!=null and record.discountAmount!='') or (record.discountAmount!='' and record.discountAmount==0) "> |
| | | and discount_amount = #{record.discountAmount} |
| | | </if> |
| | | <if test="(record.payType!=null and record.payType!='') or (record.payType!='' and record.payType==0) "> |
| | | and pay_type = #{record.payType} |
| | | </if> |
| | | </if> |
| | | |
| | | </sql> |