32 changed files with 2486 additions and 60 deletions
@ -0,0 +1,120 @@ |
|||||
|
package com.dongjian.dashboard.back.dao.auto; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.model.DashboardNotification; |
||||
|
import com.dongjian.dashboard.back.model.DashboardNotificationExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface DashboardNotificationMapper { |
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
long countByExample(DashboardNotificationExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int deleteByExample(DashboardNotificationExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int insert(DashboardNotification record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int insertSelective(DashboardNotification record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
List<DashboardNotification> selectByExampleWithBLOBs(DashboardNotificationExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
List<DashboardNotification> selectByExample(DashboardNotificationExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
DashboardNotification selectByPrimaryKey(Long id); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByExampleSelective(@Param("record") DashboardNotification record, @Param("example") DashboardNotificationExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByExampleWithBLOBs(@Param("record") DashboardNotification record, @Param("example") DashboardNotificationExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByExample(@Param("record") DashboardNotification record, @Param("example") DashboardNotificationExample example); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByPrimaryKeySelective(DashboardNotification record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByPrimaryKeyWithBLOBs(DashboardNotification record); |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
int updateByPrimaryKey(DashboardNotification record); |
||||
|
} |
||||
@ -0,0 +1,17 @@ |
|||||
|
package com.dongjian.dashboard.back.dao.ex; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.dao.auto.DashboardNotificationMapper; |
||||
|
import com.dongjian.dashboard.back.dao.auto.UserBuildingRelationMapper; |
||||
|
import com.dongjian.dashboard.back.model.UserBuildingRelation; |
||||
|
import com.dongjian.dashboard.back.vo.building.BindedBuildingVO; |
||||
|
import com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO; |
||||
|
import org.apache.ibatis.annotations.Mapper; |
||||
|
|
||||
|
@Mapper |
||||
|
public interface DashboardNotificationMapperExt extends DashboardNotificationMapper { |
||||
|
|
||||
|
DashboardNotificationPageVO getNotification(Long companyId); |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,423 @@ |
|||||
|
<?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.dongjian.dashboard.back.dao.auto.DashboardNotificationMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.dongjian.dashboard.back.model.DashboardNotification"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="company_id" jdbcType="BIGINT" property="companyId" /> |
||||
|
<result column="demand_time" jdbcType="VARCHAR" property="demandTime" /> |
||||
|
<result column="category" jdbcType="VARCHAR" property="category" /> |
||||
|
<result column="flag" jdbcType="INTEGER" property="flag" /> |
||||
|
<result column="created_at" jdbcType="BIGINT" property="createdAt" /> |
||||
|
<result column="created_by" jdbcType="BIGINT" property="createdBy" /> |
||||
|
<result column="updated_at" jdbcType="BIGINT" property="updatedAt" /> |
||||
|
<result column="updated_by" jdbcType="BIGINT" property="updatedBy" /> |
||||
|
</resultMap> |
||||
|
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.dongjian.dashboard.back.model.DashboardNotification"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<result column="content" jdbcType="LONGVARCHAR" property="content" /> |
||||
|
</resultMap> |
||||
|
<sql id="Example_Where_Clause"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<where> |
||||
|
<foreach collection="oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Update_By_Example_Where_Clause"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<where> |
||||
|
<foreach collection="example.oredCriteria" item="criteria" separator="or"> |
||||
|
<if test="criteria.valid"> |
||||
|
<trim prefix="(" prefixOverrides="and" suffix=")"> |
||||
|
<foreach collection="criteria.criteria" item="criterion"> |
||||
|
<choose> |
||||
|
<when test="criterion.noValue"> |
||||
|
and ${criterion.condition} |
||||
|
</when> |
||||
|
<when test="criterion.singleValue"> |
||||
|
and ${criterion.condition} #{criterion.value} |
||||
|
</when> |
||||
|
<when test="criterion.betweenValue"> |
||||
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} |
||||
|
</when> |
||||
|
<when test="criterion.listValue"> |
||||
|
and ${criterion.condition} |
||||
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=","> |
||||
|
#{listItem} |
||||
|
</foreach> |
||||
|
</when> |
||||
|
</choose> |
||||
|
</foreach> |
||||
|
</trim> |
||||
|
</if> |
||||
|
</foreach> |
||||
|
</where> |
||||
|
</sql> |
||||
|
<sql id="Base_Column_List"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
id, company_id, demand_time, category, flag, created_at, created_by, updated_at, |
||||
|
updated_by |
||||
|
</sql> |
||||
|
<sql id="Blob_Column_List"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
content |
||||
|
</sql> |
||||
|
<select id="selectByExampleWithBLOBs" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationExample" resultMap="ResultMapWithBLOBs"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
'true' as QUERYID, |
||||
|
<include refid="Base_Column_List" /> |
||||
|
, |
||||
|
<include refid="Blob_Column_List" /> |
||||
|
from dashboard_notification |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationExample" resultMap="BaseResultMap"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
'true' as QUERYID, |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from dashboard_notification |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
<if test="orderByClause != null"> |
||||
|
order by ${orderByClause} |
||||
|
</if> |
||||
|
</select> |
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="ResultMapWithBLOBs"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
, |
||||
|
<include refid="Blob_Column_List" /> |
||||
|
from dashboard_notification |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
delete from dashboard_notification |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationExample"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
delete from dashboard_notification |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.dongjian.dashboard.back.model.DashboardNotification"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> |
||||
|
SELECT LAST_INSERT_ID() |
||||
|
</selectKey> |
||||
|
insert into dashboard_notification (company_id, demand_time, category, |
||||
|
flag, created_at, created_by, |
||||
|
updated_at, updated_by, content |
||||
|
) |
||||
|
values (#{companyId,jdbcType=BIGINT}, #{demandTime,jdbcType=VARCHAR}, #{category,jdbcType=VARCHAR}, |
||||
|
#{flag,jdbcType=INTEGER}, #{createdAt,jdbcType=BIGINT}, #{createdBy,jdbcType=BIGINT}, |
||||
|
#{updatedAt,jdbcType=BIGINT}, #{updatedBy,jdbcType=BIGINT}, #{content,jdbcType=LONGVARCHAR} |
||||
|
) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotification"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> |
||||
|
SELECT LAST_INSERT_ID() |
||||
|
</selectKey> |
||||
|
insert into dashboard_notification |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="companyId != null"> |
||||
|
company_id, |
||||
|
</if> |
||||
|
<if test="demandTime != null"> |
||||
|
demand_time, |
||||
|
</if> |
||||
|
<if test="category != null"> |
||||
|
category, |
||||
|
</if> |
||||
|
<if test="flag != null"> |
||||
|
flag, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at, |
||||
|
</if> |
||||
|
<if test="createdBy != null"> |
||||
|
created_by, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at, |
||||
|
</if> |
||||
|
<if test="updatedBy != null"> |
||||
|
updated_by, |
||||
|
</if> |
||||
|
<if test="content != null"> |
||||
|
content, |
||||
|
</if> |
||||
|
</trim> |
||||
|
<trim prefix="values (" suffix=")" suffixOverrides=","> |
||||
|
<if test="companyId != null"> |
||||
|
#{companyId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="demandTime != null"> |
||||
|
#{demandTime,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="category != null"> |
||||
|
#{category,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="flag != null"> |
||||
|
#{flag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
#{createdAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="createdBy != null"> |
||||
|
#{createdBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
#{updatedAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="updatedBy != null"> |
||||
|
#{updatedBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="content != null"> |
||||
|
#{content,jdbcType=LONGVARCHAR}, |
||||
|
</if> |
||||
|
</trim> |
||||
|
</insert> |
||||
|
<select id="countByExample" parameterType="com.dongjian.dashboard.back.model.DashboardNotificationExample" resultType="java.lang.Long"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
select count(*) from dashboard_notification |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.companyId != null"> |
||||
|
company_id = #{record.companyId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.demandTime != null"> |
||||
|
demand_time = #{record.demandTime,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.category != null"> |
||||
|
category = #{record.category,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.flag != null"> |
||||
|
flag = #{record.flag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="record.createdAt != null"> |
||||
|
created_at = #{record.createdAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.createdBy != null"> |
||||
|
created_by = #{record.createdBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.updatedAt != null"> |
||||
|
updated_at = #{record.updatedAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.updatedBy != null"> |
||||
|
updated_by = #{record.updatedBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.content != null"> |
||||
|
content = #{record.content,jdbcType=LONGVARCHAR}, |
||||
|
</if> |
||||
|
</set> |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExampleWithBLOBs" parameterType="map"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
company_id = #{record.companyId,jdbcType=BIGINT}, |
||||
|
demand_time = #{record.demandTime,jdbcType=VARCHAR}, |
||||
|
category = #{record.category,jdbcType=VARCHAR}, |
||||
|
flag = #{record.flag,jdbcType=INTEGER}, |
||||
|
created_at = #{record.createdAt,jdbcType=BIGINT}, |
||||
|
created_by = #{record.createdBy,jdbcType=BIGINT}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=BIGINT}, |
||||
|
updated_by = #{record.updatedBy,jdbcType=BIGINT}, |
||||
|
content = #{record.content,jdbcType=LONGVARCHAR} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
company_id = #{record.companyId,jdbcType=BIGINT}, |
||||
|
demand_time = #{record.demandTime,jdbcType=VARCHAR}, |
||||
|
category = #{record.category,jdbcType=VARCHAR}, |
||||
|
flag = #{record.flag,jdbcType=INTEGER}, |
||||
|
created_at = #{record.createdAt,jdbcType=BIGINT}, |
||||
|
created_by = #{record.createdBy,jdbcType=BIGINT}, |
||||
|
updated_at = #{record.updatedAt,jdbcType=BIGINT}, |
||||
|
updated_by = #{record.updatedBy,jdbcType=BIGINT} |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Update_By_Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.dongjian.dashboard.back.model.DashboardNotification"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification |
||||
|
<set> |
||||
|
<if test="companyId != null"> |
||||
|
company_id = #{companyId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="demandTime != null"> |
||||
|
demand_time = #{demandTime,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="category != null"> |
||||
|
category = #{category,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="flag != null"> |
||||
|
flag = #{flag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="createdAt != null"> |
||||
|
created_at = #{createdAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="createdBy != null"> |
||||
|
created_by = #{createdBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="updatedAt != null"> |
||||
|
updated_at = #{updatedAt,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="updatedBy != null"> |
||||
|
updated_by = #{updatedBy,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="content != null"> |
||||
|
content = #{content,jdbcType=LONGVARCHAR}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKeyWithBLOBs" parameterType="com.dongjian.dashboard.back.model.DashboardNotification"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification |
||||
|
set company_id = #{companyId,jdbcType=BIGINT}, |
||||
|
demand_time = #{demandTime,jdbcType=VARCHAR}, |
||||
|
category = #{category,jdbcType=VARCHAR}, |
||||
|
flag = #{flag,jdbcType=INTEGER}, |
||||
|
created_at = #{createdAt,jdbcType=BIGINT}, |
||||
|
created_by = #{createdBy,jdbcType=BIGINT}, |
||||
|
updated_at = #{updatedAt,jdbcType=BIGINT}, |
||||
|
updated_by = #{updatedBy,jdbcType=BIGINT}, |
||||
|
content = #{content,jdbcType=LONGVARCHAR} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
<update id="updateByPrimaryKey" parameterType="com.dongjian.dashboard.back.model.DashboardNotification"> |
||||
|
<!-- |
||||
|
WARNING - @mbg.generated |
||||
|
This element is automatically generated by MyBatis Generator, do not modify. |
||||
|
--> |
||||
|
update dashboard_notification |
||||
|
set company_id = #{companyId,jdbcType=BIGINT}, |
||||
|
demand_time = #{demandTime,jdbcType=VARCHAR}, |
||||
|
category = #{category,jdbcType=VARCHAR}, |
||||
|
flag = #{flag,jdbcType=INTEGER}, |
||||
|
created_at = #{createdAt,jdbcType=BIGINT}, |
||||
|
created_by = #{createdBy,jdbcType=BIGINT}, |
||||
|
updated_at = #{updatedAt,jdbcType=BIGINT}, |
||||
|
updated_by = #{updatedBy,jdbcType=BIGINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
||||
@ -0,0 +1,17 @@ |
|||||
|
<?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.dongjian.dashboard.back.dao.ex.DashboardNotificationMapperExt"> |
||||
|
|
||||
|
<select id="getNotification" resultType="com.dongjian.dashboard.back.vo.dashboardnotification.DashboardNotificationPageVO"> |
||||
|
SELECT |
||||
|
id dashboardNotificationId, |
||||
|
demand_time, |
||||
|
category, |
||||
|
content, |
||||
|
created_at |
||||
|
FROM dashboard_notification |
||||
|
WHERE flag = 0 AND company_id = #{companyId} |
||||
|
ORDER BY id DESC limit 1 |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
||||
@ -0,0 +1,370 @@ |
|||||
|
package com.dongjian.dashboard.back.model; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
|
||||
|
public class DashboardNotification implements Serializable { |
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long id; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.company_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long companyId; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.demand_time |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private String demandTime; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private String category; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.flag |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Integer flag; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.created_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long createdAt; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.created_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long createdBy; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.updated_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long updatedAt; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.updated_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private Long updatedBy; |
||||
|
|
||||
|
/** |
||||
|
* |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database column dashboard_notification.content |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private String content; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.id |
||||
|
* |
||||
|
* @return the value of dashboard_notification.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.id |
||||
|
* |
||||
|
* @param id the value for dashboard_notification.id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setId(Long id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.company_id |
||||
|
* |
||||
|
* @return the value of dashboard_notification.company_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getCompanyId() { |
||||
|
return companyId; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.company_id |
||||
|
* |
||||
|
* @param companyId the value for dashboard_notification.company_id |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setCompanyId(Long companyId) { |
||||
|
this.companyId = companyId; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.demand_time |
||||
|
* |
||||
|
* @return the value of dashboard_notification.demand_time |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getDemandTime() { |
||||
|
return demandTime; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.demand_time |
||||
|
* |
||||
|
* @param demandTime the value for dashboard_notification.demand_time |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setDemandTime(String demandTime) { |
||||
|
this.demandTime = demandTime == null ? null : demandTime.trim(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.category |
||||
|
* |
||||
|
* @return the value of dashboard_notification.category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getCategory() { |
||||
|
return category; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.category |
||||
|
* |
||||
|
* @param category the value for dashboard_notification.category |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setCategory(String category) { |
||||
|
this.category = category == null ? null : category.trim(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.flag |
||||
|
* |
||||
|
* @return the value of dashboard_notification.flag |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Integer getFlag() { |
||||
|
return flag; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.flag |
||||
|
* |
||||
|
* @param flag the value for dashboard_notification.flag |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setFlag(Integer flag) { |
||||
|
this.flag = flag; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.created_at |
||||
|
* |
||||
|
* @return the value of dashboard_notification.created_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getCreatedAt() { |
||||
|
return createdAt; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.created_at |
||||
|
* |
||||
|
* @param createdAt the value for dashboard_notification.created_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setCreatedAt(Long createdAt) { |
||||
|
this.createdAt = createdAt; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.created_by |
||||
|
* |
||||
|
* @return the value of dashboard_notification.created_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getCreatedBy() { |
||||
|
return createdBy; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.created_by |
||||
|
* |
||||
|
* @param createdBy the value for dashboard_notification.created_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setCreatedBy(Long createdBy) { |
||||
|
this.createdBy = createdBy; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.updated_at |
||||
|
* |
||||
|
* @return the value of dashboard_notification.updated_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getUpdatedAt() { |
||||
|
return updatedAt; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.updated_at |
||||
|
* |
||||
|
* @param updatedAt the value for dashboard_notification.updated_at |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setUpdatedAt(Long updatedAt) { |
||||
|
this.updatedAt = updatedAt; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.updated_by |
||||
|
* |
||||
|
* @return the value of dashboard_notification.updated_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Long getUpdatedBy() { |
||||
|
return updatedBy; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.updated_by |
||||
|
* |
||||
|
* @param updatedBy the value for dashboard_notification.updated_by |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setUpdatedBy(Long updatedBy) { |
||||
|
this.updatedBy = updatedBy; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method returns the value of the database column dashboard_notification.content |
||||
|
* |
||||
|
* @return the value of dashboard_notification.content |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getContent() { |
||||
|
return content; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method sets the value of the database column dashboard_notification.content |
||||
|
* |
||||
|
* @param content the value for dashboard_notification.content |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setContent(String content) { |
||||
|
this.content = content == null ? null : content.trim(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
@Override |
||||
|
public String toString() { |
||||
|
StringBuilder sb = new StringBuilder(); |
||||
|
sb.append(getClass().getSimpleName()); |
||||
|
sb.append(" ["); |
||||
|
sb.append("Hash = ").append(hashCode()); |
||||
|
sb.append(", id=").append(id); |
||||
|
sb.append(", companyId=").append(companyId); |
||||
|
sb.append(", demandTime=").append(demandTime); |
||||
|
sb.append(", category=").append(category); |
||||
|
sb.append(", flag=").append(flag); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", createdBy=").append(createdBy); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", updatedBy=").append(updatedBy); |
||||
|
sb.append(", content=").append(content); |
||||
|
sb.append(", serialVersionUID=").append(serialVersionUID); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,862 @@ |
|||||
|
package com.dongjian.dashboard.back.model; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class DashboardNotificationExample { |
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected boolean distinct; |
||||
|
|
||||
|
/** |
||||
|
* This field was generated by MyBatis Generator. |
||||
|
* This field corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public DashboardNotificationExample() { |
||||
|
oredCriteria = new ArrayList<Criteria>(); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setOrderByClause(String orderByClause) { |
||||
|
this.orderByClause = orderByClause; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public String getOrderByClause() { |
||||
|
return orderByClause; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void setDistinct(boolean distinct) { |
||||
|
this.distinct = distinct; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public boolean isDistinct() { |
||||
|
return distinct; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public List<Criteria> getOredCriteria() { |
||||
|
return oredCriteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void or(Criteria criteria) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Criteria or() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
oredCriteria.add(criteria); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public Criteria createCriteria() { |
||||
|
Criteria criteria = createCriteriaInternal(); |
||||
|
if (oredCriteria.size() == 0) { |
||||
|
oredCriteria.add(criteria); |
||||
|
} |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected Criteria createCriteriaInternal() { |
||||
|
Criteria criteria = new Criteria(); |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This method was generated by MyBatis Generator. |
||||
|
* This method corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public void clear() { |
||||
|
oredCriteria.clear(); |
||||
|
orderByClause = null; |
||||
|
distinct = false; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
protected abstract static class GeneratedCriteria { |
||||
|
protected List<Criterion> criteria; |
||||
|
|
||||
|
protected GeneratedCriteria() { |
||||
|
super(); |
||||
|
criteria = new ArrayList<Criterion>(); |
||||
|
} |
||||
|
|
||||
|
public boolean isValid() { |
||||
|
return criteria.size() > 0; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getAllCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
public List<Criterion> getCriteria() { |
||||
|
return criteria; |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition) { |
||||
|
if (condition == null) { |
||||
|
throw new RuntimeException("Value for condition cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value, String property) { |
||||
|
if (value == null) { |
||||
|
throw new RuntimeException("Value for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value)); |
||||
|
} |
||||
|
|
||||
|
protected void addCriterion(String condition, Object value1, Object value2, String property) { |
||||
|
if (value1 == null || value2 == null) { |
||||
|
throw new RuntimeException("Between values for " + property + " cannot be null"); |
||||
|
} |
||||
|
criteria.add(new Criterion(condition, value1, value2)); |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNull() { |
||||
|
addCriterion("id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIsNotNull() { |
||||
|
addCriterion("id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdEqualTo(Long value) { |
||||
|
addCriterion("id =", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotEqualTo(Long value) { |
||||
|
addCriterion("id <>", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThan(Long value) { |
||||
|
addCriterion("id >", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("id >=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThan(Long value) { |
||||
|
addCriterion("id <", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("id <=", value, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdIn(List<Long> values) { |
||||
|
addCriterion("id in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotIn(List<Long> values) { |
||||
|
addCriterion("id not in", values, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("id between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("id not between", value1, value2, "id"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdIsNull() { |
||||
|
addCriterion("company_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdIsNotNull() { |
||||
|
addCriterion("company_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdEqualTo(Long value) { |
||||
|
addCriterion("company_id =", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdNotEqualTo(Long value) { |
||||
|
addCriterion("company_id <>", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdGreaterThan(Long value) { |
||||
|
addCriterion("company_id >", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("company_id >=", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdLessThan(Long value) { |
||||
|
addCriterion("company_id <", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("company_id <=", value, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdIn(List<Long> values) { |
||||
|
addCriterion("company_id in", values, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdNotIn(List<Long> values) { |
||||
|
addCriterion("company_id not in", values, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("company_id between", value1, value2, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCompanyIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("company_id not between", value1, value2, "companyId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeIsNull() { |
||||
|
addCriterion("demand_time is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeIsNotNull() { |
||||
|
addCriterion("demand_time is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeEqualTo(String value) { |
||||
|
addCriterion("demand_time =", value, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeNotEqualTo(String value) { |
||||
|
addCriterion("demand_time <>", value, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeGreaterThan(String value) { |
||||
|
addCriterion("demand_time >", value, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("demand_time >=", value, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeLessThan(String value) { |
||||
|
addCriterion("demand_time <", value, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeLessThanOrEqualTo(String value) { |
||||
|
addCriterion("demand_time <=", value, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeLike(String value) { |
||||
|
addCriterion("demand_time like", value, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeNotLike(String value) { |
||||
|
addCriterion("demand_time not like", value, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeIn(List<String> values) { |
||||
|
addCriterion("demand_time in", values, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeNotIn(List<String> values) { |
||||
|
addCriterion("demand_time not in", values, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeBetween(String value1, String value2) { |
||||
|
addCriterion("demand_time between", value1, value2, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andDemandTimeNotBetween(String value1, String value2) { |
||||
|
addCriterion("demand_time not between", value1, value2, "demandTime"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryIsNull() { |
||||
|
addCriterion("category is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryIsNotNull() { |
||||
|
addCriterion("category is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryEqualTo(String value) { |
||||
|
addCriterion("category =", value, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryNotEqualTo(String value) { |
||||
|
addCriterion("category <>", value, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryGreaterThan(String value) { |
||||
|
addCriterion("category >", value, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("category >=", value, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryLessThan(String value) { |
||||
|
addCriterion("category <", value, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryLessThanOrEqualTo(String value) { |
||||
|
addCriterion("category <=", value, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryLike(String value) { |
||||
|
addCriterion("category like", value, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryNotLike(String value) { |
||||
|
addCriterion("category not like", value, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryIn(List<String> values) { |
||||
|
addCriterion("category in", values, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryNotIn(List<String> values) { |
||||
|
addCriterion("category not in", values, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryBetween(String value1, String value2) { |
||||
|
addCriterion("category between", value1, value2, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCategoryNotBetween(String value1, String value2) { |
||||
|
addCriterion("category not between", value1, value2, "category"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagIsNull() { |
||||
|
addCriterion("flag is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagIsNotNull() { |
||||
|
addCriterion("flag is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagEqualTo(Integer value) { |
||||
|
addCriterion("flag =", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagNotEqualTo(Integer value) { |
||||
|
addCriterion("flag <>", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagGreaterThan(Integer value) { |
||||
|
addCriterion("flag >", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagGreaterThanOrEqualTo(Integer value) { |
||||
|
addCriterion("flag >=", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagLessThan(Integer value) { |
||||
|
addCriterion("flag <", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagLessThanOrEqualTo(Integer value) { |
||||
|
addCriterion("flag <=", value, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagIn(List<Integer> values) { |
||||
|
addCriterion("flag in", values, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagNotIn(List<Integer> values) { |
||||
|
addCriterion("flag not in", values, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagBetween(Integer value1, Integer value2) { |
||||
|
addCriterion("flag between", value1, value2, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andFlagNotBetween(Integer value1, Integer value2) { |
||||
|
addCriterion("flag not between", value1, value2, "flag"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNull() { |
||||
|
addCriterion("created_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIsNotNull() { |
||||
|
addCriterion("created_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtEqualTo(Long value) { |
||||
|
addCriterion("created_at =", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotEqualTo(Long value) { |
||||
|
addCriterion("created_at <>", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThan(Long value) { |
||||
|
addCriterion("created_at >", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("created_at >=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThan(Long value) { |
||||
|
addCriterion("created_at <", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("created_at <=", value, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtIn(List<Long> values) { |
||||
|
addCriterion("created_at in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotIn(List<Long> values) { |
||||
|
addCriterion("created_at not in", values, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtBetween(Long value1, Long value2) { |
||||
|
addCriterion("created_at between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedAtNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("created_at not between", value1, value2, "createdAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByIsNull() { |
||||
|
addCriterion("created_by is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByIsNotNull() { |
||||
|
addCriterion("created_by is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByEqualTo(Long value) { |
||||
|
addCriterion("created_by =", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByNotEqualTo(Long value) { |
||||
|
addCriterion("created_by <>", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByGreaterThan(Long value) { |
||||
|
addCriterion("created_by >", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("created_by >=", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByLessThan(Long value) { |
||||
|
addCriterion("created_by <", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("created_by <=", value, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByIn(List<Long> values) { |
||||
|
addCriterion("created_by in", values, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByNotIn(List<Long> values) { |
||||
|
addCriterion("created_by not in", values, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByBetween(Long value1, Long value2) { |
||||
|
addCriterion("created_by between", value1, value2, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andCreatedByNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("created_by not between", value1, value2, "createdBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNull() { |
||||
|
addCriterion("updated_at is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIsNotNull() { |
||||
|
addCriterion("updated_at is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtEqualTo(Long value) { |
||||
|
addCriterion("updated_at =", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotEqualTo(Long value) { |
||||
|
addCriterion("updated_at <>", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThan(Long value) { |
||||
|
addCriterion("updated_at >", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("updated_at >=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThan(Long value) { |
||||
|
addCriterion("updated_at <", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("updated_at <=", value, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtIn(List<Long> values) { |
||||
|
addCriterion("updated_at in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotIn(List<Long> values) { |
||||
|
addCriterion("updated_at not in", values, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtBetween(Long value1, Long value2) { |
||||
|
addCriterion("updated_at between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedAtNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("updated_at not between", value1, value2, "updatedAt"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByIsNull() { |
||||
|
addCriterion("updated_by is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByIsNotNull() { |
||||
|
addCriterion("updated_by is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByEqualTo(Long value) { |
||||
|
addCriterion("updated_by =", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByNotEqualTo(Long value) { |
||||
|
addCriterion("updated_by <>", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByGreaterThan(Long value) { |
||||
|
addCriterion("updated_by >", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("updated_by >=", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByLessThan(Long value) { |
||||
|
addCriterion("updated_by <", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("updated_by <=", value, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByIn(List<Long> values) { |
||||
|
addCriterion("updated_by in", values, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByNotIn(List<Long> values) { |
||||
|
addCriterion("updated_by not in", values, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByBetween(Long value1, Long value2) { |
||||
|
addCriterion("updated_by between", value1, value2, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUpdatedByNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("updated_by not between", value1, value2, "updatedBy"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated do_not_delete_during_merge |
||||
|
*/ |
||||
|
public static class Criteria extends GeneratedCriteria { |
||||
|
|
||||
|
protected Criteria() { |
||||
|
super(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* This class was generated by MyBatis Generator. |
||||
|
* This class corresponds to the database table dashboard_notification |
||||
|
* |
||||
|
* @mbg.generated |
||||
|
*/ |
||||
|
public static class Criterion { |
||||
|
private String condition; |
||||
|
|
||||
|
private Object value; |
||||
|
|
||||
|
private Object secondValue; |
||||
|
|
||||
|
private boolean noValue; |
||||
|
|
||||
|
private boolean singleValue; |
||||
|
|
||||
|
private boolean betweenValue; |
||||
|
|
||||
|
private boolean listValue; |
||||
|
|
||||
|
private String typeHandler; |
||||
|
|
||||
|
public String getCondition() { |
||||
|
return condition; |
||||
|
} |
||||
|
|
||||
|
public Object getValue() { |
||||
|
return value; |
||||
|
} |
||||
|
|
||||
|
public Object getSecondValue() { |
||||
|
return secondValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isNoValue() { |
||||
|
return noValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isSingleValue() { |
||||
|
return singleValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isBetweenValue() { |
||||
|
return betweenValue; |
||||
|
} |
||||
|
|
||||
|
public boolean isListValue() { |
||||
|
return listValue; |
||||
|
} |
||||
|
|
||||
|
public String getTypeHandler() { |
||||
|
return typeHandler; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.typeHandler = null; |
||||
|
this.noValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.typeHandler = typeHandler; |
||||
|
if (value instanceof List<?>) { |
||||
|
this.listValue = true; |
||||
|
} else { |
||||
|
this.singleValue = true; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value) { |
||||
|
this(condition, value, null); |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { |
||||
|
super(); |
||||
|
this.condition = condition; |
||||
|
this.value = value; |
||||
|
this.secondValue = secondValue; |
||||
|
this.typeHandler = typeHandler; |
||||
|
this.betweenValue = true; |
||||
|
} |
||||
|
|
||||
|
protected Criterion(String condition, Object value, Object secondValue) { |
||||
|
this(condition, value, secondValue, null); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
package com.dongjian.dashboard.back.vo.dashboardnotification; |
||||
|
|
||||
|
import io.swagger.v3.oas.annotations.media.Schema; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* @author Mr.Jiang |
||||
|
* @time 2022年7月21日 下午8:50:31 |
||||
|
*/ |
||||
|
@Data |
||||
|
public class DashboardNotificationPageVO { |
||||
|
|
||||
|
@Schema(description = "Provider unique identifier ID, not required for new entries", example = "2738967") |
||||
|
private Long dashboardNotificationId; |
||||
|
|
||||
|
@Schema(description = "demand time", example = "testProvider1") |
||||
|
private String demandTime; |
||||
|
|
||||
|
@Schema(description = "category", example = "remark") |
||||
|
private String category; |
||||
|
|
||||
|
@Schema(description ="content", example = "2") |
||||
|
private String content; |
||||
|
|
||||
|
@Schema(description = "created time", example = "2738967") |
||||
|
private Long createdAt; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,69 @@ |
|||||
|
package com.dongjian.dashboard.back.service.common; |
||||
|
|
||||
|
import com.dongjian.dashboard.back.vo.device.LineData; |
||||
|
|
||||
|
import java.time.LocalDateTime; |
||||
|
import java.time.format.DateTimeFormatter; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
import java.util.TreeMap; |
||||
|
|
||||
|
/** |
||||
|
* 给计测设备,按小时聚合数据,求平均值 |
||||
|
*/ |
||||
|
public class LineDataHourAggregator { |
||||
|
|
||||
|
private static final DateTimeFormatter INPUT_FMT = |
||||
|
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss"); |
||||
|
|
||||
|
private static final DateTimeFormatter HOUR_FMT = |
||||
|
DateTimeFormatter.ofPattern("yyyy-MM-dd HH:00:00"); |
||||
|
|
||||
|
public static void aggregateByHour(LineData lineData) { |
||||
|
|
||||
|
List<Object> xData = lineData.getXData(); |
||||
|
List<Object> yData = lineData.getYData(); |
||||
|
|
||||
|
if (xData == null || yData == null || xData.size() != yData.size()) { |
||||
|
return; |
||||
|
} |
||||
|
|
||||
|
// hour -> List<Double>
|
||||
|
Map<String, List<Double>> hourMap = new TreeMap<>(); |
||||
|
|
||||
|
for (int i = 0; i < xData.size(); i++) { |
||||
|
String timeStr = String.valueOf(xData.get(i)); |
||||
|
Object yVal = yData.get(i); |
||||
|
|
||||
|
if (yVal == null) { |
||||
|
continue; |
||||
|
} |
||||
|
|
||||
|
LocalDateTime time = LocalDateTime.parse(timeStr, INPUT_FMT); |
||||
|
String hourKey = time.format(HOUR_FMT); |
||||
|
|
||||
|
hourMap.computeIfAbsent(hourKey, k -> new ArrayList<>()).add(Double.parseDouble(String.valueOf(yVal))); |
||||
|
} |
||||
|
|
||||
|
// 重新构建 xData / yData
|
||||
|
List<Object> newX = new ArrayList<>(); |
||||
|
List<Object> newY = new ArrayList<>(); |
||||
|
|
||||
|
for (Map.Entry<String, List<Double>> entry : hourMap.entrySet()) { |
||||
|
newX.add(entry.getKey()); |
||||
|
|
||||
|
double avg = entry.getValue() |
||||
|
.stream() |
||||
|
.mapToDouble(Double::doubleValue) |
||||
|
.average() |
||||
|
.orElse(0); |
||||
|
|
||||
|
newY.add(avg); |
||||
|
} |
||||
|
|
||||
|
lineData.setXData(newX); |
||||
|
lineData.setYData(newY); |
||||
|
} |
||||
|
} |
||||
|
|
||||
Loading…
Reference in new issue