✨作者主页:IT研究室✨
个人简介:曾从事计算机专业培训教学,擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。
☑文末获取源码☑
精彩专栏推荐⬇⬇⬇
Java项目
Python项目
安卓项目
微信小程序项目
一、前言
戏曲文化是中国传统文化的重要组成部分,具有悠久的历史和深厚的文化底蕴。然而,随着现代化的进程和人们生活方式的改变,传统戏曲文化的传承和发展面临着严峻的挑战。为了更好地保护和传承戏曲文化,开发一款便捷、实用的戏曲文化苑微信小程序/安卓APP具有重要的现实意义。
目前,一些戏曲文化相关的应用程序已经存在,但是这些应用程序存在一些问题。首先,部分应用程序的功能不够完善,无法满足用户的需求;其次,部分应用程序的用户体验不佳,操作流程繁琐等问题影响了用户的使用体验;再次,部分应用程序的信息更新不及时,无法及时反映戏曲文化动态。这些问题都严重影响了戏曲文化相关应用程序的效果和质量。
本课题的研究目的是设计并实现一款基于微信小程序/安卓APP的戏曲文化苑平台,以提高平台的效率和质量。具体来说,该工具可以实现以下功能:
- 提供便捷的戏曲文化信息展示和管理功能,方便用户进行信息查询和选择;
- 提供戏曲文化知识普及和学习功能,增进戏曲文化的传承和发展;
通过以上功能的实现,可以解决现有解决方案存在的问题,提高戏曲文化相关应用程序的效果和质量。
本课题的研究具有重要的现实意义和应用价值。首先,它可以增进戏曲文化的传承和发展,提高人们对戏曲文化的认识和理解;其次,它可以提升用户的使用体验,方便用户了解和参与戏曲文化活动;再次,它可以推动数字化经济的发展,增进数字经济与传统产业的相融。因此,本课题的研究对于戏曲文化、用户和社会都具有重要的意义。
二、开发环境
- 开发语言:Java
- 数据库:MySQL
- 后端:SpringBoot
- 前端:微信小程序+uniapp+Vue
三、系统界面展示
- 戏曲文化苑微信小程序/安卓APP界面展示:
四、代码参考
- 戏曲文化苑微信小程序/安卓APP项目实战代码参考:
@RestController
@RequestMapping("/comment")
public class CommentController {
@Autowired
private UserService userService;
@Autowired
private CommentService commentService;
@RequestMapping(path = "/getCommentByPage", method = RequestMethod.GET)
public String getCommentByStatus(String pageNum, String pageSize){
Integer first = StringUtil.changeString(pageNum);
Integer second = StringUtil.changeString(pageSize);
Map<String, Object> map = commentService.getCommentByPage(first, second);
if ((long)map.get("total") == 0){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else {
return JSON.toJSONString(new Result().setCode(200).setData(map));
}
}
@RequestMapping(path = "/getCommentByName", method = RequestMethod.GET)
public String getCommentByName(String commentName){
Map<String, Object> map = commentService.getCommentByName(commentName);
if ((long)map.get("total") == 0){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else {
return JSON.toJSONString(new Result().setCode(200).setData(map));
}
}
// @RequestMapping(path = "/getCommentByTuijian", method = RequestMethod.GET)
// public String getCommentByTuijian(){
// List<Userfile> userfileList = userfileService.list(new QueryWrapper<Userfile>().eq("istuijian","是"));
// if (userfileList.size() == 0){
// return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
// }else {
// return JSON.toJSONString(new Result().setCode(200).setData(userfileList));
// }
// }
@RequestMapping(path = "/getCommentById", method = RequestMethod.GET)
public String getCommentById(Integer CommentId){
Comment comment = commentService.getById(CommentId);
if(comment == null){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else{
return JSON.toJSONString(new Result().setCode(200).setData(comment));
}
}
@RequestMapping(path = "/getAllComment", method = RequestMethod.GET)
public String getAllComment(){
List<Comment> commentList = commentService.list();
if(commentList.size() == 0){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else{
for (Comment comment:commentList){
comment.setUser(userService.getById(comment.getUserId()));
}
return JSON.toJSONString(new Result().setCode(200).setData(commentList));
}
}
@RequestMapping(path = "/getAllCommentByName", method = RequestMethod.GET)
public String getAllCommentByName(String name){
List<Comment> commentList = commentService.list(new QueryWrapper<Comment>().like("name", name));
if(commentList.size() == 0){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else{
return JSON.toJSONString(new Result().setCode(200).setData(commentList));
}
}
@RequestMapping(path = "/getCommentByUserfile", method = RequestMethod.GET)
public String getCommentByUserfile(Integer userfileId){
List<Comment> commentList = commentService.list(new QueryWrapper<Comment>().like("userfile_id", userfileId));
if(commentList.size() == 0){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else{
return JSON.toJSONString(new Result().setCode(200).setData(commentList));
}
}
// @RequestMapping(path = "/getAllUserfileLike2", method = RequestMethod.GET)
// public String getAllUserfileLike2(String name){
// List<Userfile> userfileList = commentService.list(new QueryWrapper<Userfile>()
// .eq("istuijian","是")
// .like("name", name));
// if(userfileList.size() == 0){
// return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
// }else{
// return JSON.toJSONString(new Result().setCode(200).setData(userfileList));
// }
//
// }
@RequestMapping(value = "/updateComment", method = RequestMethod.POST)
public String updateComment(@RequestParam(value = "form") String form,
@RequestParam(value = "headpic",required=false) MultipartFile file1,
@RequestParam(value = "file",required=false) MultipartFile file2){
Comment comment = JSON.parseObject(form, Comment.class);
if(file1 != null){
String path = commentService.getById(comment.getCommentId()).getContent();
String filename = "";
if (path == null){
}else {
filename = path.substring(path.lastIndexOf('/')+1);
FileUploadUtils.deleteFiles(new File(getUploadPath()+filename));
}
String url = "";
String newName = FileUploadUtils.uploadImage(file1, getUploadPath());
if(newName !=null ){
url = "/headpic/"+ newName;
}
comment.setContent(url);
}
// if(file2 != null){
// String path = commentService.getById(comment.getUserfileId()).getFile();
// String filename = "";
// if (path == null){
//
// }else {
// filename = path.substring(path.lastIndexOf('/')+1);
// FileUploadUtils.deleteFiles(new File(getUploadPath()+filename));
// }
// String url = "";
// String newName = FileUploadUtils.uploadImage(file2, getUploadPath());
// if(newName !=null ){
// url = "/headpic/"+ newName;
// }
// comment.setFile(url);
// }
boolean f = commentService.updateById(comment);
if(f) {
return JSON.toJSONString(new Result().setCode(200).setMessage("修改成功"));
}
else
return JSON.toJSONString(new Result().setCode(402).setMessage("修改失败"));
}
@RequestMapping(value = "/addFile", method = RequestMethod.POST)
public String updateHeadpic(@RequestParam(value = "file",required=false) MultipartFile file1){
String url = "";
if(file1 != null){
//存储file对象到指定路径
String newName = FileUploadUtils.uploadImage(file1, getUploadPath());
if(newName !=null ){
//生成url
url = "/headpic/"+ newName;
}
}
return JSON.toJSONString(new Result().setCode(200).setData(url));
}
@RequestMapping(value = "/addComment", method = RequestMethod.POST)
public String addComment(@RequestBody Comment comment){
System.out.println("comment 内容为 " + comment);
comment.setCreateTime(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(new Date()));
boolean f = commentService.save(comment);
if(f) {
return JSON.toJSONString(new Result().setCode(200).setMessage("添加成功"));
}
else
return JSON.toJSONString(new Result().setCode(402).setMessage("添加失败"));
}
@RequestMapping(path = "/delCommentById", method = RequestMethod.GET)
public String delCommentById(Integer commentId){
boolean f = commentService.removeById(commentId);
if(f){
return JSON.toJSONString(new Result().setCode(200).setMessage("删除成功"));
}else{
return JSON.toJSONString(new Result().setCode(402).setMessage("删除失败"));
}
}
// @RequestMapping(value = "/delCommentById", method = RequestMethod.GET)
// public String delUserfile(Integer commentId) {
// String path = commentService.getById(commentId);
// String filename = "";
// String path2 = commentService.getById(commentId).getFile();
// String filename2 = "";
// boolean f = commentService.removeById(commentId);
// if (f) {
// if (path == null) {
//
// } else {
// filename = path.substring(path.lastIndexOf('/') + 1);
// FileUploadUtils.deleteFiles(new File(getUploadPath() + filename));
// }
// if (path2 == null) {
//
// } else {
// filename2 = path.substring(path.lastIndexOf('/') + 1);
// FileUploadUtils.deleteFiles(new File(getUploadPath() + filename2));
// }
// return JSON.toJSONString(new Result().setCode(200).setMessage("删除成功"));
// } else {
// return JSON.toJSONString(new Result().setCode(402).setData("删除失败"));
// }
// }
// @RequestMapping(value = "/addUserfile2", method = RequestMethod.POST)
// public String addUserfile2(@RequestParam(value = "userfileForm") String form,
// @RequestParam(value = "headpic",required=false) MultipartFile file1,
// @RequestParam(value = "file",required=false) MultipartFile file2){
// Userfile userfile = JSON.parseObject(form, Userfile.class);
// if(file1 != null){
// String url = "";
// String newName = FileUploadUtils.uploadImage(file1, getUploadPath());
// if(newName !=null ){
// url = "/headpic/"+ newName;
// }
// userfile.setImg(url);
// }
// if(file2!= null){
// String url = "";
// String newName = FileUploadUtils.uploadImage(file2, getUploadPath());
// if(newName !=null ){
// url = "/headpic/"+ newName;
// }
// userfile.setFile(url);
// }
// boolean f = commentService.save(userfile);
// if(f) {
// return JSON.toJSONString(new Result().setCode(200).setMessage("添加成功"));
// }
// else
// return JSON.toJSONString(new Result().setCode(402).setMessage("添加失败"));
// }
public String getUploadPath(){
ApplicationHome h = new ApplicationHome(getClass());
File jarF = h.getSource();
String dirPath = jarF.getParentFile().toString()+"\\headpic\\";
return dirPath;
}
}
@RestController
@RequestMapping("/user")
public class UserController {
@Autowired
private UserService userService;
@RequestMapping(value = "/login", method = RequestMethod.POST)
public String login(@RequestBody User user){
User userLogin = userService.getOne(new QueryWrapper<User>().eq("username",user.getUsername())
.eq("password",user.getPassword()).eq("role","用户"));
if (userLogin == null){
return JSON.toJSONString(new Result().setCode(402).setMessage("登录失败"));
}else {
return JSON.toJSONString(new Result().setCode(200).setData(userLogin).setMessage("登录成功"));
}
}
@RequestMapping(value = "/login2", method = RequestMethod.POST)
public String login2(@RequestBody User user){
User userLogin = userService.getOne(new QueryWrapper<User>().eq("username",user.getUsername())
.eq("password",user.getPassword()).eq("role","管理员"));
if (userLogin == null){
return JSON.toJSONString(new Result().setCode(402).setMessage("登录失败"));
}else {
return JSON.toJSONString(new Result().setCode(200).setData(userLogin).setMessage("登录成功"));
}
}
@RequestMapping(path = "/getAllUser", method = RequestMethod.GET)
public String getAllUser(){
List<User> userList = userService.list();
if (userList.size() == 0){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else {
return JSON.toJSONString(new Result().setCode(200).setData(userList));
}
}
@RequestMapping(path = "/getUserByPage", method = RequestMethod.GET)
public String getUserByStatus(String pageNum, String pageSize){
Integer first = StringUtil.changeString(pageNum);
Integer second = StringUtil.changeString(pageSize);
Map<String, Object> map = userService.getUserByPage(first, second);
if ((long)map.get("total") == 0){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else {
return JSON.toJSONString(new Result().setCode(200).setData(map));
}
}
@RequestMapping(path = "/getUserById", method = RequestMethod.GET)
public String getUserById(Integer userId){
User user = userService.getById(userId);
if(user == null){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else{
return JSON.toJSONString(new Result().setCode(200).setData(user));
}
}
@RequestMapping(path = "/getUserByName", method = RequestMethod.GET)
public String getUserByName(String userName){
Map<String, Object> user = userService.getUserByName(userName);
if((long)user.get("total") == 0){
return JSON.toJSONString(new Result().setCode(402).setMessage("暂无信息"));
}else{
return JSON.toJSONString(new Result().setCode(200).setData(user));
}
}
@RequestMapping(path = "/wxupdateUser", method = RequestMethod.POST)
public String wxupdateWechatuser(@RequestBody User user){
boolean f = userService.updateById(user);
if(f){
return JSON.toJSONString(new Result().setCode(200).setMessage("修改成功").setData(user));
}else{
return JSON.toJSONString(new Result().setCode(402).setMessage("修改失败"));
}
}
@RequestMapping(value = "/updateUser", method = RequestMethod.POST)
public String updateUser(@RequestParam(value = "form") String form,
@RequestParam(value = "headpic",required=false) MultipartFile file1){
User user = JSON.parseObject(form, User.class);
if(file1 != null){
String path = userService.getById(user.getUserId()).getHeadpic();
String filename = "";
if (path == null){
}else {
filename = path.substring(path.lastIndexOf('/')+1);
FileUploadUtils.deleteFiles(new File(getUploadPath()+filename));
}
String url = "";
String newName = FileUploadUtils.uploadImage(file1, getUploadPath());
if(newName !=null ){
url = "/headpic/"+ newName;
}
user.setHeadpic(url);
}
boolean f = userService.updateById(user);
if(f) {
return JSON.toJSONString(new Result().setCode(200).setMessage("修改成功"));
}
else
return JSON.toJSONString(new Result().setCode(402).setMessage("修改失败"));
}
@RequestMapping(path = "/updateUser2", method = RequestMethod.POST)
public String updateUser2(@RequestBody User user){
boolean f = userService.updateById(user);
if(f){
return JSON.toJSONString(new Result().setCode(200).setMessage("修改成功").setData(userService.getById(user.getUserId())));
}else{
return JSON.toJSONString(new Result().setCode(402).setMessage("修改失败"));
}
}
@RequestMapping(value = "/updateHeadpic", method = RequestMethod.POST)
public String updateHeadpic(@RequestParam(value = "userId") Integer userId,
@RequestParam(value = "file",required=false) MultipartFile file1){
//如果用户上传了新头像,我们需要做两个操作1.删除之前用户的头像;2.存储用户的新头像并生成新的url
User user = userService.getById(userId);
if(file1 != null){
String path = userService.getById(user.getUserId()).getHeadpic();
String filename = "";
if (path == null){
}else {
filename = path.substring(path.lastIndexOf('/')+1);
FileUploadUtils.deleteFiles(new File(getUploadPath()+filename));
}
String url = "";
//存储file对象到指定路径
String newName = FileUploadUtils.uploadImage(file1, getUploadPath());
if(newName !=null ){
//生成url
url = "/headpic/"+ newName;
}
user.setHeadpic(url);
}
//业务部分:对数据库tab实体类进行修改
boolean f = userService.updateById(user);
User user1 = userService.getById(userId);
if(f) {
return JSON.toJSONString(new Result().setCode(200).setMessage("修改成功").setData(user1));
}
else
return JSON.toJSONString(new Result().setCode(402).setMessage("修改失败"));
}
@RequestMapping(value = "/addUser", method = RequestMethod.POST)
public String addUser(@RequestParam(value = "userForm") String form,
@RequestParam(value = "headpic",required=false) MultipartFile file1){
User user = JSON.parseObject(form, User.class);
if(file1 != null){
String url = "";
String newName = FileUploadUtils.uploadImage(file1, getUploadPath());
if(newName !=null ){
url = "/headpic/"+ newName;
}
user.setHeadpic(url);
}
boolean f = userService.save(user);
if(f) {
return JSON.toJSONString(new Result().setCode(200).setMessage("添加成功"));
}
else
return JSON.toJSONString(new Result().setCode(402).setMessage("添加失败"));
}
@RequestMapping(value = "/addUser2", method = RequestMethod.POST)
public String addUser2(@RequestBody User user){
boolean f = userService.save(user);
if(f) {
return JSON.toJSONString(new Result().setCode(200).setMessage("添加成功"));
}
else
return JSON.toJSONString(new Result().setCode(402).setMessage("添加失败"));
}
@RequestMapping(value = "/delUserById", method = RequestMethod.GET)
public String delUser(Integer userId) {
String path = userService.getById(userId).getHeadpic();
String filename = "";
boolean f = userService.removeById(userId);
if (f) {
if (path == null) {
} else {
filename = path.substring(path.lastIndexOf('/') + 1);
FileUploadUtils.deleteFiles(new File(getUploadPath() + filename));
}
return JSON.toJSONString(new Result().setCode(200).setMessage("删除成功"));
} else {
return JSON.toJSONString(new Result().setCode(402).setData("删除失败"));
}
}
public String getUploadPath(){
ApplicationHome h = new ApplicationHome(getClass());
File jarF = h.getSource();
String dirPath = jarF.getParentFile().toString()+"\\headpic\\";
return dirPath;
}
}
五、论文参考
- 计算机毕业设计选题推荐-戏曲文化苑微信小程序/安卓APP论文参考:
六、系统视频
戏曲文化苑微信小程序/安卓APP项目视频:
计算机毕业设计选题推荐-戏曲文化苑微信小程序/安卓APP
结语
计算机毕业设计选题推荐-戏曲文化苑微信小程序/安卓APP-项目实战
大家可以帮忙点赞、收藏、关注、评论啦~
源码获取:私信我文章来源:https://www.toymoban.com/news/detail-725618.html
精彩专栏推荐⬇⬇⬇
Java项目
Python项目
安卓项目
微信小程序项目文章来源地址https://www.toymoban.com/news/detail-725618.html
到了这里,关于计算机毕业设计选题推荐-戏曲文化苑微信小程序/安卓APP-项目实战的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!