feat[litemall-db]: SQL添加通知表和通知管理员表
This commit is contained in:
@@ -173,5 +173,11 @@
|
||||
<table tableName="litemall_log">
|
||||
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
|
||||
</table>
|
||||
<table tableName="litemall_notice">
|
||||
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
|
||||
</table>
|
||||
<table tableName="litemall_notice_admin">
|
||||
<generatedKey column="id" sqlStatement="MySql" identity="true"/>
|
||||
</table>
|
||||
</context>
|
||||
</generatorConfiguration>
|
||||
@@ -512,7 +512,46 @@ CREATE TABLE `litemall_log` (
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='操作日志表';
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=43 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='操作日志表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `litemall_notice`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `litemall_notice`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `litemall_notice` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`title` varchar(63) DEFAULT NULL COMMENT '通知标题',
|
||||
`content` varchar(511) DEFAULT NULL COMMENT '通知内容',
|
||||
`admin_id` int(11) DEFAULT '0' COMMENT '创建通知的管理员ID,如果是系统内置通知则是0.',
|
||||
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='通知表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
-- Table structure for table `litemall_notice_admin`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `litemall_notice_admin`;
|
||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||
/*!40101 SET character_set_client = utf8 */;
|
||||
CREATE TABLE `litemall_notice_admin` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`notice_id` int(11) DEFAULT NULL COMMENT '通知ID',
|
||||
`notice_title` varchar(63) DEFAULT NULL COMMENT '通知标题',
|
||||
`admin_id` int(11) DEFAULT NULL COMMENT '接收通知的管理员ID',
|
||||
`read_time` datetime DEFAULT NULL COMMENT '阅读时间,如果是NULL则是未读状态',
|
||||
`add_time` datetime DEFAULT NULL COMMENT '创建时间',
|
||||
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||||
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COMMENT='通知管理员表';
|
||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||
|
||||
--
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
package org.linlinjava.litemall.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.linlinjava.litemall.db.domain.LitemallNoticeAdmin;
|
||||
import org.linlinjava.litemall.db.domain.LitemallNoticeAdminExample;
|
||||
|
||||
public interface LitemallNoticeAdminMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
long countByExample(LitemallNoticeAdminExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int deleteByExample(LitemallNoticeAdminExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int insert(LitemallNoticeAdmin record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int insertSelective(LitemallNoticeAdmin record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNoticeAdmin selectOneByExample(LitemallNoticeAdminExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNoticeAdmin selectOneByExampleSelective(@Param("example") LitemallNoticeAdminExample example, @Param("selective") LitemallNoticeAdmin.Column ... selective);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
List<LitemallNoticeAdmin> selectByExampleSelective(@Param("example") LitemallNoticeAdminExample example, @Param("selective") LitemallNoticeAdmin.Column ... selective);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
List<LitemallNoticeAdmin> selectByExample(LitemallNoticeAdminExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNoticeAdmin selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") LitemallNoticeAdmin.Column ... selective);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNoticeAdmin selectByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNoticeAdmin selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") LitemallNoticeAdmin record, @Param("example") LitemallNoticeAdminExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByExample(@Param("record") LitemallNoticeAdmin record, @Param("example") LitemallNoticeAdminExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByPrimaryKeySelective(LitemallNoticeAdmin record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByPrimaryKey(LitemallNoticeAdmin record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int logicalDeleteByExample(@Param("example") LitemallNoticeAdminExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int logicalDeleteByPrimaryKey(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,152 @@
|
||||
package org.linlinjava.litemall.db.dao;
|
||||
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.linlinjava.litemall.db.domain.LitemallNotice;
|
||||
import org.linlinjava.litemall.db.domain.LitemallNoticeExample;
|
||||
|
||||
public interface LitemallNoticeMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
long countByExample(LitemallNoticeExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int deleteByExample(LitemallNoticeExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int insert(LitemallNotice record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int insertSelective(LitemallNotice record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNotice selectOneByExample(LitemallNoticeExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNotice selectOneByExampleSelective(@Param("example") LitemallNoticeExample example, @Param("selective") LitemallNotice.Column ... selective);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
List<LitemallNotice> selectByExampleSelective(@Param("example") LitemallNoticeExample example, @Param("selective") LitemallNotice.Column ... selective);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
List<LitemallNotice> selectByExample(LitemallNoticeExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNotice selectByPrimaryKeySelective(@Param("id") Integer id, @Param("selective") LitemallNotice.Column ... selective);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNotice selectByPrimaryKey(Integer id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
LitemallNotice selectByPrimaryKeyWithLogicalDelete(@Param("id") Integer id, @Param("andLogicalDeleted") boolean andLogicalDeleted);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") LitemallNotice record, @Param("example") LitemallNoticeExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByExample(@Param("record") LitemallNotice record, @Param("example") LitemallNoticeExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByPrimaryKeySelective(LitemallNotice record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int updateByPrimaryKey(LitemallNotice record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int logicalDeleteByExample(@Param("example") LitemallNoticeExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
int logicalDeleteByPrimaryKey(Integer id);
|
||||
}
|
||||
@@ -0,0 +1,579 @@
|
||||
package org.linlinjava.litemall.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class LitemallNotice {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice.title
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String title;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice.content
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String content;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice.admin_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer adminId;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice.add_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private LocalDateTime addTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice.update_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice.deleted
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice.id
|
||||
*
|
||||
* @return the value of litemall_notice.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice.id
|
||||
*
|
||||
* @param id the value for litemall_notice.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice.title
|
||||
*
|
||||
* @return the value of litemall_notice.title
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice.title
|
||||
*
|
||||
* @param title the value for litemall_notice.title
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setTitle(String title) {
|
||||
this.title = title;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice.content
|
||||
*
|
||||
* @return the value of litemall_notice.content
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice.content
|
||||
*
|
||||
* @param content the value for litemall_notice.content
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice.admin_id
|
||||
*
|
||||
* @return the value of litemall_notice.admin_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Integer getAdminId() {
|
||||
return adminId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice.admin_id
|
||||
*
|
||||
* @param adminId the value for litemall_notice.admin_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setAdminId(Integer adminId) {
|
||||
this.adminId = adminId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice.add_time
|
||||
*
|
||||
* @return the value of litemall_notice.add_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public LocalDateTime getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice.add_time
|
||||
*
|
||||
* @param addTime the value for litemall_notice.add_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setAddTime(LocalDateTime addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice.update_time
|
||||
*
|
||||
* @return the value of litemall_notice.update_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public LocalDateTime getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice.update_time
|
||||
*
|
||||
* @param updateTime the value for litemall_notice.update_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void andLogicalDeleted(boolean deleted) {
|
||||
setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice.deleted
|
||||
*
|
||||
* @return the value of litemall_notice.deleted
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Boolean getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice.deleted
|
||||
*
|
||||
* @param deleted the value for litemall_notice.deleted
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setDeleted(Boolean deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", IS_DELETED=").append(IS_DELETED);
|
||||
sb.append(", NOT_DELETED=").append(NOT_DELETED);
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", title=").append(title);
|
||||
sb.append(", content=").append(content);
|
||||
sb.append(", adminId=").append(adminId);
|
||||
sb.append(", addTime=").append(addTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", deleted=").append(deleted);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
LitemallNotice other = (LitemallNotice) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
|
||||
&& (this.getContent() == null ? other.getContent() == null : this.getContent().equals(other.getContent()))
|
||||
&& (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
|
||||
&& (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
|
||||
&& (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
|
||||
result = prime * result + ((getContent() == null) ? 0 : getContent().hashCode());
|
||||
result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode());
|
||||
result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This enum was generated by MyBatis Generator.
|
||||
* This enum corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public enum Deleted {
|
||||
NOT_DELETED(new Boolean("0"), "未删除"),
|
||||
IS_DELETED(new Boolean("1"), "已删除");
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final Boolean value;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
Deleted(Boolean value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Boolean getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Boolean value() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This enum was generated by MyBatis Generator.
|
||||
* This enum corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public enum Column {
|
||||
id("id", "id", "INTEGER", false),
|
||||
title("title", "title", "VARCHAR", false),
|
||||
content("content", "content", "VARCHAR", false),
|
||||
adminId("admin_id", "adminId", "INTEGER", false),
|
||||
addTime("add_time", "addTime", "TIMESTAMP", false),
|
||||
updateTime("update_time", "updateTime", "TIMESTAMP", false),
|
||||
deleted("deleted", "deleted", "BIT", false);
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final String column;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final String javaProperty;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final String jdbcType;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,616 @@
|
||||
package org.linlinjava.litemall.db.domain;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class LitemallNoticeAdmin {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public static final Boolean IS_DELETED = Deleted.IS_DELETED.value();
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public static final Boolean NOT_DELETED = Deleted.NOT_DELETED.value();
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice_admin.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer id;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice_admin.notice_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer noticeId;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice_admin.notice_title
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private String noticeTitle;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice_admin.admin_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Integer adminId;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice_admin.read_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private LocalDateTime readTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice_admin.add_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private LocalDateTime addTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice_admin.update_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
*
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column litemall_notice_admin.deleted
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private Boolean deleted;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice_admin.id
|
||||
*
|
||||
* @return the value of litemall_notice_admin.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice_admin.id
|
||||
*
|
||||
* @param id the value for litemall_notice_admin.id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice_admin.notice_id
|
||||
*
|
||||
* @return the value of litemall_notice_admin.notice_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Integer getNoticeId() {
|
||||
return noticeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice_admin.notice_id
|
||||
*
|
||||
* @param noticeId the value for litemall_notice_admin.notice_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setNoticeId(Integer noticeId) {
|
||||
this.noticeId = noticeId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice_admin.notice_title
|
||||
*
|
||||
* @return the value of litemall_notice_admin.notice_title
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getNoticeTitle() {
|
||||
return noticeTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice_admin.notice_title
|
||||
*
|
||||
* @param noticeTitle the value for litemall_notice_admin.notice_title
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setNoticeTitle(String noticeTitle) {
|
||||
this.noticeTitle = noticeTitle;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice_admin.admin_id
|
||||
*
|
||||
* @return the value of litemall_notice_admin.admin_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Integer getAdminId() {
|
||||
return adminId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice_admin.admin_id
|
||||
*
|
||||
* @param adminId the value for litemall_notice_admin.admin_id
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setAdminId(Integer adminId) {
|
||||
this.adminId = adminId;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice_admin.read_time
|
||||
*
|
||||
* @return the value of litemall_notice_admin.read_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public LocalDateTime getReadTime() {
|
||||
return readTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice_admin.read_time
|
||||
*
|
||||
* @param readTime the value for litemall_notice_admin.read_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setReadTime(LocalDateTime readTime) {
|
||||
this.readTime = readTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice_admin.add_time
|
||||
*
|
||||
* @return the value of litemall_notice_admin.add_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public LocalDateTime getAddTime() {
|
||||
return addTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice_admin.add_time
|
||||
*
|
||||
* @param addTime the value for litemall_notice_admin.add_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setAddTime(LocalDateTime addTime) {
|
||||
this.addTime = addTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice_admin.update_time
|
||||
*
|
||||
* @return the value of litemall_notice_admin.update_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public LocalDateTime getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice_admin.update_time
|
||||
*
|
||||
* @param updateTime the value for litemall_notice_admin.update_time
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setUpdateTime(LocalDateTime updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void andLogicalDeleted(boolean deleted) {
|
||||
setDeleted(deleted ? Deleted.IS_DELETED.value() : Deleted.NOT_DELETED.value());
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column litemall_notice_admin.deleted
|
||||
*
|
||||
* @return the value of litemall_notice_admin.deleted
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Boolean getDeleted() {
|
||||
return deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column litemall_notice_admin.deleted
|
||||
*
|
||||
* @param deleted the value for litemall_notice_admin.deleted
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public void setDeleted(Boolean deleted) {
|
||||
this.deleted = deleted;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(getClass().getSimpleName());
|
||||
sb.append(" [");
|
||||
sb.append("Hash = ").append(hashCode());
|
||||
sb.append(", IS_DELETED=").append(IS_DELETED);
|
||||
sb.append(", NOT_DELETED=").append(NOT_DELETED);
|
||||
sb.append(", id=").append(id);
|
||||
sb.append(", noticeId=").append(noticeId);
|
||||
sb.append(", noticeTitle=").append(noticeTitle);
|
||||
sb.append(", adminId=").append(adminId);
|
||||
sb.append(", readTime=").append(readTime);
|
||||
sb.append(", addTime=").append(addTime);
|
||||
sb.append(", updateTime=").append(updateTime);
|
||||
sb.append(", deleted=").append(deleted);
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
@Override
|
||||
public boolean equals(Object that) {
|
||||
if (this == that) {
|
||||
return true;
|
||||
}
|
||||
if (that == null) {
|
||||
return false;
|
||||
}
|
||||
if (getClass() != that.getClass()) {
|
||||
return false;
|
||||
}
|
||||
LitemallNoticeAdmin other = (LitemallNoticeAdmin) that;
|
||||
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
|
||||
&& (this.getNoticeId() == null ? other.getNoticeId() == null : this.getNoticeId().equals(other.getNoticeId()))
|
||||
&& (this.getNoticeTitle() == null ? other.getNoticeTitle() == null : this.getNoticeTitle().equals(other.getNoticeTitle()))
|
||||
&& (this.getAdminId() == null ? other.getAdminId() == null : this.getAdminId().equals(other.getAdminId()))
|
||||
&& (this.getReadTime() == null ? other.getReadTime() == null : this.getReadTime().equals(other.getReadTime()))
|
||||
&& (this.getAddTime() == null ? other.getAddTime() == null : this.getAddTime().equals(other.getAddTime()))
|
||||
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
|
||||
&& (this.getDeleted() == null ? other.getDeleted() == null : this.getDeleted().equals(other.getDeleted()));
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
@Override
|
||||
public int hashCode() {
|
||||
final int prime = 31;
|
||||
int result = 1;
|
||||
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
|
||||
result = prime * result + ((getNoticeId() == null) ? 0 : getNoticeId().hashCode());
|
||||
result = prime * result + ((getNoticeTitle() == null) ? 0 : getNoticeTitle().hashCode());
|
||||
result = prime * result + ((getAdminId() == null) ? 0 : getAdminId().hashCode());
|
||||
result = prime * result + ((getReadTime() == null) ? 0 : getReadTime().hashCode());
|
||||
result = prime * result + ((getAddTime() == null) ? 0 : getAddTime().hashCode());
|
||||
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
|
||||
result = prime * result + ((getDeleted() == null) ? 0 : getDeleted().hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* This enum was generated by MyBatis Generator.
|
||||
* This enum corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public enum Deleted {
|
||||
NOT_DELETED(new Boolean("0"), "未删除"),
|
||||
IS_DELETED(new Boolean("1"), "已删除");
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final Boolean value;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final String name;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
Deleted(Boolean value, String name) {
|
||||
this.value = value;
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Boolean getValue() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public Boolean value() {
|
||||
return this.value;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This enum was generated by MyBatis Generator.
|
||||
* This enum corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public enum Column {
|
||||
id("id", "id", "INTEGER", false),
|
||||
noticeId("notice_id", "noticeId", "INTEGER", false),
|
||||
noticeTitle("notice_title", "noticeTitle", "VARCHAR", false),
|
||||
adminId("admin_id", "adminId", "INTEGER", false),
|
||||
readTime("read_time", "readTime", "TIMESTAMP", false),
|
||||
addTime("add_time", "addTime", "TIMESTAMP", false),
|
||||
updateTime("update_time", "updateTime", "TIMESTAMP", false),
|
||||
deleted("deleted", "deleted", "BIT", false);
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private static final String BEGINNING_DELIMITER = "`";
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private static final String ENDING_DELIMITER = "`";
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final String column;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final boolean isColumnNameDelimited;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final String javaProperty;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
private final String jdbcType;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String value() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getValue() {
|
||||
return this.column;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getJavaProperty() {
|
||||
return this.javaProperty;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getJdbcType() {
|
||||
return this.jdbcType;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
Column(String column, String javaProperty, String jdbcType, boolean isColumnNameDelimited) {
|
||||
this.column = column;
|
||||
this.javaProperty = javaProperty;
|
||||
this.jdbcType = jdbcType;
|
||||
this.isColumnNameDelimited = isColumnNameDelimited;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String desc() {
|
||||
return this.getEscapedColumnName() + " DESC";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String asc() {
|
||||
return this.getEscapedColumnName() + " ASC";
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public static Column[] excludes(Column ... excludes) {
|
||||
ArrayList<Column> columns = new ArrayList<>(Arrays.asList(Column.values()));
|
||||
if (excludes != null && excludes.length > 0) {
|
||||
columns.removeAll(new ArrayList<>(Arrays.asList(excludes)));
|
||||
}
|
||||
return columns.toArray(new Column[]{});
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getEscapedColumnName() {
|
||||
if (this.isColumnNameDelimited) {
|
||||
return new StringBuilder().append(BEGINNING_DELIMITER).append(this.column).append(ENDING_DELIMITER).toString();
|
||||
} else {
|
||||
return this.column;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table litemall_notice_admin
|
||||
*
|
||||
* @mbg.generated
|
||||
*/
|
||||
public String getAliasedEscapedColumnName() {
|
||||
return this.getEscapedColumnName();
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,130 @@
|
||||
package org.linlinjava.litemall.db.service;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.linlinjava.litemall.db.dao.LitemallNoticeAdminMapper;
|
||||
import org.linlinjava.litemall.db.domain.*;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class LitemallNoticeAdminService {
|
||||
@Resource
|
||||
private LitemallNoticeAdminMapper noticeAdminMapper;
|
||||
|
||||
public List<LitemallNoticeAdmin> querySelective(String title, String type, Integer adminId, Integer page, Integer limit, String sort, String order) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
LitemallNoticeAdminExample.Criteria criteria = example.createCriteria();
|
||||
|
||||
if(!StringUtils.isEmpty(title)){
|
||||
criteria.andNoticeTitleLike("%" + title + "%");
|
||||
}
|
||||
|
||||
if(type.equals("read")){
|
||||
criteria.andReadTimeIsNotNull();
|
||||
}
|
||||
else if(type.equals("unread")){
|
||||
criteria.andReadTimeIsNull();
|
||||
}
|
||||
criteria.andAdminIdEqualTo(adminId);
|
||||
criteria.andDeletedEqualTo(false);
|
||||
|
||||
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
||||
example.setOrderByClause(sort + " " + order);
|
||||
}
|
||||
|
||||
PageHelper.startPage(page, limit);
|
||||
return noticeAdminMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public LitemallNoticeAdmin find(Integer noticeId, Integer adminId) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andNoticeIdEqualTo(noticeId).andAdminIdEqualTo(adminId).andDeletedEqualTo(false);
|
||||
return noticeAdminMapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
public void add(LitemallNoticeAdmin noticeAdmin) {
|
||||
noticeAdmin.setAddTime(LocalDateTime.now());
|
||||
noticeAdmin.setUpdateTime(LocalDateTime.now());
|
||||
noticeAdminMapper.insertSelective(noticeAdmin);
|
||||
}
|
||||
|
||||
public void update(LitemallNoticeAdmin noticeAdmin) {
|
||||
noticeAdmin.setUpdateTime(LocalDateTime.now());
|
||||
noticeAdminMapper.updateByPrimaryKeySelective(noticeAdmin);
|
||||
}
|
||||
|
||||
public void markReadByIds(List<Integer> ids, Integer adminId) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andIdIn(ids).andAdminIdEqualTo(adminId).andDeletedEqualTo(false);
|
||||
LitemallNoticeAdmin noticeAdmin = new LitemallNoticeAdmin();
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
noticeAdmin.setReadTime(now);
|
||||
noticeAdmin.setUpdateTime(now);
|
||||
noticeAdminMapper.updateByExampleSelective(noticeAdmin, example);
|
||||
}
|
||||
|
||||
public void deleteById(Integer id, Integer adminId) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andIdEqualTo(id).andAdminIdEqualTo(adminId).andDeletedEqualTo(false);
|
||||
LitemallNoticeAdmin noticeAdmin = new LitemallNoticeAdmin();
|
||||
noticeAdmin.setUpdateTime(LocalDateTime.now());
|
||||
noticeAdmin.setDeleted(true);
|
||||
noticeAdminMapper.updateByExampleSelective(noticeAdmin, example);
|
||||
}
|
||||
|
||||
public void deleteByIds(List<Integer> ids, Integer adminId) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andIdIn(ids).andAdminIdEqualTo(adminId).andDeletedEqualTo(false);
|
||||
LitemallNoticeAdmin noticeAdmin = new LitemallNoticeAdmin();
|
||||
noticeAdmin.setUpdateTime(LocalDateTime.now());
|
||||
noticeAdmin.setDeleted(true);
|
||||
noticeAdminMapper.updateByExampleSelective(noticeAdmin, example);
|
||||
}
|
||||
|
||||
public int countUnread(Integer adminId) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andAdminIdEqualTo(adminId).andReadTimeIsNull().andDeletedEqualTo(false);
|
||||
return (int)noticeAdminMapper.countByExample(example);
|
||||
}
|
||||
|
||||
public List<LitemallNoticeAdmin> queryByNoticeId(Integer noticeId) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andNoticeIdEqualTo(noticeId).andDeletedEqualTo(false);
|
||||
return noticeAdminMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public void deleteByNoticeId(Integer id) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andNoticeIdEqualTo(id).andDeletedEqualTo(false);
|
||||
LitemallNoticeAdmin noticeAdmin = new LitemallNoticeAdmin();
|
||||
noticeAdmin.setUpdateTime(LocalDateTime.now());
|
||||
noticeAdmin.setDeleted(true);
|
||||
noticeAdminMapper.updateByExampleSelective(noticeAdmin, example);
|
||||
}
|
||||
|
||||
public void deleteByNoticeIds(List<Integer> ids) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andNoticeIdIn(ids).andDeletedEqualTo(false);
|
||||
LitemallNoticeAdmin noticeAdmin = new LitemallNoticeAdmin();
|
||||
noticeAdmin.setUpdateTime(LocalDateTime.now());
|
||||
noticeAdmin.setDeleted(true);
|
||||
noticeAdminMapper.updateByExampleSelective(noticeAdmin, example);
|
||||
}
|
||||
|
||||
public int countReadByNoticeId(Integer noticeId) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andNoticeIdEqualTo(noticeId).andReadTimeIsNotNull().andDeletedEqualTo(false);
|
||||
return (int)noticeAdminMapper.countByExample(example);
|
||||
}
|
||||
|
||||
public void updateByNoticeId(LitemallNoticeAdmin noticeAdmin, Integer noticeId) {
|
||||
LitemallNoticeAdminExample example = new LitemallNoticeAdminExample();
|
||||
example.or().andNoticeIdEqualTo(noticeId).andDeletedEqualTo(false);
|
||||
noticeAdmin.setUpdateTime(LocalDateTime.now());
|
||||
noticeAdminMapper.updateByExampleSelective(noticeAdmin, example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
package org.linlinjava.litemall.db.service;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import org.linlinjava.litemall.db.dao.LitemallNoticeMapper;
|
||||
import org.linlinjava.litemall.db.domain.LitemallNotice;
|
||||
import org.linlinjava.litemall.db.domain.LitemallNoticeAdmin;
|
||||
import org.linlinjava.litemall.db.domain.LitemallNoticeAdminExample;
|
||||
import org.linlinjava.litemall.db.domain.LitemallNoticeExample;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.util.StringUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class LitemallNoticeService {
|
||||
@Resource
|
||||
private LitemallNoticeMapper noticeMapper;
|
||||
|
||||
|
||||
public List<LitemallNotice> querySelective(String title, String content, Integer page, Integer limit, String sort, String order) {
|
||||
LitemallNoticeExample example = new LitemallNoticeExample();
|
||||
LitemallNoticeExample.Criteria criteria = example.createCriteria();
|
||||
|
||||
if (!StringUtils.isEmpty(title)) {
|
||||
criteria.andTitleLike("%" + title + "%");
|
||||
}
|
||||
if (!StringUtils.isEmpty(content)) {
|
||||
criteria.andContentLike("%" + content + "%");
|
||||
}
|
||||
criteria.andDeletedEqualTo(false);
|
||||
|
||||
if (!StringUtils.isEmpty(sort) && !StringUtils.isEmpty(order)) {
|
||||
example.setOrderByClause(sort + " " + order);
|
||||
}
|
||||
|
||||
PageHelper.startPage(page, limit);
|
||||
return noticeMapper.selectByExample(example);
|
||||
}
|
||||
|
||||
public int updateById(LitemallNotice notice) {
|
||||
notice.setUpdateTime(LocalDateTime.now());
|
||||
return noticeMapper.updateByPrimaryKeySelective(notice);
|
||||
}
|
||||
|
||||
public void deleteById(Integer id) {
|
||||
noticeMapper.logicalDeleteByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public void add(LitemallNotice notice) {
|
||||
notice.setAddTime(LocalDateTime.now());
|
||||
notice.setUpdateTime(LocalDateTime.now());
|
||||
noticeMapper.insertSelective(notice);
|
||||
}
|
||||
|
||||
public LitemallNotice findById(Integer id) {
|
||||
return noticeMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public void deleteByIds(List<Integer> ids) {
|
||||
LitemallNoticeExample example = new LitemallNoticeExample();
|
||||
example.or().andIdIn(ids).andDeletedEqualTo(false);
|
||||
LitemallNotice notice = new LitemallNotice();
|
||||
notice.setUpdateTime(LocalDateTime.now());
|
||||
notice.setDeleted(true);
|
||||
noticeMapper.updateByExampleSelective(notice, example);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,442 @@
|
||||
<?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="org.linlinjava.litemall.db.dao.LitemallNoticeAdminMapper">
|
||||
<resultMap id="BaseResultMap" type="org.linlinjava.litemall.db.domain.LitemallNoticeAdmin">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="notice_id" jdbcType="INTEGER" property="noticeId" />
|
||||
<result column="notice_title" jdbcType="VARCHAR" property="noticeTitle" />
|
||||
<result column="admin_id" jdbcType="INTEGER" property="adminId" />
|
||||
<result column="read_time" jdbcType="TIMESTAMP" property="readTime" />
|
||||
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</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, notice_id, notice_title, admin_id, read_time, add_time, update_time, deleted
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeAdminExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from litemall_notice_admin
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<if test="example.distinct">
|
||||
distinct
|
||||
</if>
|
||||
<choose>
|
||||
<when test="selective != null and selective.length > 0">
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.aliasedEscapedColumnName}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from litemall_notice_admin
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="example.orderByClause != null">
|
||||
order by ${example.orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from litemall_notice_admin
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from litemall_notice_admin
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and deleted =
|
||||
<choose>
|
||||
<when test="andLogicalDeleted">
|
||||
1
|
||||
</when>
|
||||
<otherwise>
|
||||
0
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<choose>
|
||||
<when test="selective != null and selective.length > 0">
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.aliasedEscapedColumnName}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from litemall_notice_admin
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from litemall_notice_admin
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeAdminExample">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from litemall_notice_admin
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeAdmin">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into litemall_notice_admin (notice_id, notice_title, admin_id,
|
||||
read_time, add_time, update_time,
|
||||
deleted)
|
||||
values (#{noticeId,jdbcType=INTEGER}, #{noticeTitle,jdbcType=VARCHAR}, #{adminId,jdbcType=INTEGER},
|
||||
#{readTime,jdbcType=TIMESTAMP}, #{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
|
||||
#{deleted,jdbcType=BIT})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeAdmin">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into litemall_notice_admin
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="noticeId != null">
|
||||
notice_id,
|
||||
</if>
|
||||
<if test="noticeTitle != null">
|
||||
notice_title,
|
||||
</if>
|
||||
<if test="adminId != null">
|
||||
admin_id,
|
||||
</if>
|
||||
<if test="readTime != null">
|
||||
read_time,
|
||||
</if>
|
||||
<if test="addTime != null">
|
||||
add_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="noticeId != null">
|
||||
#{noticeId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="noticeTitle != null">
|
||||
#{noticeTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminId != null">
|
||||
#{adminId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="readTime != null">
|
||||
#{readTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="addTime != null">
|
||||
#{addTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
#{deleted,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeAdminExample" resultType="java.lang.Long">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select count(*) from litemall_notice_admin
|
||||
<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 litemall_notice_admin
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.noticeId != null">
|
||||
notice_id = #{record.noticeId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.noticeTitle != null">
|
||||
notice_title = #{record.noticeTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.adminId != null">
|
||||
admin_id = #{record.adminId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.readTime != null">
|
||||
read_time = #{record.readTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.addTime != null">
|
||||
add_time = #{record.addTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<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 litemall_notice_admin
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
notice_id = #{record.noticeId,jdbcType=INTEGER},
|
||||
notice_title = #{record.noticeTitle,jdbcType=VARCHAR},
|
||||
admin_id = #{record.adminId,jdbcType=INTEGER},
|
||||
read_time = #{record.readTime,jdbcType=TIMESTAMP},
|
||||
add_time = #{record.addTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
deleted = #{record.deleted,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeAdmin">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update litemall_notice_admin
|
||||
<set>
|
||||
<if test="noticeId != null">
|
||||
notice_id = #{noticeId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="noticeTitle != null">
|
||||
notice_title = #{noticeTitle,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminId != null">
|
||||
admin_id = #{adminId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="readTime != null">
|
||||
read_time = #{readTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="addTime != null">
|
||||
add_time = #{addTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeAdmin">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update litemall_notice_admin
|
||||
set notice_id = #{noticeId,jdbcType=INTEGER},
|
||||
notice_title = #{noticeTitle,jdbcType=VARCHAR},
|
||||
admin_id = #{adminId,jdbcType=INTEGER},
|
||||
read_time = #{readTime,jdbcType=TIMESTAMP},
|
||||
add_time = #{addTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
deleted = #{deleted,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectOneByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeAdminExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from litemall_notice_admin
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<choose>
|
||||
<when test="selective != null and selective.length > 0">
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.aliasedEscapedColumnName}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from litemall_notice_admin
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="example.orderByClause != null">
|
||||
order by ${example.orderByClause}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
<update id="logicalDeleteByExample" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update litemall_notice_admin set deleted = 1
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update litemall_notice_admin set deleted = 1
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
@@ -0,0 +1,427 @@
|
||||
<?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="org.linlinjava.litemall.db.dao.LitemallNoticeMapper">
|
||||
<resultMap id="BaseResultMap" type="org.linlinjava.litemall.db.domain.LitemallNotice">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<id column="id" jdbcType="INTEGER" property="id" />
|
||||
<result column="title" jdbcType="VARCHAR" property="title" />
|
||||
<result column="content" jdbcType="VARCHAR" property="content" />
|
||||
<result column="admin_id" jdbcType="INTEGER" property="adminId" />
|
||||
<result column="add_time" jdbcType="TIMESTAMP" property="addTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
</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, title, content, admin_id, add_time, update_time, deleted
|
||||
</sql>
|
||||
<select id="selectByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<if test="distinct">
|
||||
distinct
|
||||
</if>
|
||||
<include refid="Base_Column_List" />
|
||||
from litemall_notice
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByExampleSelective" parameterType="map" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<if test="example.distinct">
|
||||
distinct
|
||||
</if>
|
||||
<choose>
|
||||
<when test="selective != null and selective.length > 0">
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.aliasedEscapedColumnName}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from litemall_notice
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="example.orderByClause != null">
|
||||
order by ${example.orderByClause}
|
||||
</if>
|
||||
</select>
|
||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from litemall_notice
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<select id="selectByPrimaryKeyWithLogicalDelete" parameterType="map" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from litemall_notice
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
and deleted =
|
||||
<choose>
|
||||
<when test="andLogicalDeleted">
|
||||
1
|
||||
</when>
|
||||
<otherwise>
|
||||
0
|
||||
</otherwise>
|
||||
</choose>
|
||||
</select>
|
||||
<select id="selectByPrimaryKeySelective" parameterType="map" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<choose>
|
||||
<when test="selective != null and selective.length > 0">
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.aliasedEscapedColumnName}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from litemall_notice
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</select>
|
||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from litemall_notice
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</delete>
|
||||
<delete id="deleteByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeExample">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
delete from litemall_notice
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="org.linlinjava.litemall.db.domain.LitemallNotice">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into litemall_notice (title, content, admin_id,
|
||||
add_time, update_time, deleted
|
||||
)
|
||||
values (#{title,jdbcType=VARCHAR}, #{content,jdbcType=VARCHAR}, #{adminId,jdbcType=INTEGER},
|
||||
#{addTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, #{deleted,jdbcType=BIT}
|
||||
)
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="org.linlinjava.litemall.db.domain.LitemallNotice">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Integer">
|
||||
SELECT LAST_INSERT_ID()
|
||||
</selectKey>
|
||||
insert into litemall_notice
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">
|
||||
title,
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content,
|
||||
</if>
|
||||
<if test="adminId != null">
|
||||
admin_id,
|
||||
</if>
|
||||
<if test="addTime != null">
|
||||
add_time,
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time,
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted,
|
||||
</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="title != null">
|
||||
#{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
#{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminId != null">
|
||||
#{adminId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="addTime != null">
|
||||
#{addTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
#{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
#{deleted,jdbcType=BIT},
|
||||
</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<select id="countByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeExample" resultType="java.lang.Long">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select count(*) from litemall_notice
|
||||
<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 litemall_notice
|
||||
<set>
|
||||
<if test="record.id != null">
|
||||
id = #{record.id,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.title != null">
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.content != null">
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.adminId != null">
|
||||
admin_id = #{record.adminId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.addTime != null">
|
||||
add_time = #{record.addTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.updateTime != null">
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="record.deleted != null">
|
||||
deleted = #{record.deleted,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
<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 litemall_notice
|
||||
set id = #{record.id,jdbcType=INTEGER},
|
||||
title = #{record.title,jdbcType=VARCHAR},
|
||||
content = #{record.content,jdbcType=VARCHAR},
|
||||
admin_id = #{record.adminId,jdbcType=INTEGER},
|
||||
add_time = #{record.addTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
|
||||
deleted = #{record.deleted,jdbcType=BIT}
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="updateByPrimaryKeySelective" parameterType="org.linlinjava.litemall.db.domain.LitemallNotice">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update litemall_notice
|
||||
<set>
|
||||
<if test="title != null">
|
||||
title = #{title,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="content != null">
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="adminId != null">
|
||||
admin_id = #{adminId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="addTime != null">
|
||||
add_time = #{addTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="updateTime != null">
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
</if>
|
||||
<if test="deleted != null">
|
||||
deleted = #{deleted,jdbcType=BIT},
|
||||
</if>
|
||||
</set>
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<update id="updateByPrimaryKey" parameterType="org.linlinjava.litemall.db.domain.LitemallNotice">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update litemall_notice
|
||||
set title = #{title,jdbcType=VARCHAR},
|
||||
content = #{content,jdbcType=VARCHAR},
|
||||
admin_id = #{adminId,jdbcType=INTEGER},
|
||||
add_time = #{addTime,jdbcType=TIMESTAMP},
|
||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||
deleted = #{deleted,jdbcType=BIT}
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
<select id="selectOneByExample" parameterType="org.linlinjava.litemall.db.domain.LitemallNoticeExample" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<include refid="Base_Column_List" />
|
||||
from litemall_notice
|
||||
<if test="_parameter != null">
|
||||
<include refid="Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="orderByClause != null">
|
||||
order by ${orderByClause}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
<select id="selectOneByExampleSelective" parameterType="map" resultMap="BaseResultMap">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
select
|
||||
<choose>
|
||||
<when test="selective != null and selective.length > 0">
|
||||
<foreach collection="selective" item="column" separator=",">
|
||||
${column.aliasedEscapedColumnName}
|
||||
</foreach>
|
||||
</when>
|
||||
<otherwise>
|
||||
<include refid="Base_Column_List" />
|
||||
</otherwise>
|
||||
</choose>
|
||||
from litemall_notice
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
<if test="example.orderByClause != null">
|
||||
order by ${example.orderByClause}
|
||||
</if>
|
||||
limit 1
|
||||
</select>
|
||||
<update id="logicalDeleteByExample" parameterType="map">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update litemall_notice set deleted = 1
|
||||
<if test="_parameter != null">
|
||||
<include refid="Update_By_Example_Where_Clause" />
|
||||
</if>
|
||||
</update>
|
||||
<update id="logicalDeleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
This element is automatically generated by MyBatis Generator, do not modify.
|
||||
-->
|
||||
update litemall_notice set deleted = 1
|
||||
where id = #{id,jdbcType=INTEGER}
|
||||
</update>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user