main
parent
6cfc5bfab7
commit
23e5ef15a2
@ -0,0 +1,8 @@
|
||||
package com.tamguo.modules.sys.dao;
|
||||
|
||||
import com.tamguo.config.dao.SuperMapper;
|
||||
import com.tamguo.modules.sys.model.SysCompanyEntity;
|
||||
|
||||
public interface SysCompanyMapper extends SuperMapper<SysCompanyEntity>{
|
||||
|
||||
}
|
@ -0,0 +1,97 @@
|
||||
package com.tamguo.modules.sys.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
import com.baomidou.mybatisplus.annotations.TableName;
|
||||
import com.tamguo.config.dao.SuperEntity;
|
||||
|
||||
/**
|
||||
* The persistent class for the sys_company database table.
|
||||
*
|
||||
*/
|
||||
@TableName(value="sys_company")
|
||||
public class SysCompanyEntity extends SuperEntity<SysCompanyEntity> implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
private String name;
|
||||
private String fullName;
|
||||
private String type;
|
||||
private String dutyMan;
|
||||
private String tel;
|
||||
private String address;
|
||||
private String zipCode;
|
||||
private String email;
|
||||
private String comments;
|
||||
private String parentId;
|
||||
private String treeId;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
public String getFullName() {
|
||||
return fullName;
|
||||
}
|
||||
public void setFullName(String fullName) {
|
||||
this.fullName = fullName;
|
||||
}
|
||||
public String getType() {
|
||||
return type;
|
||||
}
|
||||
public void setType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
public String getDutyMan() {
|
||||
return dutyMan;
|
||||
}
|
||||
public void setDutyMan(String dutyMan) {
|
||||
this.dutyMan = dutyMan;
|
||||
}
|
||||
public String getTel() {
|
||||
return tel;
|
||||
}
|
||||
public void setTel(String tel) {
|
||||
this.tel = tel;
|
||||
}
|
||||
public String getAddress() {
|
||||
return address;
|
||||
}
|
||||
public void setAddress(String address) {
|
||||
this.address = address;
|
||||
}
|
||||
public String getZipCode() {
|
||||
return zipCode;
|
||||
}
|
||||
public void setZipCode(String zipCode) {
|
||||
this.zipCode = zipCode;
|
||||
}
|
||||
public String getEmail() {
|
||||
return email;
|
||||
}
|
||||
public void setEmail(String email) {
|
||||
this.email = email;
|
||||
}
|
||||
public String getComments() {
|
||||
return comments;
|
||||
}
|
||||
public void setComments(String comments) {
|
||||
this.comments = comments;
|
||||
}
|
||||
public static long getSerialversionuid() {
|
||||
return serialVersionUID;
|
||||
}
|
||||
public String getParentId() {
|
||||
return parentId;
|
||||
}
|
||||
public void setParentId(String parentId) {
|
||||
this.parentId = parentId;
|
||||
}
|
||||
public String getTreeId() {
|
||||
return treeId;
|
||||
}
|
||||
public void setTreeId(String treeId) {
|
||||
this.treeId = treeId;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
package com.tamguo.modules.sys.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.tamguo.modules.sys.model.SysCompanyEntity;
|
||||
|
||||
public interface ISysCompanyService {
|
||||
|
||||
/** 公司属性结构*/
|
||||
List<SysCompanyEntity> treeData();
|
||||
|
||||
}
|
@ -0,0 +1,28 @@
|
||||
package com.tamguo.modules.sys.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.baomidou.mybatisplus.mapper.Condition;
|
||||
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
|
||||
import com.tamguo.modules.sys.dao.SysCompanyMapper;
|
||||
import com.tamguo.modules.sys.model.SysCompanyEntity;
|
||||
import com.tamguo.modules.sys.service.ISysCompanyService;
|
||||
|
||||
@Service
|
||||
public class SysCompanyServiceImpl extends ServiceImpl<SysCompanyMapper, SysCompanyEntity> implements ISysCompanyService {
|
||||
|
||||
@Autowired
|
||||
private SysCompanyMapper sysCompanyMapper;
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
@Override
|
||||
public List<SysCompanyEntity> treeData() {
|
||||
|
||||
List<SysCompanyEntity> companyList = sysCompanyMapper.selectList(Condition.EMPTY);
|
||||
return companyList;
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,25 @@
|
||||
package com.tamguo.modules.sys.web;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
|
||||
import com.tamguo.modules.sys.model.SysCompanyEntity;
|
||||
import com.tamguo.modules.sys.service.ISysCompanyService;
|
||||
|
||||
@Controller
|
||||
@RequestMapping(path="sys/company")
|
||||
public class CompanyController {
|
||||
|
||||
@Autowired
|
||||
ISysCompanyService iSysCompanyService;
|
||||
|
||||
@RequestMapping(path="treeData")
|
||||
@ResponseBody
|
||||
public List<SysCompanyEntity> treeData() {
|
||||
return iSysCompanyService.treeData();
|
||||
}
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
<?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.tamguo.modules.sys.dao.SysCompanyMapper">
|
||||
|
||||
</mapper>
|
Loading…
Reference in new issue