基于微信小程序的ssm电影交流平台源码和论文

                     基于微信小程序的ssm电影交流平台源码和论文weixin318

随着信息化时代的到来,管理系统都趋向于智能化、系统化,电影交流平台小程序也不例外,但目前国内的市场仍都使用人工管理,市场规模越来越大,同时信息量也越来越庞大,人工管理显然已无法应对时代的变化,而电影交流平台小程序能很好地解决这一问题,轻松应对电影交流平时的工作,既能提高人力物力财力,又能加快工作的效率,取代人工管理是必然趋势。

本电影交流平台小程序以ssm作为框架,b/s模式以及MySql作为后台运行的数据库,同时使用Tomcat用为系统的服务器。本系统主要包括首页、个人中心、用户管理、电影类型管理、电影中心管理、留言反馈、系统管理等功能,通过这些功能的实现能够基本满足日常电影交流管理的操作。

本文着重阐述了电影交流平台小程序的分析、设计与实现,首先介绍开发系统和环境配置、数据库的设计,接着说明功能模块的详细实现,最后进行了总结。

关键词:电影交流平台小程序; ssm;MySql数据库;Tomcat

演示视频:

基于微信小程序的ssm电影交流平台源码和论文


Abstract

With the advent of the era of information technology, management systems tend to be intelligent, systematic, film communication platform applet is not exceptional also, but the current domestic market still use manual management, the size of the market is more and more big, at the same time, the amount of information is becoming more and more big, artificial management has clearly unable to cope with the changes of The Times, and a small program that film communication platform can well solve this problem, Easy to cope with the usual work of film exchange, can not only improve human, material and financial resources, but also speed up the efficiency of work, replacing manual management is an inevitable trend.

The small program of the film exchange platform takes SSM as the framework, B/S mode and MySql as the background database, and Tomcat is used as the server of the system. This system mainly includes home page, personal center, user management, film type management, film center management, message feedback, system management and other functions, through the realization of these functions can basically meet the daily film communication management operation.

This paper focuses on the analysis, design and implementation of the small program of the film communication platform. First, it introduces the development system and environment configuration, the design of the database, and then explains the detailed implementation of the functional module. Finally, it summarizes.

Key words: film communication platform applets; ssm; MySql database; Tomcat

package com.controller;

import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;

import com.entity.DianyingzhongxinEntity;
import com.entity.view.DianyingzhongxinView;

import com.service.DianyingzhongxinService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import com.service.StoreupService;
import com.entity.StoreupEntity;

/**
 * 电影中心
 * 后端接口
 * @author 
 * @email 
 * @date 2022-05-02 17:10:35
 */
@RestController
@RequestMapping("/dianyingzhongxin")
public class DianyingzhongxinController {
    @Autowired
    private DianyingzhongxinService dianyingzhongxinService;


    @Autowired
    private StoreupService storeupService;

    


    /**
     * 后端列表
     */
    @RequestMapping("/page")
    public R page(@RequestParam Map<String, Object> params,DianyingzhongxinEntity dianyingzhongxin, 
		HttpServletRequest request){
    	if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
    		dianyingzhongxin.setUserid((Long)request.getSession().getAttribute("userId"));
    	}

