| | |
| | | <select id="queryDiscountInfo" resultType="map"> |
| | | select |
| | | aa.time, |
| | | aa.`name`, |
| | | aa.phone, |
| | | ANY_VALUE(aa.`name`) as name, |
| | | ANY_VALUE(aa.phone) as phone, |
| | | sum(aa.discountMoney) as discountMoney |
| | | from ( |
| | | select |
| | |
| | | <if test="null != companyId"> |
| | | and a.companyId = #{companyId} |
| | | </if> |
| | | ) as aa group by aa.time, userId order by aa.time desc |
| | | ) as aa group by aa.time, aa.userId order by aa.time desc |
| | | <if test="null != offset and null != limit"> |
| | | limit #{offset}, #{limit} |
| | | </if> |
| | |
| | | and a.companyId = #{companyId} |
| | | </if> |
| | | ) as aa group by aa.time, userId |
| | | |
| | | ) as w |
| | | </select> |
| | | </mapper> |