Browse Source

统计做成定时任务

master
陈裕财 4 years ago
parent
commit
9b03504b21
  1. 2
      xm-core/src/main/java/com/xm/core/ctrl/XmIterationMenuController.java
  2. 188
      xm-core/src/main/java/com/xm/core/ctrl/XmMyFocusController.java
  3. 143
      xm-core/src/main/java/com/xm/core/entity/XmMyFocus.java
  4. 112
      xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMyFocusMapper.xml

2
xm-core/src/main/java/com/xm/core/ctrl/XmIterationMenuController.java

@ -187,7 +187,7 @@ public class XmIterationMenuController {
if(menus==null || menus.size()==0){ if(menus==null || menus.size()==0){
return ResponseHelper.failed("no-qx-0","无权限操作"); return ResponseHelper.failed("no-qx-0","无权限操作");
} }
List<XmMenu> canOpList=new ArrayList<>();
List<XmMenu> canOpList=menus;
List<XmMenu> hadJoin=new ArrayList<>(); List<XmMenu> hadJoin=new ArrayList<>();
List<XmMenu> ntype1=new ArrayList<>(); List<XmMenu> ntype1=new ArrayList<>();
List<XmMenu> status789=new ArrayList<>(); List<XmMenu> status789=new ArrayList<>();

188
xm-core/src/main/java/com/xm/core/ctrl/XmMyFocusController.java

@ -1,188 +0,0 @@
package com.xm.core.ctrl;
import com.mdp.core.entity.Tips;
import com.mdp.core.err.BizException;
import com.mdp.core.utils.RequestUtils;
import com.mdp.mybatis.PageUtils;
import com.xm.core.entity.XmMyFocus;
import com.xm.core.service.XmMyFocusService;
import com.xm.core.service.XmRecordService;
import io.swagger.annotations.*;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* url编制采用rest风格,如对XM.xm_my_focus xm_my_focus的操作有增删改查,对应的url分别为:<br>
* 新增: xm/xmMyFocus/add <br>
* 查询: xm/xmMyFocus/list<br>
* 模糊查询: xm/xmMyFocus/listKey<br>
* 修改: xm/xmMyFocus/edit <br>
* 删除: xm/xmMyFocus/del<br>
* 批量删除: xm/xmMyFocus/batchDel<br>
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br>
* 实体 XmMyFocus XM.xm_my_focus 当前主键(包括多主键): id;
***/
@RestController("xm.core.xmMyFocusController")
@RequestMapping(value="/**/xm/core/xmMyFocus")
@Api(tags={"xm_my_focus操作接口"})
public class XmMyFocusController {
static Log logger=LogFactory.getLog(XmMyFocusController.class);
@Autowired
private XmMyFocusService xmMyFocusService;
@Autowired
XmRecordService xmRecordService;
@ApiOperation( value = "查询xm_my_focus信息列表",notes="listXmMyFocus,条件之间是 and关系,模糊查询写法如 {studentName:'%才哥%'}")
@ApiImplicitParams({
@ApiImplicitParam(name="id",value="主键,主键",required=false),
@ApiImplicitParam(name="userid",value="用户编号",required=false),
@ApiImplicitParam(name="username",value="用户名称",required=false),
@ApiImplicitParam(name="taskId",value="关注的任务主键",required=false),
@ApiImplicitParam(name="focusType",value="对象类型项目-project/任务-task",required=false),
@ApiImplicitParam(name="projectId",value="项目编号",required=false),
@ApiImplicitParam(name="projectName",value="项目名称",required=false),
@ApiImplicitParam(name="taskName",value="任务名称",required=false),
@ApiImplicitParam(name="pageSize",value="每页记录数",required=false),
@ApiImplicitParam(name="pageNum",value="当前页码,从1开始",required=false),
@ApiImplicitParam(name="total",value="总记录数,服务器端收到0时,会自动计算总记录数,如果上传>0的不自动计算",required=false),
@ApiImplicitParam(name="orderBy",value="排序列 如性别、学生编号排序 orderBy = sex desc,student_id desc",required=false),
@ApiImplicitParam(name="count",value="是否进行总条数计算,count=true|false",required=false)
})
@ApiResponses({
@ApiResponse(code = 200,response= XmMyFocus.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}")
})
@RequestMapping(value="/list",method=RequestMethod.GET)
public Map<String,Object> listXmMyFocus( @ApiIgnore @RequestParam Map<String,Object> xmMyFocus){
Map<String,Object> m = new HashMap<>();
RequestUtils.transformArray(xmMyFocus, "ids");
PageUtils.startPage(xmMyFocus);
List<Map<String,Object>> xmMyFocusList = xmMyFocusService.selectListMapByWhere(xmMyFocus); //列出XmMyFocus列表
PageUtils.responePage(m, xmMyFocusList);
m.put("data",xmMyFocusList);
Tips tips=new Tips("查询成功");
m.put("tips", tips);
return m;
}
/***/
@ApiOperation( value = "新增一条xm_my_focus信息",notes="addXmMyFocus,主键如果为空,后台自动生成")
@ApiResponses({
@ApiResponse(code = 200,response=XmMyFocus.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}")
})
@RequestMapping(value="/add",method=RequestMethod.POST)
public Map<String,Object> addXmMyFocus(@RequestBody XmMyFocus xmMyFocus) {
Map<String,Object> m = new HashMap<>();
Tips tips=new Tips("成功关注");
try{
if(StringUtils.isEmpty(xmMyFocus.getId())) {
xmMyFocus.setId(xmMyFocusService.createKey("id"));
}else{
XmMyFocus xmMyFocusQuery = new XmMyFocus(xmMyFocus.getId());
if(xmMyFocusService.countByWhere(xmMyFocusQuery)>0){
tips.setFailureMsg("编号重复,请修改编号再提交");
m.put("tips", tips);
return m;
}
}
xmMyFocusService.focus(xmMyFocus);
m.put("data",xmMyFocus);
}catch (BizException e) {
tips=e.getTips();
logger.error("",e);
}catch (Exception e) {
tips.setFailureMsg(e.getMessage());
logger.error("",e);
}
m.put("tips", tips);
return m;
}
/** */
@ApiOperation( value = "删除一条xm_my_focus信息",notes="delXmMyFocus,仅需要上传主键字段")
@ApiResponses({
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}")
})
@RequestMapping(value="/del",method=RequestMethod.POST)
public Map<String,Object> delXmMyFocus(@RequestBody XmMyFocus xmMyFocus){
Map<String,Object> m = new HashMap<>();
Tips tips=new Tips("取消关注成功");
try{
xmMyFocusService.unfocus(xmMyFocus);
}catch (BizException e) {
tips=e.getTips();
logger.error("",e);
}catch (Exception e) {
tips.setFailureMsg(e.getMessage());
logger.error("",e);
}
m.put("tips", tips);
return m;
}
/**
@ApiOperation( value = "根据主键修改一条xm_my_focus信息",notes="editXmMyFocus")
@ApiResponses({
@ApiResponse(code = 200,response=XmMyFocus.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}")
})
@RequestMapping(value="/edit",method=RequestMethod.POST)
public Map<String,Object> editXmMyFocus(@RequestBody XmMyFocus xmMyFocus) {
Map<String,Object> m = new HashMap<>();
Tips tips=new Tips("成功更新一条数据");
try{
xmMyFocusService.updateByPk(xmMyFocus);
m.put("data",xmMyFocus);
}catch (BizException e) {
tips=e.getTips();
logger.error("",e);
}catch (Exception e) {
tips.setFailureMsg(e.getMessage());
logger.error("",e);
}
m.put("tips", tips);
return m;
}
*/
/**
@ApiOperation( value = "根据主键列表批量删除xm_my_focus信息",notes="batchDelXmMyFocus,仅需要上传主键字段")
@ApiResponses({
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}")
})
@RequestMapping(value="/batchDel",method=RequestMethod.POST)
public Map<String,Object> batchDelXmMyFocus(@RequestBody List<XmMyFocus> xmMyFocuss) {
Map<String,Object> m = new HashMap<>();
Tips tips=new Tips("成功删除"+xmMyFocuss.size()+"条数据");
try{
xmMyFocusService.batchDelete(xmMyFocuss);
}catch (BizException e) {
tips=e.getTips();
logger.error("",e);
}catch (Exception e) {
tips.setFailureMsg(e.getMessage());
logger.error("",e);
}
m.put("tips", tips);
return m;
}
*/
}

