|
@@ -2,6 +2,7 @@ package com.caimei.modules.shiro.controller;
|
|
|
|
|
|
|
|
|
import com.caimei.modules.shiro.entity.CmMallAdminUser;
|
|
|
+import com.caimei.modules.shiro.entity.CmMallOrganize;
|
|
|
import com.caimei.modules.shiro.service.ShiroService;
|
|
|
import com.caimei.utils.JsonModel;
|
|
|
import com.caimei.utils.MD5Util;
|
|
@@ -25,7 +26,7 @@ public class ShiroController {
|
|
|
* 登录
|
|
|
*/
|
|
|
@PostMapping("/login")
|
|
|
- public JsonModel login(@RequestBody CmMallAdminUser adminUser) throws Exception {
|
|
|
+ public JsonModel login(@RequestBody CmMallAdminUser adminUser) {
|
|
|
JsonModel jsonModel = JsonModel.newInstance();
|
|
|
//用户信息
|
|
|
CmMallAdminUser user = shiroService.findByUsername(adminUser.getAccount(), adminUser.getOrganizeID());
|
|
@@ -87,8 +88,17 @@ public class ShiroController {
|
|
|
*/
|
|
|
@RequestMapping("organizeInfo")
|
|
|
public JsonModel organizeInfo(Integer id) {
|
|
|
- CmMallAdminUser mallAdminUser = shiroService.findOrganize(id);
|
|
|
- return JsonModel.newInstance().success(mallAdminUser);
|
|
|
+ CmMallOrganize mallOrganize = shiroService.findOrganize(id);
|
|
|
+ return JsonModel.newInstance().success(mallOrganize);
|
|
|
+ }
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 修改组织信息
|
|
|
+ */
|
|
|
+ @RequestMapping("update")
|
|
|
+ public JsonModel updateOrganizeInfo(CmMallOrganize mallOrganize) {
|
|
|
+ shiroService.updateOrganizeInfo(mallOrganize);
|
|
|
+ return JsonModel.newInstance().success();
|
|
|
}
|
|
|
}
|
|
|
|