微信实现文件配置
This commit is contained in:
parent
b99a19fc44
commit
6ec8cffefd
|
|
@ -68,6 +68,12 @@
|
|||
<artifactId>ruoyi-cms</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
<!-- 页面展示系统-->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-weixin</artifactId>
|
||||
<version>${ruoyi.version}</version>
|
||||
</dependency>
|
||||
<!-- 测试生成的代码-->
|
||||
<!--<dependency>-->
|
||||
<!--<groupId>com.ruoyi</groupId>-->
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ spring:
|
|||
date-format: yyyy-MM-dd HH:mm:ss
|
||||
|
||||
profiles:
|
||||
active: druid
|
||||
active: druid,weixin
|
||||
# 文件上传
|
||||
servlet:
|
||||
multipart:
|
||||
|
|
|
|||
|
|
@ -249,6 +249,7 @@ public class ShiroConfig
|
|||
filterChainDefinitionMap.put("/api/**", "anon");
|
||||
//前端网站展示
|
||||
filterChainDefinitionMap.put("/web/**", "anon");
|
||||
filterChainDefinitionMap.put("/weixin/**", "anon");
|
||||
filterChainDefinitionMap.put("/profile/**", "anon");
|
||||
filterChainDefinitionMap.put("/captcha/captchaImage**", "anon");
|
||||
// 退出 logout地址,shiro去清除session
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ public class WxUserGroupController {
|
|||
|
||||
private WxCpProperties properties;
|
||||
|
||||
@Log(title = "上传文件", businessType = BusinessType.INSERT)
|
||||
@Log(title = "获取组织机构列表", businessType = BusinessType.INSERT)
|
||||
@GetMapping("/departAllList")
|
||||
public AjaxResult departAllList() {
|
||||
this.logger.info("\n获取组织机构");
|
||||
|
|
@ -50,6 +50,7 @@ public class WxUserGroupController {
|
|||
}
|
||||
}
|
||||
|
||||
@Log(title = "新增组织机构", businessType = BusinessType.INSERT)
|
||||
@GetMapping("/insert")
|
||||
public AjaxResult insert(WxCpDepart wxCpDepart) {
|
||||
this.logger.info("新增组织机构");
|
||||
|
|
@ -62,32 +63,46 @@ public class WxUserGroupController {
|
|||
return AjaxResult.error("新增组织机构出错");
|
||||
}
|
||||
}
|
||||
|
||||
@Log(title = "全量新增组织机构", businessType = BusinessType.INSERT)
|
||||
@GetMapping("/insertList")
|
||||
public AjaxResult insertList(List<WxCpDepart> wxCpDeparts) {
|
||||
this.logger.info("全量新增组织机构");
|
||||
try {
|
||||
WxCpDepartmentService departmentService = WxCpConfiguration.getCpService(999999).getDepartmentService();
|
||||
for (WxCpDepart wxCpDepart : wxCpDeparts) {
|
||||
Integer id = departmentService.create(wxCpDepart);
|
||||
}
|
||||
return AjaxResult.success(wxCpDeparts.size(),"全量新增组织机构");
|
||||
} catch (Exception e) {
|
||||
this.logger.info("\n全量新增组织机构" + e.getMessage());
|
||||
return AjaxResult.error("全量新增组织机构");
|
||||
}
|
||||
}
|
||||
@Log(title = "获取组织机构", businessType = BusinessType.INSERT)
|
||||
@GetMapping("/update")
|
||||
public AjaxResult update(WxCpDepart wxCpDepart) {
|
||||
this.logger.info("\n获取组织机构");
|
||||
try {
|
||||
WxCpDepartmentService departmentService = WxCpConfiguration.getCpService(999999).getDepartmentService();
|
||||
|
||||
departmentService.update(wxCpDepart);
|
||||
return AjaxResult.success("更新组织机构成功");
|
||||
} catch (Exception e) {
|
||||
this.logger.info("\n获取组织机构出错" + e.getMessage());
|
||||
this.logger.info("\n更新组织机构成功" + e.getMessage());
|
||||
return AjaxResult.error("更新组织机构成功");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Log(title = "删除组织机构", businessType = BusinessType.INSERT)
|
||||
@GetMapping("/delete")
|
||||
public AjaxResult delete(Long id) {
|
||||
this.logger.info("\n获取组织机构");
|
||||
try {
|
||||
WxCpDepartmentService departmentService = WxCpConfiguration.getCpService(999999).getDepartmentService();
|
||||
departmentService.delete(id);
|
||||
return AjaxResult.success("删除组织机构成功");
|
||||
} catch (Exception e) {
|
||||
this.logger.info("\n删除组织机构出错" + e.getMessage());
|
||||
return AjaxResult.error("删除组织机构出错");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue