5 changed files with 1 additions and 829 deletions
-
204xm-core/src/main/java/com/xm/core/ctrl/XmMenuExchangeController.java
-
379xm-core/src/main/java/com/xm/core/entity/XmMenuExchange.java
-
17xm-core/src/main/java/com/xm/core/service/XmMenuExchangeService.java
-
2xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuCommentMapper.xml
-
228xm-core/src/main/resources/mybatis/mapper/xm/core/dao/XmMenuExchangeMapper.xml
@ -1,204 +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.safe.client.utils.LoginUtils; |
|||
import com.xm.core.entity.XmMenuExchange; |
|||
import com.xm.core.service.XmMenuExchangeService; |
|||
import com.xm.core.service.push.XmMenuPushMsgService; |
|||
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.Date; |
|||
import java.util.HashMap; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
/** |
|||
* url编制采用rest风格,如对XM.xm_menu_exchange 功能表的操作有增删改查,对应的url分别为:<br> |
|||
* 新增: xm/xmMenuExchange/add <br> |
|||
* 查询: xm/xmMenuExchange/list<br> |
|||
* 模糊查询: xm/xmMenuExchange/listKey<br> |
|||
* 修改: xm/xmMenuExchange/edit <br> |
|||
* 删除: xm/xmMenuExchange/del<br> |
|||
* 批量删除: xm/xmMenuExchange/batchDel<br> |
|||
* 组织 com.qqkj 顶级模块 oa 大模块 xm 小模块 <br> |
|||
* 实体 XmMenuExchange 表 XM.xm_menu_exchange 当前主键(包括多主键): id; |
|||
***/ |
|||
@RestController("xm.core.xmMenuExchangeController") |
|||
@RequestMapping(value="/**/xm/core/xmMenuExchange") |
|||
@Api(tags={"功能表操作接口"}) |
|||
public class XmMenuExchangeController { |
|||
|
|||
static Log logger=LogFactory.getLog(XmMenuExchangeController.class); |
|||
|
|||
@Autowired |
|||
private XmMenuExchangeService xmMenuExchangeService; |
|||
|
|||
@Autowired |
|||
XmMenuPushMsgService pushMsgService ; |
|||
|
|||
|
|||
@ApiOperation( value = "查询功能表信息列表",notes="listXmMenuExchange,条件之间是 and关系,模糊查询写法如 {studentName:'%才哥%'}") |
|||
@ApiImplicitParams({ |
|||
@ApiImplicitParam(name="id",value="评论编号,主键",required=false), |
|||
@ApiImplicitParam(name="menuId",value="功能编号",required=false), |
|||
@ApiImplicitParam(name="menuName",value="功能名称",required=false), |
|||
@ApiImplicitParam(name="productId",value="归属产品编号",required=false), |
|||
@ApiImplicitParam(name="remark",value="备注",required=false), |
|||
@ApiImplicitParam(name="pid",value="上级评论编号",required=false), |
|||
@ApiImplicitParam(name="cuserid",value="评论人编号",required=false), |
|||
@ApiImplicitParam(name="cusername",value="评论人名称",required=false), |
|||
@ApiImplicitParam(name="ctime",value="评论时间",required=false), |
|||
@ApiImplicitParam(name="cbranchId",value="评论人所属机构",required=false), |
|||
@ApiImplicitParam(name="adopt",value="是否采纳0否1采纳",required=false), |
|||
@ApiImplicitParam(name="adoptUserid",value="采纳人编号",required=false), |
|||
@ApiImplicitParam(name="adoptUsername",value="采纳人名称",required=false), |
|||
@ApiImplicitParam(name="adoptTime",value="采纳时间",required=false), |
|||
@ApiImplicitParam(name="closed",value="关闭该评论0否1是",required=false), |
|||
@ApiImplicitParam(name="puserid",value="上级用户编号",required=false), |
|||
@ApiImplicitParam(name="pusername",value="上级姓名",required=false), |
|||
@ApiImplicitParam(name="premark",value="上级备注",required=false), |
|||
@ApiImplicitParam(name="notifyUserids",value="本评论需要同步给的人列表,逗号分隔",required=false), |
|||
@ApiImplicitParam(name="notifyChannels",value="发送通知渠道inner-email/wxpub/sms/im/out-email等逗号分割",required=false), |
|||
@ApiImplicitParam(name="notifyUsernames",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= XmMenuExchange.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'错误码'},total:总记录数,data:[数据对象1,数据对象2,...]}") |
|||
}) |
|||
@RequestMapping(value="/list",method=RequestMethod.GET) |
|||
public Map<String,Object> listXmMenuExchange( @ApiIgnore @RequestParam Map<String,Object> xmMenuExchange){ |
|||
Map<String,Object> m = new HashMap<>(); |
|||
RequestUtils.transformArray(xmMenuExchange, "ids"); |
|||
PageUtils.startPage(xmMenuExchange); |
|||
if( !StringUtils.hasText((String) xmMenuExchange.get("branchId"))){ |
|||
xmMenuExchange.put("branchId",LoginUtils.getCurrentUserInfo().getBranchId()); |
|||
} |
|||
List<Map<String,Object>> xmMenuExchangeList = xmMenuExchangeService.selectListMapByWhere(xmMenuExchange); //列出XmMenuExchange列表 |
|||
PageUtils.responePage(m, xmMenuExchangeList); |
|||
m.put("data",xmMenuExchangeList); |
|||
Tips tips=new Tips("查询成功"); |
|||
m.put("tips", tips); |
|||
return m; |
|||
} |
|||
|
|||
|
|||
|
|||
/***/ |
|||
@ApiOperation( value = "新增一条功能表信息",notes="addXmMenuExchange,主键如果为空,后台自动生成") |
|||
@ApiResponses({ |
|||
@ApiResponse(code = 200,response=XmMenuExchange.class,message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|||
}) |
|||
@HasQx(value = "xm_core_xmMenuExchange_add",name = "发布需求评论",moduleId = "xm-project",moduleName = "管理端-项目管理系统") |
|||
@RequestMapping(value="/add",method=RequestMethod.POST) |
|||
public Map<String,Object> addXmMenuExchange(@RequestBody XmMenuExchange xmMenuExchange) { |
|||
Map<String,Object> m = new HashMap<>(); |
|||
Tips tips=new Tips("成功新增一条数据"); |
|||
try{ |
|||
if(StringUtils.isEmpty(xmMenuExchange.getId())) { |
|||
xmMenuExchange.setId(this.xmMenuExchangeService.createKey("id")); |
|||
} |
|||
xmMenuExchange.setCtime(new Date()); |
|||
xmMenuExchangeService.insert(xmMenuExchange); |
|||
String imMsg=xmMenuExchange.getCusername()+"发表关于需求【"+xmMenuExchange.getMenuId()+"-"+xmMenuExchange.getMenuName()+"】的评论:"+xmMenuExchange.getRemark(); |
|||
pushMsgService.pushMenuRelUsersMsg(xmMenuExchange.getCbranchId(), xmMenuExchange.getMenuId(), xmMenuExchange.getCuserid(), xmMenuExchange.getCusername(), imMsg); |
|||
m.put("data",xmMenuExchange); |
|||
}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="delXmMenuExchange,仅需要上传主键字段") |
|||
@ApiResponses({ |
|||
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}}") |
|||
}) |
|||
@HasQx(value = "xm_core_xmMenuExchange_del",name = "删除需求评论",moduleId = "xm-project",moduleName = "管理端-项目管理系统") |
|||
@RequestMapping(value="/del",method=RequestMethod.POST) |
|||
public Map<String,Object> delXmMenuExchange(@RequestBody XmMenuExchange xmMenuExchange){ |
|||
Map<String,Object> m = new HashMap<>(); |
|||
Tips tips=new Tips("成功删除一条数据"); |
|||
try{ |
|||
xmMenuExchangeService.deleteByPk(xmMenuExchange); |
|||
}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="editXmMenuExchange") |
|||
@ApiResponses({ |
|||
@ApiResponse(code = 200,response=XmMenuExchange.class, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'},data:数据对象}") |
|||
}) |
|||
@HasQx(value = "xm_core_xmMenuExchange_edit",name = "修改需求评论",moduleId = "xm-project",moduleName = "管理端-项目管理系统") |
|||
@RequestMapping(value="/edit",method=RequestMethod.POST) |
|||
public Map<String,Object> editXmMenuExchange(@RequestBody XmMenuExchange xmMenuExchange) { |
|||
Map<String,Object> m = new HashMap<>(); |
|||
Tips tips=new Tips("成功更新一条数据"); |
|||
try{ |
|||
xmMenuExchangeService.updateByPk(xmMenuExchange); |
|||
m.put("data",xmMenuExchange); |
|||
}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="batchDelXmMenuExchange,仅需要上传主键字段") |
|||
@ApiResponses({ |
|||
@ApiResponse(code = 200, message = "{tips:{isOk:true/false,msg:'成功/失败原因',tipscode:'失败时错误码'}") |
|||
}) |
|||
@HasQx(value = "xm_core_xmMenuExchange_batchDel",name = "批量删除需求评论",moduleId = "xm-project",moduleName = "管理端-项目管理系统") |
|||
@RequestMapping(value="/batchDel",method=RequestMethod.POST) |
|||
public Map<String,Object> batchDelXmMenuExchange(@RequestBody List<XmMenuExchange> xmMenuExchanges) { |
|||
Map<String,Object> m = new HashMap<>(); |
|||
Tips tips=new Tips("成功删除"+xmMenuExchanges.size()+"条数据"); |
|||
try{ |
|||
xmMenuExchangeService.batchDelete(xmMenuExchanges); |
|||
}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> |
|||
* 实体 XmMenuExchange所有属性名: <br> |
|||
* menuId,menuName,productId,remark,id,pid,cuserid,cusername,ctime,cbranchId,adopt,adoptUserid,adoptUsername,adoptTime,closed,puserid,pusername,premark,notifyUserids,notifyChannels,notifyUsernames,cuserHeadImg,replyType;<br> |
|||
* 表 XM.xm_menu_exchange 功能表的所有字段名: <br> |
|||
* menu_id,menu_name,product_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 XmMenuExchange 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 menuId; |
|||
|
|||
@ApiModelProperty(notes="功能名称",allowEmptyValue=true,example="",allowableValues="") |
|||
String menuName; |
|||
|
|||
@ApiModelProperty(notes="归属产品编号",allowEmptyValue=true,example="",allowableValues="") |
|||
String productId; |
|||
|
|||
@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 XmMenuExchange(String id) { |
|||
this.id = id; |
|||
} |
|||
|
|||
/**功能表**/ |
|||
public XmMenuExchange() { |
|||
} |
|||
|
|||
/** |
|||
* 功能编号 |
|||
**/ |
|||
public void setMenuId(String menuId) { |
|||
this.menuId = menuId; |
|||
} |
|||
/** |
|||
* 功能名称 |
|||
**/ |
|||
public void setMenuName(String menuName) { |
|||
this.menuName = menuName; |
|||
} |
|||
/** |
|||
* 归属产品编号 |
|||
**/ |
|||
public void setProductId(String productId) { |
|||
this.productId = productId; |
|||
} |
|||
/** |
|||
* 备注 |
|||
**/ |
|||
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 getMenuId() { |
|||
return this.menuId; |
|||
} |
|||
/** |
|||
* 功能名称 |
|||
**/ |
|||
public String getMenuName() { |
|||
return this.menuName; |
|||
} |
|||
/** |
|||
* 归属产品编号 |
|||
**/ |
|||
public String getProductId() { |
|||
return this.productId; |
|||
} |
|||
/** |
|||
* 备注 |
|||
**/ |
|||
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> |
|||
* 实体 XmMenuExchange 表 XM.xm_menu_exchange 当前主键(包括多主键): id; |
|||
***/ |
|||
@Service("xm.core.xmMenuExchangeService") |
|||
public class XmMenuExchangeService extends BaseService { |
|||
|
|||
/** 请在此类添加自定义函数 */ |
|||
|
|||
} |
|||
|
|||
@ -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.XmMenuExchange"> |
|||
|
|||
|
|||
<!--开始 自定sql函数区域 --> |
|||
<!--请在此区域添加自定义函数--> |
|||
|
|||
|
|||
|
|||
<!--结束 自定义sql函数区域--> |
|||
|
|||
|
|||
|
|||
<!-- 通过条件查询获取数据列表 返回list<map> --> |
|||
<select id="selectListMapByWhere" parameterType="HashMap" resultType="HashMap"> |
|||
select * from xm_menu_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.XmMenuExchange" resultType="com.xm.core.entity.XmMenuExchange"> |
|||
select * from xm_menu_exchange res |
|||
<where> |
|||
<include refid="where"/> |
|||
</where> |
|||
</select> |
|||
|
|||
<!-- 通过主键查询获取数据对象 返回object --> |
|||
<select id="selectOneObject" parameterType="com.xm.core.entity.XmMenuExchange" resultType="com.xm.core.entity.XmMenuExchange"> |
|||
select * from xm_menu_exchange res |
|||
where |
|||
res.id = #{id} |
|||
</select> |
|||
|
|||
<!-- 通过主键查询获取数据对象 返回map--> |
|||
<select id="selectOneMap" parameterType="HashMap" resultType="HashMap"> |
|||
select * from xm_menu_exchange res |
|||
where |
|||
res.id = #{id} |
|||
</select> |
|||
<!-- 获取数据条目 返回long --> |
|||
<select id="countByWhere" parameterType="com.xm.core.entity.XmMenuExchange" resultType="long"> |
|||
select count(1) from xm_menu_exchange res |
|||
<where> |
|||
<include refid="where"/> |
|||
</where> |
|||
</select> |
|||
<!-- 新增一条记录 主键id,--> |
|||
<insert id="insert" parameterType="com.xm.core.entity.XmMenuExchange" useGeneratedKeys="false" keyProperty="id"> |
|||
insert into xm_menu_exchange( |
|||
<include refid="columns"/> |
|||
) values ( |
|||
#{menuId},#{menuName},#{productId},#{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.XmMenuExchange"> |
|||
delete from xm_menu_exchange res |
|||
<where> |
|||
<include refid="where"/> |
|||
</where> |
|||
</delete> |
|||
|
|||
<!-- 按主键删除一条记录--> |
|||
<delete id="deleteByPk" parameterType="com.xm.core.entity.XmMenuExchange"> |
|||
delete from xm_menu_exchange |
|||
where id = #{id} |
|||
</delete> |
|||
|
|||
<!-- 根据条件修改若干条记录 --> |
|||
<update id="updateSomeFieldByPk" parameterType="com.xm.core.entity.XmMenuExchange"> |
|||
update xm_menu_exchange |
|||
<set> |
|||
<include refid="someFieldSet"/> |
|||
</set> |
|||
where id = #{id} |
|||
</update> |
|||
|
|||
<!-- 根据主键修改一条记录 --> |
|||
<update id="updateByPk" parameterType="com.xm.core.entity.XmMenuExchange"> |
|||
update xm_menu_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_menu_exchange |
|||
set |
|||
<include refid="batchSet"/> |
|||
where id = #{item.id} |
|||
</foreach> |
|||
</update> |
|||
<!-- 批量删除 --> |
|||
<delete id="batchDelete" parameterType="List"> |
|||
delete from xm_menu_exchange |
|||
where id in |
|||
<foreach collection="list" item="item" index="index" open="(" separator="," close=")" > |
|||
#{item.id } |
|||
</foreach> |
|||
</delete> |
|||
|
|||
|
|||
<!--sql片段 列--> |
|||
<sql id="columns"> |
|||
menu_id,menu_name,product_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="menuId != null and menuId != ''"> and res.menu_id = #{menuId} </if> |
|||
<if test="menuName != null and menuName != ''"> and res.menu_name = #{menuName} </if> |
|||
<if test="productId != null and productId != ''"> and res.product_id = #{productId} </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"> |
|||
menu_id = #{menuId}, |
|||
menu_name = #{menuName}, |
|||
product_id = #{productId}, |
|||
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="menuId != null and menuId != ''"> menu_id = #{menuId}, </if> |
|||
<if test="menuName != null and menuName != ''"> menu_name = #{menuName}, </if> |
|||
<if test="productId != null and productId != ''"> product_id = #{productId}, </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"> |
|||
menu_id = #{item.menuId}, |
|||
menu_name = #{item.menuName}, |
|||
product_id = #{item.productId}, |
|||
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