添加工作人员管理、转发人员配置-基础类
This commit is contained in:
@@ -337,4 +337,15 @@ public class CmsJobController extends BaseController
|
||||
});
|
||||
return success(jobList);
|
||||
}
|
||||
|
||||
@PostMapping("/wechat")
|
||||
@ApiOperation("微信抓取功能调用的新增")
|
||||
public AjaxResult wechatInsert(@RequestBody Job job) {
|
||||
// 不发布
|
||||
job.setIsPublish(0);
|
||||
if (job.getJobContactList() == null) {
|
||||
job.setJobContactList(new ArrayList<>());
|
||||
}
|
||||
return toAjax(jobService.insertJob(job));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import com.ruoyi.cms.domain.CommunityUser;
|
||||
import com.ruoyi.cms.service.ICommunityUserService;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cms/communityUser")
|
||||
@Api(tags = "后台:工作人员管理")
|
||||
public class CommunityUserController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ICommunityUserService communityUserService;
|
||||
|
||||
|
||||
@ApiOperation("查询工作人员列表")
|
||||
@PreAuthorize("@ss.hasPermi('application:msmanagement:index')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CommunityUser communityUser) {
|
||||
startPage();
|
||||
List<CommunityUser> list = communityUserService.selectCommunityUserList(communityUser);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("新增工作人员")
|
||||
@PreAuthorize("@ss.hasPermi('application:msmanagement:index')")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody CommunityUser communityUser) {
|
||||
return toAjax(communityUserService.save(communityUser));
|
||||
}
|
||||
|
||||
@ApiOperation("修改工作人员")
|
||||
@PreAuthorize("@ss.hasPermi('application:msmanagement:index')")
|
||||
@PutMapping
|
||||
public AjaxResult update(@RequestBody CommunityUser communityUser) {
|
||||
return toAjax(communityUserService.updateById(communityUser));
|
||||
}
|
||||
|
||||
@ApiOperation("删除工作人员")
|
||||
@PreAuthorize("@ss.hasPermi('application:msmanagement:index')")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(communityUserService.delCommunityUser(ids));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.ruoyi.cms.controller.cms;
|
||||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.ruoyi.cms.domain.WechatGroup;
|
||||
import com.ruoyi.cms.domain.vo.WechatGroupVo;
|
||||
import com.ruoyi.cms.service.IWechatGroupService;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/cms/wechatGroup")
|
||||
@Api(tags = "后台:转发对象管理")
|
||||
public class WechatGroupController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private IWechatGroupService wechatGroupService;
|
||||
|
||||
|
||||
@ApiOperation("查询转发对象列表")
|
||||
@PreAuthorize("@ss.hasPermi('application:groupManagement:index')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(WechatGroup wechatGroup) {
|
||||
startPage();
|
||||
List<WechatGroupVo> list = wechatGroupService.selectWechatGroupList(wechatGroup);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@ApiOperation("新增转发对象")
|
||||
@PreAuthorize("@ss.hasPermi('application:groupManagement:index')")
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody WechatGroup wechatGroup) {
|
||||
return toAjax(wechatGroupService.save(wechatGroup));
|
||||
}
|
||||
|
||||
@ApiOperation("修改转发对象")
|
||||
@PreAuthorize("@ss.hasPermi('application:groupManagement:index')")
|
||||
@PutMapping
|
||||
public AjaxResult update(@RequestBody WechatGroup wechatGroup) {
|
||||
return toAjax(wechatGroupService.updateById(wechatGroup));
|
||||
}
|
||||
|
||||
@ApiOperation("删除转发对象")
|
||||
@PreAuthorize("@ss.hasPermi('application:groupManagement:index')")
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable("ids") Long[] ids) {
|
||||
return toAjax(wechatGroupService.removeBatchByIds(CollUtil.newArrayList(ids)));
|
||||
}
|
||||
|
||||
@GetMapping("/enableList")
|
||||
@Anonymous
|
||||
public List<WechatGroupVo> enableList() {
|
||||
WechatGroup wechatGroup = new WechatGroup();
|
||||
wechatGroup.setIsPush(1);
|
||||
return wechatGroupService.selectWechatGroupList(wechatGroup)
|
||||
.stream().peek(e->e.setPhoneNumber(""))
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user