修改商品类别展示方式为树形结构
This commit is contained in:
@@ -1,131 +1,389 @@
|
||||
package com.jsh.erp.datasource.entities;
|
||||
|
||||
public class MaterialCategory {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.Id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.Name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Short categorylevel;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.ParentId
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Long parentid;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.Id
|
||||
*
|
||||
* @return the value of jsh_materialcategory.Id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.Id
|
||||
*
|
||||
* @param id the value for jsh_materialcategory.Id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.Name
|
||||
*
|
||||
* @return the value of jsh_materialcategory.Name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.Name
|
||||
*
|
||||
* @param name the value for jsh_materialcategory.Name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @return the value of jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Short getCategorylevel() {
|
||||
return categorylevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @param categorylevel the value for jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setCategorylevel(Short categorylevel) {
|
||||
this.categorylevel = categorylevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.ParentId
|
||||
*
|
||||
* @return the value of jsh_materialcategory.ParentId
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Long getParentid() {
|
||||
return parentid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.ParentId
|
||||
*
|
||||
* @param parentid the value for jsh_materialcategory.ParentId
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setParentid(Long parentid) {
|
||||
this.parentid = parentid;
|
||||
}
|
||||
package com.jsh.erp.datasource.entities;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class MaterialCategory {
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.Id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.Name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Short categorylevel;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.ParentId
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Long parentid;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.sort
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String sort;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.status
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.serial_no
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String serialNo;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.remark
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.create_time
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.creator
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Long creator;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.update_time
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Date updateTime;
|
||||
|
||||
/**
|
||||
* This field was generated by MyBatis Generator.
|
||||
* This field corresponds to the database column jsh_materialcategory.updater
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
private Long updater;
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.Id
|
||||
*
|
||||
* @return the value of jsh_materialcategory.Id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.Id
|
||||
*
|
||||
* @param id the value for jsh_materialcategory.Id
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.Name
|
||||
*
|
||||
* @return the value of jsh_materialcategory.Name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.Name
|
||||
*
|
||||
* @param name the value for jsh_materialcategory.Name
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name == null ? null : name.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @return the value of jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Short getCategorylevel() {
|
||||
return categorylevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @param categorylevel the value for jsh_materialcategory.CategoryLevel
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setCategorylevel(Short categorylevel) {
|
||||
this.categorylevel = categorylevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.ParentId
|
||||
*
|
||||
* @return the value of jsh_materialcategory.ParentId
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Long getParentid() {
|
||||
return parentid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.ParentId
|
||||
*
|
||||
* @param parentid the value for jsh_materialcategory.ParentId
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setParentid(Long parentid) {
|
||||
this.parentid = parentid;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.sort
|
||||
*
|
||||
* @return the value of jsh_materialcategory.sort
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getSort() {
|
||||
return sort;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.sort
|
||||
*
|
||||
* @param sort the value for jsh_materialcategory.sort
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setSort(String sort) {
|
||||
this.sort = sort == null ? null : sort.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.status
|
||||
*
|
||||
* @return the value of jsh_materialcategory.status
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.status
|
||||
*
|
||||
* @param status the value for jsh_materialcategory.status
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setStatus(String status) {
|
||||
this.status = status == null ? null : status.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.serial_no
|
||||
*
|
||||
* @return the value of jsh_materialcategory.serial_no
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getSerialNo() {
|
||||
return serialNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.serial_no
|
||||
*
|
||||
* @param serialNo the value for jsh_materialcategory.serial_no
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setSerialNo(String serialNo) {
|
||||
this.serialNo = serialNo == null ? null : serialNo.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.remark
|
||||
*
|
||||
* @return the value of jsh_materialcategory.remark
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public String getRemark() {
|
||||
return remark;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.remark
|
||||
*
|
||||
* @param remark the value for jsh_materialcategory.remark
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setRemark(String remark) {
|
||||
this.remark = remark == null ? null : remark.trim();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.create_time
|
||||
*
|
||||
* @return the value of jsh_materialcategory.create_time
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Date getCreateTime() {
|
||||
return createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.create_time
|
||||
*
|
||||
* @param createTime the value for jsh_materialcategory.create_time
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setCreateTime(Date createTime) {
|
||||
this.createTime = createTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.creator
|
||||
*
|
||||
* @return the value of jsh_materialcategory.creator
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Long getCreator() {
|
||||
return creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.creator
|
||||
*
|
||||
* @param creator the value for jsh_materialcategory.creator
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setCreator(Long creator) {
|
||||
this.creator = creator;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.update_time
|
||||
*
|
||||
* @return the value of jsh_materialcategory.update_time
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Date getUpdateTime() {
|
||||
return updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.update_time
|
||||
*
|
||||
* @param updateTime the value for jsh_materialcategory.update_time
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setUpdateTime(Date updateTime) {
|
||||
this.updateTime = updateTime;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method returns the value of the database column jsh_materialcategory.updater
|
||||
*
|
||||
* @return the value of jsh_materialcategory.updater
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public Long getUpdater() {
|
||||
return updater;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method sets the value of the database column jsh_materialcategory.updater
|
||||
*
|
||||
* @param updater the value for jsh_materialcategory.updater
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
public void setUpdater(Long updater) {
|
||||
this.updater = updater;
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,106 +1,96 @@
|
||||
package com.jsh.erp.datasource.mappers;
|
||||
|
||||
import com.jsh.erp.datasource.entities.MaterialCategory;
|
||||
import com.jsh.erp.datasource.entities.MaterialCategoryExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface MaterialCategoryMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int countByExample(MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int deleteByExample(MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int insert(MaterialCategory record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int insertSelective(MaterialCategory record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
List<MaterialCategory> selectByExample(MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
MaterialCategory selectByPrimaryKey(Long id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") MaterialCategory record, @Param("example") MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByExample(@Param("record") MaterialCategory record, @Param("example") MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByPrimaryKeySelective(MaterialCategory record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByPrimaryKey(MaterialCategory record);
|
||||
|
||||
List<MaterialCategory> selectByConditionMaterialCategory(
|
||||
@Param("name") String name,
|
||||
@Param("parentId") Integer parentId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByMaterialCategory(
|
||||
@Param("name") String name,
|
||||
@Param("parentId") Integer parentId);
|
||||
package com.jsh.erp.datasource.mappers;
|
||||
|
||||
import com.jsh.erp.datasource.entities.MaterialCategory;
|
||||
import com.jsh.erp.datasource.entities.MaterialCategoryExample;
|
||||
import java.util.List;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface MaterialCategoryMapper {
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int countByExample(MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int deleteByExample(MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int deleteByPrimaryKey(Long id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int insert(MaterialCategory record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int insertSelective(MaterialCategory record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
List<MaterialCategory> selectByExample(MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
MaterialCategory selectByPrimaryKey(Long id);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByExampleSelective(@Param("record") MaterialCategory record, @Param("example") MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByExample(@Param("record") MaterialCategory record, @Param("example") MaterialCategoryExample example);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByPrimaryKeySelective(MaterialCategory record);
|
||||
|
||||
/**
|
||||
* This method was generated by MyBatis Generator.
|
||||
* This method corresponds to the database table jsh_materialcategory
|
||||
*
|
||||
* @mbggenerated
|
||||
*/
|
||||
int updateByPrimaryKey(MaterialCategory record);
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.jsh.erp.datasource.mappers;
|
||||
|
||||
import com.jsh.erp.datasource.entities.MaterialCategory;
|
||||
import com.jsh.erp.datasource.vo.TreeNode;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description
|
||||
*
|
||||
* @Author: cjl
|
||||
* @Date: 2019/2/18 17:23
|
||||
*/
|
||||
public interface MaterialCategoryMapperEx {
|
||||
List<MaterialCategory> selectByConditionMaterialCategory(
|
||||
@Param("name") String name,
|
||||
@Param("parentId") Integer parentId,
|
||||
@Param("offset") Integer offset,
|
||||
@Param("rows") Integer rows);
|
||||
|
||||
int countsByMaterialCategory(
|
||||
@Param("name") String name,
|
||||
@Param("parentId") Integer parentId);
|
||||
|
||||
List<TreeNode> getNodeTree();
|
||||
List<TreeNode> getNextNodeTree(@Param("id") Long id);
|
||||
|
||||
int addMaterialCategory(MaterialCategory mc);
|
||||
|
||||
int batchDeleteMaterialCategoryByIds(@Param("updateTime") Date updateTime, @Param("updater") Long updater, @Param("ids") String ids[]);
|
||||
|
||||
int editMaterialCategory(MaterialCategory mc);
|
||||
}
|
||||
96
src/main/java/com/jsh/erp/datasource/vo/TreeNode.java
Normal file
96
src/main/java/com/jsh/erp/datasource/vo/TreeNode.java
Normal file
@@ -0,0 +1,96 @@
|
||||
package com.jsh.erp.datasource.vo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Description
|
||||
* 树形结构基本元素
|
||||
* @Author: cjl
|
||||
* @Date: 2019/2/19 11:27
|
||||
*/
|
||||
public class TreeNode {
|
||||
/**
|
||||
* id主键
|
||||
* */
|
||||
private Long id;
|
||||
/**
|
||||
* text显示的文本
|
||||
* */
|
||||
private String text;
|
||||
/**
|
||||
*state节点状态,'open' 或 'closed',默认:'open'。如果为'closed'的时候,将不自动展开该节点。
|
||||
* */
|
||||
private String state="open";
|
||||
/**
|
||||
*iconCls 节点图标id
|
||||
* */
|
||||
private String iconCls;
|
||||
/**
|
||||
* checked 是否被选中
|
||||
* */
|
||||
private boolean checked;
|
||||
/**
|
||||
*attributes 自定义属性
|
||||
* */
|
||||
private String attributes;
|
||||
/**
|
||||
* children 子节点
|
||||
* */
|
||||
private List<TreeNode> children;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Long id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public String getState() {
|
||||
return state;
|
||||
}
|
||||
|
||||
public void setState(String state) {
|
||||
this.state = state;
|
||||
}
|
||||
|
||||
public String getIconCls() {
|
||||
return iconCls;
|
||||
}
|
||||
|
||||
public void setIconCls(String iconCls) {
|
||||
this.iconCls = iconCls;
|
||||
}
|
||||
|
||||
public boolean isChecked() {
|
||||
return checked;
|
||||
}
|
||||
|
||||
public void setChecked(boolean checked) {
|
||||
this.checked = checked;
|
||||
}
|
||||
|
||||
public String getAttributes() {
|
||||
return attributes;
|
||||
}
|
||||
|
||||
public void setAttributes(String attributes) {
|
||||
this.attributes = attributes;
|
||||
}
|
||||
|
||||
public List<TreeNode> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
public void setChildren(List<TreeNode> children) {
|
||||
this.children = children;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user