NC_GROUP 表导入

赵嘉伟
parent 2279597387
commit b1d42a38f0

@ -0,0 +1,122 @@
package com.foreverwin.mesnac.meapi.controller;
import com.foreverwin.modular.core.util.R;
import com.foreverwin.modular.core.util.FrontPage;
import com.foreverwin.modular.core.util.CommonMethods;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.foreverwin.mesnac.meapi.service.NcGroupService;
import com.foreverwin.mesnac.meapi.model.NcGroup;
import java.util.List;
/**
*
* @author robert
* @since 2021-06-23
*/
@RestController
@RequestMapping("/NC-GROUP")
public class NcGroupController {
@Autowired
public NcGroupService ncGroupService;
/**
* id
*
* @param id
* @return
*/
@ResponseBody
@GetMapping("/{id:.+}")
public R getNcGroupById(@PathVariable String id) {
return R.ok( ncGroupService.getById(id));
}
/**
*
*
* @return
*/
@ResponseBody
@GetMapping("")
public R getNcGroupList(NcGroup ncGroup){
List<NcGroup> result;
QueryWrapper<NcGroup> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(ncGroup);
result = ncGroupService.list(queryWrapper);
return R.ok(result);
}
/**
*
*
* @param frontPage
* @return
*/
@ResponseBody
@GetMapping("/page")
public R page(FrontPage<NcGroup> frontPage, NcGroup ncGroup){
IPage result;
QueryWrapper<NcGroup> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(ncGroup);
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
//TODO modify global query
queryWrapper.lambda().and(wrapper -> wrapper
.like(NcGroup::getHandle, frontPage.getGlobalQuery())
.or().like(NcGroup::getSite, frontPage.getGlobalQuery())
.or().like(NcGroup::getNcGroup, frontPage.getGlobalQuery())
.or().like(NcGroup::getDescription, frontPage.getGlobalQuery())
.or().like(NcGroup::getValidAtAllOperations, frontPage.getGlobalQuery())
);
}
result = ncGroupService.page(frontPage.getPagePlus(), queryWrapper);
return R.ok(result);
}
/**
*
* @param ncGroup
* @return null
*/
@PostMapping
public R save(@RequestBody NcGroup ncGroup) {
return R.ok(ncGroupService.save(ncGroup));
}
/**
*
* @param ncGroup
* @return null
*/
@PutMapping
public R updateById(@RequestBody NcGroup ncGroup) {
return R.ok(ncGroupService.updateById(ncGroup));
}
/**
* id
* @param id ID
* @return 0 1
*/
@ResponseBody
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
public R removeById(@PathVariable("id") String id){
return R.ok(ncGroupService.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(ncGroupService.removeByIds(ids));
}
}

@ -0,0 +1,18 @@
package com.foreverwin.mesnac.meapi.mapper;
import com.foreverwin.mesnac.meapi.model.NcGroup;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;
/**
* <p>
* Mapper
* </p>
*
* @author robert
* @since 2021-06-23
*/
@Repository
public interface NcGroupMapper extends BaseMapper<NcGroup> {
}

