添加游戏数学方案管理
This commit is contained in:
@ -0,0 +1,119 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.system.service.ISysDictDataService;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.PutMapping;
|
||||
import org.springframework.web.bind.annotation.DeleteMapping;
|
||||
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.RestController;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
||||
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
||||
import com.ruoyi.project.benyi.domain.ByMathPlan;
|
||||
import com.ruoyi.project.benyi.service.IByMathPlanService;
|
||||
import com.ruoyi.framework.web.controller.BaseController;
|
||||
import com.ruoyi.framework.web.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.poi.ExcelUtil;
|
||||
import com.ruoyi.framework.web.page.TableDataInfo;
|
||||
|
||||
/**
|
||||
* 游戏数学方案Controller
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/plan")
|
||||
public class ByMathPlanController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IByMathPlanService byMathPlanService;
|
||||
|
||||
@Autowired
|
||||
private ISysDictDataService dictDataService;
|
||||
|
||||
/**
|
||||
* 查询游戏数学方案列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:plan:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByMathPlan byMathPlan)
|
||||
{
|
||||
startPage();
|
||||
List<ByMathPlan> list = byMathPlanService.selectByMathPlanList(byMathPlan);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出游戏数学方案列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:plan:export')")
|
||||
@Log(title = "游戏数学方案", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByMathPlan byMathPlan)
|
||||
{
|
||||
List<ByMathPlan> list = byMathPlanService.selectByMathPlanList(byMathPlan);
|
||||
ExcelUtil<ByMathPlan> util = new ExcelUtil<ByMathPlan>(ByMathPlan.class);
|
||||
return util.exportExcel(list, "plan");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取游戏数学方案详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:plan:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ByMathPlan byMathPlan = byMathPlanService.selectByMathPlanById(id);
|
||||
// 将数据库中的type类型分割 然后返回给前端
|
||||
String dictType = "sys_math_type";
|
||||
ajax.put("types", dictDataService.selectDictDataByType(dictType));
|
||||
String strType = byMathPlan.getType();
|
||||
ajax.put("typeIds", strType.split(";"));
|
||||
|
||||
ajax.put(AjaxResult.DATA_TAG, byMathPlan);
|
||||
return ajax;
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增游戏数学方案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:plan:add')")
|
||||
@Log(title = "游戏数学方案", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByMathPlan byMathPlan)
|
||||
{
|
||||
byMathPlan.setCreatetime(new Date());
|
||||
return toAjax(byMathPlanService.insertByMathPlan(byMathPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改游戏数学方案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:plan:edit')")
|
||||
@Log(title = "游戏数学方案", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByMathPlan byMathPlan)
|
||||
{
|
||||
return toAjax(byMathPlanService.updateByMathPlan(byMathPlan));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除游戏数学方案
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:plan:remove')")
|
||||
@Log(title = "游戏数学方案", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(byMathPlanService.deleteByMathPlanByIds(ids));
|
||||
}
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.system.service.ISysDictDataService;
|
||||
@ -89,6 +90,7 @@ public class ByThemeActivityController extends BaseController {
|
||||
@Log(title = "主题整合活动", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByThemeActivity byThemeActivity) {
|
||||
byThemeActivity.setCreateTime(new Date());
|
||||
return toAjax(byThemeActivityService.insertByThemeActivity(byThemeActivity));
|
||||
}
|
||||
|
||||
|
@ -1,122 +1,144 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 游戏数学对象 by_math
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
public class ByMath extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
public class ByMath extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 编号 */
|
||||
private Long id;
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/** 名称 */
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
@Excel(name = "名称")
|
||||
private String name;
|
||||
|
||||
/** 学习目标 */
|
||||
@Excel(name = "学习目标")
|
||||
private String target;
|
||||
/**
|
||||
* 学习目标
|
||||
*/
|
||||
@Excel(name = "学习目标")
|
||||
private String target;
|
||||
|
||||
/** 年龄段表现特征 */
|
||||
@Excel(name = "年龄段表现特征")
|
||||
private String feature;
|
||||
/**
|
||||
* 年龄段表现特征
|
||||
*/
|
||||
@Excel(name = "年龄段表现特征")
|
||||
private String feature;
|
||||
|
||||
/** 教学建议 */
|
||||
@Excel(name = "教学建议")
|
||||
private String suggest;
|
||||
/**
|
||||
* 教学建议
|
||||
*/
|
||||
@Excel(name = "教学建议")
|
||||
private String suggest;
|
||||
|
||||
/** 适用班级 */
|
||||
@Excel(name = "适用班级")
|
||||
private Integer classtypeId;
|
||||
/**
|
||||
* 适用班级
|
||||
*/
|
||||
@Excel(name = "适用班级")
|
||||
private Integer classtypeId;
|
||||
|
||||
/** 序号 */
|
||||
@Excel(name = "序号")
|
||||
private Long sort;
|
||||
/**
|
||||
* 序号
|
||||
*/
|
||||
@Excel(name = "序号")
|
||||
private Long sort;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createtime;
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setName(String name)
|
||||
{
|
||||
this.name = name;
|
||||
}
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName()
|
||||
{
|
||||
return name;
|
||||
}
|
||||
public void setTarget(String target)
|
||||
{
|
||||
this.target = target;
|
||||
}
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public String getTarget()
|
||||
{
|
||||
return target;
|
||||
}
|
||||
public void setFeature(String feature)
|
||||
{
|
||||
this.feature = feature;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getFeature()
|
||||
{
|
||||
return feature;
|
||||
}
|
||||
public void setSuggest(String suggest)
|
||||
{
|
||||
this.suggest = suggest;
|
||||
}
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getSuggest()
|
||||
{
|
||||
return suggest;
|
||||
}
|
||||
public void setClasstypeId(Integer classtypeId)
|
||||
{
|
||||
this.classtypeId = classtypeId;
|
||||
}
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public Integer getClasstypeId()
|
||||
{
|
||||
return classtypeId;
|
||||
}
|
||||
public void setSort(Long sort)
|
||||
{
|
||||
this.sort = sort;
|
||||
}
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public Long getSort()
|
||||
{
|
||||
return sort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("target", getTarget())
|
||||
.append("feature", getFeature())
|
||||
.append("suggest", getSuggest())
|
||||
.append("classtypeId", getClasstypeId())
|
||||
.append("sort", getSort())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
public void setFeature(String feature) {
|
||||
this.feature = feature;
|
||||
}
|
||||
|
||||
public String getFeature() {
|
||||
return feature;
|
||||
}
|
||||
|
||||
public void setSuggest(String suggest) {
|
||||
this.suggest = suggest;
|
||||
}
|
||||
|
||||
public String getSuggest() {
|
||||
return suggest;
|
||||
}
|
||||
|
||||
public void setClasstypeId(Integer classtypeId) {
|
||||
this.classtypeId = classtypeId;
|
||||
}
|
||||
|
||||
public Integer getClasstypeId() {
|
||||
return classtypeId;
|
||||
}
|
||||
|
||||
public void setSort(Long sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("name", getName())
|
||||
.append("target", getTarget())
|
||||
.append("feature", getFeature())
|
||||
.append("suggest", getSuggest())
|
||||
.append("classtypeId", getClasstypeId())
|
||||
.append("sort", getSort())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,191 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.framework.aspectj.lang.annotation.Excel;
|
||||
import com.ruoyi.framework.web.domain.BaseEntity;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 游戏数学方案对象 by_math_plan
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
public class ByMathPlan extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 数学游戏方案编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 数学编号
|
||||
*/
|
||||
@Excel(name = "数学编号")
|
||||
private Long mathid;
|
||||
|
||||
/**
|
||||
* 游戏名称
|
||||
*/
|
||||
@Excel(name = "游戏名称")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@Excel(name = "排序")
|
||||
private Long sort;
|
||||
|
||||
/**
|
||||
* 游戏形式
|
||||
*/
|
||||
@Excel(name = "游戏形式")
|
||||
private String type;
|
||||
|
||||
/**
|
||||
* 游戏目标
|
||||
*/
|
||||
@Excel(name = "游戏目标")
|
||||
private String target;
|
||||
|
||||
/**
|
||||
* 游戏准备
|
||||
*/
|
||||
@Excel(name = "游戏准备")
|
||||
private String prepare;
|
||||
|
||||
/**
|
||||
* 游戏过程
|
||||
*/
|
||||
@Excel(name = "游戏过程")
|
||||
private String process;
|
||||
|
||||
/**
|
||||
* 本周其它目标
|
||||
*/
|
||||
@Excel(name = "本周其它目标")
|
||||
private String otherTarget;
|
||||
|
||||
/**
|
||||
* $column.columnComment
|
||||
*/
|
||||
@Excel(name = "建议")
|
||||
private String suggest;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@Excel(name = "创建时间")
|
||||
private Date createtime;
|
||||
|
||||
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setMathid(Long mathid) {
|
||||
this.mathid = mathid;
|
||||
}
|
||||
|
||||
public Long getMathid() {
|
||||
return mathid;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setSort(Long sort) {
|
||||
this.sort = sort;
|
||||
}
|
||||
|
||||
public Long getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public void setTarget(String target) {
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public String getTarget() {
|
||||
return target;
|
||||
}
|
||||
|
||||
public void setPrepare(String prepare) {
|
||||
this.prepare = prepare;
|
||||
}
|
||||
|
||||
public String getPrepare() {
|
||||
return prepare;
|
||||
}
|
||||
|
||||
public void setProcess(String process) {
|
||||
this.process = process;
|
||||
}
|
||||
|
||||
public String getProcess() {
|
||||
return process;
|
||||
}
|
||||
|
||||
public void setOtherTarget(String otherTarget) {
|
||||
this.otherTarget = otherTarget;
|
||||
}
|
||||
|
||||
public String getOtherTarget() {
|
||||
return otherTarget;
|
||||
}
|
||||
|
||||
public void setSuggest(String suggest) {
|
||||
this.suggest = suggest;
|
||||
}
|
||||
|
||||
public String getSuggest() {
|
||||
return suggest;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("mathid", getMathid())
|
||||
.append("name", getName())
|
||||
.append("sort", getSort())
|
||||
.append("type", getType())
|
||||
.append("target", getTarget())
|
||||
.append("prepare", getPrepare())
|
||||
.append("process", getProcess())
|
||||
.append("otherTarget", getOtherTarget())
|
||||
.append("suggest", getSuggest())
|
||||
.append("createtime", getCreatetime())
|
||||
.toString();
|
||||
}
|
||||
|
||||
public Date getCreatetime() {
|
||||
return createtime;
|
||||
}
|
||||
|
||||
public void setCreatetime(Date createtime) {
|
||||
this.createtime = createtime;
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByMathPlan;
|
||||
|
||||
/**
|
||||
* 游戏数学方案Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
public interface ByMathPlanMapper
|
||||
{
|
||||
/**
|
||||
* 查询游戏数学方案
|
||||
*
|
||||
* @param id 游戏数学方案ID
|
||||
* @return 游戏数学方案
|
||||
*/
|
||||
public ByMathPlan selectByMathPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏数学方案列表
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 游戏数学方案集合
|
||||
*/
|
||||
public List<ByMathPlan> selectByMathPlanList(ByMathPlan byMathPlan);
|
||||
|
||||
/**
|
||||
* 新增游戏数学方案
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByMathPlan(ByMathPlan byMathPlan);
|
||||
|
||||
/**
|
||||
* 修改游戏数学方案
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByMathPlan(ByMathPlan byMathPlan);
|
||||
|
||||
/**
|
||||
* 删除游戏数学方案
|
||||
*
|
||||
* @param id 游戏数学方案ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByMathPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除游戏数学方案
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByMathPlanByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.benyi.domain.ByMathPlan;
|
||||
|
||||
/**
|
||||
* 游戏数学方案Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
public interface IByMathPlanService
|
||||
{
|
||||
/**
|
||||
* 查询游戏数学方案
|
||||
*
|
||||
* @param id 游戏数学方案ID
|
||||
* @return 游戏数学方案
|
||||
*/
|
||||
public ByMathPlan selectByMathPlanById(Long id);
|
||||
|
||||
/**
|
||||
* 查询游戏数学方案列表
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 游戏数学方案集合
|
||||
*/
|
||||
public List<ByMathPlan> selectByMathPlanList(ByMathPlan byMathPlan);
|
||||
|
||||
/**
|
||||
* 新增游戏数学方案
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByMathPlan(ByMathPlan byMathPlan);
|
||||
|
||||
/**
|
||||
* 修改游戏数学方案
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByMathPlan(ByMathPlan byMathPlan);
|
||||
|
||||
/**
|
||||
* 批量删除游戏数学方案
|
||||
*
|
||||
* @param ids 需要删除的游戏数学方案ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByMathPlanByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除游戏数学方案信息
|
||||
*
|
||||
* @param id 游戏数学方案ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByMathPlanById(Long id);
|
||||
}
|
@ -0,0 +1,93 @@
|
||||
package com.ruoyi.project.benyi.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.benyi.mapper.ByMathPlanMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByMathPlan;
|
||||
import com.ruoyi.project.benyi.service.IByMathPlanService;
|
||||
|
||||
/**
|
||||
* 游戏数学方案Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-21
|
||||
*/
|
||||
@Service
|
||||
public class ByMathPlanServiceImpl implements IByMathPlanService
|
||||
{
|
||||
@Autowired
|
||||
private ByMathPlanMapper byMathPlanMapper;
|
||||
|
||||
/**
|
||||
* 查询游戏数学方案
|
||||
*
|
||||
* @param id 游戏数学方案ID
|
||||
* @return 游戏数学方案
|
||||
*/
|
||||
@Override
|
||||
public ByMathPlan selectByMathPlanById(Long id)
|
||||
{
|
||||
return byMathPlanMapper.selectByMathPlanById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询游戏数学方案列表
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 游戏数学方案
|
||||
*/
|
||||
@Override
|
||||
public List<ByMathPlan> selectByMathPlanList(ByMathPlan byMathPlan)
|
||||
{
|
||||
return byMathPlanMapper.selectByMathPlanList(byMathPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增游戏数学方案
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByMathPlan(ByMathPlan byMathPlan)
|
||||
{
|
||||
return byMathPlanMapper.insertByMathPlan(byMathPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改游戏数学方案
|
||||
*
|
||||
* @param byMathPlan 游戏数学方案
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByMathPlan(ByMathPlan byMathPlan)
|
||||
{
|
||||
return byMathPlanMapper.updateByMathPlan(byMathPlan);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除游戏数学方案
|
||||
*
|
||||
* @param ids 需要删除的游戏数学方案ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByMathPlanByIds(Long[] ids)
|
||||
{
|
||||
return byMathPlanMapper.deleteByMathPlanByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除游戏数学方案信息
|
||||
*
|
||||
* @param id 游戏数学方案ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByMathPlanById(Long id)
|
||||
{
|
||||
return byMathPlanMapper.deleteByMathPlanById(id);
|
||||
}
|
||||
}
|
102
ruoyi/src/main/resources/mybatis/benyi/ByMathPlanMapper.xml
Normal file
102
ruoyi/src/main/resources/mybatis/benyi/ByMathPlanMapper.xml
Normal file
@ -0,0 +1,102 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.project.benyi.mapper.ByMathPlanMapper">
|
||||
|
||||
<resultMap type="ByMathPlan" id="ByMathPlanResult">
|
||||
<result property="id" column="id"/>
|
||||
<result property="mathid" column="mathid"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="sort" column="sort"/>
|
||||
<result property="type" column="type"/>
|
||||
<result property="target" column="target"/>
|
||||
<result property="prepare" column="prepare"/>
|
||||
<result property="process" column="process"/>
|
||||
<result property="otherTarget" column="other_target"/>
|
||||
<result property="suggest" column="suggest"/>
|
||||
<result property="createtime" column="createtime"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByMathPlanVo">
|
||||
select id, mathid, name, sort, type, target, prepare, process, other_target, suggest, createtime from by_math_plan
|
||||
</sql>
|
||||
|
||||
<select id="selectByMathPlanList" parameterType="ByMathPlan" resultMap="ByMathPlanResult">
|
||||
<include refid="selectByMathPlanVo"/>
|
||||
<where>
|
||||
<if test="mathid != null ">and mathid = #{mathid}</if>
|
||||
<if test="name != null and name != ''">and name like concat('%', #{name}, '%')</if>
|
||||
<if test="sort != null ">and sort = #{sort}</if>
|
||||
<if test="type != null and type != ''">and type like concat('%', #{type}, '%')</if>
|
||||
<if test="target != null and target != ''">and target = #{target}</if>
|
||||
<if test="prepare != null and prepare != ''">and prepare = #{prepare}</if>
|
||||
<if test="process != null and process != ''">and process = #{process}</if>
|
||||
<if test="otherTarget != null and otherTarget != ''">and other_target = #{otherTarget}</if>
|
||||
<if test="suggest != null and suggest != ''">and suggest = #{suggest}</if>
|
||||
<if test="createtime != null ">and createtime = #{createtime}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByMathPlanById" parameterType="Long" resultMap="ByMathPlanResult">
|
||||
<include refid="selectByMathPlanVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByMathPlan" parameterType="ByMathPlan" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_math_plan
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="mathid != null ">mathid,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="sort != null ">sort,</if>
|
||||
<if test="type != null and type != ''">type,</if>
|
||||
<if test="target != null and target != ''">target,</if>
|
||||
<if test="prepare != null and prepare != ''">prepare,</if>
|
||||
<if test="process != null and process != ''">process,</if>
|
||||
<if test="otherTarget != null and otherTarget != ''">other_target,</if>
|
||||
<if test="suggest != null and suggest != ''">suggest,</if>
|
||||
<if test="createtime != null ">createtime,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="mathid != null ">#{mathid},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="sort != null ">#{sort},</if>
|
||||
<if test="type != null and type != ''">#{type},</if>
|
||||
<if test="target != null and target != ''">#{target},</if>
|
||||
<if test="prepare != null and prepare != ''">#{prepare},</if>
|
||||
<if test="process != null and process != ''">#{process},</if>
|
||||
<if test="otherTarget != null and otherTarget != ''">#{otherTarget},</if>
|
||||
<if test="suggest != null and suggest != ''">#{suggest},</if>
|
||||
<if test="createtime != null ">#{createtime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByMathPlan" parameterType="ByMathPlan">
|
||||
update by_math_plan
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="mathid != null ">mathid = #{mathid},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="sort != null ">sort = #{sort},</if>
|
||||
<if test="type != null and type != ''">type = #{type},</if>
|
||||
<if test="target != null and target != ''">target = #{target},</if>
|
||||
<if test="prepare != null and prepare != ''">prepare = #{prepare},</if>
|
||||
<if test="process != null and process != ''">process = #{process},</if>
|
||||
<if test="otherTarget != null and otherTarget != ''">other_target = #{otherTarget},</if>
|
||||
<if test="suggest != null and suggest != ''">suggest = #{suggest},</if>
|
||||
<if test="createtime != null ">createtime = #{createtime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByMathPlanById" parameterType="Long">
|
||||
delete from by_math_plan where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByMathPlanByIds" parameterType="String">
|
||||
delete from by_math_plan where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user