diff --git a/xm-core/src/main/java/com/xm/core/ctrl/XmMyFocusController.java b/xm-core/src/main/java/com/xm/core/ctrl/XmMyFocusController.java
index 1e6849b5..355609d1 100644
--- a/xm-core/src/main/java/com/xm/core/ctrl/XmMyFocusController.java
+++ b/xm-core/src/main/java/com/xm/core/ctrl/XmMyFocusController.java
@@ -95,6 +95,7 @@ public class XmMyFocusController {
}
xmMyFocus.setUserid(user.getUserid());
xmMyFocus.setUsername(user.getUsername());
+
if(xmMyFocusService.selectOneObject(xmMyFocus) !=null ){
return failed("pk-exists","编号重复,请修改编号再提交");
}
diff --git a/xm-core/src/main/java/com/xm/core/entity/XmMyFocus.java b/xm-core/src/main/java/com/xm/core/entity/XmMyFocus.java
index b517d6da..19e3bcc0 100644
--- a/xm-core/src/main/java/com/xm/core/entity/XmMyFocus.java
+++ b/xm-core/src/main/java/com/xm/core/entity/XmMyFocus.java
@@ -8,7 +8,7 @@ import java.util.Date;
/**
* 组织 com 顶级模块 xm 大模块 core 小模块
* 实体 XmMyFocus所有属性名:
- * "userid","用户编号","username","用户名称","bizId","关注的对象主键","focusType","对象类型:项目-1/任务-2/产品-3/需求-4/bug-5","pbizId","对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号","bizName","任务名称","pbizName","对象上级名称","ftime","关注时间";
+ * "userid","用户编号","username","用户名称","bizId","关注的对象主键","focusType","对象类型:项目-1/任务-2/产品-3/需求-4/bug-5","pbizId","对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号","bizName","任务名称","pbizName","对象上级名称","ftime","关注时间","ubranchId","用户归属机构";
* 当前主键(包括多主键):
* userid,biz_id,pbiz_id;
*/
@@ -42,6 +42,9 @@ public class XmMyFocus implements java.io.Serializable {
@ApiModelProperty(notes="关注时间",allowEmptyValue=true,example="",allowableValues="")
Date ftime;
+
+ @ApiModelProperty(notes="用户归属机构",allowEmptyValue=true,example="",allowableValues="")
+ String ubranchId;
/**
*用户编号,关注的对象主键,对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号
diff --git a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMyFocusMapper.xml b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMyFocusMapper.xml
index c1f4b9ff..b5a32248 100644
--- a/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMyFocusMapper.xml
+++ b/xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMyFocusMapper.xml
@@ -71,7 +71,7 @@
insert into xm_my_focus(
) values (
- #{userid},#{username},#{bizId},#{focusType},#{pbizId},#{bizName},#{pbizName},#{ftime}
+ #{userid},#{username},#{bizId},#{focusType},#{pbizId},#{bizName},#{pbizName},#{ftime},#{ubranchId}
)
@@ -146,7 +146,7 @@
- userid,username,biz_id,focus_type,pbiz_id,biz_name,pbiz_name,ftime
+ userid,username,biz_id,focus_type,pbiz_id,biz_name,pbiz_name,ftime,ubranch_id
@@ -159,6 +159,7 @@
and res.biz_name = #{bizName}
and res.pbiz_name = #{pbizName}
and date_format(res.ftime,'%Y-%m-%d') = date_format(#{ftime},'%Y-%m-%d')
+ and res.ubranch_id = #{ubranchId}
@@ -166,7 +167,8 @@
focus_type = #{focusType},
biz_name = #{bizName},
pbiz_name = #{pbizName},
- ftime = #{ftime}
+ ftime = #{ftime},
+ ubranch_id = #{ubranchId}
username = #{username},
@@ -174,6 +176,7 @@
biz_name = #{bizName},
pbiz_name = #{pbizName},
ftime = #{ftime},
+ ubranch_id = #{ubranchId},
@@ -181,6 +184,7 @@
focus_type = #{item.focusType},
biz_name = #{item.bizName},
pbiz_name = #{item.pbizName},
- ftime = #{item.ftime}
+ ftime = #{item.ftime},
+ ubranch_id = #{item.ubranchId}
\ No newline at end of file