143
xm-core/src/main/java/com/xm/core/entity/XmMyFocus.java

@ -1,152 +1,61 @@
package com.xm.core.entity; package com.xm.core.entity;
import lombok.Data;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
/** /**
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br>
* 组织 com 顶级模块 xm 大模块 core 小模块 <br>
* 实体 XmMyFocus所有属性名: <br> * 实体 XmMyFocus所有属性名: <br>
* userid,username,taskId,focusType,projectId,id,projectName,taskName;<br>
* XM.xm_my_focus xm_my_focus的所有字段名: <br>
* userid,username,task_id,focus_type,project_id,id,project_name,task_name;<br>
* "userid","用户编号","username","用户名称","bizId","关注的对象主键","focusType","对象类型:项目-1/任务-2/产品-3/需求-4/bug-5","pbizId","对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号","bizName","任务名称","pbizName","对象上级名称","ftime","关注时间";<br>
* 当前主键(包括多主键):<br> * 当前主键(包括多主键):<br>
* id;<br>
* userid,biz_id,pbiz_id;<br>
*/ */
@ApiModel(description="xm_my_focus")
@Data
@ApiModel(description="我关注的项目或者任务")
public class XmMyFocus implements java.io.Serializable { public class XmMyFocus implements java.io.Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@ApiModelProperty(notes="主键,主键",allowEmptyValue=true,example="",allowableValues="")
String id;
@ApiModelProperty(notes="用户编号,主键",allowEmptyValue=true,example="",allowableValues="")
String userid;
@ApiModelProperty(notes="关注的对象主键,主键",allowEmptyValue=true,example="",allowableValues="")
String bizId;
@ApiModelProperty(notes="对象上级编号,项目时填项目编号,任务时填项目编号,产品时填产品编号,需求时填产品编号,bug时填产品编号,主键",allowEmptyValue=true,example="",allowableValues="")
String pbizId;
@ApiModelProperty(notes="用户编号",allowEmptyValue=true,example="",allowableValues="")
String userid;
@ApiModelProperty(notes="用户名称",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="用户名称",allowEmptyValue=true,example="",allowableValues="")
String username; String username;
@ApiModelProperty(notes="关注的任务主键",allowEmptyValue=true,example="",allowableValues="")
String taskId;
@ApiModelProperty(notes="对象类型项目-project/任务-task",allowEmptyValue=true,example="",allowableValues="")
@ApiModelProperty(notes="对象类型:项目-1/任务-2/产品-3/需求-4/bug-5",allowEmptyValue=true,example="",allowableValues="")
String focusType; String focusType;
@ApiModelProperty(notes="项目编号",allowEmptyValue=true,example="",allowableValues="")
String projectId;
@ApiModelProperty(notes="项目名称",allowEmptyValue=true,example="",allowableValues="")
String projectName;
@ApiModelProperty(notes="任务名称",allowEmptyValue=true,example="",allowableValues="") @ApiModelProperty(notes="任务名称",allowEmptyValue=true,example="",allowableValues="")
String taskName;
String bizName;
/**主键**/
public XmMyFocus(String id) {
this.id = id;
}
@ApiModelProperty(notes="对象上级名称",allowEmptyValue=true,example="",allowableValues="")
String pbizName;
/**xm_my_focus**/
public XmMyFocus() {
}
@ApiModelProperty(notes="关注时间",allowEmptyValue=true,example="",allowableValues="")
Date ftime;
/** /**
* 用户编号
*用户编号,关注的对象主键,对象上级编号,项目时填项目编号任务时填项目编号产品时填产品编号需求时填产品编号bug时填产品编号
**/ **/
public void setUserid(String userid) {
public XmMyFocus(String userid,String bizId,String pbizId) {
this.userid = userid; this.userid = userid;
}
/**
* 用户名称
**/
public void setUsername(String username) {
this.username = username;
}
/**
* 关注的任务主键
**/
public void setTaskId(String taskId) {
this.taskId = taskId;
}
/**
* 对象类型项目-project/任务-task
**/
public void setFocusType(String focusType) {
this.focusType = focusType;
}
/**
* 项目编号
**/
public void setProjectId(String projectId) {
this.projectId = projectId;
}
/**
* 主键
**/
public void setId(String id) {
this.id = id;
}
/**
* 项目名称
**/
public void setProjectName(String projectName) {
this.projectName = projectName;
}
/**
* 任务名称
**/
public void setTaskName(String taskName) {
this.taskName = taskName;
this.bizId = bizId;
this.pbizId = pbizId;
} }
/** /**
* 用户编号
**/
public String getUserid() {
return this.userid;
}
/**
* 用户名称
**/
public String getUsername() {
return this.username;
}
/**
* 关注的任务主键
**/
public String getTaskId() {
return this.taskId;
}
/**
* 对象类型项目-project/任务-task
* 我关注的项目或者任务
**/ **/
public String getFocusType() {
return this.focusType;
}
/**
* 项目编号
**/
public String getProjectId() {
return this.projectId;
}
/**
* 主键
**/
public String getId() {
return this.id;
}
/**
* 项目名称
**/
public String getProjectName() {
return this.projectName;
}
/**
* 任务名称
**/
public String getTaskName() {
return this.taskName;
public XmMyFocus() {
} }
} }

112
xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMyFocusMapper.xml

@ -3,9 +3,16 @@
<mapper namespace="com.xm.core.entity.XmMyFocus"> <mapper namespace="com.xm.core.entity.XmMyFocus">
<!--开始 自定sql函数区域 -->
<!--请在此区域添加自定义函数-->
<!--开始 自定sql函数区域 请在此区域添加自定义函数,其它区域尽量不要动,因为代码随时重新生成 -->
<sql id="whereForMap">
<if test=" pkList != null"> and (res.userid, res.biz_id, res.pbiz_id) in
<foreach collection="pkList" item="item" index="index" open="(" separator="," close=")" >
( #{item.userid}, #{item.bizId}, #{item.pbizId})
</foreach>
</if>
<if test="key != null and key !='' "> </if>
</sql>
<!--结束 自定义sql函数区域--> <!--结束 自定义sql函数区域-->
@ -16,14 +23,8 @@
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> <select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap">
select * from xm_my_focus res select * from xm_my_focus res
<where> <where>
<if test="ids != null"> and
id in
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</if>
<include refid="whereForMap"/>
<include refid="where"/> <include refid="where"/>
<if test="key != null and key !='' "> </if>
</where> </where>
</select> </select>
@ -39,47 +40,53 @@
<select id="selectOneObject" parameterType="com.xm.core.entity.XmMyFocus" resultType="com.xm.core.entity.XmMyFocus"> <select id="selectOneObject" parameterType="com.xm.core.entity.XmMyFocus" resultType="com.xm.core.entity.XmMyFocus">
select * from xm_my_focus res select * from xm_my_focus res
where where
res.id = #{id}
res.userid = #{userid}
and res.biz_id = #{bizId}
and res.pbiz_id = #{pbizId}
</select>
<select id="selectListByIds" parameterType="List" resultType="com.xm.core.entity.XmMyFocus">
select * from xm_my_focus res
where (res.userid, res.biz_id, res.pbiz_id) in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" >
( #{item.userid}, #{item.bizId}, #{item.pbizId})
</foreach>
</select> </select>
<!-- 通过主键查询获取数据对象 返回map--> <!-- 通过主键查询获取数据对象 返回map-->
<select id="selectOneMap" parameterType="HashMap" resultType="HashMap"> <select id="selectOneMap" parameterType="HashMap" resultType="HashMap">
select * from xm_my_focus res select * from xm_my_focus res
where where
res.id = #{id}
res.userid = #{userid}
and res.biz_id = #{bizId}
and res.pbiz_id = #{pbizId}
</select> </select>
<!-- 获取数据条目 返回long --> <!-- 获取数据条目 返回long -->
<select id="countByWhere" parameterType="com.xm.core.entity.XmMyFocus" resultType="long"> <select id="countByWhere" parameterType="com.xm.core.entity.XmMyFocus" resultType="long">
select count(1) from xm_my_focus res
select count(*) from xm_my_focus res
<where> <where>
<include refid="where"/> <include refid="where"/>
</where> </where>
</select> </select>
<!-- 新增一条记录 主键id,-->
<insert id="insert" parameterType="com.xm.core.entity.XmMyFocus" useGeneratedKeys="false" keyProperty="id">
<!-- 新增一条记录 主键userid,biz_id,pbiz_id,-->
<insert id="insert" parameterType="com.xm.core.entity.XmMyFocus" useGeneratedKeys="false" >
insert into xm_my_focus( insert into xm_my_focus(
<include refid="columns"/> <include refid="columns"/>
) values ( ) values (
#{userid},#{username},#{taskId},#{focusType},#{projectId},#{id},#{projectName},#{taskName}
#{userid},#{username},#{bizId},#{focusType},#{pbizId},#{bizName},#{pbizName},#{ftime}
) )
</insert> </insert>
<!-- 按条件删除若干条记录--> <!-- 按条件删除若干条记录-->
<delete id="deleteByWhere" parameterType="com.xm.core.entity.XmMyFocus"> <delete id="deleteByWhere" parameterType="com.xm.core.entity.XmMyFocus">
delete from xm_my_focus
delete from xm_my_focus res
<where> <where>
<if test="userid != null and userid != ''"> and userid = #{userid} </if>
<if test="taskId != null and taskId != ''"> and task_id = #{taskId} </if>
<if test="focusType != null and focusType != ''"> and focus_type = #{focusType} </if>
<if test="projectId != null and projectId != ''"> and project_id = #{projectId} </if>
<if test="id != null and id != ''"> and id = #{id} </if>
<include refid="where"/>
</where> </where>
</delete> </delete>
<!-- 按主键删除一条记录--> <!-- 按主键删除一条记录-->
<delete id="deleteByPk" parameterType="com.xm.core.entity.XmMyFocus"> <delete id="deleteByPk" parameterType="com.xm.core.entity.XmMyFocus">
delete from xm_my_focus delete from xm_my_focus
where id = #{id}
where userid = #{userid} and biz_id = #{bizId} and pbiz_id = #{pbizId}
</delete> </delete>
<!-- 根据条件修改若干条记录 --> <!-- 根据条件修改若干条记录 -->
@ -88,7 +95,7 @@
<set> <set>
<include refid="someFieldSet"/> <include refid="someFieldSet"/>
</set> </set>
where id = #{id}
where userid = #{userid} and biz_id = #{bizId} and pbiz_id = #{pbizId}
</update> </update>
<!-- 根据主键修改一条记录 --> <!-- 根据主键修改一条记录 -->
@ -97,7 +104,7 @@
<set> <set>
<include refid="set"/> <include refid="set"/>
</set> </set>
where id = #{id}
where userid = #{userid} and biz_id = #{bizId} and pbiz_id = #{pbizId}
</update> </update>
<!-- 批量新增 批量插入 借用insert 循环插入实现 <!-- 批量新增 批量插入 借用insert 循环插入实现
@ -111,62 +118,69 @@
update xm_my_focus update xm_my_focus
set set
<include refid="batchSet"/> <include refid="batchSet"/>
where id = #{item.id}
where userid = #{item.userid} and biz_id = #{item.bizId} and pbiz_id = #{item.pbizId}
</foreach> </foreach>
</update> </update>
<!-- 批量修改某几个字段 -->
<delete id="editSomeFields" parameterType="HashMap">
update xm_my_focus
<set>
<include refid="someFieldSet"/>
</set>
where (userid, biz_id, pbiz_id) in
<foreach collection="pkList" item="item" index="index" open="(" separator="," close=")" >
( #{item.userid}, #{item.bizId}, #{item.pbizId})
</foreach>
</delete>
<!-- 批量删除 --> <!-- 批量删除 -->
<delete id="batchDelete" parameterType="List"> <delete id="batchDelete" parameterType="List">
delete from xm_my_focus delete from xm_my_focus
where id in
where
(userid, biz_id, pbiz_id) in
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" > <foreach collection="list" item="item" index="index" open="(" separator="," close=")" >
#{item.id }
( #{item.userid}, #{item.bizId}, #{item.pbizId} )
</foreach> </foreach>
</delete> </delete>
<!--sql片段 列--> <!--sql片段 列-->
<sql id="columns"> <sql id="columns">
userid,username,task_id,focus_type,project_id,id,project_name,task_name
userid,username,biz_id,focus_type,pbiz_id,biz_name,pbiz_name,ftime
</sql> </sql>
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> <!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS-->
<sql id="where"> <sql id="where">
<if test="userid != null and userid != ''"> and res.userid = #{userid} </if> <if test="userid != null and userid != ''"> and res.userid = #{userid} </if>
<if test="username != null and username != ''"> and res.username = #{username} </if> <if test="username != null and username != ''"> and res.username = #{username} </if>
<if test="taskId != null and taskId != ''"> and res.task_id = #{taskId} </if>
<if test="bizId != null and bizId != ''"> and res.biz_id = #{bizId} </if>
<if test="focusType != null and focusType != ''"> and res.focus_type = #{focusType} </if> <if test="focusType != null and focusType != ''"> and res.focus_type = #{focusType} </if>
<if test="projectId != null and projectId != ''"> and res.project_id = #{projectId} </if>
<if test="id != null and id != ''"> and res.id = #{id} </if>
<if test="projectName != null and projectName != ''"> and res.project_name = #{projectName} </if>
<if test="taskName != null and taskName != ''"> and res.task_name = #{taskName} </if>
<if test="pbizId != null and pbizId != ''"> and res.pbiz_id = #{pbizId} </if>
<if test="bizName != null and bizName != ''"> and res.biz_name = #{bizName} </if>
<if test="pbizName != null and pbizName != ''"> and res.pbiz_name = #{pbizName} </if>
<if test="ftime != null"> and date_format(res.ftime,'%Y-%m-%d') = date_format(#{ftime},'%Y-%m-%d') </if>
</sql> </sql>
<!--sql片段 更新字段 --> <!--sql片段 更新字段 -->
<sql id="set"> <sql id="set">
userid = #{userid},
username = #{username}, username = #{username},
task_id = #{taskId},
focus_type = #{focusType}, focus_type = #{focusType},
project_id = #{projectId},
project_name = #{projectName},
task_name = #{taskName}
biz_name = #{bizName},
pbiz_name = #{pbizName},
ftime = #{ftime}
</sql> </sql>
<sql id="someFieldSet"> <sql id="someFieldSet">
<if test="userid != null and userid != ''"> userid = #{userid}, </if>
<if test="username != null and username != ''"> username = #{username}, </if> <if test="username != null and username != ''"> username = #{username}, </if>
<if test="taskId != null and taskId != ''"> task_id = #{taskId}, </if>
<if test="focusType != null and focusType != ''"> focus_type = #{focusType}, </if> <if test="focusType != null and focusType != ''"> focus_type = #{focusType}, </if>
<if test="projectId != null and projectId != ''"> project_id = #{projectId}, </if>
<if test="projectName != null and projectName != ''"> project_name = #{projectName}, </if>
<if test="taskName != null and taskName != ''"> task_name = #{taskName}, </if>
<if test="bizName != null and bizName != ''"> biz_name = #{bizName}, </if>
<if test="pbizName != null and pbizName != ''"> pbiz_name = #{pbizName}, </if>
<if test="ftime != null"> ftime = #{ftime}, </if>
</sql> </sql>
<!--sql片段 批量更新 --> <!--sql片段 批量更新 -->
<sql id="batchSet"> <sql id="batchSet">
userid = #{item.userid},
username = #{item.username}, username = #{item.username},
task_id = #{item.taskId},
focus_type = #{item.focusType}, focus_type = #{item.focusType},
project_id = #{item.projectId},
project_name = #{item.projectName},
task_name = #{item.taskName}
biz_name = #{item.bizName},
pbiz_name = #{item.pbizName},
ftime = #{item.ftime}
</sql> </sql>
</mapper> </mapper>
Loading…
Cancel
Save