20200720-zlp-1
幼儿管理
This commit is contained in:
@ -0,0 +1,97 @@
|
||||
package com.ruoyi.project.benyi.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
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.ByChild;
|
||||
import com.ruoyi.project.benyi.service.IByChildService;
|
||||
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-20
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/benyi/child")
|
||||
public class ByChildController extends BaseController {
|
||||
@Autowired
|
||||
private IByChildService byChildService;
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:list')")
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(ByChild byChild) {
|
||||
startPage();
|
||||
List<ByChild> list = byChildService.selectByChildList(byChild);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 导出幼儿信息列表
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:export')")
|
||||
@Log(title = "幼儿信息", businessType = BusinessType.EXPORT)
|
||||
@GetMapping("/export")
|
||||
public AjaxResult export(ByChild byChild) {
|
||||
List<ByChild> list = byChildService.selectByChildList(byChild);
|
||||
ExcelUtil<ByChild> util = new ExcelUtil<ByChild>(ByChild.class);
|
||||
return util.exportExcel(list, "child");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取幼儿信息详细信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:query')")
|
||||
@GetMapping(value = "/{id}")
|
||||
public AjaxResult getInfo(@PathVariable("id") Long id) {
|
||||
return AjaxResult.success(byChildService.selectByChildById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:add')")
|
||||
@Log(title = "幼儿信息", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public AjaxResult add(@RequestBody ByChild byChild) {
|
||||
return toAjax(byChildService.insertByChild(byChild));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改幼儿信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:edit')")
|
||||
@Log(title = "幼儿信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public AjaxResult edit(@RequestBody ByChild byChild) {
|
||||
return toAjax(byChildService.updateByChild(byChild));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除幼儿信息
|
||||
*/
|
||||
@PreAuthorize("@ss.hasPermi('benyi:child:remove')")
|
||||
@Log(title = "幼儿信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{ids}")
|
||||
public AjaxResult remove(@PathVariable Long[] ids) {
|
||||
return toAjax(byChildService.deleteByChildByIds(ids));
|
||||
}
|
||||
}
|
493
ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java
Normal file
493
ruoyi/src/main/java/com/ruoyi/project/benyi/domain/ByChild.java
Normal file
@ -0,0 +1,493 @@
|
||||
package com.ruoyi.project.benyi.domain;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
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;
|
||||
|
||||
/**
|
||||
* 幼儿信息对象 by_child
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
public class ByChild extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 编号
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 学校id
|
||||
*/
|
||||
@Excel(name = "学校id")
|
||||
private Long schoolid;
|
||||
|
||||
/**
|
||||
* 班级id
|
||||
*/
|
||||
@Excel(name = "班级id")
|
||||
private Long classid;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@Excel(name = "姓名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 英文名
|
||||
*/
|
||||
@Excel(name = "英文名")
|
||||
private String enName;
|
||||
|
||||
/**
|
||||
* 小名
|
||||
*/
|
||||
@Excel(name = "小名")
|
||||
private String infantName;
|
||||
|
||||
/**
|
||||
* 家长手机号码
|
||||
*/
|
||||
@Excel(name = "家长手机号码")
|
||||
private String phone;
|
||||
|
||||
/**
|
||||
* 性别
|
||||
*/
|
||||
@Excel(name = "性别")
|
||||
private String xb;
|
||||
|
||||
/**
|
||||
* 民族
|
||||
*/
|
||||
@Excel(name = "民族")
|
||||
private String mz;
|
||||
|
||||
/**
|
||||
* 证件号码
|
||||
*/
|
||||
@Excel(name = "证件号码")
|
||||
private String zjhm;
|
||||
|
||||
/**
|
||||
* 出生日期
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "出生日期", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date csrq;
|
||||
|
||||
/**
|
||||
* 出生所在省
|
||||
*/
|
||||
@Excel(name = "出生所在省")
|
||||
private String birthProvince;
|
||||
|
||||
/**
|
||||
* 出生所在地市
|
||||
*/
|
||||
@Excel(name = "出生所在地市")
|
||||
private String birthCity;
|
||||
|
||||
/**
|
||||
* 出生地区
|
||||
*/
|
||||
@Excel(name = "出生地区")
|
||||
private String birthArea;
|
||||
|
||||
/**
|
||||
* 户口所在地
|
||||
*/
|
||||
@Excel(name = "户口所在地")
|
||||
private String registeredProvince;
|
||||
|
||||
/**
|
||||
* 户口所在地市
|
||||
*/
|
||||
@Excel(name = "户口所在地市")
|
||||
private String registeredCity;
|
||||
|
||||
/**
|
||||
* 户口所在区
|
||||
*/
|
||||
@Excel(name = "户口所在区")
|
||||
private String registeredArea;
|
||||
|
||||
/**
|
||||
* 住址省
|
||||
*/
|
||||
@Excel(name = "住址省")
|
||||
private String addrProvince;
|
||||
|
||||
/**
|
||||
* 住址市
|
||||
*/
|
||||
@Excel(name = "住址市")
|
||||
private String addrCity;
|
||||
|
||||
/**
|
||||
* 住址区
|
||||
*/
|
||||
@Excel(name = "住址区")
|
||||
private String addrArea;
|
||||
|
||||
/**
|
||||
* 详细地址
|
||||
*/
|
||||
@Excel(name = "详细地址")
|
||||
private String addrDetail;
|
||||
|
||||
/**
|
||||
* 曾经就读幼儿园
|
||||
*/
|
||||
@Excel(name = "曾经就读幼儿园")
|
||||
private String everSchool;
|
||||
|
||||
/**
|
||||
* 是否学习英语
|
||||
*/
|
||||
@Excel(name = "是否学习英语")
|
||||
private String learnEnglish;
|
||||
|
||||
/**
|
||||
* 入园渠道
|
||||
*/
|
||||
@Excel(name = "入园渠道")
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
@Excel(name = "状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 入园时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "入园时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date enterDate;
|
||||
|
||||
/**
|
||||
* 离园时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||
@Excel(name = "离园时间", width = 30, dateFormat = "yyyy-MM-dd")
|
||||
private Date outDate;
|
||||
|
||||
/**
|
||||
* 第一语言
|
||||
*/
|
||||
@Excel(name = "第一语言")
|
||||
private String firstLanguage;
|
||||
|
||||
/**
|
||||
* 第二语言
|
||||
*/
|
||||
@Excel(name = "第二语言")
|
||||
private String seconderLanguage;
|
||||
|
||||
/**
|
||||
* 其他语言
|
||||
*/
|
||||
@Excel(name = "其他语言")
|
||||
private String otherLanguage;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@Excel(name = "创建人")
|
||||
private Long createuserid;
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setSchoolid(Long schoolid) {
|
||||
this.schoolid = schoolid;
|
||||
}
|
||||
|
||||
public Long getSchoolid() {
|
||||
return schoolid;
|
||||
}
|
||||
|
||||
public void setClassid(Long classid) {
|
||||
this.classid = classid;
|
||||
}
|
||||
|
||||
public Long getClassid() {
|
||||
return classid;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setEnName(String enName) {
|
||||
this.enName = enName;
|
||||
}
|
||||
|
||||
public String getEnName() {
|
||||
return enName;
|
||||
}
|
||||
|
||||
public void setInfantName(String infantName) {
|
||||
this.infantName = infantName;
|
||||
}
|
||||
|
||||
public String getInfantName() {
|
||||
return infantName;
|
||||
}
|
||||
|
||||
public void setPhone(String phone) {
|
||||
this.phone = phone;
|
||||
}
|
||||
|
||||
public String getPhone() {
|
||||
return phone;
|
||||
}
|
||||
|
||||
public void setXb(String xb) {
|
||||
this.xb = xb;
|
||||
}
|
||||
|
||||
public String getXb() {
|
||||
return xb;
|
||||
}
|
||||
|
||||
public void setMz(String mz) {
|
||||
this.mz = mz;
|
||||
}
|
||||
|
||||
public String getMz() {
|
||||
return mz;
|
||||
}
|
||||
|
||||
public void setZjhm(String zjhm) {
|
||||
this.zjhm = zjhm;
|
||||
}
|
||||
|
||||
public String getZjhm() {
|
||||
return zjhm;
|
||||
}
|
||||
|
||||
public void setCsrq(Date csrq) {
|
||||
this.csrq = csrq;
|
||||
}
|
||||
|
||||
public Date getCsrq() {
|
||||
return csrq;
|
||||
}
|
||||
|
||||
public void setBirthProvince(String birthProvince) {
|
||||
this.birthProvince = birthProvince;
|
||||
}
|
||||
|
||||
public String getBirthProvince() {
|
||||
return birthProvince;
|
||||
}
|
||||
|
||||
public void setBirthCity(String birthCity) {
|
||||
this.birthCity = birthCity;
|
||||
}
|
||||
|
||||
public String getBirthCity() {
|
||||
return birthCity;
|
||||
}
|
||||
|
||||
public void setBirthArea(String birthArea) {
|
||||
this.birthArea = birthArea;
|
||||
}
|
||||
|
||||
public String getBirthArea() {
|
||||
return birthArea;
|
||||
}
|
||||
|
||||
public void setRegisteredProvince(String registeredProvince) {
|
||||
this.registeredProvince = registeredProvince;
|
||||
}
|
||||
|
||||
public String getRegisteredProvince() {
|
||||
return registeredProvince;
|
||||
}
|
||||
|
||||
public void setRegisteredCity(String registeredCity) {
|
||||
this.registeredCity = registeredCity;
|
||||
}
|
||||
|
||||
public String getRegisteredCity() {
|
||||
return registeredCity;
|
||||
}
|
||||
|
||||
public void setRegisteredArea(String registeredArea) {
|
||||
this.registeredArea = registeredArea;
|
||||
}
|
||||
|
||||
public String getRegisteredArea() {
|
||||
return registeredArea;
|
||||
}
|
||||
|
||||
public void setAddrProvince(String addrProvince) {
|
||||
this.addrProvince = addrProvince;
|
||||
}
|
||||
|
||||
public String getAddrProvince() {
|
||||
return addrProvince;
|
||||
}
|
||||
|
||||
public void setAddrCity(String addrCity) {
|
||||
this.addrCity = addrCity;
|
||||
}
|
||||
|
||||
public String getAddrCity() {
|
||||
return addrCity;
|
||||
}
|
||||
|
||||
public void setAddrArea(String addrArea) {
|
||||
this.addrArea = addrArea;
|
||||
}
|
||||
|
||||
public String getAddrArea() {
|
||||
return addrArea;
|
||||
}
|
||||
|
||||
public void setAddrDetail(String addrDetail) {
|
||||
this.addrDetail = addrDetail;
|
||||
}
|
||||
|
||||
public String getAddrDetail() {
|
||||
return addrDetail;
|
||||
}
|
||||
|
||||
public void setEverSchool(String everSchool) {
|
||||
this.everSchool = everSchool;
|
||||
}
|
||||
|
||||
public String getEverSchool() {
|
||||
return everSchool;
|
||||
}
|
||||
|
||||
public void setLearnEnglish(String learnEnglish) {
|
||||
this.learnEnglish = learnEnglish;
|
||||
}
|
||||
|
||||
public String getLearnEnglish() {
|
||||
return learnEnglish;
|
||||
}
|
||||
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setEnterDate(Date enterDate) {
|
||||
this.enterDate = enterDate;
|
||||
}
|
||||
|
||||
public Date getEnterDate() {
|
||||
return enterDate;
|
||||
}
|
||||
|
||||
public void setOutDate(Date outDate) {
|
||||
this.outDate = outDate;
|
||||
}
|
||||
|
||||
public Date getOutDate() {
|
||||
return outDate;
|
||||
}
|
||||
|
||||
public void setFirstLanguage(String firstLanguage) {
|
||||
this.firstLanguage = firstLanguage;
|
||||
}
|
||||
|
||||
public String getFirstLanguage() {
|
||||
return firstLanguage;
|
||||
}
|
||||
|
||||
public void setSeconderLanguage(String seconderLanguage) {
|
||||
this.seconderLanguage = seconderLanguage;
|
||||
}
|
||||
|
||||
public String getSeconderLanguage() {
|
||||
return seconderLanguage;
|
||||
}
|
||||
|
||||
public void setOtherLanguage(String otherLanguage) {
|
||||
this.otherLanguage = otherLanguage;
|
||||
}
|
||||
|
||||
public String getOtherLanguage() {
|
||||
return otherLanguage;
|
||||
}
|
||||
|
||||
public void setCreateuserid(Long createuserid) {
|
||||
this.createuserid = createuserid;
|
||||
}
|
||||
|
||||
public Long getCreateuserid() {
|
||||
return createuserid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
|
||||
.append("id", getId())
|
||||
.append("schoolid", getSchoolid())
|
||||
.append("classid", getClassid())
|
||||
.append("name", getName())
|
||||
.append("enName", getEnName())
|
||||
.append("infantName", getInfantName())
|
||||
.append("phone", getPhone())
|
||||
.append("xb", getXb())
|
||||
.append("mz", getMz())
|
||||
.append("zjhm", getZjhm())
|
||||
.append("csrq", getCsrq())
|
||||
.append("birthProvince", getBirthProvince())
|
||||
.append("birthCity", getBirthCity())
|
||||
.append("birthArea", getBirthArea())
|
||||
.append("registeredProvince", getRegisteredProvince())
|
||||
.append("registeredCity", getRegisteredCity())
|
||||
.append("registeredArea", getRegisteredArea())
|
||||
.append("addrProvince", getAddrProvince())
|
||||
.append("addrCity", getAddrCity())
|
||||
.append("addrArea", getAddrArea())
|
||||
.append("addrDetail", getAddrDetail())
|
||||
.append("everSchool", getEverSchool())
|
||||
.append("learnEnglish", getLearnEnglish())
|
||||
.append("source", getSource())
|
||||
.append("status", getStatus())
|
||||
.append("enterDate", getEnterDate())
|
||||
.append("outDate", getOutDate())
|
||||
.append("firstLanguage", getFirstLanguage())
|
||||
.append("seconderLanguage", getSeconderLanguage())
|
||||
.append("otherLanguage", getOtherLanguage())
|
||||
.append("createuserid", getCreateuserid())
|
||||
.append("createTime", getCreateTime())
|
||||
.toString();
|
||||
}
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
|
||||
/**
|
||||
* 幼儿信息Mapper接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
public interface ByChildMapper {
|
||||
/**
|
||||
* 查询幼儿信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 幼儿信息
|
||||
*/
|
||||
public ByChild selectByChildById(Long id);
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息集合
|
||||
*/
|
||||
public List<ByChild> selectByChildList(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByChild(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 修改幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByChild(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 删除幼儿信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildById(Long id);
|
||||
|
||||
/**
|
||||
* 批量删除幼儿信息
|
||||
*
|
||||
* @param ids 需要删除的数据ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildByIds(Long[] ids);
|
||||
}
|
@ -0,0 +1,61 @@
|
||||
package com.ruoyi.project.benyi.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
|
||||
/**
|
||||
* 幼儿信息Service接口
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
public interface IByChildService {
|
||||
/**
|
||||
* 查询幼儿信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 幼儿信息
|
||||
*/
|
||||
public ByChild selectByChildById(Long id);
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息集合
|
||||
*/
|
||||
public List<ByChild> selectByChildList(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertByChild(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 修改幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateByChild(ByChild byChild);
|
||||
|
||||
/**
|
||||
* 批量删除幼儿信息
|
||||
*
|
||||
* @param ids 需要删除的幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除幼儿信息信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteByChildById(Long id);
|
||||
}
|
@ -0,0 +1,89 @@
|
||||
package com.ruoyi.project.benyi.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.benyi.mapper.ByChildMapper;
|
||||
import com.ruoyi.project.benyi.domain.ByChild;
|
||||
import com.ruoyi.project.benyi.service.IByChildService;
|
||||
|
||||
/**
|
||||
* 幼儿信息Service业务层处理
|
||||
*
|
||||
* @author tsbz
|
||||
* @date 2020-07-20
|
||||
*/
|
||||
@Service
|
||||
public class ByChildServiceImpl implements IByChildService {
|
||||
@Autowired
|
||||
private ByChildMapper byChildMapper;
|
||||
|
||||
/**
|
||||
* 查询幼儿信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 幼儿信息
|
||||
*/
|
||||
@Override
|
||||
public ByChild selectByChildById(Long id) {
|
||||
return byChildMapper.selectByChildById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询幼儿信息列表
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 幼儿信息
|
||||
*/
|
||||
@Override
|
||||
public List<ByChild> selectByChildList(ByChild byChild) {
|
||||
return byChildMapper.selectByChildList(byChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int insertByChild(ByChild byChild) {
|
||||
byChild.setCreateTime(DateUtils.getNowDate());
|
||||
return byChildMapper.insertByChild(byChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改幼儿信息
|
||||
*
|
||||
* @param byChild 幼儿信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int updateByChild(ByChild byChild) {
|
||||
return byChildMapper.updateByChild(byChild);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除幼儿信息
|
||||
*
|
||||
* @param ids 需要删除的幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByChildByIds(Long[] ids) {
|
||||
return byChildMapper.deleteByChildByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除幼儿信息信息
|
||||
*
|
||||
* @param id 幼儿信息ID
|
||||
* @return 结果
|
||||
*/
|
||||
@Override
|
||||
public int deleteByChildById(Long id) {
|
||||
return byChildMapper.deleteByChildById(id);
|
||||
}
|
||||
}
|
206
ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml
Normal file
206
ruoyi/src/main/resources/mybatis/benyi/ByChildMapper.xml
Normal file
@ -0,0 +1,206 @@
|
||||
<?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.ByChildMapper">
|
||||
|
||||
<resultMap type="ByChild" id="ByChildResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="schoolid" column="schoolid" />
|
||||
<result property="classid" column="classid" />
|
||||
<result property="name" column="name" />
|
||||
<result property="enName" column="en_name" />
|
||||
<result property="infantName" column="infant_name" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="xb" column="xb" />
|
||||
<result property="mz" column="mz" />
|
||||
<result property="zjhm" column="zjhm" />
|
||||
<result property="csrq" column="csrq" />
|
||||
<result property="birthProvince" column="birth_province" />
|
||||
<result property="birthCity" column="birth_city" />
|
||||
<result property="birthArea" column="birth_area" />
|
||||
<result property="registeredProvince" column="registered_province" />
|
||||
<result property="registeredCity" column="registered_city" />
|
||||
<result property="registeredArea" column="registered_area" />
|
||||
<result property="addrProvince" column="addr_province" />
|
||||
<result property="addrCity" column="addr_city" />
|
||||
<result property="addrArea" column="addr_area" />
|
||||
<result property="addrDetail" column="addr_detail" />
|
||||
<result property="everSchool" column="ever_school" />
|
||||
<result property="learnEnglish" column="learn_english" />
|
||||
<result property="source" column="source" />
|
||||
<result property="status" column="status" />
|
||||
<result property="enterDate" column="enter_date" />
|
||||
<result property="outDate" column="out_date" />
|
||||
<result property="firstLanguage" column="first_language" />
|
||||
<result property="seconderLanguage" column="seconder_language" />
|
||||
<result property="otherLanguage" column="other_language" />
|
||||
<result property="createuserid" column="createuserid" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectByChildVo">
|
||||
select id, schoolid, classid, name, en_name, infant_name, phone, xb, mz, zjhm, csrq, birth_province, birth_city, birth_area, registered_province, registered_city, registered_area, addr_province, addr_city, addr_area, addr_detail, ever_school, learn_english, source, status, enter_date, out_date, first_language, seconder_language, other_language, createuserid, create_time from by_child
|
||||
</sql>
|
||||
|
||||
<select id="selectByChildList" parameterType="ByChild" resultMap="ByChildResult">
|
||||
<include refid="selectByChildVo"/>
|
||||
<where>
|
||||
<if test="schoolid != null "> and schoolid = #{schoolid}</if>
|
||||
<if test="classid != null "> and classid = #{classid}</if>
|
||||
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
||||
<if test="enName != null and enName != ''"> and en_name like concat('%', #{enName}, '%')</if>
|
||||
<if test="infantName != null and infantName != ''"> and infant_name like concat('%', #{infantName}, '%')</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="xb != null and xb != ''"> and xb = #{xb}</if>
|
||||
<if test="mz != null and mz != ''"> and mz = #{mz}</if>
|
||||
<if test="zjhm != null and zjhm != ''"> and zjhm = #{zjhm}</if>
|
||||
<if test="csrq != null "> and csrq = #{csrq}</if>
|
||||
<if test="birthProvince != null and birthProvince != ''"> and birth_province = #{birthProvince}</if>
|
||||
<if test="birthCity != null and birthCity != ''"> and birth_city = #{birthCity}</if>
|
||||
<if test="birthArea != null and birthArea != ''"> and birth_area = #{birthArea}</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''"> and registered_province = #{registeredProvince}</if>
|
||||
<if test="registeredCity != null and registeredCity != ''"> and registered_city = #{registeredCity}</if>
|
||||
<if test="registeredArea != null and registeredArea != ''"> and registered_area = #{registeredArea}</if>
|
||||
<if test="addrProvince != null and addrProvince != ''"> and addr_province = #{addrProvince}</if>
|
||||
<if test="addrCity != null and addrCity != ''"> and addr_city = #{addrCity}</if>
|
||||
<if test="addrArea != null and addrArea != ''"> and addr_area = #{addrArea}</if>
|
||||
<if test="addrDetail != null and addrDetail != ''"> and addr_detail = #{addrDetail}</if>
|
||||
<if test="everSchool != null and everSchool != ''"> and ever_school = #{everSchool}</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''"> and learn_english = #{learnEnglish}</if>
|
||||
<if test="source != null and source != ''"> and source = #{source}</if>
|
||||
<if test="status != null and status != ''"> and status = #{status}</if>
|
||||
<if test="enterDate != null "> and enter_date = #{enterDate}</if>
|
||||
<if test="outDate != null "> and out_date = #{outDate}</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''"> and first_language = #{firstLanguage}</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''"> and seconder_language = #{seconderLanguage}</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''"> and other_language = #{otherLanguage}</if>
|
||||
<if test="createuserid != null "> and createuserid = #{createuserid}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectByChildById" parameterType="Long" resultMap="ByChildResult">
|
||||
<include refid="selectByChildVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertByChild" parameterType="ByChild" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into by_child
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="schoolid != null ">schoolid,</if>
|
||||
<if test="classid != null ">classid,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="enName != null and enName != ''">en_name,</if>
|
||||
<if test="infantName != null and infantName != ''">infant_name,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="xb != null and xb != ''">xb,</if>
|
||||
<if test="mz != null and mz != ''">mz,</if>
|
||||
<if test="zjhm != null and zjhm != ''">zjhm,</if>
|
||||
<if test="csrq != null ">csrq,</if>
|
||||
<if test="birthProvince != null and birthProvince != ''">birth_province,</if>
|
||||
<if test="birthCity != null and birthCity != ''">birth_city,</if>
|
||||
<if test="birthArea != null and birthArea != ''">birth_area,</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''">registered_province,</if>
|
||||
<if test="registeredCity != null and registeredCity != ''">registered_city,</if>
|
||||
<if test="registeredArea != null and registeredArea != ''">registered_area,</if>
|
||||
<if test="addrProvince != null and addrProvince != ''">addr_province,</if>
|
||||
<if test="addrCity != null and addrCity != ''">addr_city,</if>
|
||||
<if test="addrArea != null and addrArea != ''">addr_area,</if>
|
||||
<if test="addrDetail != null and addrDetail != ''">addr_detail,</if>
|
||||
<if test="everSchool != null and everSchool != ''">ever_school,</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''">learn_english,</if>
|
||||
<if test="source != null and source != ''">source,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="enterDate != null ">enter_date,</if>
|
||||
<if test="outDate != null ">out_date,</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''">first_language,</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''">seconder_language,</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''">other_language,</if>
|
||||
<if test="createuserid != null ">createuserid,</if>
|
||||
<if test="createTime != null ">create_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="schoolid != null ">#{schoolid},</if>
|
||||
<if test="classid != null ">#{classid},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="enName != null and enName != ''">#{enName},</if>
|
||||
<if test="infantName != null and infantName != ''">#{infantName},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="xb != null and xb != ''">#{xb},</if>
|
||||
<if test="mz != null and mz != ''">#{mz},</if>
|
||||
<if test="zjhm != null and zjhm != ''">#{zjhm},</if>
|
||||
<if test="csrq != null ">#{csrq},</if>
|
||||
<if test="birthProvince != null and birthProvince != ''">#{birthProvince},</if>
|
||||
<if test="birthCity != null and birthCity != ''">#{birthCity},</if>
|
||||
<if test="birthArea != null and birthArea != ''">#{birthArea},</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''">#{registeredProvince},</if>
|
||||
<if test="registeredCity != null and registeredCity != ''">#{registeredCity},</if>
|
||||
<if test="registeredArea != null and registeredArea != ''">#{registeredArea},</if>
|
||||
<if test="addrProvince != null and addrProvince != ''">#{addrProvince},</if>
|
||||
<if test="addrCity != null and addrCity != ''">#{addrCity},</if>
|
||||
<if test="addrArea != null and addrArea != ''">#{addrArea},</if>
|
||||
<if test="addrDetail != null and addrDetail != ''">#{addrDetail},</if>
|
||||
<if test="everSchool != null and everSchool != ''">#{everSchool},</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''">#{learnEnglish},</if>
|
||||
<if test="source != null and source != ''">#{source},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="enterDate != null ">#{enterDate},</if>
|
||||
<if test="outDate != null ">#{outDate},</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''">#{firstLanguage},</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''">#{seconderLanguage},</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''">#{otherLanguage},</if>
|
||||
<if test="createuserid != null ">#{createuserid},</if>
|
||||
<if test="createTime != null ">#{createTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateByChild" parameterType="ByChild">
|
||||
update by_child
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="schoolid != null ">schoolid = #{schoolid},</if>
|
||||
<if test="classid != null ">classid = #{classid},</if>
|
||||
<if test="name != null and name != ''">name = #{name},</if>
|
||||
<if test="enName != null and enName != ''">en_name = #{enName},</if>
|
||||
<if test="infantName != null and infantName != ''">infant_name = #{infantName},</if>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="xb != null and xb != ''">xb = #{xb},</if>
|
||||
<if test="mz != null and mz != ''">mz = #{mz},</if>
|
||||
<if test="zjhm != null and zjhm != ''">zjhm = #{zjhm},</if>
|
||||
<if test="csrq != null ">csrq = #{csrq},</if>
|
||||
<if test="birthProvince != null and birthProvince != ''">birth_province = #{birthProvince},</if>
|
||||
<if test="birthCity != null and birthCity != ''">birth_city = #{birthCity},</if>
|
||||
<if test="birthArea != null and birthArea != ''">birth_area = #{birthArea},</if>
|
||||
<if test="registeredProvince != null and registeredProvince != ''">registered_province = #{registeredProvince},</if>
|
||||
<if test="registeredCity != null and registeredCity != ''">registered_city = #{registeredCity},</if>
|
||||
<if test="registeredArea != null and registeredArea != ''">registered_area = #{registeredArea},</if>
|
||||
<if test="addrProvince != null and addrProvince != ''">addr_province = #{addrProvince},</if>
|
||||
<if test="addrCity != null and addrCity != ''">addr_city = #{addrCity},</if>
|
||||
<if test="addrArea != null and addrArea != ''">addr_area = #{addrArea},</if>
|
||||
<if test="addrDetail != null and addrDetail != ''">addr_detail = #{addrDetail},</if>
|
||||
<if test="everSchool != null and everSchool != ''">ever_school = #{everSchool},</if>
|
||||
<if test="learnEnglish != null and learnEnglish != ''">learn_english = #{learnEnglish},</if>
|
||||
<if test="source != null and source != ''">source = #{source},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="enterDate != null ">enter_date = #{enterDate},</if>
|
||||
<if test="outDate != null ">out_date = #{outDate},</if>
|
||||
<if test="firstLanguage != null and firstLanguage != ''">first_language = #{firstLanguage},</if>
|
||||
<if test="seconderLanguage != null and seconderLanguage != ''">seconder_language = #{seconderLanguage},</if>
|
||||
<if test="otherLanguage != null and otherLanguage != ''">other_language = #{otherLanguage},</if>
|
||||
<if test="createuserid != null ">createuserid = #{createuserid},</if>
|
||||
<if test="createTime != null ">create_time = #{createTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteByChildById" parameterType="Long">
|
||||
delete from by_child where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteByChildByIds" parameterType="String">
|
||||
delete from by_child where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
</mapper>
|
Reference in New Issue
Block a user