ssm星空游戏购买下载平台源码和论文PPT

news2024/9/23 3:23:05

ssm星空游戏购买下载平台的设计与实现112

 开发工具:idea 
 数据库mysql5.7+
 数据库链接工具:navcat,小海豚等
  技术:ssm

摘 要

随着科学技术的飞速发展,各行各业都在努力与现代先进技术接轨,通过科技手段提高自身的优势,商品交易当然也不能排除在外,随着商品交易管理的不断成熟,它彻底改变了过去传统的经营管理方式,不仅使商品交易管理难度变低了,还提升了商品交易管理的灵活性。这种个性化的网上商品交易特别注重交互协调经营与管理的相互配合,激发了管理人员的创造性与主动性,对商品交易的管理而言非常有利。

星空游戏购买下载平台的设计主要是对系统所要实现的功能进行详细考虑,确定所要实现的功能后进行界面的设计,在这中间还要考虑如何可以更好的将功能及页面进行很好的结合,方便用户可以很容易明了的找到自己所需要的信息,还有系统平台后期的可操作性,通过对信息内容的详细了解进行技术的开发。

本设计的基本思想就是采用SSM框架开发星空游戏购买下载平台,以Java为开发语言,MySQL为数据库,后端使用了Spring、Spring MVC和MyBatis三个框架(简称SSM),其中用Spring MVC实现。测试结果表明,该星空游戏购买下载平台能以一种简便、轻量级的方式实现了管理的基本功能,降低了开发的复杂性,提高了系统的可维护性,具有一定的应用价值。

关键词: 星空游戏购买下载平台; Mysql;Java

Abstract

With the rapid development of science and technology, all walks of life are trying to connect with modern advanced technology and improve their own advantages through scientific and technological means. With the continuous maturity of commodity transaction management, it has completely changed the traditional management mode in the past, which not only makes commodity transaction management less difficult, but also improves the flexibility of commodity transaction management. This kind of individualized online commodity transaction pays special attention to the mutual coordination of management and management, which stimulates the creativity and initiative of managers, and is very beneficial to the management of commodity trading.

 The design of online star game purchase and download platform is mainly to consider the functions to be realized by the system in detail, to determine the functions to be implemented and to design the interface. In the middle, we also consider how to better combine the functions and pages.

 A basic idea of this design is to use the SSM framework to develop online star game purchase and download platform, Java as the language of development, MySQL as a database, The backend uses three frameworks, Spring、Spring MVC and MyBatis (SSM), Among them, Spring MVC is used to realize. The test results show that, The online Star Games purchase and download platform can achieve the basic functions of management in a simple and lightweight way, Reduced development complexity, Improved system maintainability, It has certain application value.

 Keywords: Star Game Buy Download Platform; Mysql;Java 

package com.controller;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang3.StringUtils;
import org.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ResourceUtils;
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.annotation.IgnoreAuth;
import com.baidu.aip.face.AipFace;
import com.baidu.aip.face.MatchRequest;
import com.baidu.aip.util.Base64Util;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.entity.ConfigEntity;
import com.service.CommonService;
import com.service.ConfigService;
import com.utils.BaiduUtil;
import com.utils.FileUtil;
import com.utils.R;

/**
 * 通用接口
 */
@RestController
public class CommonController{
	@Autowired
	private CommonService commonService;
	
	@Autowired
	private ConfigService configService;
	
	private static AipFace client = null;
	
	private static String BAIDU_DITU_AK = null;
	
