88 lines
3.6 KiB
XML
88 lines
3.6 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
<mapper namespace="com.dao.LuxianxinxiDao">
|
|
|
|
<!-- 可根据自己的需求,是否要使用 -->
|
|
<resultMap type="com.entity.LuxianxinxiEntity" id="luxianxinxiMap">
|
|
<result property="dongwubianhao" column="dongwubianhao"/>
|
|
<result property="dongwumingcheng" column="dongwumingcheng"/>
|
|
<result property="tupian" column="tupian"/>
|
|
<result property="dongwuleibie" column="dongwuleibie"/>
|
|
<result property="baohudengji" column="baohudengji"/>
|
|
<result property="xingtaitezheng" column="xingtaitezheng"/>
|
|
<result property="shenghuoxixing" column="shenghuoxixing"/>
|
|
<result property="fenbufanwei" column="fenbufanwei"/>
|
|
<result property="baidubaike" column="baidubaike"/>
|
|
<result property="qixihuanjing" column="qixihuanjing"/>
|
|
<result property="zhongqunzhuangkuang" column="zhongqunzhuangkuang"/>
|
|
<result property="baoyucuoshi" column="baoyucuoshi"/>
|
|
<result property="faburiqi" column="faburiqi"/>
|
|
<result property="thumbsupnum" column="thumbsupnum"/>
|
|
<result property="crazilynum" column="crazilynum"/>
|
|
<result property="clicktime" column="clicktime"/>
|
|
<result property="clicknum" column="clicknum"/>
|
|
<result property="discussnum" column="discussnum"/>
|
|
<result property="storeupnum" column="storeupnum"/>
|
|
</resultMap>
|
|
|
|
<select id="selectListVO"
|
|
resultType="com.entity.vo.LuxianxinxiVO" >
|
|
SELECT * FROM luxianxinxi luxianxinxi
|
|
<where> 1=1 ${ew.sqlSegment}</where>
|
|
</select>
|
|
|
|
<select id="selectVO"
|
|
resultType="com.entity.vo.LuxianxinxiVO" >
|
|
SELECT luxianxinxi.* FROM luxianxinxi luxianxinxi
|
|
<where> 1=1 ${ew.sqlSegment}</where>
|
|
</select>
|
|
|
|
<select id="selectListView"
|
|
resultType="com.entity.view.LuxianxinxiView" >
|
|
|
|
SELECT luxianxinxi.* FROM luxianxinxi luxianxinxi
|
|
<where> 1=1 ${ew.sqlSegment}</where>
|
|
</select>
|
|
|
|
<select id="selectView"
|
|
resultType="com.entity.view.LuxianxinxiView" >
|
|
SELECT * FROM luxianxinxi luxianxinxi <where> 1=1 ${ew.sqlSegment}</where>
|
|
</select>
|
|
|
|
|
|
<select id="selectValue" resultType="map" >
|
|
SELECT ${params.xColumn}, ROUND(sum(${params.yColumn}),1) total FROM luxianxinxi
|
|
<where> 1=1 ${ew.sqlSegment}</where>
|
|
group by ${params.xColumn}
|
|
</select>
|
|
|
|
<select id="selectTimeStatValue" resultType="map" >
|
|
<if test = 'params.timeStatType == "日"'>
|
|
SELECT DATE_FORMAT(${params.xColumn},'%Y-%m-%d') ${params.xColumn}, sum(${params.yColumn}) total FROM luxianxinxi
|
|
<where> 1=1 ${ew.sqlSegment}</where>
|
|
group by DATE_FORMAT(${params.xColumn},'%Y-%m-%d')
|
|
</if>
|
|
<if test = 'params.timeStatType == "月"'>
|
|
SELECT DATE_FORMAT(${params.xColumn},'%Y-%m') ${params.xColumn}, sum(${params.yColumn}) total FROM luxianxinxi
|
|
<where> 1=1 ${ew.sqlSegment}</where>
|
|
group by DATE_FORMAT(${params.xColumn},'%Y-%m')
|
|
</if>
|
|
<if test = 'params.timeStatType == "年"'>
|
|
SELECT DATE_FORMAT(${params.xColumn},'%Y') ${params.xColumn}, sum(${params.yColumn}) total FROM luxianxinxi
|
|
<where> 1=1 ${ew.sqlSegment}</where>
|
|
group by DATE_FORMAT(${params.xColumn},'%Y')
|
|
</if>
|
|
</select>
|
|
|
|
<select id="selectGroup" resultType="map" >
|
|
SELECT ${params.column} , count(1) total FROM luxianxinxi
|
|
<where> 1=1 ${ew.sqlSegment}</where>
|
|
group by ${params.column}
|
|
</select>
|
|
|
|
|
|
|
|
|
|
</mapper>
|