use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.
the class GroupController method groupMember.
/**
* 功能描述:添加小组成员
*
* @param pmphGroupMembers
* 需要小组Id 成员Id 是否作家用户
* @return 是否成功
*/
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "添加小组成员")
@RequestMapping(value = "/add/groupMember", method = RequestMethod.POST)
public ResponseBean groupMember(Long groupId, String pmphGroupMembers, HttpServletRequest request) {
Gson gson = new Gson();
Type type = new TypeToken<ArrayList<PmphGroupMember>>() {
}.getType();
List<PmphGroupMember> list = gson.fromJson(pmphGroupMembers, type);
String sessionId = CookiesUtil.getSessionId(request);
return new ResponseBean(pmphGroupMemberService.addPmphGroupMembers(groupId, list));
}
use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.
the class GroupController method identity.
/**
* 功能描述:批量修改小组成员权限
*
* @param listPar
* 成员id
* @return 是否成功
*/
@ResponseBody
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "批量修改小组成员权限")
@RequestMapping(value = "/update/identity", method = RequestMethod.PUT)
public ResponseBean identity(Long groupId, String pmphGroupMembers, HttpServletRequest request) {
Gson gson = new Gson();
Type type = new TypeToken<ArrayList<PmphGroupMember>>() {
}.getType();
List<PmphGroupMember> list = gson.fromJson(pmphGroupMembers, type);
String sessionId = CookiesUtil.getSessionId(request);
return new ResponseBean(pmphGroupMemberService.updateMemberIdentity(groupId, list, sessionId));
}
use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.
the class GroupController method pmphGroup.
/**
* 根据小组名称模糊查询获取当前用户的小组
*
* @author Mryang
* @param pmphGroup
* @return
* @createDate 2017年9月21日 下午4:02:57
*/
@RequestMapping(value = "/list/pmphGroup", method = RequestMethod.GET)
@LogDetail(businessType = BUSSINESS_TYPE, logRemark = "根据小组名称模糊查询获取当前用户的小组")
@ResponseBody
public ResponseBean pmphGroup(@RequestParam(name = "groupName", defaultValue = "") String groupName, HttpServletRequest request) {
/*
* --------- 以下是正确的示例 ---------
*
* 在ResponseBean初始化时,通过ResponseBeanAop对其构造函数进行切面编程,
* 因此返回时<务必>要使用ResponseBean的构造函数即 new ResponseBean(anything)
*/
PmphGroup pmphGroup = new PmphGroup();
if (StringUtil.isEmpty(groupName)) {
pmphGroup.setGroupName(groupName.trim());
}
String sessionId = CookiesUtil.getSessionId(request);
return new ResponseBean(pmphGroupService.listPmphGroup(pmphGroup, sessionId));
}
use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.
the class MaterialController method add.
/**
* 新建遴选公告
*
* @param sessionId
* @param material
* 教材对象
* @param materialContacts
* 多个教材联系人
* @param materialExtensions
* 多个教材扩展项
* @param MaterialProjectEditors
* 多个教材扩项目编辑
* @param materialExtra
* 教材通知备
* @param materialNoticeAttachments
* 多个教材通知
* @param noticeFiles
* 通知文件
* @param materialNoteAttachments
* 多个教材备注
* @param noteFiles
* 备注文件
* @return
*/
@ResponseBody
@LogDetail(businessType = Business_Type, logRemark = "新建遴选公告")
@RequestMapping(value = "/add", method = RequestMethod.POST)
public ResponseBean add(HttpServletRequest request, MaterialVO materialVO, // MultipartFile[] noteFiles,
String deadline, String actualDeadline, String ageDeadline) {
try {
materialVO.getMaterial().setDeadline(DateUtil.str3Date(deadline));
materialVO.getMaterial().setActualDeadline(DateUtil.str3Date(actualDeadline));
materialVO.getMaterial().setAgeDeadline(DateUtil.str3Date(ageDeadline));
return new ResponseBean(materialService.addOrUpdateMaterial(request, materialVO, // noteFiles,
false));
} catch (IOException e) {
ResponseBean responseBean = new ResponseBean(e);
responseBean.setData("上传文件失败");
return responseBean;
} catch (Exception e) {
ResponseBean responseBean = new ResponseBean(e);
responseBean.setData(e.getMessage());
return responseBean;
}
}
use of com.bc.pmpheep.annotation.LogDetail in project pmph by BCSquad.
the class MaterialController method list.
/**
* 功能描述:初始化/条件查询教材列表
*
* @param request
* @param pageSize
* 当前页条数
* @param pageNumber
* 当前页数
* @param isMy
* 是否我的
* @param state
* 当前状态
* @param materialName
* 教材名称
* @param contactUserName
* 联系人名称
* @return
*/
@ResponseBody
@LogDetail(businessType = Business_Type, logRemark = "查询教材公告列表")
@RequestMapping(value = "/list", method = RequestMethod.GET)
public ResponseBean list(HttpServletRequest request, Integer pageSize, Integer pageNumber, Boolean isMy, String state, String materialName, String contactUserName) {
String sessionId = CookiesUtil.getSessionId(request);
PageParameter<MaterialListVO> pageParameter = new PageParameter<>(pageNumber, pageSize);
MaterialListVO materialListVO = new MaterialListVO();
materialListVO.setIsMy(isMy);
materialListVO.setState(state);
materialListVO.setContactUserName(contactUserName);
materialListVO.setMaterialName(materialName);
pageParameter.setParameter(materialListVO);
return new ResponseBean(materialService.listMaterials(pageParameter, sessionId));
}
Aggregations