ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeCategoryController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,104 @@ package com.smartor.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; 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.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.enums.BusinessType; import com.smartor.domain.HeCategory; import com.smartor.service.IHeCategoryService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** * 宣æåç±»Controller * * @author smartor * @date 2023-03-04 */ @RestController @RequestMapping("/smartor/hecategory") public class HeCategoryController extends BaseController { @Autowired private IHeCategoryService heCategoryService; /** * æ¥è¯¢å®£æåç±»å表 */ @PreAuthorize("@ss.hasPermi('smartor:hecategory:list')") @GetMapping("/list") public TableDataInfo list(HeCategory heCategory) { startPage(); List<HeCategory> list = heCategoryService.selectHeCategoryList(heCategory); return getDataTable(list); } /** * 导åºå®£æåç±»å表 */ @PreAuthorize("@ss.hasPermi('smartor:hecategory:export')") @Log(title = "宣æåç±»", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, HeCategory heCategory) { List<HeCategory> list = heCategoryService.selectHeCategoryList(heCategory); ExcelUtil<HeCategory> util = new ExcelUtil<HeCategory>(HeCategory.class); util.exportExcel(response, list, "宣æåç±»æ°æ®"); } /** * è·å宣æå类详ç»ä¿¡æ¯ */ @PreAuthorize("@ss.hasPermi('smartor:hecategory:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(heCategoryService.selectHeCategoryById(id)); } /** * æ°å¢å®£æåç±» */ @PreAuthorize("@ss.hasPermi('smartor:hecategory:add')") @Log(title = "宣æåç±»", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody HeCategory heCategory) { return toAjax(heCategoryService.insertHeCategory(heCategory)); } /** * ä¿®æ¹å®£æåç±» */ @PreAuthorize("@ss.hasPermi('smartor:hecategory:edit')") @Log(title = "宣æåç±»", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody HeCategory heCategory) { return toAjax(heCategoryService.updateHeCategory(heCategory)); } /** * å é¤å®£æåç±» */ @PreAuthorize("@ss.hasPermi('smartor:hecategory:remove')") @Log(title = "宣æåç±»", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(heCategoryService.deleteHeCategoryByIds(ids)); } } ruoyi-admin/src/main/java/com/ruoyi/web/controller/smartor/HeLocallibraryController.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,104 @@ package com.smartor.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; 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.common.annotation.Log; import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.enums.BusinessType; import com.smartor.domain.HeLocallibrary; import com.smartor.service.IHeLocallibraryService; import com.ruoyi.common.utils.poi.ExcelUtil; import com.ruoyi.common.core.page.TableDataInfo; /** * 宣æåºController * * @author smartor * @date 2023-03-04 */ @RestController @RequestMapping("/smartor/helibrary") public class HeLocallibraryController extends BaseController { @Autowired private IHeLocallibraryService heLocallibraryService; /** * æ¥è¯¢å®£æåºå表 */ @PreAuthorize("@ss.hasPermi('smartor:helibrary:list')") @GetMapping("/list") public TableDataInfo list(HeLocallibrary heLocallibrary) { startPage(); List<HeLocallibrary> list = heLocallibraryService.selectHeLocallibraryList(heLocallibrary); return getDataTable(list); } /** * 导åºå®£æåºå表 */ @PreAuthorize("@ss.hasPermi('smartor:helibrary:export')") @Log(title = "宣æåº", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, HeLocallibrary heLocallibrary) { List<HeLocallibrary> list = heLocallibraryService.selectHeLocallibraryList(heLocallibrary); ExcelUtil<HeLocallibrary> util = new ExcelUtil<HeLocallibrary>(HeLocallibrary.class); util.exportExcel(response, list, "宣æåºæ°æ®"); } /** * è·å宣æåºè¯¦ç»ä¿¡æ¯ */ @PreAuthorize("@ss.hasPermi('smartor:helibrary:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return success(heLocallibraryService.selectHeLocallibraryById(id)); } /** * æ°å¢å®£æåº */ @PreAuthorize("@ss.hasPermi('smartor:helibrary:add')") @Log(title = "宣æåº", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody HeLocallibrary heLocallibrary) { return toAjax(heLocallibraryService.insertHeLocallibrary(heLocallibrary)); } /** * ä¿®æ¹å®£æåº */ @PreAuthorize("@ss.hasPermi('smartor:helibrary:edit')") @Log(title = "宣æåº", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody HeLocallibrary heLocallibrary) { return toAjax(heLocallibraryService.updateHeLocallibrary(heLocallibrary)); } /** * å é¤å®£æåº */ @PreAuthorize("@ss.hasPermi('smartor:helibrary:remove')") @Log(title = "宣æåº", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(heLocallibraryService.deleteHeLocallibraryByIds(ids)); } } smartor/src/main/java/com/smartor/domain/HeCategory.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,110 @@ package com.smartor.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.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; /** * 宣æå类对象 he_category * * @author smartor * @date 2023-03-04 */ public class HeCategory extends BaseEntity { private static final long serialVersionUID = 1L; /** èªå¢ID */ private Long id; /** åç±»åç§° */ @Excel(name = " åç±»åç§° ") private String categoryname; /** æºæID */ @Excel(name = " æºæID ") private String orgid; /** å 餿 è®° */ private String delFlag; /** ä¸ä¼ æ è®° */ private Long isupload; /** ä¸ä¼ æ¶é´ */ private Date uploadTime; public void setId(Long id) { this.id = id; } public Long getId() { return id; } public void setCategoryname(String categoryname) { this.categoryname = categoryname; } public String getCategoryname() { return categoryname; } public void setOrgid(String orgid) { this.orgid = orgid; } public String getOrgid() { return orgid; } public void setDelFlag(String delFlag) { this.delFlag = delFlag; } public String getDelFlag() { return delFlag; } public void setIsupload(Long isupload) { this.isupload = isupload; } public Long getIsupload() { return isupload; } public void setUploadTime(Date uploadTime) { this.uploadTime = uploadTime; } public Date getUploadTime() { return uploadTime; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("categoryname", getCategoryname()) .append("orgid", getOrgid()) .append("delFlag", getDelFlag()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("isupload", getIsupload()) .append("uploadTime", getUploadTime()) .toString(); } } smartor/src/main/java/com/smartor/domain/HeLocallibrary.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,282 @@ package com.smartor.domain; import java.math.BigDecimal; 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.common.annotation.Excel; import com.ruoyi.common.core.domain.BaseEntity; /** * 宣æåºå¯¹è±¡ he_locallibrary * * @author smartor * @date 2023-03-04 */ public class HeLocallibrary extends BaseEntity { private static final long serialVersionUID = 1L; /** èªå¢ID */ private Long id; /** 宣æåç±» */ @Excel(name = " 宣æåç±» ") private Long preachcategoryid; /** 宣æåç§° */ @Excel(name = " 宣æåç§° ") private String preachname; /** çæ¬ */ @Excel(name = " çæ¬ ") private BigDecimal version; /** 宣æå½¢å¼ */ @Excel(name = " 宣æå½¢å¼ ") private Long preachform; /** 宣ææè¿° */ @Excel(name = " 宣ææè¿° ") private String preachdescription; /** 宣æå 容 */ @Excel(name = " 宣æå 容 ") private String preachcontent; /** 模æ¿ID */ @Excel(name = " 模æ¿ID ") private Long templateid; /** 宣æä»£ç */ @Excel(name = " 宣æä»£ç ") private String preachcode; /** ä¸å¿åºID */ @Excel(name = " ä¸å¿åºID ") private Long centerlibraryid; /** æ¯å¦å¯ç¨ */ @Excel(name = " æ¯å¦å¯ç¨ ") private Long isenable; /** æºæID */ @Excel(name = " æºæID ") private String orgid; /** å 餿 è®° */ private String delFlag; /** ä¸ä¼ æ è®° */ @Excel(name = " ä¸ä¼ æ è®° ") private Long isupload; /** ä¸ä¼ æ¶é´ */ @JsonFormat(pattern = "yyyy-MM-dd") @Excel(name = " ä¸ä¼ æ¶é´ ", width = 30, dateFormat = "yyyy-MM-dd") private Date uploadTime; /** 宣æåç±» */ @Excel(name = " 宣æåç±» ") private String classification; /** æ¯å¦æ¬å° */ @Excel(name = " æ¯å¦æ¬å° ") private Long islocal; /** ä¸å¿åºä»£ç */ @Excel(name = " ä¸å¿åºä»£ç ") private String centerlibrarycode; public void setId(Long id) { this.id = id; } public Long getId() { return id; } public void setPreachcategoryid(Long preachcategoryid) { this.preachcategoryid = preachcategoryid; } public Long getPreachcategoryid() { return preachcategoryid; } public void setPreachname(String preachname) { this.preachname = preachname; } public String getPreachname() { return preachname; } public void setVersion(BigDecimal version) { this.version = version; } public BigDecimal getVersion() { return version; } public void setPreachform(Long preachform) { this.preachform = preachform; } public Long getPreachform() { return preachform; } public void setPreachdescription(String preachdescription) { this.preachdescription = preachdescription; } public String getPreachdescription() { return preachdescription; } public void setPreachcontent(String preachcontent) { this.preachcontent = preachcontent; } public String getPreachcontent() { return preachcontent; } public void setTemplateid(Long templateid) { this.templateid = templateid; } public Long getTemplateid() { return templateid; } public void setPreachcode(String preachcode) { this.preachcode = preachcode; } public String getPreachcode() { return preachcode; } public void setCenterlibraryid(Long centerlibraryid) { this.centerlibraryid = centerlibraryid; } public Long getCenterlibraryid() { return centerlibraryid; } public void setIsenable(Long isenable) { this.isenable = isenable; } public Long getIsenable() { return isenable; } public void setOrgid(String orgid) { this.orgid = orgid; } public String getOrgid() { return orgid; } public void setDelFlag(String delFlag) { this.delFlag = delFlag; } public String getDelFlag() { return delFlag; } public void setIsupload(Long isupload) { this.isupload = isupload; } public Long getIsupload() { return isupload; } public void setUploadTime(Date uploadTime) { this.uploadTime = uploadTime; } public Date getUploadTime() { return uploadTime; } public void setClassification(String classification) { this.classification = classification; } public String getClassification() { return classification; } public void setIslocal(Long islocal) { this.islocal = islocal; } public Long getIslocal() { return islocal; } public void setCenterlibrarycode(String centerlibrarycode) { this.centerlibrarycode = centerlibrarycode; } public String getCenterlibrarycode() { return centerlibrarycode; } @Override public String toString() { return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) .append("id", getId()) .append("preachcategoryid", getPreachcategoryid()) .append("preachname", getPreachname()) .append("version", getVersion()) .append("preachform", getPreachform()) .append("preachdescription", getPreachdescription()) .append("preachcontent", getPreachcontent()) .append("templateid", getTemplateid()) .append("preachcode", getPreachcode()) .append("centerlibraryid", getCenterlibraryid()) .append("isenable", getIsenable()) .append("orgid", getOrgid()) .append("updateBy", getUpdateBy()) .append("updateTime", getUpdateTime()) .append("delFlag", getDelFlag()) .append("createBy", getCreateBy()) .append("createTime", getCreateTime()) .append("isupload", getIsupload()) .append("uploadTime", getUploadTime()) .append("classification", getClassification()) .append("islocal", getIslocal()) .append("centerlibrarycode", getCenterlibrarycode()) .toString(); } } smartor/src/main/java/com/smartor/mapper/HeCategoryMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.smartor.mapper; import java.util.List; import com.smartor.domain.HeCategory; /** * 宣æåç±»Mapperæ¥å£ * * @author smartor * @date 2023-03-04 */ public interface HeCategoryMapper { /** * æ¥è¯¢å®£æåç±» * * @param id 宣æåç±»ä¸»é® * @return 宣æåç±» */ public HeCategory selectHeCategoryById(Long id); /** * æ¥è¯¢å®£æåç±»å表 * * @param heCategory 宣æåç±» * @return 宣æåç±»éå */ public List<HeCategory> selectHeCategoryList(HeCategory heCategory); /** * æ°å¢å®£æåç±» * * @param heCategory 宣æåç±» * @return ç»æ */ public int insertHeCategory(HeCategory heCategory); /** * ä¿®æ¹å®£æåç±» * * @param heCategory 宣æåç±» * @return ç»æ */ public int updateHeCategory(HeCategory heCategory); /** * å é¤å®£æåç±» * * @param id 宣æåç±»ä¸»é® * @return ç»æ */ public int deleteHeCategoryById(Long id); /** * æ¹éå é¤å®£æåç±» * * @param ids éè¦å é¤çæ°æ®ä¸»é®éå * @return ç»æ */ public int deleteHeCategoryByIds(Long[] ids); } smartor/src/main/java/com/smartor/mapper/HeLocallibraryMapper.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.smartor.mapper; import java.util.List; import com.smartor.domain.HeLocallibrary; /** * 宣æåºMapperæ¥å£ * * @author smartor * @date 2023-03-04 */ public interface HeLocallibraryMapper { /** * æ¥è¯¢å®£æåº * * @param id 宣æåºä¸»é® * @return 宣æåº */ public HeLocallibrary selectHeLocallibraryById(Long id); /** * æ¥è¯¢å®£æåºå表 * * @param heLocallibrary 宣æåº * @return 宣æåºéå */ public List<HeLocallibrary> selectHeLocallibraryList(HeLocallibrary heLocallibrary); /** * æ°å¢å®£æåº * * @param heLocallibrary 宣æåº * @return ç»æ */ public int insertHeLocallibrary(HeLocallibrary heLocallibrary); /** * ä¿®æ¹å®£æåº * * @param heLocallibrary 宣æåº * @return ç»æ */ public int updateHeLocallibrary(HeLocallibrary heLocallibrary); /** * å é¤å®£æåº * * @param id 宣æåºä¸»é® * @return ç»æ */ public int deleteHeLocallibraryById(Long id); /** * æ¹éå é¤å®£æåº * * @param ids éè¦å é¤çæ°æ®ä¸»é®éå * @return ç»æ */ public int deleteHeLocallibraryByIds(Long[] ids); } smartor/src/main/java/com/smartor/service/IHeCategoryService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.smartor.service; import java.util.List; import com.smartor.domain.HeCategory; /** * 宣æåç±»Serviceæ¥å£ * * @author smartor * @date 2023-03-04 */ public interface IHeCategoryService { /** * æ¥è¯¢å®£æåç±» * * @param id 宣æåç±»ä¸»é® * @return 宣æåç±» */ public HeCategory selectHeCategoryById(Long id); /** * æ¥è¯¢å®£æåç±»å表 * * @param heCategory 宣æåç±» * @return 宣æåç±»éå */ public List<HeCategory> selectHeCategoryList(HeCategory heCategory); /** * æ°å¢å®£æåç±» * * @param heCategory 宣æåç±» * @return ç»æ */ public int insertHeCategory(HeCategory heCategory); /** * ä¿®æ¹å®£æåç±» * * @param heCategory 宣æåç±» * @return ç»æ */ public int updateHeCategory(HeCategory heCategory); /** * æ¹éå é¤å®£æåç±» * * @param ids éè¦å é¤ç宣æå类主é®éå * @return ç»æ */ public int deleteHeCategoryByIds(Long[] ids); /** * å é¤å®£æåç±»ä¿¡æ¯ * * @param id 宣æåç±»ä¸»é® * @return ç»æ */ public int deleteHeCategoryById(Long id); } smartor/src/main/java/com/smartor/service/IHeLocallibraryService.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,61 @@ package com.smartor.service; import java.util.List; import com.smartor.domain.HeLocallibrary; /** * 宣æåºServiceæ¥å£ * * @author smartor * @date 2023-03-04 */ public interface IHeLocallibraryService { /** * æ¥è¯¢å®£æåº * * @param id 宣æåºä¸»é® * @return 宣æåº */ public HeLocallibrary selectHeLocallibraryById(Long id); /** * æ¥è¯¢å®£æåºå表 * * @param heLocallibrary 宣æåº * @return 宣æåºéå */ public List<HeLocallibrary> selectHeLocallibraryList(HeLocallibrary heLocallibrary); /** * æ°å¢å®£æåº * * @param heLocallibrary 宣æåº * @return ç»æ */ public int insertHeLocallibrary(HeLocallibrary heLocallibrary); /** * ä¿®æ¹å®£æåº * * @param heLocallibrary 宣æåº * @return ç»æ */ public int updateHeLocallibrary(HeLocallibrary heLocallibrary); /** * æ¹éå é¤å®£æåº * * @param ids éè¦å é¤ç宣æåºä¸»é®éå * @return ç»æ */ public int deleteHeLocallibraryByIds(Long[] ids); /** * å é¤å®£æåºä¿¡æ¯ * * @param id 宣æåºä¸»é® * @return ç»æ */ public int deleteHeLocallibraryById(Long id); } smartor/src/main/java/com/smartor/service/impl/HeCategoryServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,96 @@ package com.smartor.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.smartor.mapper.HeCategoryMapper; import com.smartor.domain.HeCategory; import com.smartor.service.IHeCategoryService; /** * 宣æåç±»Serviceä¸å¡å±å¤ç * * @author smartor * @date 2023-03-04 */ @Service public class HeCategoryServiceImpl implements IHeCategoryService { @Autowired private HeCategoryMapper heCategoryMapper; /** * æ¥è¯¢å®£æåç±» * * @param id 宣æåç±»ä¸»é® * @return 宣æåç±» */ @Override public HeCategory selectHeCategoryById(Long id) { return heCategoryMapper.selectHeCategoryById(id); } /** * æ¥è¯¢å®£æåç±»å表 * * @param heCategory 宣æåç±» * @return 宣æåç±» */ @Override public List<HeCategory> selectHeCategoryList(HeCategory heCategory) { return heCategoryMapper.selectHeCategoryList(heCategory); } /** * æ°å¢å®£æåç±» * * @param heCategory 宣æåç±» * @return ç»æ */ @Override public int insertHeCategory(HeCategory heCategory) { heCategory.setCreateTime(DateUtils.getNowDate()); return heCategoryMapper.insertHeCategory(heCategory); } /** * ä¿®æ¹å®£æåç±» * * @param heCategory 宣æåç±» * @return ç»æ */ @Override public int updateHeCategory(HeCategory heCategory) { heCategory.setUpdateTime(DateUtils.getNowDate()); return heCategoryMapper.updateHeCategory(heCategory); } /** * æ¹éå é¤å®£æåç±» * * @param ids éè¦å é¤ç宣æåç±»ä¸»é® * @return ç»æ */ @Override public int deleteHeCategoryByIds(Long[] ids) { return heCategoryMapper.deleteHeCategoryByIds(ids); } /** * å é¤å®£æåç±»ä¿¡æ¯ * * @param id 宣æåç±»ä¸»é® * @return ç»æ */ @Override public int deleteHeCategoryById(Long id) { return heCategoryMapper.deleteHeCategoryById(id); } } smartor/src/main/java/com/smartor/service/impl/HeLocallibraryServiceImpl.java
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,96 @@ package com.smartor.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.smartor.mapper.HeLocallibraryMapper; import com.smartor.domain.HeLocallibrary; import com.smartor.service.IHeLocallibraryService; /** * 宣æåºServiceä¸å¡å±å¤ç * * @author smartor * @date 2023-03-04 */ @Service public class HeLocallibraryServiceImpl implements IHeLocallibraryService { @Autowired private HeLocallibraryMapper heLocallibraryMapper; /** * æ¥è¯¢å®£æåº * * @param id 宣æåºä¸»é® * @return 宣æåº */ @Override public HeLocallibrary selectHeLocallibraryById(Long id) { return heLocallibraryMapper.selectHeLocallibraryById(id); } /** * æ¥è¯¢å®£æåºå表 * * @param heLocallibrary 宣æåº * @return 宣æåº */ @Override public List<HeLocallibrary> selectHeLocallibraryList(HeLocallibrary heLocallibrary) { return heLocallibraryMapper.selectHeLocallibraryList(heLocallibrary); } /** * æ°å¢å®£æåº * * @param heLocallibrary 宣æåº * @return ç»æ */ @Override public int insertHeLocallibrary(HeLocallibrary heLocallibrary) { heLocallibrary.setCreateTime(DateUtils.getNowDate()); return heLocallibraryMapper.insertHeLocallibrary(heLocallibrary); } /** * ä¿®æ¹å®£æåº * * @param heLocallibrary 宣æåº * @return ç»æ */ @Override public int updateHeLocallibrary(HeLocallibrary heLocallibrary) { heLocallibrary.setUpdateTime(DateUtils.getNowDate()); return heLocallibraryMapper.updateHeLocallibrary(heLocallibrary); } /** * æ¹éå é¤å®£æåº * * @param ids éè¦å é¤ç宣æåºä¸»é® * @return ç»æ */ @Override public int deleteHeLocallibraryByIds(Long[] ids) { return heLocallibraryMapper.deleteHeLocallibraryByIds(ids); } /** * å é¤å®£æåºä¿¡æ¯ * * @param id 宣æåºä¸»é® * @return ç»æ */ @Override public int deleteHeLocallibraryById(Long id) { return heLocallibraryMapper.deleteHeLocallibraryById(id); } } smartor/src/main/resources/mapper/smartor/HeCategoryMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,89 @@ <?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.smartor.mapper.HeCategoryMapper"> <resultMap type="HeCategory" id="HeCategoryResult"> <result property="id" column="id" /> <result property="categoryname" column="categoryname" /> <result property="orgid" column="orgid" /> <result property="delFlag" column="del_flag" /> <result property="updateBy" column="update_by" /> <result property="updateTime" column="update_time" /> <result property="createBy" column="create_by" /> <result property="createTime" column="create_time" /> <result property="isupload" column="isupload" /> <result property="uploadTime" column="upload_time" /> </resultMap> <sql id="selectHeCategoryVo"> select id, categoryname, orgid, del_flag, update_by, update_time, create_by, create_time, isupload, upload_time from he_category </sql> <select id="selectHeCategoryList" parameterType="HeCategory" resultMap="HeCategoryResult"> <include refid="selectHeCategoryVo"/> <where> <if test="categoryname != null and categoryname != ''"> and categoryname like concat('%', #{categoryname}, '%')</if> <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> </where> </select> <select id="selectHeCategoryById" parameterType="Long" resultMap="HeCategoryResult"> <include refid="selectHeCategoryVo"/> where id = #{id} </select> <insert id="insertHeCategory" parameterType="HeCategory" useGeneratedKeys="true" keyProperty="id"> insert into he_category <trim prefix="(" suffix=")" suffixOverrides=","> <if test="categoryname != null">categoryname,</if> <if test="orgid != null">orgid,</if> <if test="delFlag != null and delFlag != ''">del_flag,</if> <if test="updateBy != null">update_by,</if> <if test="updateTime != null">update_time,</if> <if test="createBy != null">create_by,</if> <if test="createTime != null">create_time,</if> <if test="isupload != null">isupload,</if> <if test="uploadTime != null">upload_time,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="categoryname != null">#{categoryname},</if> <if test="orgid != null">#{orgid},</if> <if test="delFlag != null and delFlag != ''">#{delFlag},</if> <if test="updateBy != null">#{updateBy},</if> <if test="updateTime != null">#{updateTime},</if> <if test="createBy != null">#{createBy},</if> <if test="createTime != null">#{createTime},</if> <if test="isupload != null">#{isupload},</if> <if test="uploadTime != null">#{uploadTime},</if> </trim> </insert> <update id="updateHeCategory" parameterType="HeCategory"> update he_category <trim prefix="SET" suffixOverrides=","> <if test="categoryname != null">categoryname = #{categoryname},</if> <if test="orgid != null">orgid = #{orgid},</if> <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> <if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateTime != null">update_time = #{updateTime},</if> <if test="createBy != null">create_by = #{createBy},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="isupload != null">isupload = #{isupload},</if> <if test="uploadTime != null">upload_time = #{uploadTime},</if> </trim> where id = #{id} </update> <delete id="deleteHeCategoryById" parameterType="Long"> delete from he_category where id = #{id} </delete> <delete id="deleteHeCategoryByIds" parameterType="String"> delete from he_category where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper> smartor/src/main/resources/mapper/smartor/HeLocallibraryMapper.xml
¶Ô±ÈÐÂÎļþ @@ -0,0 +1,151 @@ <?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.smartor.mapper.HeLocallibraryMapper"> <resultMap type="HeLocallibrary" id="HeLocallibraryResult"> <result property="id" column="id" /> <result property="preachcategoryid" column="preachcategoryid" /> <result property="preachname" column="preachname" /> <result property="version" column="version" /> <result property="preachform" column="preachform" /> <result property="preachdescription" column="preachdescription" /> <result property="preachcontent" column="preachcontent" /> <result property="templateid" column="templateid" /> <result property="preachcode" column="preachcode" /> <result property="centerlibraryid" column="centerlibraryid" /> <result property="isenable" column="isenable" /> <result property="orgid" column="orgid" /> <result property="updateBy" column="update_by" /> <result property="updateTime" column="update_time" /> <result property="delFlag" column="del_flag" /> <result property="createBy" column="create_by" /> <result property="createTime" column="create_time" /> <result property="isupload" column="isupload" /> <result property="uploadTime" column="upload_time" /> <result property="classification" column="classification" /> <result property="islocal" column="islocal" /> <result property="centerlibrarycode" column="centerlibrarycode" /> </resultMap> <sql id="selectHeLocallibraryVo"> select id, preachcategoryid, preachname, version, preachform, preachdescription, preachcontent, templateid, preachcode, centerlibraryid, isenable, orgid, update_by, update_time, del_flag, create_by, create_time, isupload, upload_time, classification, islocal, centerlibrarycode from he_locallibrary </sql> <select id="selectHeLocallibraryList" parameterType="HeLocallibrary" resultMap="HeLocallibraryResult"> <include refid="selectHeLocallibraryVo"/> <where> <if test="preachcategoryid != null "> and preachcategoryid = #{preachcategoryid}</if> <if test="preachname != null and preachname != ''"> and preachname like concat('%', #{preachname}, '%')</if> <if test="version != null "> and version = #{version}</if> <if test="preachform != null "> and preachform = #{preachform}</if> <if test="preachdescription != null and preachdescription != ''"> and preachdescription = #{preachdescription}</if> <if test="preachcontent != null and preachcontent != ''"> and preachcontent = #{preachcontent}</if> <if test="templateid != null "> and templateid = #{templateid}</if> <if test="preachcode != null and preachcode != ''"> and preachcode = #{preachcode}</if> <if test="centerlibraryid != null "> and centerlibraryid = #{centerlibraryid}</if> <if test="isenable != null "> and isenable = #{isenable}</if> <if test="orgid != null and orgid != ''"> and orgid = #{orgid}</if> <if test="isupload != null "> and isupload = #{isupload}</if> <if test="uploadTime != null "> and upload_time = #{uploadTime}</if> <if test="classification != null and classification != ''"> and classification = #{classification}</if> <if test="islocal != null "> and islocal = #{islocal}</if> <if test="centerlibrarycode != null and centerlibrarycode != ''"> and centerlibrarycode = #{centerlibrarycode}</if> </where> </select> <select id="selectHeLocallibraryById" parameterType="Long" resultMap="HeLocallibraryResult"> <include refid="selectHeLocallibraryVo"/> where id = #{id} </select> <insert id="insertHeLocallibrary" parameterType="HeLocallibrary" useGeneratedKeys="true" keyProperty="id"> insert into he_locallibrary <trim prefix="(" suffix=")" suffixOverrides=","> <if test="preachcategoryid != null">preachcategoryid,</if> <if test="preachname != null">preachname,</if> <if test="version != null">version,</if> <if test="preachform != null">preachform,</if> <if test="preachdescription != null">preachdescription,</if> <if test="preachcontent != null">preachcontent,</if> <if test="templateid != null">templateid,</if> <if test="preachcode != null">preachcode,</if> <if test="centerlibraryid != null">centerlibraryid,</if> <if test="isenable != null">isenable,</if> <if test="orgid != null">orgid,</if> <if test="updateBy != null">update_by,</if> <if test="updateTime != null">update_time,</if> <if test="delFlag != null and delFlag != ''">del_flag,</if> <if test="createBy != null">create_by,</if> <if test="createTime != null">create_time,</if> <if test="isupload != null">isupload,</if> <if test="uploadTime != null">upload_time,</if> <if test="classification != null">classification,</if> <if test="islocal != null">islocal,</if> <if test="centerlibrarycode != null">centerlibrarycode,</if> </trim> <trim prefix="values (" suffix=")" suffixOverrides=","> <if test="preachcategoryid != null">#{preachcategoryid},</if> <if test="preachname != null">#{preachname},</if> <if test="version != null">#{version},</if> <if test="preachform != null">#{preachform},</if> <if test="preachdescription != null">#{preachdescription},</if> <if test="preachcontent != null">#{preachcontent},</if> <if test="templateid != null">#{templateid},</if> <if test="preachcode != null">#{preachcode},</if> <if test="centerlibraryid != null">#{centerlibraryid},</if> <if test="isenable != null">#{isenable},</if> <if test="orgid != null">#{orgid},</if> <if test="updateBy != null">#{updateBy},</if> <if test="updateTime != null">#{updateTime},</if> <if test="delFlag != null and delFlag != ''">#{delFlag},</if> <if test="createBy != null">#{createBy},</if> <if test="createTime != null">#{createTime},</if> <if test="isupload != null">#{isupload},</if> <if test="uploadTime != null">#{uploadTime},</if> <if test="classification != null">#{classification},</if> <if test="islocal != null">#{islocal},</if> <if test="centerlibrarycode != null">#{centerlibrarycode},</if> </trim> </insert> <update id="updateHeLocallibrary" parameterType="HeLocallibrary"> update he_locallibrary <trim prefix="SET" suffixOverrides=","> <if test="preachcategoryid != null">preachcategoryid = #{preachcategoryid},</if> <if test="preachname != null">preachname = #{preachname},</if> <if test="version != null">version = #{version},</if> <if test="preachform != null">preachform = #{preachform},</if> <if test="preachdescription != null">preachdescription = #{preachdescription},</if> <if test="preachcontent != null">preachcontent = #{preachcontent},</if> <if test="templateid != null">templateid = #{templateid},</if> <if test="preachcode != null">preachcode = #{preachcode},</if> <if test="centerlibraryid != null">centerlibraryid = #{centerlibraryid},</if> <if test="isenable != null">isenable = #{isenable},</if> <if test="orgid != null">orgid = #{orgid},</if> <if test="updateBy != null">update_by = #{updateBy},</if> <if test="updateTime != null">update_time = #{updateTime},</if> <if test="delFlag != null and delFlag != ''">del_flag = #{delFlag},</if> <if test="createBy != null">create_by = #{createBy},</if> <if test="createTime != null">create_time = #{createTime},</if> <if test="isupload != null">isupload = #{isupload},</if> <if test="uploadTime != null">upload_time = #{uploadTime},</if> <if test="classification != null">classification = #{classification},</if> <if test="islocal != null">islocal = #{islocal},</if> <if test="centerlibrarycode != null">centerlibrarycode = #{centerlibrarycode},</if> </trim> where id = #{id} </update> <delete id="deleteHeLocallibraryById" parameterType="Long"> delete from he_locallibrary where id = #{id} </delete> <delete id="deleteHeLocallibraryByIds" parameterType="String"> delete from he_locallibrary where id in <foreach item="id" collection="array" open="(" separator="," close=")"> #{id} </foreach> </delete> </mapper>