diff --git a/xm-core/src/main/java/com/xm/core/entity/XmRecord.java b/xm-core/src/main/java/com/xm/core/entity/XmRecord.java index 1756a801..8653e59e 100644 --- a/xm-core/src/main/java/com/xm/core/entity/XmRecord.java +++ b/xm-core/src/main/java/com/xm/core/entity/XmRecord.java @@ -1,16 +1,15 @@ -package com.xm.core.entity; +package com.xm.core.entity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; - import java.util.Date; /** - * 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块
+ * 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmRecord所有属性名:
- * id,projectId,operUserid,operUsername,operTime,objType,action,oldValue,newValue,remarks,taskId,reqNo,branchId,ip;
- * 表 XM.xm_record xm_record的所有字段名:
- * id,project_id,oper_userid,oper_username,oper_time,obj_type,action,old_value,new_value,remarks,task_id,req_no,branch_id,ip;
+ * id,projectId,operUserid,operUsername,operTime,objType,action,oldValue,newValue,remarks,reqNo,branchId,ip,bizId,pbizId,productId;
+ * 表 xm_record xm_record的所有字段名:
+ * id,project_id,oper_userid,oper_username,oper_time,obj_type,action,old_value,new_value,remarks,req_no,branch_id,ip,biz_id,pbiz_id,product_id;
* 当前主键(包括多主键):
* id;
*/ @@ -35,7 +34,7 @@ public class XmRecord implements java.io.Serializable { @ApiModelProperty(notes="操作时间",allowEmptyValue=true,example="",allowableValues="") Date operTime; - @ApiModelProperty(notes="操作对象project/task",allowEmptyValue=true,example="",allowableValues="") + @ApiModelProperty(notes="操作对象project/task/phase/group/budget/cost",allowEmptyValue=true,example="",allowableValues="") String objType; @ApiModelProperty(notes="操作的id",allowEmptyValue=true,example="",allowableValues="") @@ -50,9 +49,6 @@ public class XmRecord implements java.io.Serializable { @ApiModelProperty(notes="备注",allowEmptyValue=true,example="",allowableValues="") String remarks; - @ApiModelProperty(notes="任务编号",allowEmptyValue=true,example="",allowableValues="") - String taskId; - @ApiModelProperty(notes="请求编号,用于跟踪日志",allowEmptyValue=true,example="",allowableValues="") String reqNo; @@ -61,6 +57,15 @@ public class XmRecord implements java.io.Serializable { @ApiModelProperty(notes="ip地址",allowEmptyValue=true,example="",allowableValues="") String ip; + + @ApiModelProperty(notes="业务主键编号",allowEmptyValue=true,example="",allowableValues="") + String bizId; + + @ApiModelProperty(notes="上级业务主键编号",allowEmptyValue=true,example="",allowableValues="") + String pbizId; + + @ApiModelProperty(notes="产品编号",allowEmptyValue=true,example="",allowableValues="") + String productId; /**日志编号**/ public XmRecord(String id) { @@ -102,7 +107,7 @@ public class XmRecord implements java.io.Serializable { this.operTime = operTime; } /** - * 操作对象project/task + * 操作对象project/task/phase/group/budget/cost **/ public void setObjType(String objType) { this.objType = objType; @@ -131,12 +136,6 @@ public class XmRecord implements java.io.Serializable { public void setRemarks(String remarks) { this.remarks = remarks; } - /** - * 任务编号 - **/ - public void setTaskId(String taskId) { - this.taskId = taskId; - } /** * 请求编号,用于跟踪日志 **/ @@ -155,6 +154,24 @@ public class XmRecord implements java.io.Serializable { public void setIp(String ip) { this.ip = ip; } + /** + * 业务主键编号 + **/ + public void setBizId(String bizId) { + this.bizId = bizId; + } + /** + * 上级业务主键编号 + **/ + public void setPbizId(String pbizId) { + this.pbizId = pbizId; + } + /** + * 产品编号 + **/ + public void setProductId(String productId) { + this.productId = productId; + } /** * 日志编号 @@ -187,7 +204,7 @@ public class XmRecord implements java.io.Serializable { return this.operTime; } /** - * 操作对象project/task + * 操作对象project/task/phase/group/budget/cost **/ public String getObjType() { return this.objType; @@ -216,12 +233,6 @@ public class XmRecord implements java.io.Serializable { public String getRemarks() { return this.remarks; } - /** - * 任务编号 - **/ - public String getTaskId() { - return this.taskId; - } /** * 请求编号,用于跟踪日志 **/ @@ -240,5 +251,23 @@ public class XmRecord implements java.io.Serializable { public String getIp() { return this.ip; } + /** + * 业务主键编号 + **/ + public String getBizId() { + return this.bizId; + } + /** + * 上级业务主键编号 + **/ + public String getPbizId() { + return this.pbizId; + } + /** + * 产品编号 + **/ + public String getProductId() { + return this.productId; + } } \ No newline at end of file diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmRecordMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmRecordMapper.xml index c166e518..dc76b67e 100644 --- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmRecordMapper.xml +++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmRecordMapper.xml @@ -3,11 +3,18 @@ - - - - - + + + + and (res.id) in + + ( #{item}) + + + + + + @@ -15,15 +22,9 @@ @@ -56,11 +57,11 @@ - + insert into xm_record( ) values ( - #{id},#{projectId},#{operUserid},#{operUsername},#{operTime},#{objType},#{action},#{oldValue},#{newValue},#{remarks},#{taskId},#{reqNo},#{branchId},#{ip} + #{id},#{projectId},#{operUserid},#{operUsername},#{operTime},#{objType},#{action},#{oldValue},#{newValue},#{remarks},#{reqNo},#{branchId},#{ip},#{bizId},#{pbizId},#{productId} ) @@ -74,13 +75,13 @@ - delete from xm_record + delete from xm_record where id = #{id} - update xm_record + update xm_record @@ -89,7 +90,7 @@ - update xm_record + update xm_record @@ -104,7 +105,7 @@ - update xm_record + update xm_record set where id = #{item.id} @@ -112,35 +113,38 @@ - delete from xm_record - where id in - - #{item.id } - + delete from xm_record + where + (id) in + + ( #{item.id} ) + - id,project_id,oper_userid,oper_username,oper_time,obj_type,action,old_value,new_value,remarks,task_id,req_no,branch_id,ip + id,project_id,oper_userid,oper_username,oper_time,obj_type,action,old_value,new_value,remarks,req_no,branch_id,ip,biz_id,pbiz_id,product_id - + and res.id = #{id} and res.project_id = #{projectId} and res.oper_userid = #{operUserid} and res.oper_username = #{operUsername} - and TO_CHAR(res.oper_time,'YYYY-MM-DD') = TO_CHAR(#{operTime},'YYYY-MM-DD') + and date_format(res.oper_time,'%Y-%m-%d') = date_format(#{operTime},'%Y-%m-%d') and res.obj_type = #{objType} and res.action = #{action} and res.old_value = #{oldValue} and res.new_value = #{newValue} and res.remarks = #{remarks} - and res.task_id = #{taskId} and res.req_no = #{reqNo} and res.branch_id = #{branchId} and res.ip = #{ip} + and res.biz_id = #{bizId} + and res.pbiz_id = #{pbizId} + and res.product_id = #{productId} @@ -153,10 +157,12 @@ old_value = #{oldValue}, new_value = #{newValue}, remarks = #{remarks}, - task_id = #{taskId}, req_no = #{reqNo}, branch_id = #{branchId}, - ip = #{ip} + ip = #{ip}, + biz_id = #{bizId}, + pbiz_id = #{pbizId}, + product_id = #{productId} project_id = #{projectId}, @@ -168,10 +174,12 @@ old_value = #{oldValue}, new_value = #{newValue}, remarks = #{remarks}, - task_id = #{taskId}, req_no = #{reqNo}, branch_id = #{branchId}, ip = #{ip}, + biz_id = #{bizId}, + pbiz_id = #{pbizId}, + product_id = #{productId}, @@ -184,9 +192,11 @@ old_value = #{item.oldValue}, new_value = #{item.newValue}, remarks = #{item.remarks}, - task_id = #{item.taskId}, req_no = #{item.reqNo}, branch_id = #{item.branchId}, - ip = #{item.ip} + ip = #{item.ip}, + biz_id = #{item.bizId}, + pbiz_id = #{item.pbizId}, + product_id = #{item.productId} \ No newline at end of file