【项目功能介绍】
????本系统包含后台管理和前端app双端系统,后台管理的功能包含: 登录, 退出, 修改管理员信息(基本信息与头像),资源管理,角色管理,资源权限分配,字典管理,用户管理,新闻管理; ?app端功能:登录,退出, 动态,发布动态,点赞,评论,新闻分类,新闻列表,新闻详情,新闻评论,用户基本信息管理,用户头像修改,密码修改,用户退出
【项目视频教程】
????视频教程每个课时包含的内容见下图, 该套教程具有非常高的知识价值 并且 适合以下人群:
????A. 想了解并且学习代码实现逻辑的同学
????B. 想对代码进行二次开发的同学
????C. 在课题设计和毕业设计中,需要对老师问答做到得心应手的同学
????D.做论文时,需要技术和业务层面帮助进行文字描述以及绘制流程图(时序图, ER图, 原理图)的同学
【项目包含内容】
【运行环境】??IDEA,?JDK1.8, MAVEN, AndroidStudio
【部分代码】
BaseController.java
package com.myway.platform.controller;
import com.myway.platform.handler.exception.NotLoginException;
import com.myway.platform.mysql.authority.entity.SysUserInfo;
import com.myway.platform.mysql.authority.service.ISysUserInfoService;
import lombok.SneakyThrows;
import org.apache.shiro.SecurityUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.StringUtils;
import org.springframework.web.context.request.RequestContextHolder;
import org.springframework.web.context.request.ServletRequestAttributes;
import javax.servlet.http.HttpServletRequest;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @author: bruce
* @time on 2019/12/18 15:37
* @description:
*/
public abstract class BaseController {
@Value("${myway.system.title}")
protected String systemTitle;
@Value("${myway.system.copyright}")
protected String systemCopyRight;
@Value("${myway.system.domain}")
protected String doMain;
protected String filePath = "images/";
@Autowired
@Qualifier("sysUserInfoServiceImpl")
protected ISysUserInfoService sysUserInfoService;
public HttpServletRequest request() {
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest();
return request;
}
/**
* 获取系统用户会话信息
*
* @return
*/
@SneakyThrows
protected SysUserInfo getSessionSysUser() {
SysUserInfo principal = (SysUserInfo) SecurityUtils.getSubject().getPrincipal();
if (principal == null) {
throw new NotLoginException();
}
return principal;
}
protected List<String> getSessionSysUserRoles() {
List<String> roles = new ArrayList<>();
SysUserInfo sessionSysUser = getSessionSysUser();
SysUserInfo sysUserBasicInfo = sysUserInfoService.getById(sessionSysUser.getSysUserId());
String roleId = sysUserBasicInfo.getRoles();
if (!StringUtils.isEmpty(roleId)) {
roles.add(roleId);
}
return roles;
}
}
AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="cn.xiaoph.apps">
<!-- Required -->
<!-- Required 一些系统要求的权限,如访问网络等-->
<uses-permission android:name="cn.xiaoph.apps.permission.JPUSH_MESSAGE" />
<uses-permission android:name="android.permission.RECEIVE_USER_PRESENT" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<uses-permission
android:name="android.permission.RECORD_AUDIO"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<!-- Optional for location -->
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" /> <!-- 用于开启 debug 版本的应用在6.0 系统上 层叠窗口权限 -->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.CHANGE_WIFI_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_LOCATION_EXTRA_COMMANDS" />
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_TASKS" />
<application
android:name=".Application"
android:allowBackup="true"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme"
tools:replace="android:icon,android:theme,android:allowBackup,android:label,android:supportsRtl">
<meta-data
android:name="domain_name"
android:value="192.168.0.103:8080" />
<meta-data
android:name="timeout"
android:value="5000" />
<activity android:name=".activity.MainActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity android:name=".activity.UserInfoActivity" />
<activity android:name=".activity.UpdatePwdActivity" />
<activity android:name=".activity.UpdateNiceActivity" />
<activity android:name=".activity.UpdateEmailActivity" />
<activity android:name=".activity.RegisterActivity" />
<activity android:name=".activity.UpdatePhoneActivity" />
<activity android:name=".activity.ViewNewsActivity" />
<activity android:name=".activity.AddTrendsActivity" />
<activity android:name=".activity.LoginActivity" />
<activity android:name=".activity.MyActivity" />
<activity android:name=".activity.CommentActivity" />
<activity android:name=".activity.SearchNewsActivity" />
</application>
</manifest>
【技术栈】
????Web端?? ? ? ? ? ? ? ? ? ? ? ? ? ? ??
????后台前端:layui,js、jQuery、css、html? ? ? ?
????后台框架:Java、Spring boot、Spring Mvc、Mybatis Plus、Shiro、ajax
????数据库:Mysql5.7
????App客户端
????前端框架:xml、LinearLayout、RelativeLayout
????后台框架:OkHttp、fastJson? ?
【项目代码截图】
【数据库截图】
【项目运行截图】
?
|