	@RequestMapping("/location")
	public R location(String lng,String lat) {
		if(BAIDU_DITU_AK==null) {
			BAIDU_DITU_AK = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "baidu_ditu_ak")).getValue();
			if(BAIDU_DITU_AK==null) {
				return R.error("请在配置管理中正确配置baidu_ditu_ak");
			}
		}
		Map<String, String> map = BaiduUtil.getCityByLonLat(BAIDU_DITU_AK, lng, lat);
		return R.ok().put("data", map);
	}
	
	/**
	 * 人脸比对
	 * 
	 * @param face1 人脸1
	 * @param face2 人脸2
	 * @return
	 */
	@RequestMapping("/matchFace")
	public R matchFace(String face1, String face2,HttpServletRequest request) {
		if(client==null) {
			/*String AppID = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "AppID")).getValue();*/
			String APIKey = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "APIKey")).getValue();
			String SecretKey = configService.selectOne(new EntityWrapper<ConfigEntity>().eq("name", "SecretKey")).getValue();
			String token = BaiduUtil.getAuth(APIKey, SecretKey);
			if(token==null) {
				return R.error("请在配置管理中正确配置APIKey和SecretKey");
			}
			client = new AipFace(null, APIKey, SecretKey);
			client.setConnectionTimeoutInMillis(2000);
			client.setSocketTimeoutInMillis(60000);
		}
		JSONObject res = null;
		try {
			File file1 = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+face1);
			File file2 = new File(request.getSession().getServletContext().getRealPath("/upload")+"/"+face2);
			String img1 = Base64Util.encode(FileUtil.FileToByte(file1));
			String img2 = Base64Util.encode(FileUtil.FileToByte(file2));
			MatchRequest req1 = new MatchRequest(img1, "BASE64");
			MatchRequest req2 = new MatchRequest(img2, "BASE64");
			ArrayList<MatchRequest> requests = new ArrayList<MatchRequest>();
			requests.add(req1);
			requests.add(req2);
			res = client.match(requests);
			System.out.println(res.get("result"));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
			return R.error("文件不存在");
		} catch (IOException e) {
			e.printStackTrace();
		} 
		return R.ok().put("data", com.alibaba.fastjson.JSONObject.parse(res.get("result").toString()));
	}
    
	/**
	 * 获取table表中的column列表(联动接口)
	 * @param table
	 * @param column
	 * @return
	 */
	@IgnoreAuth
	@RequestMapping("/option/{tableName}/{columnName}")
	public R getOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName,String level,String parent) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("column", columnName);
		if(StringUtils.isNotBlank(level)) {
			params.put("level", level);
		}
		if(StringUtils.isNotBlank(parent)) {
			params.put("parent", parent);
		}
		List<String> data = commonService.getOption(params);
		return R.ok().put("data", data);
	}
	
	/**
	 * 根据table中的column获取单条记录
	 * @param table
	 * @param column
	 * @return
	 */
	@IgnoreAuth
	@RequestMapping("/follow/{tableName}/{columnName}")
	public R getFollowByOption(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, @RequestParam String columnValue) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("column", columnName);
		params.put("columnValue", columnValue);
		Map<String, Object> result = commonService.getFollowByOption(params);
		return R.ok().put("data", result);
	}
	
	/**
	 * 修改table表的sfsh状态
	 * @param table
	 * @param map
	 * @return
	 */
	@RequestMapping("/sh/{tableName}")
	public R sh(@PathVariable("tableName") String tableName, @RequestBody Map<String, Object> map) {
		map.put("table", tableName);
		commonService.sh(map);
		return R.ok();
	}
	
	/**
	 * 获取需要提醒的记录数
	 * @param tableName
	 * @param columnName
	 * @param type 1:数字 2:日期
	 * @param map
	 * @return
	 */
	@IgnoreAuth
	@RequestMapping("/remind/{tableName}/{columnName}/{type}")
	public R remindCount(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName, 
						 @PathVariable("type") String type,@RequestParam Map<String, Object> map) {
		map.put("table", tableName);
		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));
			}
		}
		
		int count = commonService.remindCount(map);
		return R.ok().put("count", count);
	}
	
	/**
	 * 单列求和
	 */
	@IgnoreAuth
	@RequestMapping("/cal/{tableName}/{columnName}")
	public R cal(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("column", columnName);
		Map<String, Object> result = commonService.selectCal(params);
		return R.ok().put("data", result);
	}
	
	/**
	 * 分组统计
	 */
	@IgnoreAuth
	@RequestMapping("/group/{tableName}/{columnName}")
	public R group(@PathVariable("tableName") String tableName, @PathVariable("columnName") String columnName) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("column", columnName);
		List<Map<String, Object>> result = commonService.selectGroup(params);
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		for(Map<String, Object> m : result) {
			for(String k : m.keySet()) {
				if(m.get(k) instanceof Date) {
					m.put(k, sdf.format((Date)m.get(k)));
				}
			}
		}
		return R.ok().put("data", result);
	}
	
	/**
	 * (按值统计)
	 */
	@IgnoreAuth
	@RequestMapping("/value/{tableName}/{xColumnName}/{yColumnName}")
	public R value(@PathVariable("tableName") String tableName, @PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName) {
		Map<String, Object> params = new HashMap<String, Object>();
		params.put("table", tableName);
		params.put("xColumn", xColumnName);
		params.put("yColumn", yColumnName);
		List<Map<String, Object>> result = commonService.selectValue(params);
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
		for(Map<String, Object> m : result) {
			for(String k : m.keySet()) {
				if(m.get(k) instanceof Date) {
					m.put(k, sdf.format((Date)m.get(k)));
				}
			}
		}
		return R.ok().put("data", result);
	}
	
}

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/959047.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

