添加幼儿园若干更改
This commit is contained in:
@ -0,0 +1,108 @@
|
||||
package com.ruoyi.project.system.controller;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
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.system.domain.BySchool;
|
||||
import com.ruoyi.project.system.service.IBySchoolService;
|
||||
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-04-08
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/system/school")
|
||||
public class BySchoolController extends BaseController
|
||||
{
|
||||
@Autowired
|
||||
private IBySchoolService bySchoolService;
|
||||
|
||||
/**
|
||||
* 查询幼儿园机构列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:school:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(BySchool bySchool)
|
||||
{
|
||||
startPage();
|
||||
List<BySchool> list = bySchoolService.selectBySchoolList(bySchool);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出幼儿园机构列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:school:export')")
|
||||
@Log(title = "幼儿园机构", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(BySchool bySchool)
|
||||
{
|
||||
List<BySchool> list = bySchoolService.selectBySchoolList(bySchool);
|
||||
ExcelUtil<BySchool> util = new ExcelUtil<BySchool>(BySchool.class);
|
||||
return util.exportExcel(list, "school");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取幼儿园机构详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:school:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id)
|
||||
{
|
||||
return AjaxResult.success(bySchoolService.selectBySchoolById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿园机构
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:school:add')")
|
||||
@Log(title = "幼儿园机构", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody BySchool bySchool)
|
||||
{
|
||||
bySchool.setCreateUser(SecurityUtils.getLoginUser().getUser().getUserId());
|
||||
bySchool.setCreateTime(new Date());
|
||||
return toAjax(bySchoolService.insertBySchool(bySchool));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改幼儿园机构
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:school:edit')")
|
||||
@Log(title = "幼儿园机构", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody BySchool bySchool)
|
||||
{
|
||||
return toAjax(bySchoolService.updateBySchool(bySchool));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除幼儿园机构
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('system:school:remove')")
|
||||
@Log(title = "幼儿园机构", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids)
|
||||
{
|
||||
return toAjax(bySchoolService.deleteBySchoolByIds(ids));
|
||||
}
|
||||
}
|
@ -0,0 +1,432 @@
|
||||
package com.ruoyi.project.system.domain;
|
||||
|
||||
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_school
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-04-08
|
||||
*/
|
||||
public class BySchool extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 幼儿园ID */
|
||||
private Long id;
|
||||
|
||||
/** 机构名称 */
|
||||
@Excel(name = "机构名称")
|
||||
private String schoolName;
|
||||
|
||||
/** 幼儿园简称 */
|
||||
@Excel(name = "幼儿园简称")
|
||||
private String nameShort;
|
||||
|
||||
/** 幼儿园类型1、独立2、集团3、集团下属 */
|
||||
@Excel(name = "幼儿园类型1、独立2、集团3、集团下属")
|
||||
private Long type;
|
||||
|
||||
/** 集团下属有parentid */
|
||||
@Excel(name = "集团下属有parentid")
|
||||
private Long parentId;
|
||||
|
||||
/** 所在省 */
|
||||
@Excel(name = "所在省")
|
||||
private String province;
|
||||
|
||||
/** 所在省 */
|
||||
@Excel(name = "所在省")
|
||||
private String provincename;
|
||||
|
||||
/** 所在城市 */
|
||||
@Excel(name = "所在城市")
|
||||
private String regionid;
|
||||
|
||||
/** 所在城市 */
|
||||
@Excel(name = "所在城市")
|
||||
private String regionname;
|
||||
|
||||
/** 所在区 */
|
||||
@Excel(name = "所在区")
|
||||
private String area;
|
||||
|
||||
/** 所在区 */
|
||||
@Excel(name = "所在区")
|
||||
private String areaname;
|
||||
|
||||
/** 详细地址 */
|
||||
@Excel(name = "详细地址")
|
||||
private String address;
|
||||
|
||||
/** 联系人 */
|
||||
@Excel(name = "联系人")
|
||||
private String mastername;
|
||||
|
||||
/** 电话 */
|
||||
@Excel(name = "电话")
|
||||
private String tel;
|
||||
|
||||
/** 紧急联系人 */
|
||||
@Excel(name = "紧急联系人")
|
||||
private String emMan;
|
||||
|
||||
/** 紧急联系电话 */
|
||||
@Excel(name = "紧急联系电话")
|
||||
private String emTel;
|
||||
|
||||
/** 状态(0试用,1开通,2停用,3禁用) */
|
||||
@Excel(name = "状态", readConverterExp = "0=试用,1开通,2停用,3禁用")
|
||||
private Long status;
|
||||
|
||||
/** 幼儿园规模 */
|
||||
@Excel(name = "幼儿园规模")
|
||||
private Long scale;
|
||||
|
||||
/** 创建人ID */
|
||||
@Excel(name = "创建人ID")
|
||||
private Long createUser;
|
||||
|
||||
/** 最后审核人ID */
|
||||
@Excel(name = "最后审核人ID")
|
||||
private Long approvalUser;
|
||||
|
||||
/** 审核时间 */
|
||||
@Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date approvalTime;
|
||||
|
||||
/** 幼儿园位置 */
|
||||
@Excel(name = "幼儿园位置")
|
||||
private String location;
|
||||
|
||||
/** 园所会员性质 */
|
||||
@Excel(name = "园所会员性质")
|
||||
private Long isDemonstr;
|
||||
|
||||
/** 营业执照图片 */
|
||||
@Excel(name = "营业执照图片")
|
||||
private String businesslicenseimg;
|
||||
|
||||
/** 家长手册发布状态(0取消,1发布) */
|
||||
@Excel(name = "家长手册发布状态", readConverterExp = "0=取消,1发布")
|
||||
private Long openBook;
|
||||
|
||||
/** 幼儿园缴费状态(0未缴费,1已缴费,2已到期) */
|
||||
@Excel(name = "幼儿园缴费状态", readConverterExp = "0=未缴费,1已缴费,2已到期")
|
||||
private Long feeStatus;
|
||||
|
||||
/** 开通截至日期 */
|
||||
@Excel(name = "开通截至日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date openDeadline;
|
||||
|
||||
/** 当前学年 */
|
||||
@Excel(name = "当前学年")
|
||||
private String dqxn;
|
||||
|
||||
/** 当前学期 */
|
||||
@Excel(name = "当前学期")
|
||||
private String dqxq;
|
||||
|
||||
public void setId(Long id)
|
||||
{
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId()
|
||||
{
|
||||
return id;
|
||||
}
|
||||
public void setSchoolName(String schoolName)
|
||||
{
|
||||
this.schoolName = schoolName;
|
||||
}
|
||||
|
||||
public String getSchoolName()
|
||||
{
|
||||
return schoolName;
|
||||
}
|
||||
public void setNameShort(String nameShort)
|
||||
{
|
||||
this.nameShort = nameShort;
|
||||
}
|
||||
|
||||
public String getNameShort()
|
||||
{
|
||||
return nameShort;
|
||||
}
|
||||
public void setType(Long type)
|
||||
{
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Long getType()
|
||||
{
|
||||
return type;
|
||||
}
|
||||
public void setParentId(Long parentId)
|
||||
{
|
||||
this.parentId = parentId;
|
||||
}
|
||||
|
||||
public Long getParentId()
|
||||
{
|
||||
return parentId;
|
||||
}
|
||||
public void setProvince(String province)
|
||||
{
|
||||
this.province = province;
|
||||
}
|
||||
|
||||
public String getProvince()
|
||||
{
|
||||
return province;
|
||||
}
|
||||
public void setProvincename(String provincename)
|
||||
{
|
||||
this.provincename = provincename;
|
||||
}
|
||||
|
||||
public String getProvincename()
|
||||
{
|
||||
return provincename;
|
||||
}
|
||||
public void setRegionid(String regionid)
|
||||
{
|
||||
this.regionid = regionid;
|
||||
}
|
||||
|
||||
public String getRegionid()
|
||||
{
|
||||
return regionid;
|
||||
}
|
||||
public void setRegionname(String regionname)
|
||||
{
|
||||
this.regionname = regionname;
|
||||
}
|
||||
|
||||
public String getRegionname()
|
||||
{
|
||||
return regionname;
|
||||
}
|
||||
public void setArea(String area)
|
||||
{
|
||||
this.area = area;
|
||||
}
|
||||
|
||||
public String getArea()
|
||||
{
|
||||
return area;
|
||||
}
|
||||
public void setAreaname(String areaname)
|
||||
{
|
||||
this.areaname = areaname;
|
||||
}
|
||||
|
||||
public String getAreaname()
|
||||
{
|
||||
return areaname;
|
||||
}
|
||||
public void setAddress(String address)
|
||||
{
|
||||
this.address = address;
|
||||
}
|
||||
|
||||
public String getAddress()
|
||||
{
|
||||
return address;
|
||||
}
|
||||
public void setMastername(String mastername)
|
||||
{
|
||||
this.mastername = mastername;
|
||||
}
|
||||
|
||||
public String getMastername()
|
||||
{
|
||||
return mastername;
|
||||
}
|
||||
public void setTel(String tel)
|
||||
{
|
||||
this.tel = tel;
|
||||
}
|
||||
|
||||
public String getTel()
|
||||
{
|
||||
return tel;
|
||||
}
|
||||
public void setEmMan(String emMan)
|
||||
{
|
||||
this.emMan = emMan;
|
||||
}
|
||||
|
||||
public String getEmMan()
|
||||
{
|
||||
return emMan;
|
||||
}
|
||||
public void setEmTel(String emTel)
|
||||
{
|
||||
this.emTel = emTel;
|
||||
}
|
||||
|
||||
public String getEmTel()
|
||||
{
|
||||
return emTel;
|
||||
}
|
||||
public void setStatus(Long status)
|
||||
{
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Long getStatus()
|
||||
{
|
||||
return status;
|
||||
}
|
||||
public void setScale(Long scale)
|
||||
{
|
||||
this.scale = scale;
|
||||
}
|
||||
|
||||
public Long getScale()
|
||||
{
|
||||
return scale;
|
||||
}
|
||||
public void setCreateUser(Long createUser)
|
||||
{
|
||||
this.createUser = createUser;
|
||||
}
|
||||
|
||||
public Long getCreateUser()
|
||||
{
|
||||
return createUser;
|
||||
}
|
||||
public void setApprovalUser(Long approvalUser)
|
||||
{
|
||||
this.approvalUser = approvalUser;
|
||||
}
|
||||
|
||||
public Long getApprovalUser()
|
||||
{
|
||||
return approvalUser;
|
||||
}
|
||||
public void setApprovalTime(Date approvalTime)
|
||||
{
|
||||
this.approvalTime = approvalTime;
|
||||
}
|
||||
|
||||
public Date getApprovalTime()
|
||||
{
|
||||
return approvalTime;
|
||||
}
|
||||
public void setLocation(String location)
|
||||
{
|
||||
this.location = location;
|
||||
}
|
||||
|
||||
public String getLocation()
|
||||
{
|
||||
return location;
|
||||
}
|
||||
public void setIsDemonstr(Long isDemonstr)
|
||||
{
|
||||
this.isDemonstr = isDemonstr;
|
||||
}
|
||||
|
||||
public Long getIsDemonstr()
|
||||
{
|
||||
return isDemonstr;
|
||||
}
|
||||
public void setBusinesslicenseimg(String businesslicenseimg)
|
||||
{
|
||||
this.businesslicenseimg = businesslicenseimg;
|
||||
}
|
||||
|
||||
public String getBusinesslicenseimg()
|
||||
{
|
||||
return businesslicenseimg;
|
||||
}
|
||||
public void setOpenBook(Long openBook)
|
||||
{
|
||||
this.openBook = openBook;
|
||||
}
|
||||
|
||||
public Long getOpenBook()
|
||||
{
|
||||
return openBook;
|
||||
}
|
||||
public void setFeeStatus(Long feeStatus)
|
||||
{
|
||||
this.feeStatus = feeStatus;
|
||||
}
|
||||
|
||||
public Long getFeeStatus()
|
||||
{
|
||||
return feeStatus;
|
||||
}
|
||||
public void setOpenDeadline(Date openDeadline)
|
||||
{
|
||||
this.openDeadline = openDeadline;
|
||||
}
|
||||
|
||||
public Date getOpenDeadline()
|
||||
{
|
||||
return openDeadline;
|
||||
}
|
||||
public void setDqxn(String dqxn)
|
||||
{
|
||||
this.dqxn = dqxn;
|
||||
}
|
||||
|
||||
public String getDqxn()
|
||||
{
|
||||
return dqxn;
|
||||
}
|
||||
public void setDqxq(String dqxq)
|
||||
{
|
||||
this.dqxq = dqxq;
|
||||
}
|
||||
|
||||
public String getDqxq()
|
||||
{
|
||||
return dqxq;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("schoolName", getSchoolName())
|
||||
.append("nameShort", getNameShort())
|
||||
.append("type", getType())
|
||||
.append("parentId", getParentId())
|
||||
.append("province", getProvince())
|
||||
.append("provincename", getProvincename())
|
||||
.append("regionid", getRegionid())
|
||||
.append("regionname", getRegionname())
|
||||
.append("area", getArea())
|
||||
.append("areaname", getAreaname())
|
||||
.append("address", getAddress())
|
||||
.append("mastername", getMastername())
|
||||
.append("tel", getTel())
|
||||
.append("emMan", getEmMan())
|
||||
.append("emTel", getEmTel())
|
||||
.append("status", getStatus())
|
||||
.append("scale", getScale())
|
||||
.append("createTime", getCreateTime())
|
||||
.append("createUser", getCreateUser())
|
||||
.append("approvalUser", getApprovalUser())
|
||||
.append("approvalTime", getApprovalTime())
|
||||
.append("remark", getRemark())
|
||||
.append("location", getLocation())
|
||||
.append("isDemonstr", getIsDemonstr())
|
||||
.append("businesslicenseimg", getBusinesslicenseimg())
|
||||
.append("openBook", getOpenBook())
|
||||
.append("feeStatus", getFeeStatus())
|
||||
.append("openDeadline", getOpenDeadline())
|
||||
.append("dqxn", getDqxn())
|
||||
.append("dqxq", getDqxq())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.system.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.system.domain.BySchool;
|
||||
|
||||
/**
|
||||
* 幼儿园机构Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-04-08
|
||||
*/
|
||||
public interface BySchoolMapper
|
||||
{
|
||||
/**
|
||||
* 查询幼儿园机构
|
||||
*
|
||||
* @param id 幼儿园机构ID
|
||||
* @return 幼儿园机构
|
||||
*/
|
||||
public BySchool selectBySchoolById(Long id);
|
||||
|
||||
/**
|
||||
* 查询幼儿园机构列表
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 幼儿园机构集合
|
||||
*/
|
||||
public List<BySchool> selectBySchoolList(BySchool bySchool);
|
||||
|
||||
/**
|
||||
* 新增幼儿园机构
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBySchool(BySchool bySchool);
|
||||
|
||||
/**
|
||||
* 修改幼儿园机构
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBySchool(BySchool bySchool);
|
||||
|
||||
/**
|
||||
* 删除幼儿园机构
|
||||
*
|
||||
* @param id 幼儿园机构ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBySchoolById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除幼儿园机构
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBySchoolByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.system.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.project.system.domain.BySchool;
|
||||
|
||||
/**
|
||||
* 幼儿园机构Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-04-08
|
||||
*/
|
||||
public interface IBySchoolService
|
||||
{
|
||||
/**
|
||||
* 查询幼儿园机构
|
||||
*
|
||||
* @param id 幼儿园机构ID
|
||||
* @return 幼儿园机构
|
||||
*/
|
||||
public BySchool selectBySchoolById(Long id);
|
||||
|
||||
/**
|
||||
* 查询幼儿园机构列表
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 幼儿园机构集合
|
||||
*/
|
||||
public List<BySchool> selectBySchoolList(BySchool bySchool);
|
||||
|
||||
/**
|
||||
* 新增幼儿园机构
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertBySchool(BySchool bySchool);
|
||||
|
||||
/**
|
||||
* 修改幼儿园机构
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateBySchool(BySchool bySchool);
|
||||
|
||||
/**
|
||||
* 批量删除幼儿园机构
|
||||
*
|
||||
* @param ids 需要删除的幼儿园机构ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBySchoolByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除幼儿园机构信息
|
||||
*
|
||||
* @param id 幼儿园机构ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteBySchoolById(Long id);
|
||||
}
|
@ -0,0 +1,95 @@
|
||||
package com.ruoyi.project.system.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ruoyi.project.system.mapper.BySchoolMapper;
|
||||
import com.ruoyi.project.system.domain.BySchool;
|
||||
import com.ruoyi.project.system.service.IBySchoolService;
|
||||
|
||||
/**
|
||||
* 幼儿园机构Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-04-08
|
||||
*/
|
||||
@Service
|
||||
public class BySchoolServiceImpl implements IBySchoolService
|
||||
{
|
||||
@Autowired
|
||||
private BySchoolMapper bySchoolMapper;
|
||||
|
||||
/**
|
||||
* 查询幼儿园机构
|
||||
*
|
||||
* @param id 幼儿园机构ID
|
||||
* @return 幼儿园机构
|
||||
*/
|
||||
@Override
|
||||
public BySchool selectBySchoolById(Long id)
|
||||
{
|
||||
return bySchoolMapper.selectBySchoolById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询幼儿园机构列表
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 幼儿园机构
|
||||
*/
|
||||
@Override
|
||||
public List<BySchool> selectBySchoolList(BySchool bySchool)
|
||||
{
|
||||
return bySchoolMapper.selectBySchoolList(bySchool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿园机构
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertBySchool(BySchool bySchool)
|
||||
{
|
||||
bySchool.setCreateTime(DateUtils.getNowDate());
|
||||
return bySchoolMapper.insertBySchool(bySchool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改幼儿园机构
|
||||
*
|
||||
* @param bySchool 幼儿园机构
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateBySchool(BySchool bySchool)
|
||||
{
|
||||
return bySchoolMapper.updateBySchool(bySchool);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除幼儿园机构
|
||||
*
|
||||
* @param ids 需要删除的幼儿园机构ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBySchoolByIds(Long[] ids)
|
||||
{
|
||||
return bySchoolMapper.deleteBySchoolByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除幼儿园机构信息
|
||||
*
|
||||
* @param id 幼儿园机构ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteBySchoolById(Long id)
|
||||
{
|
||||
return bySchoolMapper.deleteBySchoolById(id);
|
||||
}
|
||||
}
|
200
ruoyi/src/main/resources/mybatis/system/BySchoolMapper.xml
Normal file
200
ruoyi/src/main/resources/mybatis/system/BySchoolMapper.xml
Normal file
@ -0,0 +1,200 @@
|
||||
<?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.system.mapper.BySchoolMapper">
|
||||
|
||||
<resultMap type="BySchool" id="BySchoolResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="schoolName" column="school_name" />
|
||||
<result property="nameShort" column="name_short" />
|
||||
<result property="type" column="type" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="province" column="province" />
|
||||
<result property="provincename" column="provincename" />
|
||||
<result property="regionid" column="regionid" />
|
||||
<result property="regionname" column="regionname" />
|
||||
<result property="area" column="area" />
|
||||
<result property="areaname" column="areaname" />
|
||||
<result property="address" column="address" />
|
||||
<result property="mastername" column="mastername" />
|
||||
<result property="tel" column="tel" />
|
||||
<result property="emMan" column="em_man" />
|
||||
<result property="emTel" column="em_tel" />
|
||||
<result property="status" column="status" />
|
||||
<result property="scale" column="scale" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="createUser" column="create_user" />
|
||||
<result property="approvalUser" column="approval_user" />
|
||||
<result property="approvalTime" column="approval_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="location" column="location" />
|
||||
<result property="isDemonstr" column="is_demonstr" />
|
||||
<result property="businesslicenseimg" column="businesslicenseimg" />
|
||||
<result property="openBook" column="open_book" />
|
||||
<result property="feeStatus" column="fee_status" />
|
||||
<result property="openDeadline" column="open_deadline" />
|
||||
<result property="dqxn" column="dqxn" />
|
||||
<result property="dqxq" column="dqxq" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectBySchoolVo">
|
||||
select id, school_name, name_short, type, parent_id, province, provincename, regionid, regionname, area, areaname, address, mastername, tel, em_man, em_tel, status, scale, create_time, create_user, approval_user, approval_time, remark, location, is_demonstr, businesslicenseimg, open_book, fee_status, open_deadline, dqxn, dqxq from by_school
|
||||
</sql>
|
||||
|
||||
<select id="selectBySchoolList" parameterType="BySchool" resultMap="BySchoolResult">
|
||||
<include refid="selectBySchoolVo"/>
|
||||
<where>
|
||||
<if test="schoolName != null and schoolName != ''"> and school_name like concat('%', #{schoolName}, '%')</if>
|
||||
<if test="nameShort != null and nameShort != ''"> and name_short = #{nameShort}</if>
|
||||
<if test="type != null "> and type = #{type}</if>
|
||||
<if test="parentId != null "> and parent_id = #{parentId}</if>
|
||||
<if test="province != null and province != ''"> and province = #{province}</if>
|
||||
<if test="provincename != null and provincename != ''"> and provincename like concat('%', #{provincename}, '%')</if>
|
||||
<if test="regionid != null and regionid != ''"> and regionid = #{regionid}</if>
|
||||
<if test="regionname != null and regionname != ''"> and regionname like concat('%', #{regionname}, '%')</if>
|
||||
<if test="area != null and area != ''"> and area = #{area}</if>
|
||||
<if test="areaname != null and areaname != ''"> and areaname like concat('%', #{areaname}, '%')</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="mastername != null and mastername != ''"> and mastername like concat('%', #{mastername}, '%')</if>
|
||||
<if test="tel != null and tel != ''"> and tel = #{tel}</if>
|
||||
<if test="emMan != null and emMan != ''"> and em_man = #{emMan}</if>
|
||||
<if test="emTel != null and emTel != ''"> and em_tel = #{emTel}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="scale != null "> and scale = #{scale}</if>
|
||||
<if test="createUser != null "> and create_user = #{createUser}</if>
|
||||
<if test="approvalUser != null "> and approval_user = #{approvalUser}</if>
|
||||
<if test="approvalTime != null "> and approval_time = #{approvalTime}</if>
|
||||
<if test="location != null and location != ''"> and location = #{location}</if>
|
||||
<if test="isDemonstr != null "> and is_demonstr = #{isDemonstr}</if>
|
||||
<if test="businesslicenseimg != null and businesslicenseimg != ''"> and businesslicenseimg = #{businesslicenseimg}</if>
|
||||
<if test="openBook != null "> and open_book = #{openBook}</if>
|
||||
<if test="feeStatus != null "> and fee_status = #{feeStatus}</if>
|
||||
<if test="openDeadline != null "> and open_deadline = #{openDeadline}</if>
|
||||
<if test="dqxn != null and dqxn != ''"> and dqxn = #{dqxn}</if>
|
||||
<if test="dqxq != null and dqxq != ''"> and dqxq = #{dqxq}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectBySchoolById" parameterType="Long" resultMap="BySchoolResult">
|
||||
<include refid="selectBySchoolVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertBySchool" parameterType="BySchool" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_school
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="schoolName != null and schoolName != ''">school_name,</if>
|
||||
<if test="nameShort != null and nameShort != ''">name_short,</if>
|
||||
<if test="type != null ">type,</if>
|
||||
<if test="parentId != null ">parent_id,</if>
|
||||
<if test="province != null and province != ''">province,</if>
|
||||
<if test="provincename != null and provincename != ''">provincename,</if>
|
||||
<if test="regionid != null and regionid != ''">regionid,</if>
|
||||
<if test="regionname != null and regionname != ''">regionname,</if>
|
||||
<if test="area != null and area != ''">area,</if>
|
||||
<if test="areaname != null and areaname != ''">areaname,</if>
|
||||
<if test="address != null and address != ''">address,</if>
|
||||
<if test="mastername != null and mastername != ''">mastername,</if>
|
||||
<if test="tel != null and tel != ''">tel,</if>
|
||||
<if test="emMan != null and emMan != ''">em_man,</if>
|
||||
<if test="emTel != null and emTel != ''">em_tel,</if>
|
||||
<if test="status != null ">status,</if>
|
||||
<if test="scale != null ">scale,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
<if test="createUser != null ">create_user,</if>
|
||||
<if test="approvalUser != null ">approval_user,</if>
|
||||
<if test="approvalTime != null ">approval_time,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="location != null and location != ''">location,</if>
|
||||
<if test="isDemonstr != null ">is_demonstr,</if>
|
||||
<if test="businesslicenseimg != null and businesslicenseimg != ''">businesslicenseimg,</if>
|
||||
<if test="openBook != null ">open_book,</if>
|
||||
<if test="feeStatus != null ">fee_status,</if>
|
||||
<if test="openDeadline != null ">open_deadline,</if>
|
||||
<if test="dqxn != null and dqxn != ''">dqxn,</if>
|
||||
<if test="dqxq != null and dqxq != ''">dqxq,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="schoolName != null and schoolName != ''">#{schoolName},</if>
|
||||
<if test="nameShort != null and nameShort != ''">#{nameShort},</if>
|
||||
<if test="type != null ">#{type},</if>
|
||||
<if test="parentId != null ">#{parentId},</if>
|
||||
<if test="province != null and province != ''">#{province},</if>
|
||||
<if test="provincename != null and provincename != ''">#{provincename},</if>
|
||||
<if test="regionid != null and regionid != ''">#{regionid},</if>
|
||||
<if test="regionname != null and regionname != ''">#{regionname},</if>
|
||||
<if test="area != null and area != ''">#{area},</if>
|
||||
<if test="areaname != null and areaname != ''">#{areaname},</if>
|
||||
<if test="address != null and address != ''">#{address},</if>
|
||||
<if test="mastername != null and mastername != ''">#{mastername},</if>
|
||||
<if test="tel != null and tel != ''">#{tel},</if>
|
||||
<if test="emMan != null and emMan != ''">#{emMan},</if>
|
||||
<if test="emTel != null and emTel != ''">#{emTel},</if>
|
||||
<if test="status != null ">#{status},</if>
|
||||
<if test="scale != null ">#{scale},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
<if test="createUser != null ">#{createUser},</if>
|
||||
<if test="approvalUser != null ">#{approvalUser},</if>
|
||||
<if test="approvalTime != null ">#{approvalTime},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="location != null and location != ''">#{location},</if>
|
||||
<if test="isDemonstr != null ">#{isDemonstr},</if>
|
||||
<if test="businesslicenseimg != null and businesslicenseimg != ''">#{businesslicenseimg},</if>
|
||||
<if test="openBook != null ">#{openBook},</if>
|
||||
<if test="feeStatus != null ">#{feeStatus},</if>
|
||||
<if test="openDeadline != null ">#{openDeadline},</if>
|
||||
<if test="dqxn != null and dqxn != ''">#{dqxn},</if>
|
||||
<if test="dqxq != null and dqxq != ''">#{dqxq},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateBySchool" parameterType="BySchool">
|
||||
update by_school
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="schoolName != null and schoolName != ''">school_name = #{schoolName},</if>
|
||||
<if test="nameShort != null and nameShort != ''">name_short = #{nameShort},</if>
|
||||
<if test="type != null ">type = #{type},</if>
|
||||
<if test="parentId != null ">parent_id = #{parentId},</if>
|
||||
<if test="province != null and province != ''">province = #{province},</if>
|
||||
<if test="provincename != null and provincename != ''">provincename = #{provincename},</if>
|
||||
<if test="regionid != null and regionid != ''">regionid = #{regionid},</if>
|
||||
<if test="regionname != null and regionname != ''">regionname = #{regionname},</if>
|
||||
<if test="area != null and area != ''">area = #{area},</if>
|
||||
<if test="areaname != null and areaname != ''">areaname = #{areaname},</if>
|
||||
<if test="address != null and address != ''">address = #{address},</if>
|
||||
<if test="mastername != null and mastername != ''">mastername = #{mastername},</if>
|
||||
<if test="tel != null and tel != ''">tel = #{tel},</if>
|
||||
<if test="emMan != null and emMan != ''">em_man = #{emMan},</if>
|
||||
<if test="emTel != null and emTel != ''">em_tel = #{emTel},</if>
|
||||
<if test="status != null ">status = #{status},</if>
|
||||
<if test="scale != null ">scale = #{scale},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
<if test="createUser != null ">create_user = #{createUser},</if>
|
||||
<if test="approvalUser != null ">approval_user = #{approvalUser},</if>
|
||||
<if test="approvalTime != null ">approval_time = #{approvalTime},</if>
|
||||
<if test="remark != null and remark != ''">remark = #{remark},</if>
|
||||
<if test="location != null and location != ''">location = #{location},</if>
|
||||
<if test="isDemonstr != null ">is_demonstr = #{isDemonstr},</if>
|
||||
<if test="businesslicenseimg != null and businesslicenseimg != ''">businesslicenseimg = #{businesslicenseimg},</if>
|
||||
<if test="openBook != null ">open_book = #{openBook},</if>
|
||||
<if test="feeStatus != null ">fee_status = #{feeStatus},</if>
|
||||
<if test="openDeadline != null ">open_deadline = #{openDeadline},</if>
|
||||
<if test="dqxn != null and dqxn != ''">dqxn = #{dqxn},</if>
|
||||
<if test="dqxq != null and dqxq != ''">dqxq = #{dqxq},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteBySchoolById" parameterType="Long">
|
||||
delete from by_school where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteBySchoolByIds" parameterType="String">
|
||||
delete from by_school where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user