package ssm.controller;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.multipart.MultipartFile;
import org.springframework.web.servlet.ModelAndView;
import ssm.entity.InverstMessage;
import ssm.entity.InvestType;
import ssm.entity.InvestUMessage;
import ssm.service.InvestMessageService;
import ssm.service.InvestTypeService;
import ssm.service.InvestUMessageService;
@Controller
public class InvestController {
@Autowired
private InvestTypeService investtypeservice;
@Autowired
private InvestMessageService investMessageservice;
@Autowired
private InvestUMessageService umessageservice;
@RequestMapping("toinvest")
public ModelAndView toinvest(HttpServletRequest request) {
List<InvestType> plist=this.investtypeservice.selectpclass();
List<InvestType> slist=this.investtypeservice.selectsclass();
request.getSession().setAttribute("plist", plist);
request.getSession().setAttribute("slist", slist);
return new ModelAndView("invest");
}
@RequestMapping("Invest/toclassmanager")
public ModelAndView toclassmanager() {
List<InvestType> plist=this.investtypeservice.selectpclass();
List<InvestType> slist=this.investtypeservice.selectsclass();
Map<String, Object> list=new HashMap<String, Object>();
list.put("plist", plist);
list.put("slist", slist);
return new ModelAndView("invest_classmanager","list",list);
}
@RequestMapping("Invest/toaddclass")
public ModelAndView toaddclass() {
return new ModelAndView("invest_addclass");
}
@RequestMapping("Invest/addclass")
public ModelAndView addclass(@ModelAttribute("it")InvestType it) {
this.investtypeservice.insert(it);
return this.toclassmanager();
}
@RequestMapping("Invest/toeditclass")
public ModelAndView toeditclass(int id) {
InvestType it=this.investtypeservice.selectByPrimaryKey(id);
return new ModelAndView("invest_editclass","it",it);
}
@RequestMapping("Invest/updateclass")
public ModelAndView updateclass(@ModelAttribute("it")InvestType it) {
this.investtypeservice.updateByPrimaryKey(it);
return this.toclassmanager();
}
@RequestMapping("Invest/delclass")
public ModelAndView delclass(int id) {
this.investtypeservice.deleteByPrimaryKey(id);
return this.toclassmanager();
}
@RequestMapping("Invest/toinfolist")
public ModelAndView toinfolist() {
List<InverstMessage> list=this.investMessageservice.selectinfo();
return new ModelAndView("invest_infolist","list",list);
}
@RequestMapping("Invest/toaddinfo")
public ModelAndView toaddinfo() {
return new ModelAndView("invest_addinfo");
}
@RequestMapping("Invest/addinfo")
public ModelAndView addinfo(@ModelAttribute("info")InverstMessage info,@RequestParam("file") MultipartFile file) {
if(!file.isEmpty()) {
String path="D://file";
String filename=file.getOriginalFilename();
File filepath=new File(path,filename);
if(!filepath.getParentFile().exists()) {
filepath.getParentFile().mkdirs();
}
try {
file.transferTo(filepath);
} catch (IllegalStateException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
info.setImLogo(filename);
}
this.investMessageservice.insert(info);
return this.toinfolist();
}
@RequestMapping("Invest/toeditinfo")
public ModelAndView toeditinfo(int id) {
InverstMessage im=this.investMessageservice.selectByPrimaryKey(id);
return new ModelAndView("invest_editinfo","im",im);
}
@RequestMapping("Invest/updateinfo")
public ModelAndView updateinfo(@ModelAttribute("im")InverstMessage im,@RequestParam("file") MultipartFile file) {
if(!file.isEmpty()) {
String path="D://file";
String filename=file.getOriginalFilename();
File filepath=new File(path,filename);
if(!filepath.getParentFile().exists()) {
filepath.getParentFile().mkdirs();
}
try {
file.transferTo(filepath);
} catch (IllegalStateException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
im.setImLogo(filename);
}
this.investMessageservice.updateByPrimaryKey(im);
return this.toinfolist();
}
@RequestMapping("Invest/delinfo")
public ModelAndView delinfo(int id) {
this.investMessageservice.deleteByPrimaryKey(id);
return this.toinfolist();
}
@RequestMapping("Invest/toulist")
public ModelAndView toulist() {
List<InvestUMessage> list=this.umessageservice.selectuinfo();
return new ModelAndView("invest_ulist","list",list);
}
@RequestMapping("Invest/toaddu")
public ModelAndView toaddu() {
return new ModelAndView("invest_addu");
}
@RequestMapping("Invest/addu")
public ModelAndView addu(@ModelAttribute("um")InvestUMessage um,@RequestParam("file") MultipartFile file) {
if(!file.isEmpty()) {
String path="D://file";
String filename=file.getOriginalFilename();
File filepath=new File(path,filename);
if(!filepath.getParentFile().exists()) {
filepath.getParentFile().mkdirs();
}
try {
file.transferTo(filepath);
} catch (IllegalStateException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
um.setIumHead(filename);;
}
this.umessageservice.insert(um);
return this.toulist();
}
@RequestMapping("Invest/delu")
public ModelAndView delu(int id) {
this.umessageservice.deleteByPrimaryKey(id);
return this.toulist();
}
@RequestMapping("Invest/toeditu")
public ModelAndView toeditu(int id) {
InvestUMessage um=this.umessageservice.selectByPrimaryKey(id);
return new ModelAndView("invest_editu","um",um);
}
@RequestMapping("Invest/updateu")
public ModelAndView updateu(@ModelAttribute("um")InvestUMessage um,@RequestParam("file")MultipartFile file) {
if(!file.isEmpty()) {
String path="D://file";
String filename=file.getOriginalFilename();
File filepath=new File(path,filename);
if(!filepath.getParentFile().exists()) {
filepath.getParentFile().mkdirs();
}
try {
file.transferTo(filepath);
} catch (IllegalStateException | IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
um.setIumHead(filename);
}
this.umessageservice.updateByPrimaryKey(um);
return this.toulist();
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
jinrong.zip_jinrong_资金_金融_金融投资管理
共508个文件
gif:151个
class:66个
java:66个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 17 浏览量
2022-09-20
11:04:18
上传
评论
收藏 29.91MB ZIP 举报
温馨提示
金融后台项目,实现用户注册,投资管理,资金管理等。
资源推荐
资源详情
资源评论
收起资源包目录
jinrong.zip_jinrong_资金_金融_金融投资管理 (508个子文件)
InvestController.class 8KB
FoundMoneyController.class 6KB
FoundMessage.class 6KB
EssayController.class 6KB
ProductController.class 6KB
LinkController.class 6KB
UserController.class 5KB
OtherController.class 5KB
InverstMessage.class 4KB
SysinfoEntity.class 4KB
InvestUMessage.class 4KB
EssayMessage.class 4KB
Message.class 3KB
ProductMessage.class 3KB
OtherMessage.class 2KB
UserEntity.class 2KB
UserServiceImp.class 2KB
LinkMessage.class 2KB
InverstTypeImp.class 2KB
FoundMoneyImp.class 2KB
EssayTypeImp.class 2KB
ProductServiceImp.class 2KB
OtherTypeImp.class 2KB
InvestUMessageImp.class 2KB
ProductMessageImp.class 2KB
InvestMessageImp.class 2KB
FoundMessageImp.class 2KB
FoundMoney.class 2KB
OtherMessageImp.class 2KB
EssayMessageImp.class 2KB
LinkMessageImp.class 2KB
LinkTypeImp.class 2KB
OtherType.class 2KB
EssayType.class 2KB
InvestType.class 2KB
LinkType.class 1KB
Product.class 1KB
UserService.class 575B
UserMapper.class 569B
FoundMoneyService.class 537B
InvestTypeService.class 537B
InvestTypeMapper.class 531B
FoundMoneyMapper.class 531B
OtherTypeService.class 530B
EssayTypeService.class 530B
InvestUMessageService.class 525B
OtherTypeMapper.class 524B
EssayTypeMapper.class 524B
ProductMessageService.class 524B
ProductService.class 522B
InvestMessageService.class 522B
InvestUMessageMapper.class 519B
ProductMessageMapper.class 518B
InverstMessageMapper.class 518B
ProductMapper.class 516B
OtherMessageService.class 515B
FoundMessageService.class 514B
EssayMessageService.class 510B
LinkMessageService.class 510B
OtherMessageMapper.class 509B
FoundMessageMapper.class 508B
EssayMessageMapper.class 504B
LinkMessageMapper.class 504B
LinkTypeService.class 492B
LinkTypeMapper.class 486B
MessageMapper.class 378B
.classpath 842B
org.eclipse.wst.common.component 485B
org.eclipse.wst.jsdt.ui.superType.container 49B
default.css 21KB
default.css 21KB
css.css 6KB
laydate.css 6KB
content.css 4KB
laydate(1).css 3KB
qq.css 3KB
simple.css 2KB
prettify.css 973B
static.gif 35KB
35.gif 13KB
42.gif 13KB
40.gif 10KB
18.gif 8KB
19.gif 8KB
11.gif 8KB
32.gif 7KB
49.gif 6KB
29.gif 6KB
97.gif 5KB
65.gif 5KB
31.gif 5KB
46.gif 5KB
57.gif 5KB
45.gif 5KB
8.gif 5KB
43.gif 4KB
33.gif 4KB
68.gif 4KB
26.gif 4KB
14.gif 4KB
共 508 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
寒泊
- 粉丝: 76
- 资源: 1万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 2406011243520696.mp4
- sql语句及应用场景.zip
- 疯狂吃月饼游戏小程序前端源码
- 硬件工程师+电子类工程师岗位简历模板
- 知识领域: 人工智能 技术关键词: TensorFlow、Keras、深度学习、神经网络
- 知识领域: 自动化测试 技术关键词: pytest、unittest、自动化测试、测试框架
- 知识领域: 数据库管理 技术关键词: SQLAlchemy、数据库、ORM、SQL 内容关键词: 数据库连接、数据查询、数据操作
- 知识领域: 网络编程 技术关键词: socket、网络编程、异步IO、TCP/IP 内容关键词: 客户端、服务器、网络协议
- 知识领域: 自然语言处理 技术关键词: NLTK、spaCy、文本处理、语言模型
- ubuntu20.04安装教程.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功