12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061 |
- <?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.platform.yijia.dao.IntegralWaresMapper">
- <!--返回结果-->
- <resultMap id="BaseResultMap" type="com.platform.yijia.pojo.IntegralWares">
- <id column="id" jdbcType="INTEGER" property="id" />
- <result column="wares_type" jdbcType="VARCHAR" property="waresType" />
- <result column="wares_name" jdbcType="VARCHAR" property="waresName" />
- <result column="sale_integral" jdbcType="DECIMAL" property="saleIntegral" />
- <result column="wares_pic" jdbcType="VARCHAR" property="waresPic" />
- <result column="wares_detail" jdbcType="VARCHAR" property="waresDetail" />
- <result column="wares_count" jdbcType="INTEGER" property="waresCount" />
- <result column="wares_out_count" jdbcType="INTEGER" property="waresOutCount" />
- <result column="wares_status" jdbcType="VARCHAR" property="waresStatus" />
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
- <result column="create_by" jdbcType="VARCHAR" property="createBy" />
- <result column="create_name" jdbcType="VARCHAR" property="createName" />
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
- <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
- <result column="update_name" jdbcType="VARCHAR" property="updateName" />
- <result column="station_id" jdbcType="INTEGER" property="stationId" />
- <result column="station_name" jdbcType="VARCHAR" property="stationName" />
- </resultMap>
- <!--查询列-->
- <sql id="Base_Column_List">
- id, wares_type, wares_name, sale_integral, wares_pic, wares_detail, wares_count, wares_out_count, wares_status, create_time,
- create_by, create_name, update_time, update_by, update_name, station_name
- </sql>
- <!--查询油站商品信息-->
- <select id="getIntegralWaresInfoList" resultMap="BaseResultMap" parameterType="com.platform.yijia.pojo.IntegralWares">
- SELECT
- <include refid="Base_Column_List" />
- FROM integral_wares
- <where>
- wares_status = "1"
- <if test="stationId !=null and stationId !=''">
- AND station_id = #{stationId}
- </if>
- </where>
- </select>
- <!--更新油站商品已售数量-->
- <update id="updateIntegralWaresInfo" parameterType="com.platform.yijia.pojo.IntegralWares">
- UPDATE
- integral_wares
- <set>
- <if test="waresOutCount !=null">
- wares_out_count = #{waresOutCount}
- </if>
- </set>
- <where>
- <if test="id !=null and id != ''">
- id = #{id}
- </if>
- </where>
- </update>
- </mapper>
|