@ -0,0 +1,155 @@
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 robert
* @since 2021-06-23
*/
@TableName("NC_GROUP")
public class NcGroup extends Model<NcGroup> {
private static final long serialVersionUID = 1L;
@TableField("HANDLE")
private String handle;
@TableField("CHANGE_STAMP")
private Long changeStamp;
@TableField("SITE")
private String site;
@TableField("NC_GROUP")
private String ncGroup;
@TableField("DESCRIPTION")
private String description;
@TableField("VALID_AT_ALL_OPERATIONS")
private String validAtAllOperations;
@TableField("PRIORITY")
private Long priority;
@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 Long getChangeStamp() {
return changeStamp;
}
public void setChangeStamp(Long changeStamp) {
this.changeStamp = changeStamp;
}
public String getSite() {
return site;
}
public void setSite(String site) {
this.site = site;
}
public String getNcGroup() {
return ncGroup;
}
public void setNcGroup(String ncGroup) {
this.ncGroup = ncGroup;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getValidAtAllOperations() {
return validAtAllOperations;
}
public void setValidAtAllOperations(String validAtAllOperations) {
this.validAtAllOperations = validAtAllOperations;
}
public Long getPriority() {
return priority;
}
public void setPriority(Long priority) {
this.priority = priority;
}
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 CHANGE_STAMP = "CHANGE_STAMP";
public static final String SITE = "SITE";
public static final String NC_GROUP = "NC_GROUP";
public static final String DESCRIPTION = "DESCRIPTION";
public static final String VALID_AT_ALL_OPERATIONS = "VALID_AT_ALL_OPERATIONS";
public static final String PRIORITY = "PRIORITY";
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 "NcGroup{" +
"handle = " + handle +
", changeStamp = " + changeStamp +
", site = " + site +
", ncGroup = " + ncGroup +
", description = " + description +
", validAtAllOperations = " + validAtAllOperations +
", priority = " + priority +
", 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.NcGroup;
import com.baomidou.mybatisplus.extension.service.IService;
import com.foreverwin.modular.core.util.FrontPage;
import java.util.List;
/**
* <p>
*
* </p>
*
* @author robert
* @since 2021-06-23
*/
public interface NcGroupService extends IService<NcGroup> {
/**
*
* @param frontPage
* @return
*/
IPage<NcGroup> selectPage(FrontPage<NcGroup> frontPage, NcGroup ncGroup);
List<NcGroup> selectList(NcGroup ncGroup);
}

@ -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.NcGroup;
import com.foreverwin.mesnac.meapi.mapper.NcGroupMapper;
import com.foreverwin.mesnac.meapi.service.NcGroupService;
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 robert
* @since 2021-06-23
*/
@Service
@Transactional(rollbackFor = Exception.class)
public class NcGroupServiceImpl extends ServiceImpl<NcGroupMapper, NcGroup> implements NcGroupService {
@Autowired
private NcGroupMapper ncGroupMapper;
@Override
public IPage<NcGroup> selectPage(FrontPage<NcGroup> frontPage, NcGroup ncGroup) {
QueryWrapper<NcGroup> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(ncGroup);
return super.page(frontPage.getPagePlus(), queryWrapper);
}
@Override
public List<NcGroup> selectList(NcGroup ncGroup) {
QueryWrapper<NcGroup> queryWrapper = new QueryWrapper<>();
queryWrapper.setEntity(ncGroup);
return super.list(queryWrapper);
}
}

@ -0,0 +1,346 @@
<?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.NcGroupMapper">
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.NcGroup">
<result column="HANDLE" property="handle" />
<result column="CHANGE_STAMP" property="changeStamp" />
<result column="SITE" property="site" />
<result column="NC_GROUP" property="ncGroup" />
<result column="DESCRIPTION" property="description" />
<result column="VALID_AT_ALL_OPERATIONS" property="validAtAllOperations" />
<result column="PRIORITY" property="priority" />
<result column="CREATED_DATE_TIME" property="createdDateTime" />
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
</resultMap>
<!-- 通用查询结果列 -->
<sql id="Base_Column_List">
HANDLE, CHANGE_STAMP, SITE, NC_GROUP, DESCRIPTION, VALID_AT_ALL_OPERATIONS, PRIORITY, CREATED_DATE_TIME, MODIFIED_DATE_TIME
</sql>
<!-- BaseMapper标准查询/修改/删除 -->
<select id="selectByMap" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
FROM NC_GROUP
<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 NC_GROUP
<where>
<if test="ew.entity.handle!=null">
HANDLE=#{ew.handle}
</if>
<if test="ew.entity.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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 NC_GROUP
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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 NC_GROUP
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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 NC_GROUP
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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 NC_GROUP
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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 NC_GROUP
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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 NC_GROUP
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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.NcGroup">
INSERT INTO NC_GROUP
<trim prefix="(" suffix=")" suffixOverrides=",">
HANDLE,
<if test="changeStamp!=null">CHANGE_STAMP,</if>
<if test="site!=null">SITE,</if>
<if test="ncGroup!=null">NC_GROUP,</if>
<if test="description!=null">DESCRIPTION,</if>
<if test="validAtAllOperations!=null">VALID_AT_ALL_OPERATIONS,</if>
<if test="priority!=null">PRIORITY,</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="changeStamp!=null">#{changeStamp},</if>
<if test="site!=null">#{site},</if>
<if test="ncGroup!=null">#{ncGroup},</if>
<if test="description!=null">#{description},</if>
<if test="validAtAllOperations!=null">#{validAtAllOperations},</if>
<if test="priority!=null">#{priority},</if>
<if test="createdDateTime!=null">#{createdDateTime},</if>
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
</trim>
</insert>
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.NcGroup">
INSERT INTO NC_GROUP
<trim prefix="(" suffix=")" suffixOverrides=",">
<include refid="Base_Column_List"></include>
</trim> VALUES
<trim prefix="(" suffix=")" suffixOverrides=",">
#{handle},
#{changeStamp},
#{site},
#{ncGroup},
#{description},
#{validAtAllOperations},
#{priority},
#{createdDateTime},
#{modifiedDateTime},
</trim>
</insert>
<update id="update">
UPDATE NC_GROUP <trim prefix="SET" suffixOverrides=",">
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
<if test="et.changeStamp!=null">CHANGE_STAMP=#{et.changeStamp},</if>
<if test="et.site!=null">SITE=#{et.site},</if>
<if test="et.ncGroup!=null">NC_GROUP=#{et.ncGroup},</if>
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
<if test="et.validAtAllOperations!=null">VALID_AT_ALL_OPERATIONS=#{et.validAtAllOperations},</if>
<if test="et.priority!=null">PRIORITY=#{et.priority},</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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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 NC_GROUP
<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 NC_GROUP
<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.changeStamp!=null"> AND CHANGE_STAMP=#{ew.entity.changeStamp}</if>
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
<if test="ew.entity.ncGroup!=null"> AND NC_GROUP=#{ew.entity.ncGroup}</if>
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
<if test="ew.entity.validAtAllOperations!=null"> AND VALID_AT_ALL_OPERATIONS=#{ew.entity.validAtAllOperations}</if>
<if test="ew.entity.priority!=null"> AND PRIORITY=#{ew.entity.priority}</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