基于微信小程序的青少年素质教育培训系统设计与实现-计算机毕业设计源码+LW文档
发布时间:2023-12-04 15:03:55 317
相关标签:
开发语言:Java 框架:ssm JDK版本:JDK1.8 服务器:tomcat7 数据库:mysql 5.7(一定要5.7版本) 数据库工具:Navicat11 开发软件:eclipse/myeclipse/idea Maven包:Maven3.3.9 浏览器:谷歌浏览器
小程序框架:uniapp 小程序开发软件:HBuilder X 小程序运行软件:微信开发者
代码:
/**
- 教学信息评论表
- 后端接口
- @author
- @date 2022-04-03 11:19:32
*/
@RestController
@RequestMapping("/discussjiaoxuexinxi")
public class DiscussjiaoxuexinxiController {
@Autowired
private DiscussjiaoxuexinxiService discussjiaoxuexinxiService;
/**
- 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map
params,DiscussjiaoxuexinxiEntity discussjiaoxuexinxi, HttpServletRequest request){
EntityWrapper(); PageUtils page = discussjiaoxuexinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussjiaoxuexinxi), params), params)); return R.ok().put("data", page); }
/**
- 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map
params,DiscussjiaoxuexinxiEntity discussjiaoxuexinxi, HttpServletRequest request){ EntityWrapper(); PageUtils page = discussjiaoxuexinxiService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, discussjiaoxuexinxi), params), params)); return R.ok().put("data", page); }
/**
- 列表 */ @RequestMapping("/lists") public R list( DiscussjiaoxuexinxiEntity discussjiaoxuexinxi){ EntityWrapper(); ew.allEq(MPUtil.allEQMapPre( discussjiaoxuexinxi, "discussjiaoxuexinxi")); return R.ok().put("data", discussjiaoxuexinxiService.selectListView(ew)); }
/**
- 查询 */ @RequestMapping("/query") public R query(DiscussjiaoxuexinxiEntity discussjiaoxuexinxi){ EntityWrapper< DiscussjiaoxuexinxiEntity> ew = new EntityWrapper< DiscussjiaoxuexinxiEntity>(); ew.allEq(MPUtil.allEQMapPre( discussjiaoxuexinxi, "discussjiaoxuexinxi")); DiscussjiaoxuexinxiView discussjiaoxuexinxiView = discussjiaoxuexinxiService.selectView(ew); return R.ok("查询教学信息评论表成功").put("data", discussjiaoxuexinxiView); }
/**
- 后端详情 */ @RequestMapping("/info/{id}") public R info(@PathVariable("id") Long id){ DiscussjiaoxuexinxiEntity discussjiaoxuexinxi = discussjiaoxuexinxiService.selectById(id); return R.ok().put("data", discussjiaoxuexinxi); }
/**
- 前端详情 */ @IgnoreAuth @RequestMapping("/detail/{id}") public R detail(@PathVariable("id") Long id){ DiscussjiaoxuexinxiEntity discussjiaoxuexinxi = discussjiaoxuexinxiService.selectById(id); return R.ok().put("data", discussjiaoxuexinxi); }
/**
- 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody DiscussjiaoxuexinxiEntity discussjiaoxuexinxi, HttpServletRequest request){
discussjiaoxuexinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(discussjiaoxuexinxi);
discussjiaoxuexinxiService.insert(discussjiaoxuexinxi); return R.ok(); }
/**
- 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody DiscussjiaoxuexinxiEntity discussjiaoxuexinxi, HttpServletRequest request){
discussjiaoxuexinxi.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(discussjiaoxuexinxi);
discussjiaoxuexinxiService.insert(discussjiaoxuexinxi); return R.ok(); }
/**
- 修改 */ @RequestMapping("/update") public R update(@RequestBody DiscussjiaoxuexinxiEntity discussjiaoxuexinxi, HttpServletRequest request){ //ValidatorUtils.validateEntity(discussjiaoxuexinxi); discussjiaoxuexinxiService.updateById(discussjiaoxuexinxi);//全部更新 return R.ok(); }
文章来源: https://blog.51cto.com/u_15745565/5854233
特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报