1
0
mirror of https://github.com/chatopera/cosin.git synced 2025-08-01 16:38:02 +08:00

Remove access = false

This commit is contained in:
dengchao@xgtl 2020-04-16 16:45:41 +08:00
parent 4f4616ccba
commit 540a480cd1
8 changed files with 631 additions and 636 deletions

View File

@ -39,20 +39,20 @@ public class CallCenterBlackController extends Handler{
private BlackListRepository blackRes ;
@RequestMapping(value = "/black")
@Menu(type = "callcenter" , subtype = "callcenterblack" , access = false , admin = true)
@Menu(type = "callcenter", subtype = "callcenterblack", admin = true)
public ModelAndView black(ModelMap map , HttpServletRequest request , @Valid String hostid) {
map.addAttribute("blackList" , blackRes.findByOrgi(super.getOrgi(request)));
return request(super.createRequestPageTempletResponse("/admin/callcenter/black/index"));
}
@RequestMapping(value = "/black/add")
@Menu(type = "callcenter" , subtype = "black" , access = false , admin = true)
@Menu(type = "callcenter", subtype = "black", admin = true)
public ModelAndView blackadd(ModelMap map , HttpServletRequest request , @Valid String hostid) {
return request(super.createRequestPageTempletResponse("/admin/callcenter/black/add"));
}
@RequestMapping(value = "/black/save")
@Menu(type = "callcenter" , subtype = "black" , access = false , admin = true)
@Menu(type = "callcenter", subtype = "black", admin = true)
public ModelAndView blacksave(ModelMap map , HttpServletRequest request , @Valid String phones) {
if(!StringUtils.isBlank(phones)){
String[] ps = phones.split("[ ,\t\n]") ;
@ -74,14 +74,14 @@ public class CallCenterBlackController extends Handler{
}
@RequestMapping(value = "/black/edit")
@Menu(type = "callcenter" , subtype = "black" , access = false , admin = true)
@Menu(type = "callcenter", subtype = "black", admin = true)
public ModelAndView blackedit(ModelMap map , HttpServletRequest request , @Valid String id) {
map.addAttribute("black" , blackRes.findByIdAndOrgi(id, super.getOrgi(request)));
return request(super.createRequestPageTempletResponse("/admin/callcenter/black/edit"));
}
@RequestMapping(value = "/black/update")
@Menu(type = "callcenter" , subtype = "black" , access = false , admin = true)
@Menu(type = "callcenter", subtype = "black", admin = true)
public ModelAndView pbxhostupdate(ModelMap map , HttpServletRequest request , @Valid BlackEntity black) {
if(!StringUtils.isBlank(black.getId())){
BlackEntity oldBlack = blackRes.findByIdAndOrgi(black.getId(), super.getOrgi(request)) ;
@ -96,7 +96,7 @@ public class CallCenterBlackController extends Handler{
}
@RequestMapping(value = "/black/delete")
@Menu(type = "callcenter" , subtype = "black" , access = false , admin = true)
@Menu(type = "callcenter", subtype = "black", admin = true)
public ModelAndView blackdelete(ModelMap map , HttpServletRequest request , @Valid String id) {
if(!StringUtils.isBlank(id)){
blackRes.delete(id);

View File

@ -158,7 +158,7 @@ public class CallCenterMediaController extends Handler {
}
@RequestMapping(value = "/play")
@Menu(type = "callcenter", subtype = "play", access = false)
@Menu(type = "callcenter", subtype = "play")
public ModelAndView play(ModelMap map, HttpServletRequest request, @Valid final String id) {
map.addAttribute("media", mediaRes.findByIdAndOrgi(id, super.getOrgi(request)));
return request(super.createRequestPageTempletResponse("/admin/callcenter/media/play"));

View File

@ -58,31 +58,30 @@ public class TemplateController extends Handler {
private final Cache cache;
@RequestMapping("/index")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
public ModelAndView index(ModelMap map, HttpServletRequest request) {
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView index(ModelMap map) {
map.addAttribute("sysDicList", Dict.getInstance().getDic(Constants.CSKEFU_SYSTEM_DIC));
return request(super.createAdminTempletResponse("/admin/system/template/index"));
}
@RequestMapping("/expall")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
public void expall(ModelMap map, HttpServletRequest request, HttpServletResponse response) throws Exception {
@Menu(type = "admin", subtype = "template", admin = true)
public void expall(HttpServletRequest request, HttpServletResponse response) throws Exception {
List<Template> templateList = templateRes.findByOrgi(super.getOrgi(request));
response.setHeader("content-disposition", "attachment;filename=UCKeFu-Template-Export-" + new SimpleDateFormat("yyyy-MM-dd").format(new Date()) + ".data");
response.getOutputStream().write(MainUtils.toBytes(templateList));
return;
}
@RequestMapping("/imp")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
public ModelAndView imp(ModelMap map, HttpServletRequest request) {
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView imp() {
return request(super.createRequestPageTempletResponse("/admin/system/template/imp"));
}
@SuppressWarnings("unchecked")
@RequestMapping("/impsave")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
public ModelAndView impsave(ModelMap map, HttpServletRequest request, @RequestParam(value = "dataFile", required = false) MultipartFile dataFile) throws Exception {
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView impsave(@RequestParam(value = "dataFile", required = false) MultipartFile dataFile) throws Exception {
if (dataFile != null && dataFile.getSize() > 0) {
List<Template> templateList = (List<Template>) MainUtils.toObject(dataFile.getBytes());
if (templateList != null && templateList.size() > 0) {
@ -96,7 +95,7 @@ public class TemplateController extends Handler {
}
@RequestMapping("/list")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView list(ModelMap map, HttpServletRequest request, @Valid String type) {
map.addAttribute("sysDic", dicRes.findById(type));
map.addAttribute("templateList", templateRes.findByTemplettypeAndOrgi(type, super.getOrgi(request)));
@ -104,14 +103,14 @@ public class TemplateController extends Handler {
}
@RequestMapping("/add")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
public ModelAndView add(ModelMap map, HttpServletRequest request, @Valid String type) {
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView add(ModelMap map, @Valid String type) {
map.addAttribute("sysDic", dicRes.findById(type));
return request(super.createRequestPageTempletResponse("/admin/system/template/add"));
}
@RequestMapping("/save")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView save(HttpServletRequest request, @Valid Template template) {
template.setOrgi(super.getOrgi(request));
template.setCreatetime(new Date());
@ -127,7 +126,7 @@ public class TemplateController extends Handler {
}
@RequestMapping("/edit")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView edit(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String type) {
map.addAttribute("sysDic", dicRes.findById(type));
map.addAttribute("template", templateRes.findByIdAndOrgi(id, super.getOrgi(request)));
@ -135,7 +134,7 @@ public class TemplateController extends Handler {
}
@RequestMapping("/update")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView update(HttpServletRequest request, @Valid Template template) {
Template oldTemplate = templateRes.findByIdAndOrgi(template.getId(), super.getOrgi(request));
if (oldTemplate != null) {
@ -157,7 +156,7 @@ public class TemplateController extends Handler {
}
@RequestMapping("/code")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView code(ModelMap map, HttpServletRequest request, @Valid String id, @Valid String type) {
map.addAttribute("sysDic", dicRes.findById(type));
map.addAttribute("template", templateRes.findByIdAndOrgi(id, super.getOrgi(request)));
@ -165,7 +164,7 @@ public class TemplateController extends Handler {
}
@RequestMapping("/codesave")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView codesave(HttpServletRequest request, @Valid Template template) {
Template oldTemplate = templateRes.findByIdAndOrgi(template.getId(), super.getOrgi(request));
if (oldTemplate != null) {
@ -179,7 +178,7 @@ public class TemplateController extends Handler {
}
@RequestMapping("/delete")
@Menu(type = "admin", subtype = "template", access = false, admin = true)
@Menu(type = "admin", subtype = "template", admin = true)
public ModelAndView delete(HttpServletRequest request, @Valid Template template) {
templateRes.delete(template);
cache.deleteSystembyIdAndOrgi(template.getId(), super.getOrgi(request));

View File

@ -60,7 +60,7 @@ public class AgentQualityController extends Handler {
private Cache cache;
@RequestMapping(value = "/index")
@Menu(type = "agent", subtype = "quality", access = false)
@Menu(type = "agent", subtype = "quality")
public ModelAndView index(ModelMap map, HttpServletRequest request) {
map.addAttribute("sessionConfig", acdPolicyService.initSessionConfig(super.getOrgi(request)));
map.addAttribute("qualityList", qualityRes.findByQualitytypeAndOrgi(MainContext.QualityType.CHAT.toString(), super.getOrgi(request)));
@ -70,7 +70,7 @@ public class AgentQualityController extends Handler {
@RequestMapping(value = "/save")
@Menu(type = "agent", subtype = "quality", access = false)
@Menu(type = "agent", subtype = "quality")
public ModelAndView save(ModelMap map, HttpServletRequest request, @Valid QualityRequest qualityArray) {
String orgi = super.getOrgi(request);

View File

@ -118,7 +118,7 @@ public class KbsController extends Handler {
}
@RequestMapping("/save")
@Menu(type = "topic" , subtype = "save" , access = false)
@Menu(type = "topic", subtype = "save")
public ModelAndView save(HttpServletRequest request,
final @Valid KbsTopic topic,
@RequestParam(value = "files", required = false) MultipartFile[] files) throws IOException {
@ -131,11 +131,7 @@ public class KbsController extends Handler {
KbsType workOrderType = kbsTypeRes.findByIdAndOrgi(topic.getTptype(), super.getOrgi(request));
// 知识处理流程如果知识分类需要审批则触发知识流程
if(workOrderType.isApproval()){
topic.setApproval(false);
}else{
topic.setApproval(true);
}
topic.setApproval(!workOrderType.isApproval());
kbsTopicRes.save(topic);
return view;
}

View File

@ -74,7 +74,7 @@ public class AgentSummaryController extends Handler {
* 按条件查询
*/
@RequestMapping(value = "/index")
@Menu(type = "agent", subtype = "agentsummary", access = false)
@Menu(type = "agent", subtype = "agentsummary")
public ModelAndView index(ModelMap map, HttpServletRequest request, @Valid final String begin, @Valid final String end) {
final String orgi = super.getOrgi(request);
Page<AgentServiceSummary> page = serviceSummaryRes.findAll((Specification<AgentServiceSummary>) (root, query, cb) -> {
@ -105,7 +105,7 @@ public class AgentSummaryController extends Handler {
}
@RequestMapping(value = "/process")
@Menu(type = "agent", subtype = "agentsummary", access = false)
@Menu(type = "agent", subtype = "agentsummary")
public ModelAndView process(ModelMap map, HttpServletRequest request, @Valid final String id) {
AgentServiceSummary summary = serviceSummaryRes.findByIdAndOrgi(id, super.getOrgi(request));
map.addAttribute("summary", summary);
@ -123,7 +123,7 @@ public class AgentSummaryController extends Handler {
}
@RequestMapping(value = "/save")
@Menu(type = "agent", subtype = "agentsummary", access = false)
@Menu(type = "agent", subtype = "agentsummary")
public ModelAndView save(HttpServletRequest request, @Valid final AgentServiceSummary summary) {
AgentServiceSummary oldSummary = serviceSummaryRes.findByIdAndOrgi(summary.getId(), super.getOrgi(request));
if (oldSummary != null) {
@ -138,7 +138,7 @@ public class AgentSummaryController extends Handler {
}
@RequestMapping("/expids")
@Menu(type = "agent", subtype = "agentsummary", access = false)
@Menu(type = "agent", subtype = "agentsummary")
public void expids(HttpServletResponse response, @Valid String[] ids) throws IOException {
if (ids != null && ids.length > 0) {
Iterable<AgentServiceSummary> statusEventList = serviceSummaryRes.findAllById(Arrays.asList(ids));
@ -156,7 +156,7 @@ public class AgentSummaryController extends Handler {
}
@RequestMapping("/expall")
@Menu(type = "agent", subtype = "agentsummary", access = false)
@Menu(type = "agent", subtype = "agentsummary")
public void expall(HttpServletRequest request, HttpServletResponse response) throws IOException {
Iterable<AgentServiceSummary> statusEventList = serviceSummaryRes.findByChannelNotAndOrgi(
MainContext.ChannelType.PHONE.toString(), super.getOrgi(request), PageRequest.of(0, 10000));
@ -174,7 +174,7 @@ public class AgentSummaryController extends Handler {
}
@RequestMapping("/expsearch")
@Menu(type = "agent", subtype = "agentsummary", access = false)
@Menu(type = "agent", subtype = "agentsummary")
public void expall(HttpServletRequest request, HttpServletResponse response, @Valid final String begin, @Valid final String end) throws IOException {
final String orgi = super.getOrgi(request);
Page<AgentServiceSummary> page = serviceSummaryRes.findAll((Specification<AgentServiceSummary>) (root, query, cb) -> {

View File

@ -73,7 +73,7 @@ public class ProcessedSummaryController extends Handler {
* 按条件查询
*/
@RequestMapping(value = "/index")
@Menu(type = "agent", subtype = "processed", access = false)
@Menu(type = "agent", subtype = "processed")
public ModelAndView index(ModelMap map, HttpServletRequest request, @Valid final String ani, @Valid final String called, @Valid final String begin, @Valid final String end) {
final String orgi = super.getOrgi(request);
Page<AgentServiceSummary> page = serviceSummaryRes.findAll((Specification<AgentServiceSummary>) (root, query, cb) -> {
@ -113,7 +113,7 @@ public class ProcessedSummaryController extends Handler {
@RequestMapping(value = "/process")
@Menu(type = "agent", subtype = "processed", access = false)
@Menu(type = "agent", subtype = "processed")
public ModelAndView process(ModelMap map, HttpServletRequest request, @Valid final String id) {
AgentServiceSummary summary = serviceSummaryRes.findByIdAndOrgi(id, super.getOrgi(request));
map.addAttribute("summary", summary);
@ -131,7 +131,7 @@ public class ProcessedSummaryController extends Handler {
}
@RequestMapping(value = "/save")
@Menu(type = "agent", subtype = "processed", access = false)
@Menu(type = "agent", subtype = "processed")
public ModelAndView save(HttpServletRequest request, @Valid final AgentServiceSummary summary) {
AgentServiceSummary oldSummary = serviceSummaryRes.findByIdAndOrgi(summary.getId(), super.getOrgi(request));
if (oldSummary != null) {
@ -146,7 +146,7 @@ public class ProcessedSummaryController extends Handler {
}
@RequestMapping("/expids")
@Menu(type = "agent", subtype = "processed", access = false)
@Menu(type = "agent", subtype = "processed")
public void expids(HttpServletResponse response, @Valid String[] ids) throws IOException {
if (ids != null && ids.length > 0) {
Iterable<AgentServiceSummary> statusEventList = serviceSummaryRes.findAllById(Arrays.asList(ids));
@ -165,7 +165,7 @@ public class ProcessedSummaryController extends Handler {
}
@RequestMapping("/expall")
@Menu(type = "agent", subtype = "processed", access = false)
@Menu(type = "agent", subtype = "processed")
public void expall(HttpServletRequest request, HttpServletResponse response) throws IOException {
Iterable<AgentServiceSummary> statusEventList = serviceSummaryRes.findByChannelNotAndOrgi(
MainContext.ChannelType.PHONE.toString(), super.getOrgi(request), PageRequest.of(0, 10000));
@ -183,7 +183,7 @@ public class ProcessedSummaryController extends Handler {
}
@RequestMapping("/expsearch")
@Menu(type = "agent", subtype = "processed", access = false)
@Menu(type = "agent", subtype = "processed")
public void expall(HttpServletRequest request, HttpServletResponse response, @Valid final String ani, @Valid final String called, @Valid final String begin, @Valid final String end) throws IOException {
final String orgi = super.getOrgi(request);
Page<AgentServiceSummary> page = serviceSummaryRes.findAll((Specification<AgentServiceSummary>) (root, query, cb) -> {

View File

@ -63,7 +63,7 @@ public class MediaController extends Handler {
@Autowired
private JpaBlobHelper jpaBlobHelper;
private String TEMPLATE_DATA_PATH = "WEB-INF/data/templates/";
private final String TEMPLATE_DATA_PATH = "WEB-INF/data/templates/";
@Autowired
private AttachmentRepository attachementRes;
@ -117,7 +117,7 @@ public class MediaController extends Handler {
}
@RequestMapping("/image/upload")
@Menu(type = "resouce", subtype = "imageupload", access = false)
@Menu(type = "resouce", subtype = "imageupload")
public ModelAndView upload(ModelMap map,
HttpServletRequest request,
@RequestParam(value = "imgFile", required = false) MultipartFile multipart) throws IOException {
@ -145,7 +145,7 @@ public class MediaController extends Handler {
}
@RequestMapping("/file")
@Menu(type = "resouce", subtype = "file", access = false)
@Menu(type = "resouce", subtype = "file")
public void file(HttpServletResponse response, HttpServletRequest request, @Valid String id) throws IOException, SQLException {
if (StringUtils.isNotBlank(id)) {
AttachmentFile attachmentFile = attachementRes.findByIdAndOrgi(id, super.getOrgi(request));
@ -165,7 +165,7 @@ public class MediaController extends Handler {
}
@RequestMapping("/template")
@Menu(type = "resouce", subtype = "template", access = false)
@Menu(type = "resouce", subtype = "template")
public void template(HttpServletResponse response, HttpServletRequest request, @Valid String filename) throws IOException {
if (StringUtils.isNotBlank(filename)) {
InputStream is = MediaController.class.getClassLoader().getResourceAsStream(TEMPLATE_DATA_PATH + filename);