【Linux】线程安全-死锁

文章目录 死锁问题场景1场景2死锁的gdb调试造成死锁的必要条件不可剥夺循环等待互斥条件请求和保持 预防死锁破坏必要条件&#xff0c;循环等待&请求和保持加锁顺序一致避免锁没有被释放资源一次性分配 死锁问题 死锁的两种场景&#xff1a; 场景1 线程加锁之后一直没有将锁…

Lvs+KeepAlived高可用高性能负载均衡

目录 1.环境介绍 2.配置keepalived 3.测试 1.测试负载均衡 2.测试RS高可用 3.测试LVS高可用 3.1测试lvs主服务宕机 3.2.测试lvs主服务器恢复 4.我在实验中遇到的错误 1.环境介绍 环境&#xff1a;centos7 RS1---RIP1:192.168.163.145 VIP 192.168.163.200 RS2---RIP2…

SAP维护货币换算比率 TCODE: OBBS

通过外币做账时&#xff0c;如果系统没有维护好货币换算比率的&#xff0c;系统会提示&#xff1a;维护 SAR/ CNY 的换算率(汇率类型 M)。 维护维护 货币换算率事务代码为&#xff1a; OBBS

【Linux】进程的优先级

我们都知道进程等待需要cpu处理的&#xff0c;那就需要一个数据结构来记录要被cpu处理的进程&#xff0c;那这些进程是按一个什么样的方式在这个结构中进行等待呢&#xff1f;下面就要谈到进程的优先级了&#xff1a; 目录 一、进程的优先级的概念 二、查看进程的优先级 2.1…

浏览器连不上 Flink WebUI 8081 端口

安装 flink-1.17.0 后&#xff0c;start-cluster.sh 启动&#xff0c;发现浏览器连不上 Flink WebUI 的8081端口。 问题排查&#xff1a; command R&#xff0c;输入cmd&#xff0c;检查宿主机能否ping通虚拟机&#xff0c;发现能ping通。 检查是否有flink以外的任务占用8081…

SpringBoot使用i18n国际化

使用的SpringBoot版本是2.3.5 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.3.5.RELEASE</version><relativePath/> </parent> 一、简单测试…

CentOs8安装jdk

这里使用yum的方式安装jdk 卸载 如果有jdk的话&#xff0c;先卸载&#xff0c;卸载操作&#xff1a;https://blog.csdn.net/a3562323/article/details/107468828 安装 查看可安装的jdk相关版本 yum list java*安装 我这里装的是jdk11 yum install -y java-11-openjdk.x8…

ArcGIS Maps SDK for JavaScript(一):概述与使用

文章目录 1 概述2 如何使用ArcGIS Maps SDK for JavaScript2.1 AMD 模块与 ES 模块2.2 AMD 模块和 ES 模块比较 3 几种安装方式3.1 通过 ArcGIS CDN 获取 AMD 模块3.2 通过 NPM 运行 ES 模块3.3 通过 CDN 获取 ES 模块3.4 本地构建 ES3.5 本地构建 AMD 3 VSCode下载与安装2.1 下…

澳洲留学: 学签将改革移民倾向不再是拒签理由!

目录 1. 澳洲留学: 学签将改革移民倾向不再是拒签理由! 2. GMAT考试: 新版GMAT考试8月29日正式开放报名! AP 学科考试报名时间轴公布 或许native speaker使用的英语没有想象中的那么难 如果有人不相信你&#xff0c;而你想让他们相信你&#xff0c;你需要表现出不可否认…

基于java+springboot+vue的点餐平台网站-lw-源码

