getCountByStatus.md
1.9 KB
查询各种状态的优惠码总数接口
接口名:
/limitProduct/getCountByStatus
方法
POST JSONRAW
入参
属性名称 | 类型 | 例子 | 说明 | 是否必填 | 长度限制 |
---|---|---|---|---|---|
batchNo | String | 限购码批次号 | 是 | 11 | |
productSkn | int | 关联SKN | 是 | 11 |
对应SQL的操作库表
<select id="selectLimitProductCount" resultType="java.lang.Integer" parameterType="com.yohobuy.platform.model.product.req.LimitProductReq" >
select count(id) from limit_product p
where 1=1
<if test="id != null and id != ''" >
and p.id = #{id,jdbcType=INTEGER}
</if>
<if test="productSkn != null and productSkn != ''" >
and p.productSkn=#{productSkn,jdbcType=INTEGER}
</if>
<if test="productName != null and productName != ''" >
and p.productName like '%' #{productName,jdbcType=VARCHAR} '%'
</if>
<if test="batchNo != null and batchNo != ''" >
and p.batchno like '%' #{batchNo,jdbcType=VARCHAR} '%'
</if>
<if test="status != null and status != ''" >
and p.status = #{status,jdbcType=VARCHAR}
</if>
<if test="hotFlag != null and hotFlag != ''" >
and p.hotFlag = #{hotFlag,jdbcType=VARCHAR}
</if>
<if test="showFlag != null and showFlag != ''" >
and p.showFlag = #{showFlag,jdbcType=VARCHAR}
</if>
<if test="saleFlag != null and saleFlag != '' and saleFlag == 1" >
and p.sale_time < #{currentTime,jdbcType=INTEGER}
</if>
<if test="saleFlag != null and saleFlag != '' and saleFlag == 0" >
and p.sale_time > #{currentTime,jdbcType=INTEGER}
</if>
</select>
响应码
响应码code | 消息 | 说明 |
---|---|---|
200 | 修改成功! | |
5001 | 修改失败! |
返回
{
"code": 200,
"data": [],
"md5": "d751713988987e9331980363e24189ce",
"message": "修改成功!"
}