        EntityWrapper<DianyingzhongxinEntity> ew = new EntityWrapper<DianyingzhongxinEntity>();
		PageUtils page = dianyingzhongxinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dianyingzhongxin), params), params));
        return R.ok().put("data", page);
    }
    
    /**
     * 前端列表
     */
	@IgnoreAuth
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params,DianyingzhongxinEntity dianyingzhongxin, 
		HttpServletRequest request){
        EntityWrapper<DianyingzhongxinEntity> ew = new EntityWrapper<DianyingzhongxinEntity>();
		PageUtils page = dianyingzhongxinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dianyingzhongxin), params), params));
        return R.ok().put("data", page);
    }

	/**
     * 列表
     */
    @RequestMapping("/lists")
    public R list( DianyingzhongxinEntity dianyingzhongxin){
       	EntityWrapper<DianyingzhongxinEntity> ew = new EntityWrapper<DianyingzhongxinEntity>();
      	ew.allEq(MPUtil.allEQMapPre( dianyingzhongxin, "dianyingzhongxin")); 
        return R.ok().put("data", dianyingzhongxinService.selectListView(ew));
    }

	 /**
     * 查询
     */
    @RequestMapping("/query")
    public R query(DianyingzhongxinEntity dianyingzhongxin){
        EntityWrapper< DianyingzhongxinEntity> ew = new EntityWrapper< DianyingzhongxinEntity>();
 		ew.allEq(MPUtil.allEQMapPre( dianyingzhongxin, "dianyingzhongxin")); 
		DianyingzhongxinView dianyingzhongxinView =  dianyingzhongxinService.selectView(ew);
		return R.ok("查询电影中心成功").put("data", dianyingzhongxinView);
    }
	
    /**
     * 后端详情
     */
    @RequestMapping("/info/{id}")
    public R info(@PathVariable("id") Long id){
        DianyingzhongxinEntity dianyingzhongxin = dianyingzhongxinService.selectById(id);
		dianyingzhongxin.setClicknum(dianyingzhongxin.getClicknum()+1);
		dianyingzhongxin.setClicktime(new Date());
		dianyingzhongxinService.updateById(dianyingzhongxin);
        return R.ok().put("data", dianyingzhongxin);
    }

    /**
     * 前端详情
     */
	@IgnoreAuth
    @RequestMapping("/detail/{id}")
    public R detail(@PathVariable("id") Long id){
        DianyingzhongxinEntity dianyingzhongxin = dianyingzhongxinService.selectById(id);
		dianyingzhongxin.setClicknum(dianyingzhongxin.getClicknum()+1);
		dianyingzhongxin.setClicktime(new Date());
		dianyingzhongxinService.updateById(dianyingzhongxin);
        return R.ok().put("data", dianyingzhongxin);
    }
    



    /**
     * 后端保存
     */
    @RequestMapping("/save")
    public R save(@RequestBody DianyingzhongxinEntity dianyingzhongxin, HttpServletRequest request){
    	dianyingzhongxin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(dianyingzhongxin);
    	dianyingzhongxin.setUserid((Long)request.getSession().getAttribute("userId"));

        dianyingzhongxinService.insert(dianyingzhongxin);
        return R.ok();
    }
    
    /**
     * 前端保存
     */
    @RequestMapping("/add")
    public R add(@RequestBody DianyingzhongxinEntity dianyingzhongxin, HttpServletRequest request){
    	dianyingzhongxin.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
    	//ValidatorUtils.validateEntity(dianyingzhongxin);

        dianyingzhongxinService.insert(dianyingzhongxin);
        return R.ok();
    }

    /**
     * 修改
     */
    @RequestMapping("/update")
    @Transactional
    public R update(@RequestBody DianyingzhongxinEntity dianyingzhongxin, HttpServletRequest request){
        //ValidatorUtils.validateEntity(dianyingzhongxin);
        dianyingzhongxinService.updateById(dianyingzhongxin);//全部更新
        return R.ok();
    }
    

    /**
     * 删除
     */
    @RequestMapping("/delete")
    public R delete(@RequestBody Long[] ids){
        dianyingzhongxinService.deleteBatchIds(Arrays.asList(ids));
        return R.ok();
    }
    
    /**
     * 提醒接口
     */
	@RequestMapping("/remind/{columnName}/{type}")
	public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("column", columnName);
		map.put("type", type);
		
		if(type.equals("2")) {
			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
			Calendar c = Calendar.getInstance();
			Date remindStartDate = null;
			Date remindEndDate = null;
			if(map.get("remindstart")!=null) {
				Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
				c.setTime(new Date()); 
				c.add(Calendar.DAY_OF_MONTH,remindStart);
				remindStartDate = c.getTime();
				map.put("remindstart", sdf.format(remindStartDate));
			}
			if(map.get("remindend")!=null) {
				Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
				c.setTime(new Date());
				c.add(Calendar.DAY_OF_MONTH,remindEnd);
				remindEndDate = c.getTime();
				map.put("remindend", sdf.format(remindEndDate));
			}
		}
		
		Wrapper<DianyingzhongxinEntity> wrapper = new EntityWrapper<DianyingzhongxinEntity>();
		if(map.get("remindstart")!=null) {
			wrapper.ge(columnName, map.get("remindstart"));
		}
		if(map.get("remindend")!=null) {
			wrapper.le(columnName, map.get("remindend"));
		}
		if(!request.getSession().getAttribute("role").toString().equals("管理员")) {
    		wrapper.eq("userid", (Long)request.getSession().getAttribute("userId"));
    	}


		int count = dianyingzhongxinService.selectCount(wrapper);
		return R.ok().put("count", count);
	}
	
	/**
     * 前端智能排序
     */
	@IgnoreAuth
    @RequestMapping("/autoSort")
    public R autoSort(@RequestParam Map<String, Object> params,DianyingzhongxinEntity dianyingzhongxin, HttpServletRequest request,String pre){
        EntityWrapper<DianyingzhongxinEntity> ew = new EntityWrapper<DianyingzhongxinEntity>();
        Map<String, Object> newMap = new HashMap<String, Object>();
        Map<String, Object> param = new HashMap<String, Object>();
		Iterator<Map.Entry<String, Object>> it = param.entrySet().iterator();
		while (it.hasNext()) {
			Map.Entry<String, Object> entry = it.next();
			String key = entry.getKey();
			String newKey = entry.getKey();
			if (pre.endsWith(".")) {
				newMap.put(pre + newKey, entry.getValue());
			} else if (StringUtils.isEmpty(pre)) {
				newMap.put(newKey, entry.getValue());
			} else {
				newMap.put(pre + "." + newKey, entry.getValue());
			}
		}
		params.put("sort", "clicknum");
        
        params.put("order", "desc");
		PageUtils page = dianyingzhongxinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dianyingzhongxin), params), params));
        return R.ok().put("data", page);
    }


    /**
     * 协同算法(按收藏推荐)
     */
    @RequestMapping("/autoSort2")
    public R autoSort2(@RequestParam Map<String, Object> params,DianyingzhongxinEntity dianyingzhongxin, HttpServletRequest request){
        String userId = request.getSession().getAttribute("userId").toString();
        String inteltypeColumn = "dianyingleixing";
        List<StoreupEntity> storeups = storeupService.selectList(new EntityWrapper<StoreupEntity>().eq("type", 1).eq("userid", userId).eq("tablename", "dianyingzhongxin").orderBy("addtime", false));
        List<String> inteltypes = new ArrayList<String>();
        Integer limit = params.get("limit")==null?10:Integer.parseInt(params.get("limit").toString());
        List<DianyingzhongxinEntity> dianyingzhongxinList = new ArrayList<DianyingzhongxinEntity>();
        //去重
        if(storeups!=null && storeups.size()>0) {
            for(StoreupEntity s : storeups) {
                dianyingzhongxinList.addAll(dianyingzhongxinService.selectList(new EntityWrapper<DianyingzhongxinEntity>().eq(inteltypeColumn, s.getInteltype())));
            }
        }
        EntityWrapper<DianyingzhongxinEntity> ew = new EntityWrapper<DianyingzhongxinEntity>();
        params.put("sort", "id");
        params.put("order", "desc");
        PageUtils page = dianyingzhongxinService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, dianyingzhongxin), params), params));
        List<DianyingzhongxinEntity> pageList = (List<DianyingzhongxinEntity>)page.getList();
        if(dianyingzhongxinList.size()<limit) {
            int toAddNum = (limit-dianyingzhongxinList.size())<=pageList.size()?(limit-dianyingzhongxinList.size()):pageList.size();
            for(DianyingzhongxinEntity o1 : pageList) {
                boolean addFlag = true;
                for(DianyingzhongxinEntity o2 : dianyingzhongxinList) {
                    if(o1.getId().intValue()==o2.getId().intValue()) {
                        addFlag = false;
                        break;
                    }
                }
                if(addFlag) {
                    dianyingzhongxinList.add(o1);
                    if(--toAddNum==0) break;
                }
            }
        } else if(dianyingzhongxinList.size()>limit) {
            dianyingzhongxinList = dianyingzhongxinList.subList(0, limit);
        }
        page.setList(dianyingzhongxinList);
        return R.ok().put("data", page);
    }





}

  • 29
    点赞
  • 17
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
基于SSM(Spring+Spring MVC+MyBatis)框架的电影交流平台微信小程序是一款旨在促进电影爱好者之间交流与分享的应用。该小程序整合了电影信息展示、用户评论互动、影评发布等功能,为用户提供了一个便捷的电影社区平台。 以下是该微信小程序的主要功能和特点: 电影信息展示: 用户可以通过小程序浏览最新的电影信息,包括电影名称、导演、演员、剧情简介等,方便用户了解电影资讯。 用户评论互动: 用户可以在小程序中查看其他用户对电影的评论和评分,并进行互动交流。同时,用户也可以对自己观影的电影进行评价和分享,与其他用户分享观影心得。 影评发布: 用户可以在小程序中发布自己的影评文章,分享对电影的深度解读和观点分析,吸引其他用户的关注和讨论。 电影推荐系统: 小程序可以根据用户的浏览历史和兴趣偏好,推荐符合用户口味的电影,提高用户体验。 社区互动: 小程序建立了电影爱好者的社区,用户可以在社区中交流讨论电影话题、分享观影心得,增进彼此之间的交流与互动。 用户个人中心: 用户可以在小程序中建立个人资料,查看自己的评论、收藏记录,管理个人信息。 数据统计与分析: 小程序可以对用户的浏览行为和交互数据进行统计分析,了解用户的兴趣偏好和行为习惯,为电影推荐和社区运营提供数据支持。 通过以上功能,基于SSM框架的电影交流平台微信小程序为用户提供了一个集电影信息获取、观影评论和社区互动于一体的综合性电影社区平台,为广大电影爱好者提供了一个分享、交流与互动的平台。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值