You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

49 lines
2.7 KiB

<?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.charge.task.dao.ActivityNewDOMapper" >
<resultMap id="BaseResultMap" type="com.charge.task.model.ActivityNewDO" >
<!--
WARNING - @mbg.generated
-->
<id column="id" property="id" jdbcType="BIGINT" />
<result column="redis_key" property="redisKey" jdbcType="VARCHAR" />
<result column="activity_name" property="activityName" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="TINYINT" />
<result column="status" property="status" jdbcType="TINYINT" />
<result column="join_method" property="joinMethod" jdbcType="TINYINT" />
<result column="limit_num_type" property="limitNumType" jdbcType="TINYINT" />
<result column="limit_num" property="limitNum" jdbcType="INTEGER" />
<result column="limit_city_flag" property="limitCityFlag" jdbcType="TINYINT" />
<result column="limit_city_ids" property="limitCityIds" jdbcType="VARCHAR" />
<result column="limit_city_names" property="limitCityNames" jdbcType="VARCHAR" />
<result column="limit_station_flag" property="limitStationFlag" jdbcType="TINYINT" />
<result column="limit_station_ids" property="limitStationIds" jdbcType="VARCHAR" />
<result column="limit_station_names" property="limitStationNames" jdbcType="VARCHAR" />
<result column="limit_user_type" property="limitUserType" jdbcType="TINYINT" />
<result column="company_object" property="companyObject" jdbcType="TINYINT" />
<result column="limit_company_ids" property="limitCompanyIds" jdbcType="VARCHAR" />
<result column="current_status" property="currentStatus" jdbcType="TINYINT" />
<result column="config_flag" property="configFlag" jdbcType="TINYINT" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
<result column="start_time" property="startTime" jdbcType="TIMESTAMP" />
<result column="end_time" property="endTime" jdbcType="TIMESTAMP" />
<result column="config_json" property="configJson" jdbcType="LONGVARCHAR" />
</resultMap>
<update id="checkActivityDate">
update t_activity_new
set status = 0
where start_time &gt; #{date}
or end_time &lt; #{date}
</update>
<select id="getListByType" resultMap="BaseResultMap">
select * from t_activity_new
where status = 1
and type = #{type}
and start_time &lt;= #{date}
and end_time &gt;= #{date}
</select>
</mapper>