Browse Source

接口api

liulingchao 4 years ago
parent
commit
5b43584a62

+ 1 - 1
dgtly-api/src/main/java/com/dgtly/api/controller/SysNoticeInterface.java

@@ -101,7 +101,7 @@ public class SysNoticeInterface extends ApiBaseController {
         Long noticeId = sysNotice.getNoticeId();
         if(null != noticeId){
             SysNotice sysNotice1 = sysNoticeService.selectNoticeById(noticeId);
-            return AjaxResult.success("查询成功",sysNotice1);
+            return AjaxResult.success().putKV("sysNotice",sysNotice1);
         }else{
             return AjaxResult.error("参数为空");
         }

+ 26 - 0
dgtly-member/dgtly-member-api/src/main/java/com/dgtly/member/controller/MemberInfoController.java

@@ -121,5 +121,31 @@ public class MemberInfoController extends ApiBaseController {
             return AjaxResult.error(305,"根据token获取用户id出错");
         }
 
+    }
+
+
+    /**
+     * @descption: 修改用户信息
+     * @param: token  用户信息
+     * @return:
+     * @auther: LiuLingChao
+     * @date: 2020-2-28 15:01
+     */
+    @PostMapping("/editMemberInfo")
+    public Object editMemberInfo(){
+        String userId  = TokenUtil.getTokenUserId();
+
+        if(StringUtils.isNotEmpty(userId)){
+            ParameterObject obj =  getParameterObject();
+            MemberInfo memberInfo = obj.parseBean(MemberInfo.class);
+            memberInfo.setId(Long.parseLong(userId));
+            int flag = iMemberInfoService.updateMemberInfo(memberInfo);
+            return toAjax(flag);
+        }else{
+            return AjaxResult.error(305,"根据token获取用户id出错");
+        }
+
+
+
     }
 }