Browse Source

添加修改任务时间的单独接口

master
陈裕财 4 years ago
parent
commit
1210df4e19
  1. 66
      xm-core/src/main/java/com/xm/core/entity/XmMenu.java
  2. 71
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml

66
xm-core/src/main/java/com/xm/core/entity/XmMenu.java

@ -7,9 +7,9 @@ import java.util.Date;
/**
* 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmMenu所有属性名: <br>
* menuId,menuName,pmenuId,productId,remark,status,online,demandUrl,codeUrl,designUrl,docUrl,helpUrl,operDocUrl,seqNo,mmUserid,mmUsername,ctime;<br>
* XM.xm_menu 功能表的所有字段名: <br>
* menu_id,menu_name,pmenu_id,product_id,remark,status,online,demand_url,code_url,design_url,doc_url,help_url,oper_doc_url,seq_no,mm_userid,mm_username,ctime;<br>
* menuId,menuName,pmenuId,productId,remark,status,online,demandUrl,codeUrl,designUrl,docUrl,helpUrl,operDocUrl,seqNo,mmUserid,mmUsername,ctime,ntype,sinceVersion,childrenCnt,ltime;<br>
* xm_menu 功能表的所有字段名: <br>
* menu_id,menu_name,pmenu_id,product_id,remark,status,online,demand_url,code_url,design_url,doc_url,help_url,oper_doc_url,seq_no,mm_userid,mm_username,ctime,ntype,since_version,children_cnt,ltime;<br>
* 当前主键(包括多主键):<br>
* menu_id;<br>
*/
@ -70,6 +70,18 @@ public class XmMenu implements java.io.Serializable {
@ApiModelProperty(notes="创建时间",allowEmptyValue=true,example="",allowableValues="")
Date ctime;
@ApiModelProperty(notes="节点类型0-功能点,1-目录。目录下建功能点,功能点下不允许建立任何子节点",allowEmptyValue=true,example="",allowableValues="")
String ntype;
@ApiModelProperty(notes="开始版本",allowEmptyValue=true,example="",allowableValues="")
String sinceVersion;
@ApiModelProperty(notes="儿子节点个数",allowEmptyValue=true,example="",allowableValues="")
Integer childrenCnt;
@ApiModelProperty(notes="更新时间",allowEmptyValue=true,example="",allowableValues="")
Date ltime;
/**功能编号**/
public XmMenu(String menuId) {
this.menuId = menuId;
@ -181,6 +193,30 @@ public class XmMenu implements java.io.Serializable {
public void setCtime(Date ctime) {
this.ctime = ctime;
}
/**
* 节点类型0-功能点1-目录目录下建功能点功能点下不允许建立任何子节点
**/
public void setNtype(String ntype) {
this.ntype = ntype;
}
/**
* 开始版本
**/
public void setSinceVersion(String sinceVersion) {
this.sinceVersion = sinceVersion;
}
/**
* 儿子节点个数
**/
public void setChildrenCnt(Integer childrenCnt) {
this.childrenCnt = childrenCnt;
}
/**
* 更新时间
**/
public void setLtime(Date ltime) {
this.ltime = ltime;
}
/**
* 功能编号
@ -284,5 +320,29 @@ public class XmMenu implements java.io.Serializable {
public Date getCtime() {
return this.ctime;
}
/**
* 节点类型0-功能点1-目录目录下建功能点功能点下不允许建立任何子节点
**/
public String getNtype() {
return this.ntype;
}
/**
* 开始版本
**/
public String getSinceVersion() {
return this.sinceVersion;
}
/**
* 儿子节点个数
**/
public Integer getChildrenCnt() {
return this.childrenCnt;
}
/**
* 更新时间
**/
public Date getLtime() {
return this.ltime;
}
}

71
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuMapper.xml

@ -3,8 +3,24 @@
<mapper namespace="com.xm.core.entity.XmMenu">
<!--开始 自定sql函数区域 -->
<!--请在此区域添加自定义函数-->
<!--开始 自定sql函数区域 请在此区域添加自定义函数,其它区域尽量不要动,因为代码随时重新生成 -->
<sql id="whereForMap">
<if test=" menuIds != null"> and (res.menu_id) in
<foreach collection="menuIds" item="item" index="index" open="(" separator="," close=")" >
( #{item})
</foreach>
</if>
<if test=' iterationFilterType!=null and iterationFilterType!=""'>
and <if test='iterationFilterType=="not-join"'> not </if>
exists ( select 1 from xm_iteration_menu im where im.menu_id=res.menu_id)
</if>
<if test=' taskFilterType!=null and taskFilterType!="" '>
and <if test='taskFilterType=="not-join"'> not </if>
exists ( select 1 from xm_task t where t.menu_id=res.menu_id)
</if>
<if test="key != null and key !='' "> and res.menu_name like #{key} </if>
</sql>
<select id="selectExistIterationMenus" parameterType="HashMap" resultType="com.xm.core.entity.XmMenu">
select * from xm_menu res
@ -90,6 +106,7 @@
order by res.seq_no asc
</select>
<!--结束 自定义sql函数区域-->
@ -98,22 +115,8 @@
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select * from xm_menu res
<where>
<if test="ids != null"> and
menu_id in
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</if>
<include refid="whereForMap"/>
<include refid="where"/>
<if test=' iterationFilterType!=null and iterationFilterType!=""'>
and <if test='iterationFilterType=="not-join"'> not </if>
exists ( select 1 from xm_iteration_menu im where im.menu_id=res.menu_id)
</if>
<if test=' taskFilterType!=null and taskFilterType!="" '>
and <if test='taskFilterType=="not-join"'> not </if>
exists ( select 1 from xm_task t where t.menu_id=res.menu_id)
</if>
<if test="key != null and key !='' "> and res.menu_name like #{key} </if>
</where>
</select>
@ -150,15 +153,15 @@
insert into xm_menu(
<include refid="columns"/>
) values (
#{menuId},#{menuName},#{pmenuId},#{productId},#{remark},#{status},#{online},#{demandUrl},#{codeUrl},#{designUrl},#{docUrl},#{helpUrl},#{operDocUrl},#{seqNo},#{mmUserid},#{mmUsername},#{ctime}
#{menuId},#{menuName},#{pmenuId},#{productId},#{remark},#{status},#{online},#{demandUrl},#{codeUrl},#{designUrl},#{docUrl},#{helpUrl},#{operDocUrl},#{seqNo},#{mmUserid},#{mmUsername},#{ctime},#{ntype},#{sinceVersion},#{childrenCnt},#{ltime}
)
</insert>
<!-- 按条件删除若干条记录-->
<delete id="deleteByWhere" parameterType="com.xm.core.entity.XmMenu">
delete from xm_menu
delete from xm_menu res
<where>
1=2
<include refid="where"/>
</where>
</delete>
@ -204,18 +207,16 @@
<delete id="batchDelete" parameterType="List">
delete from xm_menu
where
(menu_id)
in
(menu_id) in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" >
( #{item.menuId}
)
( #{item.menuId} )
</foreach>
</delete>
<!--sql片段 列-->
<sql id="columns">
menu_id,menu_name,pmenu_id,product_id,remark,status,online,demand_url,code_url,design_url,doc_url,help_url,oper_doc_url,seq_no,mm_userid,mm_username,ctime
menu_id,menu_name,pmenu_id,product_id,remark,status,online,demand_url,code_url,design_url,doc_url,help_url,oper_doc_url,seq_no,mm_userid,mm_username,ctime,ntype,since_version,children_cnt,ltime
</sql>
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS-->
@ -237,6 +238,10 @@
<if test="mmUserid != null and mmUserid != ''"> and res.mm_userid = #{mmUserid} </if>
<if test="mmUsername != null and mmUsername != ''"> and res.mm_username = #{mmUsername} </if>
<if test="ctime != null"> and date_format(res.ctime,'%Y-%m-%d') = date_format(#{ctime},'%Y-%m-%d') </if>
<if test="ntype != null and ntype != ''"> and res.ntype = #{ntype} </if>
<if test="sinceVersion != null and sinceVersion != ''"> and res.since_version = #{sinceVersion} </if>
<if test="childrenCnt != null and childrenCnt != ''"> and res.children_cnt = #{childrenCnt} </if>
<if test="ltime != null"> and date_format(res.ltime,'%Y-%m-%d') = date_format(#{ltime},'%Y-%m-%d') </if>
</sql>
<!--sql片段 更新字段 -->
<sql id="set">
@ -255,7 +260,11 @@
seq_no = #{seqNo},
mm_userid = #{mmUserid},
mm_username = #{mmUsername},
ctime = #{ctime}
ctime = #{ctime},
ntype = #{ntype},
since_version = #{sinceVersion},
children_cnt = #{childrenCnt},
ltime = #{ltime}
</sql>
<sql id="someFieldSet">
<if test="menuName != null and menuName != ''"> menu_name = #{menuName}, </if>
@ -274,6 +283,10 @@
<if test="mmUserid != null and mmUserid != ''"> mm_userid = #{mmUserid}, </if>
<if test="mmUsername != null and mmUsername != ''"> mm_username = #{mmUsername}, </if>
<if test="ctime != null"> ctime = #{ctime}, </if>
<if test="ntype != null and ntype != ''"> ntype = #{ntype}, </if>
<if test="sinceVersion != null and sinceVersion != ''"> since_version = #{sinceVersion}, </if>
<if test="childrenCnt != null and childrenCnt != ''"> children_cnt = #{childrenCnt}, </if>
<if test="ltime != null"> ltime = #{ltime}, </if>
</sql>
<!--sql片段 批量更新 -->
<sql id="batchSet">
@ -292,6 +305,10 @@
seq_no = #{item.seqNo},
mm_userid = #{item.mmUserid},
mm_username = #{item.mmUsername},
ctime = #{item.ctime}
ctime = #{item.ctime},
ntype = #{item.ntype},
since_version = #{item.sinceVersion},
children_cnt = #{item.childrenCnt},
ltime = #{item.ltime}
</sql>
</mapper>
Loading…
Cancel
Save