| | |
| | | <result column="updateBy" property="updateBy" /> |
| | | <result column="isCover" property="isCover" /> |
| | | <result column="shopId" property="shopId" /> |
| | | <result column="generatorId" property="generatorId" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, stockNum, stockTime, createTime, updateTime, disabled, createBy, updateBy,isCover,shopId |
| | | id, stockNum, stockTime, createTime, updateTime, disabled, createBy, updateBy,isCover,shopId,generatorId |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.system.vo.TOrderStockVO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | |
| | | <if test="query.shopId != null"> |
| | | AND shopId = #{query.shopId} |
| | | </if> |
| | | <if test="query.generatorId != null"> |
| | | AND generatorId = #{query.generatorId} |
| | | </if> |
| | | <if test="query.endTime != null and query.startTime != null"> |
| | | AND (stockTime BETWEEN #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY createTime DESC |
| | | </select> |
| | | <select id="getDataGeneratorStockDetail" resultType="java.util.Map"> |
| | | SELECT |
| | | SUM(payMoney) AS stockAmountSum, |
| | | COUNT(id) AS totalStock |
| | | from t_order_stock |
| | | <where> |
| | | <if test="query.stockNum != null and query.stockNum != ''"> |
| | | AND stockNum LIKE concat('%',#{query.stockNum},'%') |
| | | </if> |
| | | <if test="query.generatorId != null"> |
| | | AND generatorId = #{query.generatorId} |
| | | </if> |
| | | <if test="query.endTime != null and query.startTime != null"> |
| | | AND (stockTime BETWEEN #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | AND disabled = ${@com.ruoyi.common.enums.DisabledEnum@NO.getCode()} |
| | | </where> |
| | | </select> |
| | | <select id="stockGeneratorExport" resultType="com.ruoyi.system.vo.TOrderStockVO"> |
| | | SELECT <include refid="Base_Column_List"></include> |
| | | FROM t_order_stock |
| | | <where> |
| | | <if test="query.stockNum != null and query.stockNum != ''"> |
| | | AND stockNum LIKE concat('%',#{query.stockNum},'%') |
| | | </if> |
| | | <if test="query.generatorId != null"> |
| | | AND generatorId = #{query.generatorId} |
| | | </if> |
| | | <if test="query.endTime != null and query.startTime != null"> |
| | | AND (stockTime BETWEEN #{query.startTime} and #{query.endTime}) |
| | | </if> |