Commit 41120ff7 by zhiwj

指标说明

parent d830f1ad
package com.gic.cloud.dto;
import java.io.Serializable;
import java.util.Date;
/**
* @author zhiwj
* @Description:
* @date 2020-07-23 16:21
*/
public class IndexDescDTO implements Serializable {
private static final long serialVersionUID = 9165568005916128353L;
/**
*
*/
private Integer indexDescId;
/**
* 模块id
*/
private String moduleId;
/**
* 指标名称
*/
private String indexName;
/**
* 指标code
*/
private String indexCode;
/**
* 分类名
*/
private String indexGroupName;
/**
*
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
private Integer enterpriseId;
private Integer sort;
private Integer updateTips;
private Integer indexRemark;
public Integer getIndexDescId() {
return indexDescId;
}
public void setIndexDescId(Integer indexDescId) {
this.indexDescId = indexDescId;
}
public String getModuleId() {
return moduleId;
}
public void setModuleId(String moduleId) {
this.moduleId = moduleId;
}
public String getIndexName() {
return indexName;
}
public void setIndexName(String indexName) {
this.indexName = indexName;
}
public String getIndexCode() {
return indexCode;
}
public void setIndexCode(String indexCode) {
this.indexCode = indexCode;
}
public String getIndexGroupName() {
return indexGroupName;
}
public void setIndexGroupName(String indexGroupName) {
this.indexGroupName = indexGroupName;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Integer getUpdateTips() {
return updateTips;
}
public void setUpdateTips(Integer updateTips) {
this.updateTips = updateTips;
}
public Integer getIndexRemark() {
return indexRemark;
}
public void setIndexRemark(Integer indexRemark) {
this.indexRemark = indexRemark;
}
}
package com.gic.cloud.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.IndexDescDTO;
import java.util.List;
import java.util.Map;
/**
* @author zhiwj
* @Description:
* @date 2020-07-23 14:50
*/
public interface IndexDescApiService {
/**
* 查询某个商户在某个模块下的指标
* @Title: listByEnterpriseAndModule
* @Description:
* @author zhiwj
* @param enterpriseId
* @param moduleId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse<Map<String, List<IndexDescDTO>>> listByEnterpriseAndModule(Integer enterpriseId, String moduleId);
/**
* @Title: listByEnterpriseAndModuleDetail
* @Description:
* @author zhiwj
* @param enterpriseId
* @param moduleId
* @return com.gic.api.base.commons.ServiceResponse<com.gic.cloud.dto.IndexEnterpriseGroupDTO>
* @throws
*/
ServiceResponse<Map<String, List<IndexDescDTO>>> listByEnterpriseAndModuleDetail(Integer enterpriseId, String moduleId, Integer userId);
/**
* 回收站中的指标
* @Title: listRecycle
* @Description:
* @author zhiwj
* @param enterpriseId
* @param moduleId
* @return com.gic.api.base.commons.ServiceResponse<com.gic.cloud.dto.IndexEnterpriseGroupDTO>
* @throws
*/
ServiceResponse<List<IndexDescDTO>> listRecycle(Integer enterpriseId, String moduleId);
/**
* 排序
* @Title: sortIndex
* @Description:
* @author zhiwj
* @param enterpriseId 商户id
* @param moduleId
* @param indexId 指标id
* @param seq 排到第几个
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse<Void> sortIndex(Integer enterpriseId, String moduleId, Integer indexId, Integer seq);
/**
* 移动到回收站
* @Title: moveToRecycle
* @Description:
* @author zhiwj
* @param enterpriseId
* @param moduleId
* @param indexId
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse<Void> moveToRecycle(Integer enterpriseId, String moduleId, Integer indexId);
}
package com.gic.cloud.dao.mapper;
import com.gic.cloud.entity.TabIndexDescEnterprise;
public interface TabIndexDescEnterpriseMapper {
/**
* 根据主键删除
*
* @param indexDescEnterpriseId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer indexDescEnterpriseId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabIndexDescEnterprise record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabIndexDescEnterprise record);
/**
* 根据主键查询
*
* @param indexDescEnterpriseId 主键
* @return 实体对象
*/
TabIndexDescEnterprise selectByPrimaryKey(Integer indexDescEnterpriseId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabIndexDescEnterprise record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabIndexDescEnterprise record);
}
\ No newline at end of file
package com.gic.cloud.dao.mapper;
import com.gic.cloud.dto.IndexDescDTO;
import com.gic.cloud.entity.TabIndexDesc;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface TabIndexDescMapper {
/**
* 根据主键删除
*
* @param indexDescId 主键
* @return 更新条目数
*/
int deleteByPrimaryKey(Integer indexDescId);
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insert(TabIndexDesc record);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int insertSelective(TabIndexDesc record);
/**
* 根据主键查询
*
* @param indexDescId 主键
* @return 实体对象
*/
TabIndexDesc selectByPrimaryKey(Integer indexDescId);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKeySelective(TabIndexDesc record);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int updateByPrimaryKey(TabIndexDesc record);
List<IndexDescDTO> listByEnterpriseAndModule(@Param("enterpriseId") Integer enterpriseId, @Param("moduleId") String moduleId);
List<IndexDescDTO> listByEnterpriseAndModuleDetail(@Param("enterpriseId") Integer enterpriseId, @Param("moduleId") String moduleId, @Param("userId") Integer userId);
}
\ No newline at end of file
package com.gic.cloud.entity;
import java.util.Date;
/**
* tab_index_desc
*/
public class TabIndexDesc {
/**
*
*/
private Integer indexDescId;
/**
* 模块id
*/
private String moduleId;
/**
* 指标名称
*/
private String indexName;
/**
* 指标code
*/
private String indexCode;
/**
* 分类名
*/
private String indexGroupName;
/**
*
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getIndexDescId() {
return indexDescId;
}
public void setIndexDescId(Integer indexDescId) {
this.indexDescId = indexDescId;
}
public String getModuleId() {
return moduleId;
}
public void setModuleId(String moduleId) {
this.moduleId = moduleId;
}
public String getIndexName() {
return indexName;
}
public void setIndexName(String indexName) {
this.indexName = indexName;
}
public String getIndexCode() {
return indexCode;
}
public void setIndexCode(String indexCode) {
this.indexCode = indexCode;
}
public String getIndexGroupName() {
return indexGroupName;
}
public void setIndexGroupName(String indexGroupName) {
this.indexGroupName = indexGroupName;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.cloud.entity;
import java.util.Date;
/**
* tab_index_desc_enterprise
*/
public class TabIndexDescEnterprise {
/**
*
*/
private Integer indexDescEnterpriseId;
/**
*
*/
private String indexCode;
/**
* 商户id
*/
private Integer enterpriseId;
/**
* 1正常 0在回收站
*/
private Integer indexStatus;
/**
* 排序
*/
private Integer sort;
/**
*
*/
private Integer status;
/**
*
*/
private Date createTime;
/**
*
*/
private Date updateTime;
public Integer getIndexDescEnterpriseId() {
return indexDescEnterpriseId;
}
public void setIndexDescEnterpriseId(Integer indexDescEnterpriseId) {
this.indexDescEnterpriseId = indexDescEnterpriseId;
}
public String getIndexCode() {
return indexCode;
}
public void setIndexCode(String indexCode) {
this.indexCode = indexCode;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
public Integer getIndexStatus() {
return indexStatus;
}
public void setIndexStatus(Integer indexStatus) {
this.indexStatus = indexStatus;
}
public Integer getSort() {
return sort;
}
public void setSort(Integer sort) {
this.sort = sort;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
package com.gic.cloud.service;
/**
* @author zhiwj
* @Description:
* @date 2020-07-23 16:46
*/
public interface IndexDescEnterpriseService {
}
package com.gic.cloud.service;
import com.gic.cloud.dto.IndexDescDTO;
import java.util.List;
/**
* @author zhiwj
* @Description:
* @date 2020-07-23 15:11
*/
public interface IndexDescService {
List<IndexDescDTO> listByEnterpriseAndModule(Integer enterpriseId, String moduleId);
List<IndexDescDTO> listByEnterpriseAndModuleDetail(Integer enterpriseId, String moduleId, Integer userId);
}
package com.gic.cloud.service.impl;
import com.gic.cloud.service.IndexDescEnterpriseService;
import org.springframework.stereotype.Service;
/**
* @author zhiwj
* @Description:
* @date 2020-07-23 16:46
*/
@Service
public class IndexDescEnterpriseServiceImpl implements IndexDescEnterpriseService {
}
package com.gic.cloud.service.impl;
import com.gic.cloud.dao.mapper.TabIndexDescMapper;
import com.gic.cloud.dto.IndexDescDTO;
import com.gic.cloud.service.IndexDescService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* @author zhiwj
* @Description:
* @date 2020-07-23 15:11
*/
@Service
public class IndexDescServiceImpl implements IndexDescService {
@Autowired
private TabIndexDescMapper tabIndexDescMapper;
@Override
public List<IndexDescDTO> listByEnterpriseAndModule(Integer enterpriseId, String moduleId) {
return tabIndexDescMapper.listByEnterpriseAndModule(enterpriseId, moduleId);
}
@Override
public List<IndexDescDTO> listByEnterpriseAndModuleDetail(Integer enterpriseId, String moduleId, Integer userId) {
return tabIndexDescMapper.listByEnterpriseAndModuleDetail(enterpriseId, moduleId, userId);
}
}
package com.gic.cloud.service.outer.impl;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.cloud.dto.IndexDescDTO;
import com.gic.cloud.service.IndexDescApiService;
import com.gic.cloud.service.IndexDescService;
import com.gic.enterprise.response.EnterpriseServiceResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
* @author zhiwj
* @Description:
* @date 2020-07-23 15:10
*/
@Service("indexEnterpriseApiService")
public class IndexEnterpriseApiServiceImpl implements IndexDescApiService {
@Autowired
private IndexDescService indexDescService;
@Override
public ServiceResponse<Map<String, List<IndexDescDTO>>> listByEnterpriseAndModule(Integer enterpriseId, String moduleId) {
List<IndexDescDTO> descList = indexDescService.listByEnterpriseAndModule(enterpriseId, moduleId);
Map<String, List<IndexDescDTO>> resultMap = descList.stream().collect(Collectors.groupingBy(IndexDescDTO::getIndexGroupName, Collectors.mapping(e -> e, Collectors.toList())));
return EnterpriseServiceResponse.success(resultMap);
}
@Override
public ServiceResponse<Map<String, List<IndexDescDTO>>> listByEnterpriseAndModuleDetail(Integer enterpriseId, String moduleId, Integer userId) {
List<IndexDescDTO> descList = indexDescService.listByEnterpriseAndModuleDetail(enterpriseId, moduleId, userId);
Map<String, List<IndexDescDTO>> resultMap = descList.stream().collect(Collectors.groupingBy(IndexDescDTO::getIndexGroupName, Collectors.mapping(e -> e, Collectors.toList())));
return EnterpriseServiceResponse.success(resultMap);
}
@Override
public ServiceResponse<List<IndexDescDTO>> listRecycle(Integer enterpriseId, String moduleId) {
return null;
}
@Override
public ServiceResponse<Void> sortIndex(Integer enterpriseId, String moduleId, Integer indexId, Integer seq) {
return null;
}
@Override
public ServiceResponse<Void> moveToRecycle(Integer enterpriseId, String moduleId, Integer indexId) {
return null;
}
}
<?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.gic.cloud.dao.mapper.TabIndexDescEnterpriseMapper">
<resultMap id="BaseResultMap" type="com.gic.cloud.entity.TabIndexDescEnterprise">
<id column="index_desc_enterprise_id" jdbcType="INTEGER" property="indexDescEnterpriseId" />
<result column="index_code" jdbcType="VARCHAR" property="indexCode" />
<result column="enterprise_id" jdbcType="INTEGER" property="enterpriseId" />
<result column="index_status" jdbcType="INTEGER" property="indexStatus" />
<result column="sort" jdbcType="INTEGER" property="sort" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
index_desc_enterprise_id, index_code, enterprise_id, index_status, sort, status,
create_time, update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_index_desc_enterprise
where index_desc_enterprise_id = #{indexDescEnterpriseId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_index_desc_enterprise
where index_desc_enterprise_id = #{indexDescEnterpriseId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.cloud.entity.TabIndexDescEnterprise">
insert into tab_index_desc_enterprise (index_desc_enterprise_id, index_code,
enterprise_id, index_status, sort,
status, create_time, update_time
)
values (#{indexDescEnterpriseId,jdbcType=INTEGER}, #{indexCode,jdbcType=VARCHAR},
#{enterpriseId,jdbcType=INTEGER}, #{indexStatus,jdbcType=INTEGER}, #{sort,jdbcType=INTEGER},
#{status,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
</insert>
<insert id="insertSelective" parameterType="com.gic.cloud.entity.TabIndexDescEnterprise">
insert into tab_index_desc_enterprise
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="indexDescEnterpriseId != null">
index_desc_enterprise_id,
</if>
<if test="indexCode != null">
index_code,
</if>
<if test="enterpriseId != null">
enterprise_id,
</if>
<if test="indexStatus != null">
index_status,
</if>
<if test="sort != null">
sort,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="indexDescEnterpriseId != null">
#{indexDescEnterpriseId,jdbcType=INTEGER},
</if>
<if test="indexCode != null">
#{indexCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
#{enterpriseId,jdbcType=INTEGER},
</if>
<if test="indexStatus != null">
#{indexStatus,jdbcType=INTEGER},
</if>
<if test="sort != null">
#{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.cloud.entity.TabIndexDescEnterprise">
update tab_index_desc_enterprise
<set>
<if test="indexCode != null">
index_code = #{indexCode,jdbcType=VARCHAR},
</if>
<if test="enterpriseId != null">
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if test="indexStatus != null">
index_status = #{indexStatus,jdbcType=INTEGER},
</if>
<if test="sort != null">
sort = #{sort,jdbcType=INTEGER},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where index_desc_enterprise_id = #{indexDescEnterpriseId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.cloud.entity.TabIndexDescEnterprise">
update tab_index_desc_enterprise
set index_code = #{indexCode,jdbcType=VARCHAR},
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
index_status = #{indexStatus,jdbcType=INTEGER},
sort = #{sort,jdbcType=INTEGER},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where index_desc_enterprise_id = #{indexDescEnterpriseId,jdbcType=INTEGER}
</update>
</mapper>
\ No newline at end of file
<?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.gic.cloud.dao.mapper.TabIndexDescMapper">
<resultMap id="BaseResultMap" type="com.gic.cloud.entity.TabIndexDesc">
<id column="index_desc_id" jdbcType="INTEGER" property="indexDescId" />
<result column="module_id" jdbcType="VARCHAR" property="moduleId" />
<result column="index_name" jdbcType="VARCHAR" property="indexName" />
<result column="index_code" jdbcType="VARCHAR" property="indexCode" />
<result column="index_group_name" jdbcType="VARCHAR" property="indexGroupName" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<resultMap id="DTOResultMap" type="com.gic.cloud.dto.IndexDescDTO">
<id column="index_desc_id" jdbcType="INTEGER" property="indexDescId" />
<result column="module_id" jdbcType="VARCHAR" property="moduleId" />
<result column="index_name" jdbcType="VARCHAR" property="indexName" />
<result column="index_code" jdbcType="VARCHAR" property="indexCode" />
<result column="index_group_name" jdbcType="VARCHAR" property="indexGroupName" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Base_Column_List">
index_desc_id, module_id, index_name, index_code, index_group_name, status, create_time,
update_time
</sql>
<sql id="DTO_List" >
${alias}.index_desc_id, ${alias}.module_id, ${alias}.index_name, ${alias}.index_code, ${alias}.index_group_name,
${alias}.status, ${alias}.create_time, ${alias}.update_time
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tab_index_desc
where index_desc_id = #{indexDescId,jdbcType=INTEGER}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
delete from tab_index_desc
where index_desc_id = #{indexDescId,jdbcType=INTEGER}
</delete>
<insert id="insert" parameterType="com.gic.cloud.entity.TabIndexDesc">
insert into tab_index_desc (index_desc_id, module_id, index_name,
index_code, index_group_name, status,
create_time, update_time)
values (#{indexDescId,jdbcType=INTEGER}, #{moduleId,jdbcType=VARCHAR}, #{indexName,jdbcType=VARCHAR},
#{indexCode,jdbcType=VARCHAR}, #{indexGroupName,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.cloud.entity.TabIndexDesc">
insert into tab_index_desc
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="indexDescId != null">
index_desc_id,
</if>
<if test="moduleId != null">
module_id,
</if>
<if test="indexName != null">
index_name,
</if>
<if test="indexCode != null">
index_code,
</if>
<if test="indexGroupName != null">
index_group_name,
</if>
<if test="status != null">
status,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="indexDescId != null">
#{indexDescId,jdbcType=INTEGER},
</if>
<if test="moduleId != null">
#{moduleId,jdbcType=VARCHAR},
</if>
<if test="indexName != null">
#{indexName,jdbcType=VARCHAR},
</if>
<if test="indexCode != null">
#{indexCode,jdbcType=VARCHAR},
</if>
<if test="indexGroupName != null">
#{indexGroupName,jdbcType=VARCHAR},
</if>
<if test="status != null">
#{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.cloud.entity.TabIndexDesc">
update tab_index_desc
<set>
<if test="moduleId != null">
module_id = #{moduleId,jdbcType=VARCHAR},
</if>
<if test="indexName != null">
index_name = #{indexName,jdbcType=VARCHAR},
</if>
<if test="indexCode != null">
index_code = #{indexCode,jdbcType=VARCHAR},
</if>
<if test="indexGroupName != null">
index_group_name = #{indexGroupName,jdbcType=VARCHAR},
</if>
<if test="status != null">
status = #{status,jdbcType=INTEGER},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where index_desc_id = #{indexDescId,jdbcType=INTEGER}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.cloud.entity.TabIndexDesc">
update tab_index_desc
set module_id = #{moduleId,jdbcType=VARCHAR},
index_name = #{indexName,jdbcType=VARCHAR},
index_code = #{indexCode,jdbcType=VARCHAR},
index_group_name = #{indexGroupName,jdbcType=VARCHAR},
status = #{status,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where index_desc_id = #{indexDescId,jdbcType=INTEGER}
</update>
<select id="listByEnterpriseAndModule" resultMap="BaseResultMap">
select
<include refid="DTO_List" >
<property name="alias" value="t1"/>
</include>
from tab_index_desc t1
left join tab_index_desc_enterprise t2 on t1.index_code = t2.index_code
where t1.status = 1
and t1.enterprise_id = #{enterpriseId}
and t1.module_id = #{moduleId}
order by t2.sort
</select>
<!-- List<IndexDescDTO> listByEnterpriseAndModuleDetail(@Param("enterpriseId") Integer enterpriseId, @Param("moduleId") String moduleId, @Param("userId") Integer userId);-->
<select id="listByEnterpriseAndModuleDetail" resultMap="BaseResultMap">
select
<include refid="DTO_List" >
<property name="alias" value="t1"/>
</include>
from tab_index_desc t1
left join tab_index_desc_enterprise t2 on t1.index_code = t2.index_code
where t1.status = 1
and t1.enterprise_id = #{enterpriseId}
and t1.module_id = #{moduleId}
order by t2.sort
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment