6 changed files with 5 additions and 827 deletions
-
176xm-core/src/main/java/com/xm/core/ctrl/XmExchangeController.java
-
6xm-core/src/main/java/com/xm/core/ctrl/XmTaskExecuserController.java
-
379xm-core/src/main/java/com/xm/core/entity/XmExchange.java
-
17xm-core/src/main/java/com/xm/core/service/XmExchangeService.java
-
26xm-core/src/main/java/com/xm/core/vo/XmExchangeVo.java
-
228xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmExchangeMapper.xml
@ -1,176 +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.mdp.qx.HasQx; |
|
||||
import com.mdp.swagger.ApiEntityParams; |
|
||||
import com.xm.core.entity.XmExchange; |
|
||||
import com.xm.core.service.XmExchangeService; |
|
||||
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_exchange 功能表的操作有增删改查,对应的url分别为:<br> |
|
||||
* 新增: xm/xmExchange/add <br> |
|
||||
* 查询: xm/xmExchange/list<br> |
|
||||
* 模糊查询: xm/xmExchange/listKey<br> |
|
||||
* 修改: xm/xmExchange/edit <br> |
|
||||
* 删除: xm/xmExchange/del<br> |
|
||||
* 批量删除: xm/xmExchange/batchDel<br> |
|
||||
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br> |
|
||||
* 实体 XmExchange 表 XM.xm_exchange 当前主键(包括多主键): id; |
|
||||
***/ |
|
||||
@RestController("xm.core.xmExchangeController") |
|
||||
@RequestMapping(value="/**/xm/core/xmExchange") |
|
||||
@Api(tags={"功能表操作接口"}) |
|
||||
public class XmExchangeController { |
|
||||
|
|
||||
static Log logger=LogFactory.getLog(XmExchangeController.class); |
|
||||
|
|
||||
@Autowired |
|
||||
private XmExchangeService xmExchangeService; |
|
||||
|
|
||||
|
|
||||
|
|
||||
@ApiOperation( value = "查询功能表信息列表",notes="listXmExchange,条件之间是 and关系,模糊查询写法如 {studentName:'%才哥%'}") |
|
||||
@ApiEntityParams(XmExchange.class) |
|
||||
@ApiImplicitParams({ |
|
||||
@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=XmExchange.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") |
|
||||
}) |
|
||||
@RequestMapping(value="/list",method=RequestMethod.GET) |
|
||||
public Map<String,Object> listXmExchange( @ApiIgnore @RequestParam Map<String,Object> xmExchange){ |
|
||||
Map<String,Object> m = new HashMap<>(); |
|
||||
RequestUtils.transformArray(xmExchange, "ids"); |
|
||||
PageUtils.startPage(xmExchange); |
|
||||
List<Map<String,Object>> xmExchangeList = xmExchangeService.selectListMapByWhere(xmExchange); //列出XmExchange列表 |
|
||||
PageUtils.responePage(m, xmExchangeList); |
|
||||
m.put("data",xmExchangeList); |
|
||||
Tips tips=new Tips("查询成功"); |
|
||||
m.put("tips", tips); |
|
||||
return m; |
|
||||
} |
|
||||
|
|
||||
|
|
||||
|
|
||||
@ApiOperation( value = "新增一条功能表信息",notes="addXmExchange,主键如果为空,后台自动生成") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmExchange.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|
||||
}) |
|
||||
@RequestMapping(value="/add",method= RequestMethod.POST) |
|
||||
public Map<String,Object> addXmExchange(@RequestBody XmExchange xmExchange) { |
|
||||
Map<String,Object> m = new HashMap<>(); |
|
||||
Tips tips=new Tips("成功新增一条数据"); |
|
||||
try{ |
|
||||
if(StringUtils.isEmpty(xmExchange.getId())) { |
|
||||
xmExchange.setId(xmExchangeService.createKey("id")); |
|
||||
}else{ |
|
||||
XmExchange xmExchangeQuery = new XmExchange(xmExchange.getId()); |
|
||||
if(xmExchangeService.countByWhere(xmExchangeQuery)>0){ |
|
||||
tips.setFailureMsg("编号重复,请修改编号再提交"); |
|
||||
m.put("tips", tips); |
|
||||
return m; |
|
||||
} |
|
||||
} |
|
||||
xmExchangeService.insert(xmExchange); |
|
||||
m.put("data",xmExchange); |
|
||||
}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 = "删除一条功能表信息",notes="delXmExchange,仅需要上传主键字段") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}") |
|
||||
}) |
|
||||
@HasQx(value = "xm_core_xmExchange_del",name = "删除评论",moduleId = "xm-project",moduleName = "管理端-项目管理系统") |
|
||||
@RequestMapping(value="/del",method=RequestMethod.POST) |
|
||||
public Map<String,Object> delXmExchange(@RequestBody XmExchange xmExchange){ |
|
||||
Map<String,Object> m = new HashMap<>(); |
|
||||
Tips tips=new Tips("成功删除一条数据"); |
|
||||
try{ |
|
||||
xmExchangeService.deleteByPk(xmExchange); |
|
||||
}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 = "根据主键修改一条功能表信息",notes="editXmExchange") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200,response=XmExchange.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|
||||
}) |
|
||||
@RequestMapping(value="/edit",method=RequestMethod.POST) |
|
||||
public Map<String,Object> editXmExchange(@RequestBody XmExchange xmExchange) { |
|
||||
Map<String,Object> m = new HashMap<>(); |
|
||||
Tips tips=new Tips("成功更新一条数据"); |
|
||||
try{ |
|
||||
xmExchangeService.updateByPk(xmExchange); |
|
||||
m.put("data",xmExchange); |
|
||||
}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 = "根据主键列表批量删除功能表信息",notes="batchDelXmExchange,仅需要上传主键字段") |
|
||||
@ApiResponses({ |
|
||||
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}") |
|
||||
}) |
|
||||
@RequestMapping(value="/batchDel",method=RequestMethod.POST) |
|
||||
public Map<String,Object> batchDelXmExchange(@RequestBody List<XmExchange> xmExchanges) { |
|
||||
Map<String,Object> m = new HashMap<>(); |
|
||||
Tips tips=new Tips("成功删除"+xmExchanges.size()+"条数据"); |
|
||||
try{ |
|
||||
xmExchangeService.batchDelete(xmExchanges); |
|
||||
}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; |
|
||||
} |
|
||||
*/ |
|
||||
} |
|
||||
@ -1,379 +0,0 @@ |
|||||
package com.xm.core.entity; |
|
||||
|
|
||||
import io.swagger.annotations.ApiModel; |
|
||||
import io.swagger.annotations.ApiModelProperty; |
|
||||
|
|
||||
import java.util.Date; |
|
||||
|
|
||||
/** |
|
||||
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br> |
|
||||
* 实体 XmExchange所有属性名: <br> |
|
||||
* taskId,taskName,projectId,remark,id,pid,cuserid,cusername,ctime,cbranchId,adopt,adoptUserid,adoptUsername,adoptTime,closed,puserid,pusername,premark,notifyUserids,notifyChannels,notifyUsernames,cuserHeadImg,replyType;<br> |
|
||||
* 表 XM.xm_exchange 功能表的所有字段名: <br> |
|
||||
* task_id,task_name,project_id,remark,id,pid,cuserid,cusername,ctime,cbranch_id,adopt,adopt_userid,adopt_username,adopt_time,closed,puserid,pusername,premark,notify_userids,notify_channels,notify_usernames,cuser_head_img,reply_type;<br> |
|
||||
* 当前主键(包括多主键):<br> |
|
||||
* id;<br> |
|
||||
*/ |
|
||||
@ApiModel(description="功能表") |
|
||||
public class XmExchange implements java.io.Serializable { |
|
||||
|
|
||||
private static final long serialVersionUID = 1L; |
|
||||
|
|
||||
@ApiModelProperty(notes="评论编号,主键",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String id; |
|
||||
|
|
||||
|
|
||||
@ApiModelProperty(notes="功能编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String taskId; |
|
||||
|
|
||||
@ApiModelProperty(notes="功能名称",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String taskName; |
|
||||
|
|
||||
@ApiModelProperty(notes="归属产品编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String projectId; |
|
||||
|
|
||||
@ApiModelProperty(notes="备注",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String remark; |
|
||||
|
|
||||
@ApiModelProperty(notes="上级评论编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String pid; |
|
||||
|
|
||||
@ApiModelProperty(notes="评论人编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String cuserid; |
|
||||
|
|
||||
@ApiModelProperty(notes="评论人名称",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String cusername; |
|
||||
|
|
||||
@ApiModelProperty(notes="评论时间",allowEmptyValue=true,example="",allowableValues="") |
|
||||
Date ctime; |
|
||||
|
|
||||
@ApiModelProperty(notes="评论人所属机构",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String cbranchId; |
|
||||
|
|
||||
@ApiModelProperty(notes="是否采纳0否1采纳",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String adopt; |
|
||||
|
|
||||
@ApiModelProperty(notes="采纳人编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String adoptUserid; |
|
||||
|
|
||||
@ApiModelProperty(notes="采纳人名称",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String adoptUsername; |
|
||||
|
|
||||
@ApiModelProperty(notes="采纳时间",allowEmptyValue=true,example="",allowableValues="") |
|
||||
Date adoptTime; |
|
||||
|
|
||||
@ApiModelProperty(notes="关闭该评论0否1是",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String closed; |
|
||||
|
|
||||
@ApiModelProperty(notes="上级用户编号",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String puserid; |
|
||||
|
|
||||
@ApiModelProperty(notes="上级姓名",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String pusername; |
|
||||
|
|
||||
@ApiModelProperty(notes="上级备注",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String premark; |
|
||||
|
|
||||
@ApiModelProperty(notes="本评论需要同步给的人列表,逗号分隔",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String notifyUserids; |
|
||||
|
|
||||
@ApiModelProperty(notes="发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String notifyChannels; |
|
||||
|
|
||||
@ApiModelProperty(notes="通知用户姓名逗号分隔",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String notifyUsernames; |
|
||||
|
|
||||
@ApiModelProperty(notes="发言人头像地址",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String cuserHeadImg; |
|
||||
|
|
||||
@ApiModelProperty(notes="回复方式1引用2回复",allowEmptyValue=true,example="",allowableValues="") |
|
||||
String replyType; |
|
||||
|
|
||||
/**评论编号**/ |
|
||||
public XmExchange(String id) { |
|
||||
this.id = id; |
|
||||
} |
|
||||
|
|
||||
/**功能表**/ |
|
||||
public XmExchange() { |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 功能编号 |
|
||||
**/ |
|
||||
public void setTaskId(String taskId) { |
|
||||
this.taskId = taskId; |
|
||||
} |
|
||||
/** |
|
||||
* 功能名称 |
|
||||
**/ |
|
||||
public void setTaskName(String taskName) { |
|
||||
this.taskName = taskName; |
|
||||
} |
|
||||
/** |
|
||||
* 归属产品编号 |
|
||||
**/ |
|
||||
public void setProjectId(String projectId) { |
|
||||
this.projectId = projectId; |
|
||||
} |
|
||||
/** |
|
||||
* 备注 |
|
||||
**/ |
|
||||
public void setRemark(String remark) { |
|
||||
this.remark = remark; |
|
||||
} |
|
||||
/** |
|
||||
* 评论编号 |
|
||||
**/ |
|
||||
public void setId(String id) { |
|
||||
this.id = id; |
|
||||
} |
|
||||
/** |
|
||||
* 上级评论编号 |
|
||||
**/ |
|
||||
public void setPid(String pid) { |
|
||||
this.pid = pid; |
|
||||
} |
|
||||
/** |
|
||||
* 评论人编号 |
|
||||
**/ |
|
||||
public void setCuserid(String cuserid) { |
|
||||
this.cuserid = cuserid; |
|
||||
} |
|
||||
/** |
|
||||
* 评论人名称 |
|
||||
**/ |
|
||||
public void setCusername(String cusername) { |
|
||||
this.cusername = cusername; |
|
||||
} |
|
||||
/** |
|
||||
* 评论时间 |
|
||||
**/ |
|
||||
public void setCtime(Date ctime) { |
|
||||
this.ctime = ctime; |
|
||||
} |
|
||||
/** |
|
||||
* 评论人所属机构 |
|
||||
**/ |
|
||||
public void setCbranchId(String cbranchId) { |
|
||||
this.cbranchId = cbranchId; |
|
||||
} |
|
||||
/** |
|
||||
* 是否采纳0否1采纳 |
|
||||
**/ |
|
||||
public void setAdopt(String adopt) { |
|
||||
this.adopt = adopt; |
|
||||
} |
|
||||
/** |
|
||||
* 采纳人编号 |
|
||||
**/ |
|
||||
public void setAdoptUserid(String adoptUserid) { |
|
||||
this.adoptUserid = adoptUserid; |
|
||||
} |
|
||||
/** |
|
||||
* 采纳人名称 |
|
||||
**/ |
|
||||
public void setAdoptUsername(String adoptUsername) { |
|
||||
this.adoptUsername = adoptUsername; |
|
||||
} |
|
||||
/** |
|
||||
* 采纳时间 |
|
||||
**/ |
|
||||
public void setAdoptTime(Date adoptTime) { |
|
||||
this.adoptTime = adoptTime; |
|
||||
} |
|
||||
/** |
|
||||
* 关闭该评论0否1是 |
|
||||
**/ |
|
||||
public void setClosed(String closed) { |
|
||||
this.closed = closed; |
|
||||
} |
|
||||
/** |
|
||||
* 上级用户编号 |
|
||||
**/ |
|
||||
public void setPuserid(String puserid) { |
|
||||
this.puserid = puserid; |
|
||||
} |
|
||||
/** |
|
||||
* 上级姓名 |
|
||||
**/ |
|
||||
public void setPusername(String pusername) { |
|
||||
this.pusername = pusername; |
|
||||
} |
|
||||
/** |
|
||||
* 上级备注 |
|
||||
**/ |
|
||||
public void setPremark(String premark) { |
|
||||
this.premark = premark; |
|
||||
} |
|
||||
/** |
|
||||
* 本评论需要同步给的人列表,逗号分隔 |
|
||||
**/ |
|
||||
public void setNotifyUserids(String notifyUserids) { |
|
||||
this.notifyUserids = notifyUserids; |
|
||||
} |
|
||||
/** |
|
||||
* 发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割 |
|
||||
**/ |
|
||||
public void setNotifyChannels(String notifyChannels) { |
|
||||
this.notifyChannels = notifyChannels; |
|
||||
} |
|
||||
/** |
|
||||
* 通知用户姓名逗号分隔 |
|
||||
**/ |
|
||||
public void setNotifyUsernames(String notifyUsernames) { |
|
||||
this.notifyUsernames = notifyUsernames; |
|
||||
} |
|
||||
/** |
|
||||
* 发言人头像地址 |
|
||||
**/ |
|
||||
public void setCuserHeadImg(String cuserHeadImg) { |
|
||||
this.cuserHeadImg = cuserHeadImg; |
|
||||
} |
|
||||
/** |
|
||||
* 回复方式1引用2回复 |
|
||||
**/ |
|
||||
public void setReplyType(String replyType) { |
|
||||
this.replyType = replyType; |
|
||||
} |
|
||||
|
|
||||
/** |
|
||||
* 功能编号 |
|
||||
**/ |
|
||||
public String getTaskId() { |
|
||||
return this.taskId; |
|
||||
} |
|
||||
/** |
|
||||
* 功能名称 |
|
||||
**/ |
|
||||
public String getTaskName() { |
|
||||
return this.taskName; |
|
||||
} |
|
||||
/** |
|
||||
* 归属产品编号 |
|
||||
**/ |
|
||||
public String getProjectId() { |
|
||||
return this.projectId; |
|
||||
} |
|
||||
/** |
|
||||
* 备注 |
|
||||
**/ |
|
||||
public String getRemark() { |
|
||||
return this.remark; |
|
||||
} |
|
||||
/** |
|
||||
* 评论编号 |
|
||||
**/ |
|
||||
public String getId() { |
|
||||
return this.id; |
|
||||
} |
|
||||
/** |
|
||||
* 上级评论编号 |
|
||||
**/ |
|
||||
public String getPid() { |
|
||||
return this.pid; |
|
||||
} |
|
||||
/** |
|
||||
* 评论人编号 |
|
||||
**/ |
|
||||
public String getCuserid() { |
|
||||
return this.cuserid; |
|
||||
} |
|
||||
/** |
|
||||
* 评论人名称 |
|
||||
**/ |
|
||||
public String getCusername() { |
|
||||
return this.cusername; |
|
||||
} |
|
||||
/** |
|
||||
* 评论时间 |
|
||||
**/ |
|
||||
public Date getCtime() { |
|
||||
return this.ctime; |
|
||||
} |
|
||||
/** |
|
||||
* 评论人所属机构 |
|
||||
**/ |
|
||||
public String getCbranchId() { |
|
||||
return this.cbranchId; |
|
||||
} |
|
||||
/** |
|
||||
* 是否采纳0否1采纳 |
|
||||
**/ |
|
||||
public String getAdopt() { |
|
||||
return this.adopt; |
|
||||
} |
|
||||
/** |
|
||||
* 采纳人编号 |
|
||||
**/ |
|
||||
public String getAdoptUserid() { |
|
||||
return this.adoptUserid; |
|
||||
} |
|
||||
/** |
|
||||
* 采纳人名称 |
|
||||
**/ |
|
||||
public String getAdoptUsername() { |
|
||||
return this.adoptUsername; |
|
||||
} |
|
||||
/** |
|
||||
* 采纳时间 |
|
||||
**/ |
|
||||
public Date getAdoptTime() { |
|
||||
return this.adoptTime; |
|
||||
} |
|
||||
/** |
|
||||
* 关闭该评论0否1是 |
|
||||
**/ |
|
||||
public String getClosed() { |
|
||||
return this.closed; |
|
||||
} |
|
||||
/** |
|
||||
* 上级用户编号 |
|
||||
**/ |
|
||||
public String getPuserid() { |
|
||||
return this.puserid; |
|
||||
} |
|
||||
/** |
|
||||
* 上级姓名 |
|
||||
**/ |
|
||||
public String getPusername() { |
|
||||
return this.pusername; |
|
||||
} |
|
||||
/** |
|
||||
* 上级备注 |
|
||||
**/ |
|
||||
public String getPremark() { |
|
||||
return this.premark; |
|
||||
} |
|
||||
/** |
|
||||
* 本评论需要同步给的人列表,逗号分隔 |
|
||||
**/ |
|
||||
public String getNotifyUserids() { |
|
||||
return this.notifyUserids; |
|
||||
} |
|
||||
/** |
|
||||
* 发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割 |
|
||||
**/ |
|
||||
public String getNotifyChannels() { |
|
||||
return this.notifyChannels; |
|
||||
} |
|
||||
/** |
|
||||
* 通知用户姓名逗号分隔 |
|
||||
**/ |
|
||||
public String getNotifyUsernames() { |
|
||||
return this.notifyUsernames; |
|
||||
} |
|
||||
/** |
|
||||
* 发言人头像地址 |
|
||||
**/ |
|
||||
public String getCuserHeadImg() { |
|
||||
return this.cuserHeadImg; |
|
||||
} |
|
||||
/** |
|
||||
* 回复方式1引用2回复 |
|
||||
**/ |
|
||||
public String getReplyType() { |
|
||||
return this.replyType; |
|
||||
} |
|
||||
|
|
||||
} |
|
||||
@ -1,17 +0,0 @@ |
|||||
package com.xm.core.service; |
|
||||
|
|
||||
import com.mdp.core.service.BaseService; |
|
||||
import org.springframework.stereotype.Service; |
|
||||
|
|
||||
/** |
|
||||
* 父类已经支持增删改查操作,因此,即使本类什么也不写,也已经可以满足一般的增删改查操作了.<br> |
|
||||
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br> |
|
||||
* 实体 XmExchange 表 XM.xm_exchange 当前主键(包括多主键): id; |
|
||||
***/ |
|
||||
@Service("xm.core.xmExchangeService") |
|
||||
public class XmExchangeService extends BaseService { |
|
||||
|
|
||||
/** 请在此类添加自定义函数 */ |
|
||||
|
|
||||
} |
|
||||
|
|
||||
@ -1,26 +0,0 @@ |
|||||
package com.xm.core.vo; |
|
||||
|
|
||||
import com.xm.core.entity.XmExchange; |
|
||||
|
|
||||
import java.util.List; |
|
||||
|
|
||||
public class XmExchangeVo extends XmExchange { |
|
||||
XmExchange quote; |
|
||||
List<XmExchange> reply; |
|
||||
|
|
||||
public XmExchange getQuote() { |
|
||||
return quote; |
|
||||
} |
|
||||
|
|
||||
public void setQuote(XmExchange quote) { |
|
||||
this.quote = quote; |
|
||||
} |
|
||||
|
|
||||
public List<XmExchange> getReply() { |
|
||||
return reply; |
|
||||
} |
|
||||
|
|
||||
public void setReply(List<XmExchange> reply) { |
|
||||
this.reply = reply; |
|
||||
} |
|
||||
} |
|
||||
@ -1,228 +0,0 @@ |
|||||
<?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.xm.core.entity.XmExchange"> |
|
||||
|
|
||||
|
|
||||
<!--开始 自定sql函数区域 --> |
|
||||
<!--请在此区域添加自定义函数--> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!--结束 自定义sql函数区域--> |
|
||||
|
|
||||
|
|
||||
|
|
||||
<!-- 通过条件查询获取数据列表 返回list<map> --> |
|
||||
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> |
|
||||
select * from xm_exchange res |
|
||||
<where> |
|
||||
<if test="ids != null"> and |
|
||||
id in |
|
||||
<foreach collection="ids" item="item" index="index" open="(" separator="," close=")" > |
|
||||
#{item} |
|
||||
</foreach> |
|
||||
</if> |
|
||||
<include refid="where"/> |
|
||||
<if test="key != null and key !='' "> </if> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 通过条件查询获取数据列表 不分页 返回 list<Object> --> |
|
||||
<select id="selectListByWhere" parameterType="com.xm.core.entity.XmExchange" resultType="com.xm.core.entity.XmExchange"> |
|
||||
select * from xm_exchange res |
|
||||
<where> |
|
||||
<include refid="where"/> |
|
||||
</where> |
|
||||
</select> |
|
||||
|
|
||||
<!-- 通过主键查询获取数据对象 返回object --> |
|
||||
<select id="selectOneObject" parameterType="com.xm.core.entity.XmExchange" resultType="com.xm.core.entity.XmExchange"> |
|
||||
select * from xm_exchange res |
|
||||
where |
|
||||
res.id = #{id} |
|
||||
</select> |
|
||||
|
|
||||
<!-- 通过主键查询获取数据对象 返回map--> |
|
||||
<select id="selectOneMap" parameterType="HashMap" resultType="HashMap"> |
|
||||
select * from xm_exchange res |
|
||||
where |
|
||||
res.id = #{id} |
|
||||
</select> |
|
||||
<!-- 获取数据条目 返回long --> |
|
||||
<select id="countByWhere" parameterType="com.xm.core.entity.XmExchange" resultType="long"> |
|
||||
select count(1) from xm_exchange res |
|
||||
<where> |
|
||||
<include refid="where"/> |
|
||||
</where> |
|
||||
</select> |
|
||||
<!-- 新增一条记录 主键id,--> |
|
||||
<insert id="insert" parameterType="com.xm.core.entity.XmExchange" useGeneratedKeys="false" keyProperty="id"> |
|
||||
insert into xm_exchange( |
|
||||
<include refid="columns"/> |
|
||||
) values ( |
|
||||
#{taskId},#{taskName},#{projectId},#{remark},#{id},#{pid},#{cuserid},#{cusername},#{ctime},#{cbranchId},#{adopt},#{adoptUserid},#{adoptUsername},#{adoptTime},#{closed},#{puserid},#{pusername},#{premark},#{notifyUserids},#{notifyChannels},#{notifyUsernames},#{cuserHeadImg},#{replyType} |
|
||||
) |
|
||||
</insert> |
|
||||
|
|
||||
<!-- 按条件删除若干条记录--> |
|
||||
<delete id="deleteByWhere" parameterType="com.xm.core.entity.XmExchange"> |
|
||||
delete from xm_exchange res |
|
||||
<where> |
|
||||
<include refid="where"/> |
|
||||
</where> |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 按主键删除一条记录--> |
|
||||
<delete id="deleteByPk" parameterType="com.xm.core.entity.XmExchange"> |
|
||||
delete from xm_exchange |
|
||||
where id = #{id} |
|
||||
</delete> |
|
||||
|
|
||||
<!-- 根据条件修改若干条记录 --> |
|
||||
<update id="updateSomeFieldByPk" parameterType="com.xm.core.entity.XmExchange"> |
|
||||
update xm_exchange |
|
||||
<set> |
|
||||
<include refid="someFieldSet"/> |
|
||||
</set> |
|
||||
where id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!-- 根据主键修改一条记录 --> |
|
||||
<update id="updateByPk" parameterType="com.xm.core.entity.XmExchange"> |
|
||||
update xm_exchange |
|
||||
<set> |
|
||||
<include refid="set"/> |
|
||||
</set> |
|
||||
where id = #{id} |
|
||||
</update> |
|
||||
|
|
||||
<!-- 批量新增 批量插入 借用insert 循环插入实现 |
|
||||
<insert id="batchInsert" parameterType="List"> |
|
||||
</insert> |
|
||||
--> |
|
||||
|
|
||||
<!-- 批量更新 --> |
|
||||
<update id="batchUpdate" parameterType="List"> |
|
||||
<foreach collection="list" item="item" index="index" separator=";" > |
|
||||
update xm_exchange |
|
||||
set |
|
||||
<include refid="batchSet"/> |
|
||||
where id = #{item.id} |
|
||||
</foreach> |
|
||||
</update> |
|
||||
<!-- 批量删除 --> |
|
||||
<delete id="batchDelete" parameterType="List"> |
|
||||
delete from xm_exchange |
|
||||
where id in |
|
||||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" > |
|
||||
#{item.id } |
|
||||
</foreach> |
|
||||
</delete> |
|
||||
|
|
||||
|
|
||||
<!--sql片段 列--> |
|
||||
<sql id="columns"> |
|
||||
task_id,task_name,project_id,remark,id,pid,cuserid,cusername,ctime,cbranch_id,adopt,adopt_userid,adopt_username,adopt_time,closed,puserid,pusername,premark,notify_userids,notify_channels,notify_usernames,cuser_head_img,reply_type |
|
||||
</sql> |
|
||||
|
|
||||
<!--sql片段 动态条件 YYYY-MM-DD HH24:MI:SS--> |
|
||||
<sql id="where"> |
|
||||
<if test="taskId != null and taskId != ''"> and res.task_id = #{taskId} </if> |
|
||||
<if test="taskName != null and taskName != ''"> and res.task_name = #{taskName} </if> |
|
||||
<if test="projectId != null and projectId != ''"> and res.project_id = #{projectId} </if> |
|
||||
<if test="remark != null and remark != ''"> and res.remark = #{remark} </if> |
|
||||
<if test="id != null and id != ''"> and res.id = #{id} </if> |
|
||||
<if test="pid != null and pid != ''"> and res.pid = #{pid} </if> |
|
||||
<if test="cuserid != null and cuserid != ''"> and res.cuserid = #{cuserid} </if> |
|
||||
<if test="cusername != null and cusername != ''"> and res.cusername = #{cusername} </if> |
|
||||
<if test="ctime != null"> and TO_CHAR(res.ctime,'YYYY-MM-DD') = TO_CHAR(#{ctime},'YYYY-MM-DD') </if> |
|
||||
<if test="cbranchId != null and cbranchId != ''"> and res.cbranch_id = #{cbranchId} </if> |
|
||||
<if test="adopt != null and adopt != ''"> and res.adopt = #{adopt} </if> |
|
||||
<if test="adoptUserid != null and adoptUserid != ''"> and res.adopt_userid = #{adoptUserid} </if> |
|
||||
<if test="adoptUsername != null and adoptUsername != ''"> and res.adopt_username = #{adoptUsername} </if> |
|
||||
<if test="adoptTime != null"> and TO_CHAR(res.adopt_time,'YYYY-MM-DD') = TO_CHAR(#{adoptTime},'YYYY-MM-DD') </if> |
|
||||
<if test="closed != null and closed != ''"> and res.closed = #{closed} </if> |
|
||||
<if test="puserid != null and puserid != ''"> and res.puserid = #{puserid} </if> |
|
||||
<if test="pusername != null and pusername != ''"> and res.pusername = #{pusername} </if> |
|
||||
<if test="premark != null and premark != ''"> and res.premark = #{premark} </if> |
|
||||
<if test="notifyUserids != null and notifyUserids != ''"> and res.notify_userids = #{notifyUserids} </if> |
|
||||
<if test="notifyChannels != null and notifyChannels != ''"> and res.notify_channels = #{notifyChannels} </if> |
|
||||
<if test="notifyUsernames != null and notifyUsernames != ''"> and res.notify_usernames = #{notifyUsernames} </if> |
|
||||
<if test="cuserHeadImg != null and cuserHeadImg != ''"> and res.cuser_head_img = #{cuserHeadImg} </if> |
|
||||
<if test="replyType != null and replyType != ''"> and res.reply_type = #{replyType} </if> |
|
||||
</sql> |
|
||||
<!--sql片段 更新字段 --> |
|
||||
<sql id="set"> |
|
||||
task_id = #{taskId}, |
|
||||
task_name = #{taskName}, |
|
||||
project_id = #{projectId}, |
|
||||
remark = #{remark}, |
|
||||
pid = #{pid}, |
|
||||
cuserid = #{cuserid}, |
|
||||
cusername = #{cusername}, |
|
||||
ctime = #{ctime}, |
|
||||
cbranch_id = #{cbranchId}, |
|
||||
adopt = #{adopt}, |
|
||||
adopt_userid = #{adoptUserid}, |
|
||||
adopt_username = #{adoptUsername}, |
|
||||
adopt_time = #{adoptTime}, |
|
||||
closed = #{closed}, |
|
||||
puserid = #{puserid}, |
|
||||
pusername = #{pusername}, |
|
||||
premark = #{premark}, |
|
||||
notify_userids = #{notifyUserids}, |
|
||||
notify_channels = #{notifyChannels}, |
|
||||
notify_usernames = #{notifyUsernames}, |
|
||||
cuser_head_img = #{cuserHeadImg}, |
|
||||
reply_type = #{replyType} |
|
||||
</sql> |
|
||||
<sql id="someFieldSet"> |
|
||||
<if test="taskId != null and taskId != ''"> task_id = #{taskId}, </if> |
|
||||
<if test="taskName != null and taskName != ''"> task_name = #{taskName}, </if> |
|
||||
<if test="projectId != null and projectId != ''"> project_id = #{projectId}, </if> |
|
||||
<if test="remark != null and remark != ''"> remark = #{remark}, </if> |
|
||||
<if test="pid != null and pid != ''"> pid = #{pid}, </if> |
|
||||
<if test="cuserid != null and cuserid != ''"> cuserid = #{cuserid}, </if> |
|
||||
<if test="cusername != null and cusername != ''"> cusername = #{cusername}, </if> |
|
||||
<if test="ctime != null"> ctime = #{ctime}, </if> |
|
||||
<if test="cbranchId != null and cbranchId != ''"> cbranch_id = #{cbranchId}, </if> |
|
||||
<if test="adopt != null and adopt != ''"> adopt = #{adopt}, </if> |
|
||||
<if test="adoptUserid != null and adoptUserid != ''"> adopt_userid = #{adoptUserid}, </if> |
|
||||
<if test="adoptUsername != null and adoptUsername != ''"> adopt_username = #{adoptUsername}, </if> |
|
||||
<if test="adoptTime != null"> adopt_time = #{adoptTime}, </if> |
|
||||
<if test="closed != null and closed != ''"> closed = #{closed}, </if> |
|
||||
<if test="puserid != null and puserid != ''"> puserid = #{puserid}, </if> |
|
||||
<if test="pusername != null and pusername != ''"> pusername = #{pusername}, </if> |
|
||||
<if test="premark != null and premark != ''"> premark = #{premark}, </if> |
|
||||
<if test="notifyUserids != null and notifyUserids != ''"> notify_userids = #{notifyUserids}, </if> |
|
||||
<if test="notifyChannels != null and notifyChannels != ''"> notify_channels = #{notifyChannels}, </if> |
|
||||
<if test="notifyUsernames != null and notifyUsernames != ''"> notify_usernames = #{notifyUsernames}, </if> |
|
||||
<if test="cuserHeadImg != null and cuserHeadImg != ''"> cuser_head_img = #{cuserHeadImg}, </if> |
|
||||
<if test="replyType != null and replyType != ''"> reply_type = #{replyType}, </if> |
|
||||
</sql> |
|
||||
<!--sql片段 批量更新 --> |
|
||||
<sql id="batchSet"> |
|
||||
task_id = #{item.taskId}, |
|
||||
task_name = #{item.taskName}, |
|
||||
project_id = #{item.projectId}, |
|
||||
remark = #{item.remark}, |
|
||||
pid = #{item.pid}, |
|
||||
cuserid = #{item.cuserid}, |
|
||||
cusername = #{item.cusername}, |
|
||||
ctime = #{item.ctime}, |
|
||||
cbranch_id = #{item.cbranchId}, |
|
||||
adopt = #{item.adopt}, |
|
||||
adopt_userid = #{item.adoptUserid}, |
|
||||
adopt_username = #{item.adoptUsername}, |
|
||||
adopt_time = #{item.adoptTime}, |
|
||||
closed = #{item.closed}, |
|
||||
puserid = #{item.puserid}, |
|
||||
pusername = #{item.pusername}, |
|
||||
premark = #{item.premark}, |
|
||||
notify_userids = #{item.notifyUserids}, |
|
||||
notify_channels = #{item.notifyChannels}, |
|
||||
notify_usernames = #{item.notifyUsernames}, |
|
||||
cuser_head_img = #{item.cuserHeadImg}, |
|
||||
reply_type = #{item.replyType} |
|
||||
</sql> |
|
||||
</mapper> |
|
||||
Write
Preview
Loading…
Cancel
Save
Reference in new issue