diff --git a/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java b/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java new file mode 100644 index 00000000..96f9c8b3 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/controller/IndicatorLibraryController.java @@ -0,0 +1,60 @@ +package com.lz.modules.performance.controller; + + +import com.alibaba.fastjson.JSONObject; +import com.lz.common.utils.PageUtils; +import com.lz.common.utils.R; +import com.lz.common.utils.StringUtil; +import com.lz.modules.performance.entity.IndicatorLibrary; +import com.lz.modules.performance.service.IndicatorLibraryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.HashMap; +import java.util.Map; + +@RestController +@RequestMapping("/indicatorLibrary") +public class IndicatorLibraryController { + + + @Autowired + private IndicatorLibraryService indicatorLibraryService; + + + @RequestMapping("/list") + public R list(@RequestBody String body) { + indicatorLibraryService.list(); + return R.ok().put("data",null); + } + + + @RequestMapping("/getById") + public R getById(@RequestBody IndicatorLibrary indicatorLibrary) { + indicatorLibrary = indicatorLibraryService.selectIndicatorLibraryById(indicatorLibrary.getId()); + return R.ok().put("indicatorLibrary",indicatorLibrary); + } + + + @RequestMapping("/update") + public R update(@RequestBody IndicatorLibrary indicatorLibrary) { + indicatorLibraryService.updateIndicatorLibraryById(indicatorLibrary); + return R.ok(); + } + + + @RequestMapping("/save") + public R save(@RequestBody IndicatorLibrary indicatorLibrary) { + indicatorLibraryService.insertIndicatorLibrary(indicatorLibrary); + return R.ok(); + } + + + @RequestMapping("/delete") + public R delete(@RequestBody Long id) { + indicatorLibraryService.deleteIndicatorLibraryById(id); + return R.ok(); + } +} diff --git a/src/main/java/com/lz/modules/performance/controller/IndicatorTypeController.java b/src/main/java/com/lz/modules/performance/controller/IndicatorTypeController.java new file mode 100644 index 00000000..9cb1d485 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/controller/IndicatorTypeController.java @@ -0,0 +1,43 @@ +package com.lz.modules.performance.controller; + + +import cn.hutool.core.bean.BeanUtil; +import com.lz.common.utils.PageUtils; +import com.lz.common.utils.R; +import com.lz.modules.performance.dto.IndicatorTypeDto; +import com.lz.modules.performance.entity.IndicatorType; +import com.lz.modules.performance.req.IndicatorReq; +import com.lz.modules.performance.service.IndicatorTypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/indicatorType") +public class IndicatorTypeController { + + + @Autowired + private IndicatorTypeService indicatorTypeService; + + + @RequestMapping("/list") + public R list(@RequestBody IndicatorReq req) { + PageUtils page = indicatorTypeService.selectIndicatorTypesByReq(req); + return R.ok().put("data", page); + } + + + + @RequestMapping("/saveOrUpdate") + public R save(@RequestBody IndicatorTypeDto dto) { + IndicatorType indicatorType = new IndicatorType(); + BeanUtil.copyProperties(dto,indicatorType); + boolean success = indicatorTypeService.saveOrUpdate(indicatorType); + if(!success){ + return R.error(); + } + return R.ok(); + } +} diff --git a/src/main/java/com/lz/modules/performance/dao/IndicatorLibraryMapper.java b/src/main/java/com/lz/modules/performance/dao/IndicatorLibraryMapper.java new file mode 100644 index 00000000..a5da8dd3 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/dao/IndicatorLibraryMapper.java @@ -0,0 +1,33 @@ +package com.lz.modules.performance.dao; +/** +*

+* (设置)指标库 服务类 +*