​ 系统介绍&#xff1a; 随着现在网络的快速发展&#xff0c;网上管理系统也逐渐快速发展起来&#xff0c;网上管理模式很快融入到了许多商家的之中&#xff0c;随之就产生了“点餐平台网站”&#xff0c;这样就让点餐平台网站更加方便简单。 对于本点餐平台网站的设计来说…

【LeetCode】《LeetCode 101》第十二章:字符串

文章目录 12.1 字符串比较242 . 有效的字母异位词&#xff08;简单&#xff09;205. 同构字符串&#xff08;简单&#xff09;647. 回文子串&#xff08;中等&#xff09;696 . 计数二进制子串&#xff08;简单&#xff09; 12.2 字符串理解224. 基本计算器&#xff08;困难&am…

秋天露营怎么能少得了投影仪,极米Z7X见证你的每一个幸福时刻

秋高气爽&#xff0c;正是露营好时候。作为一种休闲娱乐的方式&#xff0c;露营近年来颇受年轻人喜爱。闲暇之余&#xff0c;约上三五好友&#xff0c;亦可情侣二人&#xff0c;带上野餐烧烤食材&#xff0c;到一处能够放飞自我的大自然中&#xff0c;欣赏风光美景&#xff0c;…

Python Qt学习(八)Treeview

源代码&#xff1a; # -*- coding: utf-8 -*-# Form implementation generated from reading ui file qt_treeview.ui # # Created by: PyQt5 UI code generator 5.15.9 # # WARNING: Any manual changes made to this file will be lost when pyuic5 is # run again. Do not…

乙酰六肽-49——治疗敏感肌肤

简介 敏感性皮肤&#xff08;sensitive skin&#xff09;和“皮肤过敏”是两个不同的概念&#xff0c;皮肤过敏是一种变态反应&#xff0c;由变应原进入机体后&#xff0c;促使机体产生相应的抗体&#xff0c;引发抗原抗体反应&#xff0c;表现为红斑、丘疹、风团等临床客观体…

软件定义网络:重新定义云计算网络架构

文章目录 软件定义网络的基本概念软件定义网络的工作原理软件定义网络在云计算中的应用与优势示例&#xff1a;软件定义网络配置未来发展和挑战结论 &#x1f389;欢迎来到AIGC人工智能专栏~软件定义网络&#xff1a;重新定义云计算网络架构 ☆* o(≧▽≦)o *☆嗨~我是IT陈寒&a…

广告宣传片策划的团队分工

一个优秀的广告宣传片制作团队能够结合创意、技术和项目管理能力&#xff0c;为客户提供高质量的宣传片制作服务。在广告宣传片的策划过程中&#xff0c;通常需要共同合作。深圳广告宣传片制作公司老友记小编还为您整理以下常见的广告宣传片策划团队的分工概述&#xff1a; 1.…

做CRM客户管理系统前要分析哪些数据?

01 做CRM客户管理系统前要分析哪些数据&#xff1f; “数据是21世纪的石油” 进行数据分析是做crm至关重要的步骤&#xff0c;根据我们团队的多年经验&#xff0c;本文总结出了两个需要重点考虑的方面&#xff1a; 1、客户基本信息 包括客户的基本档案、经营状况、客户特征…

如何有效防止服务器被攻击?

随着互联网的快速发展&#xff0c;服务器安全问题日益引起人们的关注。近期&#xff0c;全球范围内频繁发生的服务器攻击事件引发了广泛关注。为了保护企业和个人的数据安全&#xff0c;有效防止服务器被攻击已成为迫在眉睫的任务。 首先&#xff0c;及时更新服务器的操作系统和…

电子学会 2023年5月 青少年软件编程Python编程等级考试三级真题解析(选择题+判断题+编程题)

青少年编程Python编程等级考试三级真题解析(选择题+判断题+编程题) 2023年5月 一、选择题(共25题,共50分) 请选择,下面代码运行之后的结果是?( ) a = 2 b = 4 try:c = a * bprint(c) except:print

实战黑马苍穹外卖项目8.1-10.1

文章目录 软件开发的基本流程用户层网关层应用层数据层工具 数据库设计导入准备好的前端和后端工程基础工程代码分析完成员工功能完成菜品功能入门Redis实现店铺营业HttpClient微信小程序开发缓存Spring Cache实现地址功能用户下单实现订单推送状态apache对应的工具使用项目用到…