消息类型表导入

赵嘉伟 4 years ago
parent 965bbeafc8
commit e75396aaaa

@ -0,0 +1,128 @@
package com.foreverwin.mesnac.meapi.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.MessageType;
import com.foreverwin.mesnac.meapi.service.MessageTypeService;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
*
* @author Philip
* @since 2021-07-20
*/
@RestController
@RequestMapping("/MESSAGE-TYPE")
public class MessageTypeController {
@Autowired
public MessageTypeService messageTypeService;
/**
* id
*
* @param id
* @return
*/
@ResponseBody
@GetMapping("/{id:.+}")
public R getMessageTypeById(@PathVariable String id) {
return R.ok( messageTypeService.getById(id));
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("")
public R getMessageTypeList(MessageType messageType){
List<MessageType> result;
QueryWrapper<MessageType> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(messageType);
result = messageTypeService.list(queryWrapper);
return R.ok(result);
}
/**
*
*
* @param frontPage
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<MessageType> frontPage, MessageType messageType){
IPage result;
QueryWrapper<MessageType> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(messageType);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(MessageType::getHandle, frontPage.getGlobalQuery())
.or().like(MessageType::getSite, frontPage.getGlobalQuery())
.or().like(MessageType::getMessageType, frontPage.getGlobalQuery())
.or().like(MessageType::getDescription, frontPage.getGlobalQuery())
.or().like(MessageType::getSeverity, frontPage.getGlobalQuery())
.or().like(MessageType::getProcessWorkflowBo, frontPage.getGlobalQuery())
.or().like(MessageType::getEnabled, frontPage.getGlobalQuery())
.or().like(MessageType::getSubject, frontPage.getGlobalQuery())
.or().like(MessageType::getBody, frontPage.getGlobalQuery())
.or().like(MessageType::getAutoClose, frontPage.getGlobalQuery())
.or().like(MessageType::getAutoCloseIntervalUnit, frontPage.getGlobalQuery())
.or().like(MessageType::getAutoClosedByWf, frontPage.getGlobalQuery())
.or().like(MessageType::getSignalFlag, frontPage.getGlobalQuery())
);
}
result = messageTypeService.page(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}
/**
*
* @param messageType
* @return null
*/
@PostMapping
public R save(@RequestBody MessageType messageType) {
return R.ok(messageTypeService.save(messageType));
}
/**
*
* @param messageType
* @return null
*/
@PutMapping
public R updateById(@RequestBody MessageType messageType) {
return R.ok(messageTypeService.updateById(messageType));
}
/**
* id
* @param id ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
public R removeById(@PathVariable("id") String id){
return R.ok(messageTypeService.removeById(id));
}
/**
*
* @param ids ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.POST, value = "/delete-batch")
public R removeByIds(List<String> ids){
return R.ok(messageTypeService.removeByIds(ids));
}
}

@ -0,0 +1,18 @@
package com.foreverwin.mesnac.meapi.mapper;
import com.foreverwin.mesnac.meapi.model.MessageType;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* Mapper
* </p>
*
* @author Philip
* @since 2021-07-20
*/
@Repository
public interface MessageTypeMapper extends BaseMapper<MessageType> {
}

@ -0,0 +1,246 @@
package com.foreverwin.mesnac.meapi.model;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* <p>
*
* </p>
*
* @author Philip
* @since 2021-07-20
*/
@TableName("MESSAGE_TYPE")
public class MessageType extends Model<MessageType> {
private static final long serialVersionUID = 1L;
@TableField("HANDLE")
private String handle;
@TableField("SITE")
private String site;
@TableField("MESSAGE_TYPE")
private String messageType;
@TableField("DESCRIPTION")
private String description;
@TableField("SEVERITY")
private String severity;
@TableField("PROCESS_WORKFLOW_BO")
private String processWorkflowBo;
@TableField("ENABLED")
private String enabled;
@TableField("SUBJECT")
private String subject;
@TableField("BODY")
private String body;
@TableField("AUTO_CLOSE")
private String autoClose;
@TableField("AUTO_CLOSE_INTERVAL")
private Long autoCloseInterval;
@TableField("AUTO_CLOSE_INTERVAL_UNIT")
private String autoCloseIntervalUnit;
@TableField("AUTO_CLOSED_BY_WF")
private String autoClosedByWf;
@TableField("SIGNAL_FLAG")
private String signalFlag;
@TableField("CREATED_DATE_TIME")
private LocalDateTime createdDateTime;
@TableField("MODIFIED_DATE_TIME")
private LocalDateTime modifiedDateTime;
public String getHandle() {
return handle;
}
public void setHandle(String handle) {
this.handle = handle;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getMessageType() {
return messageType;
}
public void setMessageType(String messageType) {
this.messageType = messageType;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getSeverity() {
return severity;
}
public void setSeverity(String severity) {
this.severity = severity;
}
public String getProcessWorkflowBo() {
return processWorkflowBo;
}
public void setProcessWorkflowBo(String processWorkflowBo) {
this.processWorkflowBo = processWorkflowBo;
}
public String getEnabled() {
return enabled;
}
public void setEnabled(String enabled) {
this.enabled = enabled;
}
public String getSubject() {
return subject;
}
public void setSubject(String subject) {
this.subject = subject;
}
public String getBody() {
return body;
}
public void setBody(String body) {
this.body = body;
}
public String getAutoClose() {
return autoClose;
}
public void setAutoClose(String autoClose) {
this.autoClose = autoClose;
}
public Long getAutoCloseInterval() {
return autoCloseInterval;
}
public void setAutoCloseInterval(Long autoCloseInterval) {
this.autoCloseInterval = autoCloseInterval;
}
public String getAutoCloseIntervalUnit() {
return autoCloseIntervalUnit;
}
public void setAutoCloseIntervalUnit(String autoCloseIntervalUnit) {
this.autoCloseIntervalUnit = autoCloseIntervalUnit;
}
public String getAutoClosedByWf() {
return autoClosedByWf;
}
public void setAutoClosedByWf(String autoClosedByWf) {
this.autoClosedByWf = autoClosedByWf;
}
public String getSignalFlag() {
return signalFlag;
}
public void setSignalFlag(String signalFlag) {
this.signalFlag = signalFlag;
}
public LocalDateTime getCreatedDateTime() {
return createdDateTime;
}
public void setCreatedDateTime(LocalDateTime createdDateTime) {
this.createdDateTime = createdDateTime;
}
public LocalDateTime getModifiedDateTime() {
return modifiedDateTime;
}
public void setModifiedDateTime(LocalDateTime modifiedDateTime) {
this.modifiedDateTime = modifiedDateTime;
}
public static final String HANDLE = "HANDLE";
public static final String SITE = "SITE";
public static final String MESSAGE_TYPE = "MESSAGE_TYPE";
public static final String DESCRIPTION = "DESCRIPTION";
public static final String SEVERITY = "SEVERITY";
public static final String PROCESS_WORKFLOW_BO = "PROCESS_WORKFLOW_BO";
public static final String ENABLED = "ENABLED";
public static final String SUBJECT = "SUBJECT";
public static final String BODY = "BODY";
public static final String AUTO_CLOSE = "AUTO_CLOSE";
public static final String AUTO_CLOSE_INTERVAL = "AUTO_CLOSE_INTERVAL";
public static final String AUTO_CLOSE_INTERVAL_UNIT = "AUTO_CLOSE_INTERVAL_UNIT";
public static final String AUTO_CLOSED_BY_WF = "AUTO_CLOSED_BY_WF";
public static final String SIGNAL_FLAG = "SIGNAL_FLAG";
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
@Override
protected Serializable pkVal() {
return this.handle;
}
@Override
public String toString() {
return "MessageType{" +
"handle = " + handle +
", site = " + site +
", messageType = " + messageType +
", description = " + description +
", severity = " + severity +
", processWorkflowBo = " + processWorkflowBo +
", enabled = " + enabled +
", subject = " + subject +
", body = " + body +
", autoClose = " + autoClose +
", autoCloseInterval = " + autoCloseInterval +
", autoCloseIntervalUnit = " + autoCloseIntervalUnit +
", autoClosedByWf = " + autoClosedByWf +
", signalFlag = " + signalFlag +
", createdDateTime = " + createdDateTime +
", modifiedDateTime = " + modifiedDateTime +
"}";
}
}

@ -0,0 +1,28 @@
package com.foreverwin.mesnac.meapi.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.MessageType;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author Philip
* @since 2021-07-20
*/
public interface MessageTypeService extends IService<MessageType> {
/**
*
* @param frontPage
* @return
*/
IPage<MessageType> selectPage(FrontPage<MessageType> frontPage, MessageType messageType);
List<MessageType> selectList(MessageType messageType);
}

@ -0,0 +1,46 @@
package com.foreverwin.mesnac.meapi.service.impl;
import com.foreverwin.modular.core.util.FrontPage;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.foreverwin.mesnac.meapi.model.MessageType;
import com.foreverwin.mesnac.meapi.mapper.MessageTypeMapper;
import com.foreverwin.mesnac.meapi.service.MessageTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author Philip
* @since 2021-07-20
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class MessageTypeServiceImpl extends ServiceImpl<MessageTypeMapper, MessageType> implements MessageTypeService {
@Autowired
private MessageTypeMapper messageTypeMapper;
@Override
public IPage<MessageType> selectPage(FrontPage<MessageType> frontPage, MessageType messageType) {
QueryWrapper<MessageType> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(messageType);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<MessageType> selectList(MessageType messageType) {
QueryWrapper<MessageType> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(messageType);
return super.list(queryWrapper);
}
}

@ -0,0 +1,444 @@
<?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.foreverwin.mesnac.meapi.mapper.MessageTypeMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.MessageType">
<result column="HANDLE" property="handle" />
<result column="SITE" property="site" />
<result column="MESSAGE_TYPE" property="messageType" />
<result column="DESCRIPTION" property="description" />
<result column="SEVERITY" property="severity" />
<result column="PROCESS_WORKFLOW_BO" property="processWorkflowBo" />
<result column="ENABLED" property="enabled" />
<result column="SUBJECT" property="subject" />
<result column="BODY" property="body" />
<result column="AUTO_CLOSE" property="autoClose" />
<result column="AUTO_CLOSE_INTERVAL" property="autoCloseInterval" />
<result column="AUTO_CLOSE_INTERVAL_UNIT" property="autoCloseIntervalUnit" />
<result column="AUTO_CLOSED_BY_WF" property="autoClosedByWf" />
<result column="SIGNAL_FLAG" property="signalFlag" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, SITE, MESSAGE_TYPE, DESCRIPTION, SEVERITY, PROCESS_WORKFLOW_BO, ENABLED, SUBJECT, BODY, AUTO_CLOSE, AUTO_CLOSE_INTERVAL, AUTO_CLOSE_INTERVAL_UNIT, AUTO_CLOSED_BY_WF, SIGNAL_FLAG, CREATED_DATE_TIME, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM MESSAGE_TYPE
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</select>
<select id="selectOne" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include> FROM MESSAGE_TYPE
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</where>
</select>
<select id="selectCount" resultType="Integer">
SELECT COUNT(1) FROM MESSAGE_TYPE
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectList" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM MESSAGE_TYPE
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMaps" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM MESSAGE_TYPE
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectObjs" resultType="Object">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM MESSAGE_TYPE
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectPage" resultMap="BaseResultMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM MESSAGE_TYPE
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<select id="selectMapsPage" resultType="HashMap">
SELECT <choose><when test="ew != null and ew.sqlSelect != null">${ew.sqlSelect}</when><otherwise><include refid="Base_Column_List"></include></otherwise></choose> FROM MESSAGE_TYPE
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</select>
<insert id="insert" parameterType="com.foreverwin.mesnac.meapi.model.MessageType">
INSERT INTO MESSAGE_TYPE
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="site!=null">SITE,</if>
<if test="messageType!=null">MESSAGE_TYPE,</if>
<if test="description!=null">DESCRIPTION,</if>
<if test="severity!=null">SEVERITY,</if>
<if test="processWorkflowBo!=null">PROCESS_WORKFLOW_BO,</if>
<if test="enabled!=null">ENABLED,</if>
<if test="subject!=null">SUBJECT,</if>
<if test="body!=null">BODY,</if>
<if test="autoClose!=null">AUTO_CLOSE,</if>
<if test="autoCloseInterval!=null">AUTO_CLOSE_INTERVAL,</if>
<if test="autoCloseIntervalUnit!=null">AUTO_CLOSE_INTERVAL_UNIT,</if>
<if test="autoClosedByWf!=null">AUTO_CLOSED_BY_WF,</if>
<if test="signalFlag!=null">SIGNAL_FLAG,</if>
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
<if test="site!=null">#{site},</if>
<if test="messageType!=null">#{messageType},</if>
<if test="description!=null">#{description},</if>
<if test="severity!=null">#{severity},</if>
<if test="processWorkflowBo!=null">#{processWorkflowBo},</if>
<if test="enabled!=null">#{enabled},</if>
<if test="subject!=null">#{subject},</if>
<if test="body!=null">#{body},</if>
<if test="autoClose!=null">#{autoClose},</if>
<if test="autoCloseInterval!=null">#{autoCloseInterval},</if>
<if test="autoCloseIntervalUnit!=null">#{autoCloseIntervalUnit},</if>
<if test="autoClosedByWf!=null">#{autoClosedByWf},</if>
<if test="signalFlag!=null">#{signalFlag},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.MessageType">
INSERT INTO MESSAGE_TYPE
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{site},
#{messageType},
#{description},
#{severity},
#{processWorkflowBo},
#{enabled},
#{subject},
#{body},
#{autoClose},
#{autoCloseInterval},
#{autoCloseIntervalUnit},
#{autoClosedByWf},
#{signalFlag},
#{createdDateTime},
#{modifiedDateTime},
</trim>
</insert>
<update id="update">
UPDATE MESSAGE_TYPE <trim prefix="SET" suffixOverrides=",">
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.messageType!=null">MESSAGE_TYPE=#{et.messageType},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.severity!=null">SEVERITY=#{et.severity},</if>
<if test="et.processWorkflowBo!=null">PROCESS_WORKFLOW_BO=#{et.processWorkflowBo},</if>
<if test="et.enabled!=null">ENABLED=#{et.enabled},</if>
<if test="et.subject!=null">SUBJECT=#{et.subject},</if>
<if test="et.body!=null">BODY=#{et.body},</if>
<if test="et.autoClose!=null">AUTO_CLOSE=#{et.autoClose},</if>
<if test="et.autoCloseInterval!=null">AUTO_CLOSE_INTERVAL=#{et.autoCloseInterval},</if>
<if test="et.autoCloseIntervalUnit!=null">AUTO_CLOSE_INTERVAL_UNIT=#{et.autoCloseIntervalUnit},</if>
<if test="et.autoClosedByWf!=null">AUTO_CLOSED_BY_WF=#{et.autoClosedByWf},</if>
<if test="et.signalFlag!=null">SIGNAL_FLAG=#{et.signalFlag},</if>
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
</trim>
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
HANDLE=#{ew.entity.handle}
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</update>
<delete id="deleteByMap">
DELETE FROM MESSAGE_TYPE
<if test="cm!=null and !cm.isEmpty">
<where>
<foreach collection="cm.keys" item="k" separator="AND">
<if test="cm[k] != null">
${k} = #{cm[${k}]}
</if>
</foreach>
</where>
</if>
</delete>
<delete id="delete">
DELETE FROM MESSAGE_TYPE
<where>
<if test="ew!=null">
<if test="ew.entity!=null">
<if test="ew.entity.handle!=null">
HANDLE=#{ew.entity.handle}
</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.messageType!=null"> AND MESSAGE_TYPE=#{ew.entity.messageType}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.severity!=null"> AND SEVERITY=#{ew.entity.severity}</if>
<if test="ew.entity.processWorkflowBo!=null"> AND PROCESS_WORKFLOW_BO=#{ew.entity.processWorkflowBo}</if>
<if test="ew.entity.enabled!=null"> AND ENABLED=#{ew.entity.enabled}</if>
<if test="ew.entity.subject!=null"> AND SUBJECT=#{ew.entity.subject}</if>
<if test="ew.entity.body!=null"> AND BODY=#{ew.entity.body}</if>
<if test="ew.entity.autoClose!=null"> AND AUTO_CLOSE=#{ew.entity.autoClose}</if>
<if test="ew.entity.autoCloseInterval!=null"> AND AUTO_CLOSE_INTERVAL=#{ew.entity.autoCloseInterval}</if>
<if test="ew.entity.autoCloseIntervalUnit!=null"> AND AUTO_CLOSE_INTERVAL_UNIT=#{ew.entity.autoCloseIntervalUnit}</if>
<if test="ew.entity.autoClosedByWf!=null"> AND AUTO_CLOSED_BY_WF=#{ew.entity.autoClosedByWf}</if>
<if test="ew.entity.signalFlag!=null"> AND SIGNAL_FLAG=#{ew.entity.signalFlag}</if>
<if test="ew.entity.createdDateTime!=null"> AND CREATED_DATE_TIME=#{ew.entity.createdDateTime}</if>
<if test="ew.entity.modifiedDateTime!=null"> AND MODIFIED_DATE_TIME=#{ew.entity.modifiedDateTime}</if>
</if>
<if test="ew!=null and ew.sqlSegment!=null and ew.nonEmptyOfWhere">
${ew.sqlSegment}
</if>
</if>
</where>
<if test="ew!=null and ew.sqlSegment!=null and ew.emptyOfWhere">
${ew.sqlSegment}
</if>
</delete>
<!-- BaseMapper标准查询/修改/删除 -->
</mapper>
Loading…
Cancel
Save