+* +* @author quyixiao +* @since 2021-01-12 +*/ +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.lz.modules.performance.entity.IndicatorLibrary; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +@Mapper +public interface IndicatorLibraryMapper extends BaseMapper { + + + IndicatorLibrary selectIndicatorLibraryById(@Param("id") Long id); + + + Long insertIndicatorLibrary(IndicatorLibrary indicatorLibrary); + + + int updateIndicatorLibraryById(IndicatorLibrary indicatorLibrary); + + + int updateCoverIndicatorLibraryById(IndicatorLibrary indicatorLibrary); + + + int deleteIndicatorLibraryById(@Param("id") Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/performance/dao/IndicatorTypeMapper.java b/src/main/java/com/lz/modules/performance/dao/IndicatorTypeMapper.java new file mode 100644 index 00000000..cec45492 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/dao/IndicatorTypeMapper.java @@ -0,0 +1,43 @@ +package com.lz.modules.performance.dao; +/** +*

+* 指标分类 服务类 +*

+* +* @author quyixiao +* @since 2021-01-12 +*/ +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.lz.modules.equipment.entity.TCountReq; +import com.lz.modules.performance.dto.IndicatorTypeDto; +import com.lz.modules.performance.entity.IndicatorType; +import com.lz.modules.performance.req.IndicatorReq; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface IndicatorTypeMapper extends BaseMapper { + + + IndicatorType selectIndicatorTypeById(@Param("id") Long id); + + + Long insertIndicatorType(IndicatorType indicatorType); + + + int updateIndicatorTypeById(IndicatorType indicatorType); + + + int updateCoverIndicatorTypeById(IndicatorType indicatorType); + + + int deleteIndicatorTypeById(@Param("id") Long id); + + List selectIndicatorTypesByReq(@Param("page") IPage page, @Param("req")IndicatorReq req); + + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/performance/dto/IndicatorTypeDto.java b/src/main/java/com/lz/modules/performance/dto/IndicatorTypeDto.java new file mode 100644 index 00000000..04af7299 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/dto/IndicatorTypeDto.java @@ -0,0 +1,22 @@ +package com.lz.modules.performance.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author: djc + * @Desc: + * @Date: 2021/1/12 10:21 + */ +@Data +public class IndicatorTypeDto { + + @ApiModelProperty(value = "id", name = "id") + private Long id; + //指标名称 + @ApiModelProperty(value = "指标分类名称", name = "name") + private String name; + //排序 + @ApiModelProperty(value = "排序(非必传)", name = "orderBy") + private Integer orderBy; +} diff --git a/src/main/java/com/lz/modules/performance/entity/IndicatorLibrary.java b/src/main/java/com/lz/modules/performance/entity/IndicatorLibrary.java new file mode 100644 index 00000000..e99603ad --- /dev/null +++ b/src/main/java/com/lz/modules/performance/entity/IndicatorLibrary.java @@ -0,0 +1,217 @@ +package com.lz.modules.performance.entity; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +/** +*

+*

*(设置)指标库 +* @author quyixiao +* @since 2021-01-12 +*/ + +@Data +@TableName("lz_indicator_library") +@ApiModel(value = "(设置)指标库") +public class IndicatorLibrary implements java.io.Serializable { + // + @TableId(value = "id", type = IdType.AUTO) + private Long id; + // + @ApiModelProperty(value = "", name = "isDelete") + private Integer isDelete; + // + @ApiModelProperty(value = "", name = "gmtCreate") + private Date gmtCreate; + // + @ApiModelProperty(value = "", name = "gmtModified") + private Date gmtModified; + //指标名称 + @ApiModelProperty(value = "指标名称", name = "name") + private String name; + //指标类型 0:量化指标 1:行为价值观指标 2:团队管理 + @ApiModelProperty(value = "指标类型 0:量化指标 1:行为价值观指标 2:团队管理", name = "type") + private Integer type; + //指标分类 lz_indicator_type 表id + @ApiModelProperty(value = "指标分类 lz_indicator_type 表id", name = "indicatorType") + private Integer indicatorType; + //权重 + @ApiModelProperty(value = "权重", name = "weight") + private BigDecimal weight; + //考核标准,关键结果 + @ApiModelProperty(value = "考核标准,关键结果", name = "keyResult") + private String keyResult; + //排序 + @ApiModelProperty(value = "排序", name = "sort") + private Integer sort; + /** + * + * @return + */ + public Long getId() { + return id; + } + /** + * + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * + * @return + */ + public Integer getIsDelete() { + return isDelete; + } + /** + * + * @param isDelete + */ + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + /** + * + * @return + */ + public Date getGmtCreate() { + return gmtCreate; + } + /** + * + * @param gmtCreate + */ + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + /** + * + * @return + */ + public Date getGmtModified() { + return gmtModified; + } + /** + * + * @param gmtModified + */ + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + /** + * 指标名称 + * @return + */ + public String getName() { + return name; + } + /** + * 指标名称 + * @param name + */ + public void setName(String name) { + this.name = name; + } + + /** + * 指标类型 0:量化指标 1:行为价值观指标 2:团队管理 + * @return + */ + public Integer getType() { + return type; + } + /** + * 指标类型 0:量化指标 1:行为价值观指标 2:团队管理 + * @param type + */ + public void setType(Integer type) { + this.type = type; + } + + /** + * 指标分类 lz_indicator_type 表id + * @return + */ + public Integer getIndicatorType() { + return indicatorType; + } + /** + * 指标分类 lz_indicator_type 表id + * @param indicatorType + */ + public void setIndicatorType(Integer indicatorType) { + this.indicatorType = indicatorType; + } + + /** + * 权重 + * @return + */ + public BigDecimal getWeight() { + return weight; + } + /** + * 权重 + * @param weight + */ + public void setWeight(BigDecimal weight) { + this.weight = weight; + } + + /** + * 考核标准,关键结果 + * @return + */ + public String getKeyResult() { + return keyResult; + } + /** + * 考核标准,关键结果 + * @param keyResult + */ + public void setKeyResult(String keyResult) { + this.keyResult = keyResult; + } + + /** + * 排序 + * @return + */ + public Integer getSort() { + return sort; + } + /** + * 排序 + * @param sort + */ + public void setSort(Integer sort) { + this.sort = sort; + } + + @Override + public String toString() { + return "IndicatorLibrary{" + + ",id=" + id + + ",isDelete=" + isDelete + + ",gmtCreate=" + gmtCreate + + ",gmtModified=" + gmtModified + + ",name=" + name + + ",type=" + type + + ",indicatorType=" + indicatorType + + ",weight=" + weight + + ",keyResult=" + keyResult + + ",sort=" + sort + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/performance/entity/IndicatorType.java b/src/main/java/com/lz/modules/performance/entity/IndicatorType.java new file mode 100644 index 00000000..f1956664 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/entity/IndicatorType.java @@ -0,0 +1,158 @@ +package com.lz.modules.performance.entity; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.annotation.IdType; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import java.util.Date; +/** +*

+*

*指标分类 +* @author quyixiao +* @since 2021-01-12 +*/ + +@Data +@TableName("lz_indicator_type") +@ApiModel(value = "指标分类") +public class IndicatorType implements java.io.Serializable { + // + @TableId(value = "id", type = IdType.AUTO) + private Long id; + // + @ApiModelProperty(value = "", name = "isDelete") + private Integer isDelete; + // + @ApiModelProperty(value = "", name = "gmtCreate") + private Date gmtCreate; + // + @ApiModelProperty(value = "", name = "gmtModified") + private Date gmtModified; + //指标分类名称 + @ApiModelProperty(value = "指标分类名称", name = "name") + private String name; + //0: 指标分类 1:指标类型 + @ApiModelProperty(value = "0: 指标分类 1:指标类型", name = "type") + private Integer type; + //排序 + @ApiModelProperty(value = "排序", name = "sort") + private Integer sort; + /** + * + * @return + */ + public Long getId() { + return id; + } + /** + * + * @param id + */ + public void setId(Long id) { + this.id = id; + } + + /** + * + * @return + */ + public Integer getIsDelete() { + return isDelete; + } + /** + * + * @param isDelete + */ + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + /** + * + * @return + */ + public Date getGmtCreate() { + return gmtCreate; + } + /** + * + * @param gmtCreate + */ + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + /** + * + * @return + */ + public Date getGmtModified() { + return gmtModified; + } + /** + * + * @param gmtModified + */ + public void setGmtModified(Date gmtModified) { + this.gmtModified = gmtModified; + } + + /** + * 指标分类名称 + * @return + */ + public String getName() { + return name; + } + /** + * 指标分类名称 + * @param name + */ + public void setName(String name) { + this.name = name; + } + + /** + * 0: 指标分类 1:指标类型 + * @return + */ + public Integer getType() { + return type; + } + /** + * 0: 指标分类 1:指标类型 + * @param type + */ + public void setType(Integer type) { + this.type = type; + } + + /** + * 排序 + * @return + */ + public Integer getSort() { + return sort; + } + /** + * 排序 + * @param sort + */ + public void setSort(Integer sort) { + this.sort = sort; + } + + @Override + public String toString() { + return "IndicatorType{" + + ",id=" + id + + ",isDelete=" + isDelete + + ",gmtCreate=" + gmtCreate + + ",gmtModified=" + gmtModified + + ",name=" + name + + ",type=" + type + + ",sort=" + sort + + "}"; + } +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/performance/req/IndicatorReq.java b/src/main/java/com/lz/modules/performance/req/IndicatorReq.java new file mode 100644 index 00000000..a53b6e3b --- /dev/null +++ b/src/main/java/com/lz/modules/performance/req/IndicatorReq.java @@ -0,0 +1,20 @@ +package com.lz.modules.performance.req; + +import com.lz.modules.equipment.entity.model.BasePage; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @Author: djc + * @Desc: + * @Date: 2021/1/12 11:39 + */ +@Data +public class IndicatorReq extends BasePage{ + //指标名称 + @ApiModelProperty(value = "指标分类名称", name = "name") + private String name; + //指标名称 + @ApiModelProperty(value = "类型 0: 指标分类 1:指标类型", name = "type") + private Integer type; +} diff --git a/src/main/java/com/lz/modules/performance/service/IndicatorLibraryService.java b/src/main/java/com/lz/modules/performance/service/IndicatorLibraryService.java new file mode 100644 index 00000000..582fa04e --- /dev/null +++ b/src/main/java/com/lz/modules/performance/service/IndicatorLibraryService.java @@ -0,0 +1,33 @@ +package com.lz.modules.performance.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.lz.modules.performance.entity.IndicatorLibrary; + +/** +*

+* (设置)指标库 服务类 +*

+* +* @author quyixiao +* @since 2021-01-12 +*/ +public interface IndicatorLibraryService extends IService { + + + + IndicatorLibrary selectIndicatorLibraryById(Long id); + + + Long insertIndicatorLibrary(IndicatorLibrary indicatorLibrary); + + + int updateIndicatorLibraryById(IndicatorLibrary indicatorLibrary); + + + int updateCoverIndicatorLibraryById(IndicatorLibrary indicatorLibrary); + + + int deleteIndicatorLibraryById(Long id); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/performance/service/IndicatorTypeService.java b/src/main/java/com/lz/modules/performance/service/IndicatorTypeService.java new file mode 100644 index 00000000..84705fb3 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/service/IndicatorTypeService.java @@ -0,0 +1,37 @@ +package com.lz.modules.performance.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.lz.common.utils.PageUtils; +import com.lz.modules.performance.req.IndicatorReq; +import com.lz.modules.performance.entity.IndicatorType; + +/** +*

+* 指标分类 服务类 +*

+* +* @author quyixiao +* @since 2021-01-12 +*/ +public interface IndicatorTypeService extends IService { + + + + IndicatorType selectIndicatorTypeById(Long id); + + + Long insertIndicatorType(IndicatorType indicatorType); + + + int updateIndicatorTypeById(IndicatorType indicatorType); + + + int updateCoverIndicatorTypeById(IndicatorType indicatorType); + + + int deleteIndicatorTypeById(Long id); + + PageUtils selectIndicatorTypesByReq(IndicatorReq req); + + +} \ No newline at end of file diff --git a/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java new file mode 100644 index 00000000..c4edd633 --- /dev/null +++ b/src/main/java/com/lz/modules/performance/service/impl/IndicatorLibraryServiceImpl.java @@ -0,0 +1,63 @@ +package com.lz.modules.performance.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lz.modules.performance.dao.IndicatorLibraryMapper; +import com.lz.modules.performance.entity.IndicatorLibrary; +import com.lz.modules.performance.service.IndicatorLibraryService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** +*

+* (设置)指标库 服务类 +*

+* +* @author quyixiao +* @since 2021-01-12 +*/ + +@Service +public class IndicatorLibraryServiceImpl extends ServiceImpl implements IndicatorLibraryService { + + + @Autowired + private IndicatorLibraryMapper indicatorLibraryMapper; + + + + @Override + public IndicatorLibrary selectIndicatorLibraryById(Long id){ + return indicatorLibraryMapper.selectIndicatorLibraryById(id); + } + + + + @Override + public Long insertIndicatorLibrary(IndicatorLibrary indicatorLibrary){ + return indicatorLibraryMapper.insertIndicatorLibrary(indicatorLibrary); + } + + + + @Override + public int updateIndicatorLibraryById(IndicatorLibrary indicatorLibrary){ + return indicatorLibraryMapper.updateIndicatorLibraryById(indicatorLibrary); + } + + + + @Override + public int updateCoverIndicatorLibraryById(IndicatorLibrary indicatorLibrary){ + return indicatorLibraryMapper.updateCoverIndicatorLibraryById(indicatorLibrary); + } + + + + @Override + public int deleteIndicatorLibraryById(Long id){ + return indicatorLibraryMapper.deleteIndicatorLibraryById(id); + } + + + +} diff --git a/src/main/java/com/lz/modules/performance/service/impl/IndicatorTypeServiceImpl.java b/src/main/java/com/lz/modules/performance/service/impl/IndicatorTypeServiceImpl.java new file mode 100644 index 00000000..d1e7663e --- /dev/null +++ b/src/main/java/com/lz/modules/performance/service/impl/IndicatorTypeServiceImpl.java @@ -0,0 +1,71 @@ +package com.lz.modules.performance.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.lz.common.utils.PageUtils; +import com.lz.modules.performance.dao.IndicatorTypeMapper; +import com.lz.modules.performance.req.IndicatorReq; +import com.lz.modules.performance.entity.IndicatorType; +import com.lz.modules.performance.service.IndicatorTypeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +/** +*

+* 指标分类 服务类 +*

+* +* @author quyixiao +* @since 2021-01-12 +*/ + +@Service +public class IndicatorTypeServiceImpl extends ServiceImpl implements IndicatorTypeService { + + + @Autowired + private IndicatorTypeMapper indicatorTypeMapper; + + + + @Override + public IndicatorType selectIndicatorTypeById(Long id){ + return indicatorTypeMapper.selectIndicatorTypeById(id); + } + + + + @Override + public Long insertIndicatorType(IndicatorType indicatorType){ + return indicatorTypeMapper.insertIndicatorType(indicatorType); + } + + + + @Override + public int updateIndicatorTypeById(IndicatorType indicatorType){ + return indicatorTypeMapper.updateIndicatorTypeById(indicatorType); + } + + + + @Override + public int updateCoverIndicatorTypeById(IndicatorType indicatorType){ + return indicatorTypeMapper.updateCoverIndicatorTypeById(indicatorType); + } + + + + @Override + public int deleteIndicatorTypeById(Long id){ + return indicatorTypeMapper.deleteIndicatorTypeById(id); + } + + @Override + public PageUtils selectIndicatorTypesByReq(IndicatorReq req) { + + PageUtils page = PageUtils.startPage(req.getCurrPage(), req.getPageSize()).doSelect( + page1 -> indicatorTypeMapper.selectIndicatorTypesByReq(page1,req) + ); + return page; + } +} diff --git a/src/main/resources/mapper/performance/IndicatorLibraryMapper.xml b/src/main/resources/mapper/performance/IndicatorLibraryMapper.xml new file mode 100644 index 00000000..368d6e20 --- /dev/null +++ b/src/main/resources/mapper/performance/IndicatorLibraryMapper.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, type AS type, indicator_type AS indicatorType, weight AS weight, key_result AS keyResult, sort AS sort + + + + + + + + + + insert into lz_indicator_library( + name, + type, + indicator_type, + weight, + key_result, + sort, + is_delete, + gmt_create, + gmt_modified + )values( + #{ name}, + #{ type}, + #{ indicatorType}, + #{ weight}, + #{ keyResult}, + #{ sort}, + 0, + now(), + now() + ) + + + + + update + lz_indicator_library + + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + name = #{name}, + type = #{type}, + indicator_type = #{indicatorType}, + weight = #{weight}, + key_result = #{keyResult}, + sort = #{sort} + + ,gmt_modified = now() + where id = #{id} + + + + + update + lz_indicator_library + set + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + name = #{name}, + type = #{type}, + indicator_type = #{indicatorType}, + weight = #{weight}, + key_result = #{keyResult}, + sort = #{sort} + ,gmt_modified = now() + where id = #{id} + + + + update lz_indicator_library set is_delete = 1 where id=#{id} limit 1 + + + + diff --git a/src/main/resources/mapper/performance/IndicatorTypeMapper.xml b/src/main/resources/mapper/performance/IndicatorTypeMapper.xml new file mode 100644 index 00000000..ec89a785 --- /dev/null +++ b/src/main/resources/mapper/performance/IndicatorTypeMapper.xml @@ -0,0 +1,87 @@ + + + + + + + + + + + + + + + + + + + id AS id, is_delete AS isDelete, gmt_create AS gmtCreate, gmt_modified AS gmtModified, name AS name, type AS type, sort AS sort + + + + + + + + + + insert into lz_indicator_type( + name, + type, + sort, + is_delete, + gmt_create, + gmt_modified + )values( + #{ name}, + #{ type}, + #{ sort}, + 0, + now(), + now() + ) + + + + + update + lz_indicator_type + + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + name = #{name}, + type = #{type}, + sort = #{sort} + + ,gmt_modified = now() + where id = #{id} + + + + + update + lz_indicator_type + set + is_delete = #{isDelete}, + gmt_create = #{gmtCreate}, + name = #{name}, + type = #{type}, + sort = #{sort} + ,gmt_modified = now() + where id = #{id} + + + + + update lz_indicator_type set is_delete = 1 where id=#{id} limit 1 + + + + + + diff --git a/src/test/java/com/lz/mysql/MysqlMain.java b/src/test/java/com/lz/mysql/MysqlMain.java index bd526a42..ef71049e 100644 --- a/src/test/java/com/lz/mysql/MysqlMain.java +++ b/src/test/java/com/lz/mysql/MysqlMain.java @@ -85,8 +85,8 @@ public class MysqlMain { List list = new ArrayList(); - list.add(new TablesBean("lz_flow_chart_role")); - list.add(new TablesBean("lz_flow_chart_role_group")); + list.add(new TablesBean("lz_indicator_library")); + list.add(new TablesBean("lz_indicator_type")); List list2 = new ArrayList(); diff --git a/src/test/java/com/lz/mysql/MysqlUtilTable2Contoller.java b/src/test/java/com/lz/mysql/MysqlUtilTable2Contoller.java index 32fb9d06..328c88b8 100644 --- a/src/test/java/com/lz/mysql/MysqlUtilTable2Contoller.java +++ b/src/test/java/com/lz/mysql/MysqlUtilTable2Contoller.java @@ -46,7 +46,7 @@ public class MysqlUtilTable2Contoller { content.append(" if(StringUtil.isNotBlank(body)){\n"); content.append(" params = JSONObject.parseObject(body,Map.class);\n"); content.append(" }\n"); - content.append(" PageUtils page = " + tableBean.getJavaName() + "service.queryPage(params);\n"); + content.append(" PageUtils page = " + tableBean.getJavaName() + "Service.queryPage(params);\n"); content.append(" return R.ok().put(\"page\", page);\n"); content.append(" }\n"); content.append("\n");