DATA_FIELD 和 DATA_FIELD_LIST表导入
parent
ed78e0e419
commit
1dc6f78310
@ -0,0 +1,131 @@
|
||||
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.DataFieldService;
|
||||
import com.foreverwin.mesnac.meapi.model.DataField;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robert
|
||||
* @since 2021-06-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/DATA-FIELD")
|
||||
public class DataFieldController {
|
||||
|
||||
@Autowired
|
||||
public DataFieldService dataFieldService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getDataFieldById(@PathVariable String id) {
|
||||
return R.ok( dataFieldService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getDataFieldList(DataField dataField){
|
||||
List<DataField> result;
|
||||
QueryWrapper<DataField> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(dataField);
|
||||
result = dataFieldService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<DataField> frontPage, DataField dataField){
|
||||
IPage result;
|
||||
QueryWrapper<DataField> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(dataField);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(DataField::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getDataTypeBo, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getDataField, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getFieldType, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getValidationType, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getDataDefault, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getSite, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getBrowseActivityBo, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getIsBrowse, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getIsErp, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getMaskGroupBo, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getDescription, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getValidationActivityBo, frontPage.getGlobalQuery())
|
||||
.or().like(DataField::getCategory, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = dataFieldService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param dataField 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody DataField dataField) {
|
||||
return R.ok(dataFieldService.save(dataField));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param dataField 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody DataField dataField) {
|
||||
return R.ok(dataFieldService.updateById(dataField));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(dataFieldService.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(dataFieldService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,123 @@
|
||||
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.DataFieldListService;
|
||||
import com.foreverwin.mesnac.meapi.model.DataFieldList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author robert
|
||||
* @since 2021-06-29
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/DATA-FIELD-LIST")
|
||||
public class DataFieldListController {
|
||||
|
||||
@Autowired
|
||||
public DataFieldListService dataFieldListService;
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*
|
||||
* @param id 主键
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/{id:.+}")
|
||||
public R getDataFieldListById(@PathVariable String id) {
|
||||
return R.ok( dataFieldListService.getById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有数据
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("")
|
||||
public R getDataFieldListList(DataFieldList dataFieldList){
|
||||
List<DataFieldList> result;
|
||||
QueryWrapper<DataFieldList> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(dataFieldList);
|
||||
result = dataFieldListService.list(queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 分页查询数据
|
||||
*
|
||||
* @param frontPage 分页信息
|
||||
* @return
|
||||
*/
|
||||
@ResponseBody
|
||||
@GetMapping("/page")
|
||||
public R page(FrontPage<DataFieldList> frontPage, DataFieldList dataFieldList){
|
||||
IPage result;
|
||||
QueryWrapper<DataFieldList> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(dataFieldList);
|
||||
if (frontPage.getGlobalQuery() != null && !"".equals(frontPage.getGlobalQuery().trim())) {
|
||||
//TODO modify global query
|
||||
queryWrapper.lambda().and(wrapper -> wrapper
|
||||
.like(DataFieldList::getHandle, frontPage.getGlobalQuery())
|
||||
.or().like(DataFieldList::getDataFieldBo, frontPage.getGlobalQuery())
|
||||
.or().like(DataFieldList::getDataValue, frontPage.getGlobalQuery())
|
||||
.or().like(DataFieldList::getIsDefault, frontPage.getGlobalQuery())
|
||||
.or().like(DataFieldList::getValuation, frontPage.getGlobalQuery())
|
||||
.or().like(DataFieldList::getErpCodeGroup, frontPage.getGlobalQuery())
|
||||
);
|
||||
}
|
||||
result = dataFieldListService.page(frontPage.getPagePlus(), queryWrapper);
|
||||
return R.ok(result);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增
|
||||
* @param dataFieldList 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PostMapping
|
||||
public R save(@RequestBody DataFieldList dataFieldList) {
|
||||
return R.ok(dataFieldListService.save(dataFieldList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改
|
||||
* @param dataFieldList 传递的实体
|
||||
* @return null 失败 实体成功
|
||||
*/
|
||||
@PutMapping
|
||||
public R updateById(@RequestBody DataFieldList dataFieldList) {
|
||||
return R.ok(dataFieldListService.updateById(dataFieldList));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id删除对象
|
||||
* @param id 实体ID
|
||||
* @return 0 失败 1 成功
|
||||
*/
|
||||
@ResponseBody
|
||||
@RequestMapping(method = RequestMethod.DELETE, value = "/{id:.+}")
|
||||
public R removeById(@PathVariable("id") String id){
|
||||
return R.ok(dataFieldListService.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(dataFieldListService.removeByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.model.DataFieldList;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author robert
|
||||
* @since 2021-06-29
|
||||
*/
|
||||
@Repository
|
||||
public interface DataFieldListMapper extends BaseMapper<DataFieldList> {
|
||||
|
||||
}
|
@ -0,0 +1,18 @@
|
||||
package com.foreverwin.mesnac.meapi.mapper;
|
||||
|
||||
import com.foreverwin.mesnac.meapi.model.DataField;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* Mapper 接口
|
||||
* </p>
|
||||
*
|
||||
* @author robert
|
||||
* @since 2021-06-29
|
||||
*/
|
||||
@Repository
|
||||
public interface DataFieldMapper extends BaseMapper<DataField> {
|
||||
|
||||
}
|
@ -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 robert
|
||||
* @since 2021-06-29
|
||||
*/
|
||||
|
||||
@TableName("DATA_FIELD")
|
||||
|
||||
public class DataField extends Model<DataField> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("HANDLE")
|
||||
private String handle;
|
||||
@TableField("DATA_TYPE_BO")
|
||||
private String dataTypeBo;
|
||||
@TableField("DATA_FIELD")
|
||||
private String dataField;
|
||||
@TableField("FIELD_TYPE")
|
||||
private String fieldType;
|
||||
@TableField("VALIDATION_TYPE")
|
||||
private String validationType;
|
||||
@TableField("DATA_DEFAULT")
|
||||
private String dataDefault;
|
||||
@TableField("SITE")
|
||||
private String site;
|
||||
@TableField("BROWSE_ACTIVITY_BO")
|
||||
private String browseActivityBo;
|
||||
@TableField("IS_BROWSE")
|
||||
private String isBrowse;
|
||||
@TableField("IS_ERP")
|
||||
private String isErp;
|
||||
@TableField("MASK_GROUP_BO")
|
||||
private String maskGroupBo;
|
||||
@TableField("DESCRIPTION")
|
||||
private String description;
|
||||
@TableField("VALIDATION_ACTIVITY_BO")
|
||||
private String validationActivityBo;
|
||||
@TableField("CREATED_DATE_TIME")
|
||||
private LocalDateTime createdDateTime;
|
||||
@TableField("MODIFIED_DATE_TIME")
|
||||
private LocalDateTime modifiedDateTime;
|
||||
@TableField("CATEGORY")
|
||||
private String category;
|
||||
|
||||
|
||||
public String getHandle() {
|
||||
return handle;
|
||||
}
|
||||
|
||||
public void setHandle(String handle) {
|
||||
this.handle = handle;
|
||||
}
|
||||
|
||||
public String getDataTypeBo() {
|
||||
return dataTypeBo;
|
||||
}
|
||||
|
||||
public void setDataTypeBo(String dataTypeBo) {
|
||||
this.dataTypeBo = dataTypeBo;
|
||||
}
|
||||
|
||||
public String getDataField() {
|
||||
return dataField;
|
||||
}
|
||||
|
||||
public void setDataField(String dataField) {
|
||||
this.dataField = dataField;
|
||||
}
|
||||
|
||||
public String getFieldType() {
|
||||
return fieldType;
|
||||
}
|
||||
|
||||
public void setFieldType(String fieldType) {
|
||||
this.fieldType = fieldType;
|
||||
}
|
||||
|
||||
public String getValidationType() {
|
||||
return validationType;
|
||||
}
|
||||
|
||||
public void setValidationType(String validationType) {
|
||||
this.validationType = validationType;
|
||||
}
|
||||
|
||||
public String getDataDefault() {
|
||||
return dataDefault;
|
||||
}
|
||||
|
||||
public void setDataDefault(String dataDefault) {
|
||||
this.dataDefault = dataDefault;
|
||||
}
|
||||
|
||||
public String getSite() {
|
||||
return site;
|
||||
}
|
||||
|
||||
public void setSite(String site) {
|
||||
this.site = site;
|
||||
}
|
||||
|
||||
public String getBrowseActivityBo() {
|
||||
return browseActivityBo;
|
||||
}
|
||||
|
||||
public void setBrowseActivityBo(String browseActivityBo) {
|
||||
this.browseActivityBo = browseActivityBo;
|
||||
}
|
||||
|
||||
public String getIsBrowse() {
|
||||
return isBrowse;
|
||||
}
|
||||
|
||||
public void setIsBrowse(String isBrowse) {
|
||||
this.isBrowse = isBrowse;
|
||||
}
|
||||
|
||||
public String getIsErp() {
|
||||
return isErp;
|
||||
}
|
||||
|
||||
public void setIsErp(String isErp) {
|
||||
this.isErp = isErp;
|
||||
}
|
||||
|
||||
public String getMaskGroupBo() {
|
||||
return maskGroupBo;
|
||||
}
|
||||
|
||||
public void setMaskGroupBo(String maskGroupBo) {
|
||||
this.maskGroupBo = maskGroupBo;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public String getValidationActivityBo() {
|
||||
return validationActivityBo;
|
||||
}
|
||||
|
||||
public void setValidationActivityBo(String validationActivityBo) {
|
||||
this.validationActivityBo = validationActivityBo;
|
||||
}
|
||||
|
||||
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 String getCategory() {
|
||||
return category;
|
||||
}
|
||||
|
||||
public void setCategory(String category) {
|
||||
this.category = category;
|
||||
}
|
||||
|
||||
public static final String HANDLE = "HANDLE";
|
||||
|
||||
public static final String DATA_TYPE_BO = "DATA_TYPE_BO";
|
||||
|
||||
public static final String DATA_FIELD = "DATA_FIELD";
|
||||
|
||||
public static final String FIELD_TYPE = "FIELD_TYPE";
|
||||
|
||||
public static final String VALIDATION_TYPE = "VALIDATION_TYPE";
|
||||
|
||||
public static final String DATA_DEFAULT = "DATA_DEFAULT";
|
||||
|
||||
public static final String SITE = "SITE";
|
||||
|
||||
public static final String BROWSE_ACTIVITY_BO = "BROWSE_ACTIVITY_BO";
|
||||
|
||||
public static final String IS_BROWSE = "IS_BROWSE";
|
||||
|
||||
public static final String IS_ERP = "IS_ERP";
|
||||
|
||||
public static final String MASK_GROUP_BO = "MASK_GROUP_BO";
|
||||
|
||||
public static final String DESCRIPTION = "DESCRIPTION";
|
||||
|
||||
public static final String VALIDATION_ACTIVITY_BO = "VALIDATION_ACTIVITY_BO";
|
||||
|
||||
public static final String CREATED_DATE_TIME = "CREATED_DATE_TIME";
|
||||
|
||||
public static final String MODIFIED_DATE_TIME = "MODIFIED_DATE_TIME";
|
||||
|
||||
public static final String CATEGORY = "CATEGORY";
|
||||
|
||||
|
||||
@Override
|
||||
protected Serializable pkVal() {
|
||||
return this.handle;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "DataField{" +
|
||||
"handle = " + handle +
|
||||
", dataTypeBo = " + dataTypeBo +
|
||||
", dataField = " + dataField +
|
||||
", fieldType = " + fieldType +
|
||||
", validationType = " + validationType +
|
||||
", dataDefault = " + dataDefault +
|
||||
", site = " + site +
|
||||
", browseActivityBo = " + browseActivityBo +
|
||||
", isBrowse = " + isBrowse +
|
||||
", isErp = " + isErp +
|
||||
", maskGroupBo = " + maskGroupBo +
|
||||
", description = " + description +
|
||||
", validationActivityBo = " + validationActivityBo +
|
||||
", createdDateTime = " + createdDateTime +
|
||||
", modifiedDateTime = " + modifiedDateTime +
|
||||
", category = " + category +
|
||||
"}";
|
||||
}
|
||||
}
|
@ -0,0 +1,157 @@
|
||||
package com.foreverwin.mesnac.meapi.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.activerecord.Model;
|
||||
import java.time.LocalDateTime;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
*
|
||||
* </p>
|
||||
*
|
||||
* @author robert
|
||||
* @since 2021-06-29
|
||||
*/
|
||||
|
||||
@TableName("DATA_FIELD_LIST")
|
||||
|
||||
public class DataFieldList extends Model<DataFieldList> {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@TableField("HANDLE")
|
||||
private String handle;
|
||||
@TableField("SEQUENCE")
|
||||
private Long sequence;
|
||||
@TableField("DATA_FIELD_BO")
|
||||
private String dataFieldBo;
|
||||
@TableField("DATA_VALUE")
|
||||
private String dataValue;
|
||||
@TableField("IS_DEFAULT")
|
||||
private String isDefault;
|
||||
@TableField("VALUATION")
|
||||
private String valuation;
|
||||
@TableField("ERP_CODE_GROUP")
|
||||
private String erpCodeGroup;
|
||||
@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 getSequence() {
|
||||
return sequence;
|
||||
}
|
||||
|
||||
public void setSequence(Long sequence) {
|
||||
this.sequence = sequence;
|
||||
}
|
||||
|
||||
public String getDataFieldBo() {
|
||||
return dataFieldBo;
|
||||
}
|
||||
|
||||
public void setDataFieldBo(String dataFieldBo) {
|
||||
this.dataFieldBo = dataFieldBo;
|
||||
}
|
||||
|
||||
public String getDataValue() {
|
||||
return dataValue;
|
||||
}
|
||||
|
||||
public void setDataValue(String dataValue) {
|
||||
this.dataValue = dataValue;
|
||||
}
|
||||
|
||||
public String getIsDefault() {
|
||||
return isDefault;
|
||||
}
|
||||
|
||||
public void setIsDefault(String isDefault) {
|
||||
this.isDefault = isDefault;
|
||||
}
|
||||
|
||||
public String getValuation() {
|
||||
return valuation;
|
||||
}
|
||||
|
||||
public void setValuation(String valuation) {
|
||||
this.valuation = valuation;
|
||||
}
|
||||
|
||||
public String getErpCodeGroup() {
|
||||
return erpCodeGroup;
|
||||
}
|
||||
|
||||
public void setErpCodeGroup(String erpCodeGroup) {
|
||||
this.erpCodeGroup = erpCodeGroup;
|
||||
}
|
||||
|
||||
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 SEQUENCE = "SEQUENCE";
|
||||
|
||||
public static final String DATA_FIELD_BO = "DATA_FIELD_BO";
|
||||
|
||||
public static final String DATA_VALUE = "DATA_VALUE";
|
||||
|
||||
public static final String IS_DEFAULT = "IS_DEFAULT";
|
||||
|
||||
public static final String VALUATION = "VALUATION";
|
||||
|
||||
public static final String ERP_CODE_GROUP = "ERP_CODE_GROUP";
|
||||
|
||||
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 "DataFieldList{" +
|
||||
"handle = " + handle +
|
||||
", sequence = " + sequence +
|
||||
", dataFieldBo = " + dataFieldBo +
|
||||
", dataValue = " + dataValue +
|
||||
", isDefault = " + isDefault +
|
||||
", valuation = " + valuation +
|
||||
", erpCodeGroup = " + erpCodeGroup +
|
||||
", 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.DataFieldList;
|
||||
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-29
|
||||
*/
|
||||
public interface DataFieldListService extends IService<DataFieldList> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<DataFieldList> selectPage(FrontPage<DataFieldList> frontPage, DataFieldList dataFieldList);
|
||||
|
||||
List<DataFieldList> selectList(DataFieldList dataFieldList);
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.foreverwin.mesnac.meapi.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.foreverwin.mesnac.meapi.model.DataField;
|
||||
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-29
|
||||
*/
|
||||
public interface DataFieldService extends IService<DataField> {
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
* @param frontPage
|
||||
* @return
|
||||
*/
|
||||
IPage<DataField> selectPage(FrontPage<DataField> frontPage, DataField dataField);
|
||||
|
||||
List<DataField> selectList(DataField dataField);
|
||||
}
|
@ -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.DataFieldList;
|
||||
import com.foreverwin.mesnac.meapi.mapper.DataFieldListMapper;
|
||||
import com.foreverwin.mesnac.meapi.service.DataFieldListService;
|
||||
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-29
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DataFieldListServiceImpl extends ServiceImpl<DataFieldListMapper, DataFieldList> implements DataFieldListService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private DataFieldListMapper dataFieldListMapper;
|
||||
|
||||
@Override
|
||||
public IPage<DataFieldList> selectPage(FrontPage<DataFieldList> frontPage, DataFieldList dataFieldList) {
|
||||
QueryWrapper<DataFieldList> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(dataFieldList);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataFieldList> selectList(DataFieldList dataFieldList) {
|
||||
QueryWrapper<DataFieldList> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(dataFieldList);
|
||||
return super.list(queryWrapper);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -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.DataField;
|
||||
import com.foreverwin.mesnac.meapi.mapper.DataFieldMapper;
|
||||
import com.foreverwin.mesnac.meapi.service.DataFieldService;
|
||||
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-29
|
||||
*/
|
||||
@Service
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public class DataFieldServiceImpl extends ServiceImpl<DataFieldMapper, DataField> implements DataFieldService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private DataFieldMapper dataFieldMapper;
|
||||
|
||||
@Override
|
||||
public IPage<DataField> selectPage(FrontPage<DataField> frontPage, DataField dataField) {
|
||||
QueryWrapper<DataField> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(dataField);
|
||||
return super.page(frontPage.getPagePlus(), queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DataField> selectList(DataField dataField) {
|
||||
QueryWrapper<DataField> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.setEntity(dataField);
|
||||
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.DataFieldListMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.DataFieldList">
|
||||
<result column="HANDLE" property="handle" />
|
||||
<result column="SEQUENCE" property="sequence" />
|
||||
<result column="DATA_FIELD_BO" property="dataFieldBo" />
|
||||
<result column="DATA_VALUE" property="dataValue" />
|
||||
<result column="IS_DEFAULT" property="isDefault" />
|
||||
<result column="VALUATION" property="valuation" />
|
||||
<result column="ERP_CODE_GROUP" property="erpCodeGroup" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, SEQUENCE, DATA_FIELD_BO, DATA_VALUE, IS_DEFAULT, VALUATION, ERP_CODE_GROUP, CREATED_DATE_TIME, MODIFIED_DATE_TIME
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM DATA_FIELD_LIST
|
||||
<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 DATA_FIELD_LIST
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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 DATA_FIELD_LIST
|
||||
<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.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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 DATA_FIELD_LIST
|
||||
<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.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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 DATA_FIELD_LIST
|
||||
<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.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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 DATA_FIELD_LIST
|
||||
<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.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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 DATA_FIELD_LIST
|
||||
<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.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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 DATA_FIELD_LIST
|
||||
<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.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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.DataFieldList">
|
||||
INSERT INTO DATA_FIELD_LIST
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="sequence!=null">SEQUENCE,</if>
|
||||
<if test="dataFieldBo!=null">DATA_FIELD_BO,</if>
|
||||
<if test="dataValue!=null">DATA_VALUE,</if>
|
||||
<if test="isDefault!=null">IS_DEFAULT,</if>
|
||||
<if test="valuation!=null">VALUATION,</if>
|
||||
<if test="erpCodeGroup!=null">ERP_CODE_GROUP,</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="sequence!=null">#{sequence},</if>
|
||||
<if test="dataFieldBo!=null">#{dataFieldBo},</if>
|
||||
<if test="dataValue!=null">#{dataValue},</if>
|
||||
<if test="isDefault!=null">#{isDefault},</if>
|
||||
<if test="valuation!=null">#{valuation},</if>
|
||||
<if test="erpCodeGroup!=null">#{erpCodeGroup},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.DataFieldList">
|
||||
INSERT INTO DATA_FIELD_LIST
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{sequence},
|
||||
#{dataFieldBo},
|
||||
#{dataValue},
|
||||
#{isDefault},
|
||||
#{valuation},
|
||||
#{erpCodeGroup},
|
||||
#{createdDateTime},
|
||||
#{modifiedDateTime},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE DATA_FIELD_LIST <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||||
<if test="et.sequence!=null">SEQUENCE=#{et.sequence},</if>
|
||||
<if test="et.dataFieldBo!=null">DATA_FIELD_BO=#{et.dataFieldBo},</if>
|
||||
<if test="et.dataValue!=null">DATA_VALUE=#{et.dataValue},</if>
|
||||
<if test="et.isDefault!=null">IS_DEFAULT=#{et.isDefault},</if>
|
||||
<if test="et.valuation!=null">VALUATION=#{et.valuation},</if>
|
||||
<if test="et.erpCodeGroup!=null">ERP_CODE_GROUP=#{et.erpCodeGroup},</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.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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 DATA_FIELD_LIST
|
||||
<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 DATA_FIELD_LIST
|
||||
<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.sequence!=null"> AND SEQUENCE=#{ew.entity.sequence}</if>
|
||||
<if test="ew.entity.dataFieldBo!=null"> AND DATA_FIELD_BO=#{ew.entity.dataFieldBo}</if>
|
||||
<if test="ew.entity.dataValue!=null"> AND DATA_VALUE=#{ew.entity.dataValue}</if>
|
||||
<if test="ew.entity.isDefault!=null"> AND IS_DEFAULT=#{ew.entity.isDefault}</if>
|
||||
<if test="ew.entity.valuation!=null"> AND VALUATION=#{ew.entity.valuation}</if>
|
||||
<if test="ew.entity.erpCodeGroup!=null"> AND ERP_CODE_GROUP=#{ew.entity.erpCodeGroup}</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>
|
@ -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.DataFieldMapper">
|
||||
|
||||
<!-- 通用查询映射结果 -->
|
||||
<resultMap id="BaseResultMap" type="com.foreverwin.mesnac.meapi.model.DataField">
|
||||
<result column="HANDLE" property="handle" />
|
||||
<result column="DATA_TYPE_BO" property="dataTypeBo" />
|
||||
<result column="DATA_FIELD" property="dataField" />
|
||||
<result column="FIELD_TYPE" property="fieldType" />
|
||||
<result column="VALIDATION_TYPE" property="validationType" />
|
||||
<result column="DATA_DEFAULT" property="dataDefault" />
|
||||
<result column="SITE" property="site" />
|
||||
<result column="BROWSE_ACTIVITY_BO" property="browseActivityBo" />
|
||||
<result column="IS_BROWSE" property="isBrowse" />
|
||||
<result column="IS_ERP" property="isErp" />
|
||||
<result column="MASK_GROUP_BO" property="maskGroupBo" />
|
||||
<result column="DESCRIPTION" property="description" />
|
||||
<result column="VALIDATION_ACTIVITY_BO" property="validationActivityBo" />
|
||||
<result column="CREATED_DATE_TIME" property="createdDateTime" />
|
||||
<result column="MODIFIED_DATE_TIME" property="modifiedDateTime" />
|
||||
<result column="CATEGORY" property="category" />
|
||||
</resultMap>
|
||||
|
||||
<!-- 通用查询结果列 -->
|
||||
<sql id="Base_Column_List">
|
||||
HANDLE, DATA_TYPE_BO, DATA_FIELD, FIELD_TYPE, VALIDATION_TYPE, DATA_DEFAULT, SITE, BROWSE_ACTIVITY_BO, IS_BROWSE, IS_ERP, MASK_GROUP_BO, DESCRIPTION, VALIDATION_ACTIVITY_BO, CREATED_DATE_TIME, MODIFIED_DATE_TIME, CATEGORY
|
||||
</sql>
|
||||
|
||||
<!-- BaseMapper标准查询/修改/删除 -->
|
||||
|
||||
<select id="selectByMap" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List"></include>
|
||||
FROM DATA_FIELD
|
||||
<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 DATA_FIELD
|
||||
<where>
|
||||
<if test="ew.entity.handle!=null">
|
||||
HANDLE=#{ew.handle}
|
||||
</if>
|
||||
<if test="ew.entity.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCount" resultType="Integer">
|
||||
SELECT COUNT(1) FROM DATA_FIELD
|
||||
<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.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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 DATA_FIELD
|
||||
<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.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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 DATA_FIELD
|
||||
<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.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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 DATA_FIELD
|
||||
<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.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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 DATA_FIELD
|
||||
<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.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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 DATA_FIELD
|
||||
<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.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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.DataField">
|
||||
INSERT INTO DATA_FIELD
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
HANDLE,
|
||||
<if test="dataTypeBo!=null">DATA_TYPE_BO,</if>
|
||||
<if test="dataField!=null">DATA_FIELD,</if>
|
||||
<if test="fieldType!=null">FIELD_TYPE,</if>
|
||||
<if test="validationType!=null">VALIDATION_TYPE,</if>
|
||||
<if test="dataDefault!=null">DATA_DEFAULT,</if>
|
||||
<if test="site!=null">SITE,</if>
|
||||
<if test="browseActivityBo!=null">BROWSE_ACTIVITY_BO,</if>
|
||||
<if test="isBrowse!=null">IS_BROWSE,</if>
|
||||
<if test="isErp!=null">IS_ERP,</if>
|
||||
<if test="maskGroupBo!=null">MASK_GROUP_BO,</if>
|
||||
<if test="description!=null">DESCRIPTION,</if>
|
||||
<if test="validationActivityBo!=null">VALIDATION_ACTIVITY_BO,</if>
|
||||
<if test="createdDateTime!=null">CREATED_DATE_TIME,</if>
|
||||
<if test="modifiedDateTime!=null">MODIFIED_DATE_TIME,</if>
|
||||
<if test="category!=null">CATEGORY,</if>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
<if test="dataTypeBo!=null">#{dataTypeBo},</if>
|
||||
<if test="dataField!=null">#{dataField},</if>
|
||||
<if test="fieldType!=null">#{fieldType},</if>
|
||||
<if test="validationType!=null">#{validationType},</if>
|
||||
<if test="dataDefault!=null">#{dataDefault},</if>
|
||||
<if test="site!=null">#{site},</if>
|
||||
<if test="browseActivityBo!=null">#{browseActivityBo},</if>
|
||||
<if test="isBrowse!=null">#{isBrowse},</if>
|
||||
<if test="isErp!=null">#{isErp},</if>
|
||||
<if test="maskGroupBo!=null">#{maskGroupBo},</if>
|
||||
<if test="description!=null">#{description},</if>
|
||||
<if test="validationActivityBo!=null">#{validationActivityBo},</if>
|
||||
<if test="createdDateTime!=null">#{createdDateTime},</if>
|
||||
<if test="modifiedDateTime!=null">#{modifiedDateTime},</if>
|
||||
<if test="category!=null">#{category},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<insert id="insertAllColumn" parameterType="com.foreverwin.mesnac.meapi.model.DataField">
|
||||
INSERT INTO DATA_FIELD
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<include refid="Base_Column_List"></include>
|
||||
</trim> VALUES
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
#{handle},
|
||||
#{dataTypeBo},
|
||||
#{dataField},
|
||||
#{fieldType},
|
||||
#{validationType},
|
||||
#{dataDefault},
|
||||
#{site},
|
||||
#{browseActivityBo},
|
||||
#{isBrowse},
|
||||
#{isErp},
|
||||
#{maskGroupBo},
|
||||
#{description},
|
||||
#{validationActivityBo},
|
||||
#{createdDateTime},
|
||||
#{modifiedDateTime},
|
||||
#{category},
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<update id="update">
|
||||
UPDATE DATA_FIELD <trim prefix="SET" suffixOverrides=",">
|
||||
<if test="et.handle!=null">HANDLE=#{et.handle},</if>
|
||||
<if test="et.dataTypeBo!=null">DATA_TYPE_BO=#{et.dataTypeBo},</if>
|
||||
<if test="et.dataField!=null">DATA_FIELD=#{et.dataField},</if>
|
||||
<if test="et.fieldType!=null">FIELD_TYPE=#{et.fieldType},</if>
|
||||
<if test="et.validationType!=null">VALIDATION_TYPE=#{et.validationType},</if>
|
||||
<if test="et.dataDefault!=null">DATA_DEFAULT=#{et.dataDefault},</if>
|
||||
<if test="et.site!=null">SITE=#{et.site},</if>
|
||||
<if test="et.browseActivityBo!=null">BROWSE_ACTIVITY_BO=#{et.browseActivityBo},</if>
|
||||
<if test="et.isBrowse!=null">IS_BROWSE=#{et.isBrowse},</if>
|
||||
<if test="et.isErp!=null">IS_ERP=#{et.isErp},</if>
|
||||
<if test="et.maskGroupBo!=null">MASK_GROUP_BO=#{et.maskGroupBo},</if>
|
||||
<if test="et.description!=null">DESCRIPTION=#{et.description},</if>
|
||||
<if test="et.validationActivityBo!=null">VALIDATION_ACTIVITY_BO=#{et.validationActivityBo},</if>
|
||||
<if test="et.createdDateTime!=null">CREATED_DATE_TIME=#{et.createdDateTime},</if>
|
||||
<if test="et.modifiedDateTime!=null">MODIFIED_DATE_TIME=#{et.modifiedDateTime},</if>
|
||||
<if test="et.category!=null">CATEGORY=#{et.category},</if>
|
||||
</trim>
|
||||
<where>
|
||||
<if test="ew!=null">
|
||||
<if test="ew.entity!=null">
|
||||
HANDLE=#{ew.entity.handle}
|
||||
<if test="ew.entity.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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 DATA_FIELD
|
||||
<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 DATA_FIELD
|
||||
<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.dataTypeBo!=null"> AND DATA_TYPE_BO=#{ew.entity.dataTypeBo}</if>
|
||||
<if test="ew.entity.dataField!=null"> AND DATA_FIELD=#{ew.entity.dataField}</if>
|
||||
<if test="ew.entity.fieldType!=null"> AND FIELD_TYPE=#{ew.entity.fieldType}</if>
|
||||
<if test="ew.entity.validationType!=null"> AND VALIDATION_TYPE=#{ew.entity.validationType}</if>
|
||||
<if test="ew.entity.dataDefault!=null"> AND DATA_DEFAULT=#{ew.entity.dataDefault}</if>
|
||||
<if test="ew.entity.site!=null"> AND SITE=#{ew.entity.site}</if>
|
||||
<if test="ew.entity.browseActivityBo!=null"> AND BROWSE_ACTIVITY_BO=#{ew.entity.browseActivityBo}</if>
|
||||
<if test="ew.entity.isBrowse!=null"> AND IS_BROWSE=#{ew.entity.isBrowse}</if>
|
||||
<if test="ew.entity.isErp!=null"> AND IS_ERP=#{ew.entity.isErp}</if>
|
||||
<if test="ew.entity.maskGroupBo!=null"> AND MASK_GROUP_BO=#{ew.entity.maskGroupBo}</if>
|
||||
<if test="ew.entity.description!=null"> AND DESCRIPTION=#{ew.entity.description}</if>
|
||||
<if test="ew.entity.validationActivityBo!=null"> AND VALIDATION_ACTIVITY_BO=#{ew.entity.validationActivityBo}</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 test="ew.entity.category!=null"> AND CATEGORY=#{ew.entity.category}</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…
Reference in New Issue