diff --git a/user-client/src/main/java/com/hp/user/client/entity/Account.java b/user-client/src/main/java/com/hp/user/client/entity/Account.java new file mode 100644 index 0000000..7434791 --- /dev/null +++ b/user-client/src/main/java/com/hp/user/client/entity/Account.java @@ -0,0 +1,71 @@ +package com.hp.user.client.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author 王怡静 + * @since 2020/11/19 + * 账号类 + */ +public class Account extends Base{ + /** + * 用户Id + */ + private Long userId; + /** + * 用户名 + */ + private String userName; + /** + * 微信号 + */ + private String wxNumber; + /** + * 电话号码 + */ + private String phone; + + + public Account(){} + + public Account(Date createTime, Long createUserId, Date updateTime, Long updateUserId, Long userId, String userName, String wxNumber, String phone) { + super(createTime, createUserId, updateTime, updateUserId); + this.userId = userId; + this.userName = userName; + this.wxNumber = wxNumber; + this.phone = phone; + } + + public Long getUserId() { + return userId; + } + + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getUserName() { + return userName; + } + + public void setUserName(String userName) { + this.userName = userName; + } + + public String getWxNumber() { + return wxNumber; + } + + public void setWxNumber(String wxNumber) { + this.wxNumber = wxNumber; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } +} diff --git a/user-client/src/main/java/com/hp/user/client/entity/Address.java b/user-client/src/main/java/com/hp/user/client/entity/Address.java new file mode 100644 index 0000000..aa6f0d6 --- /dev/null +++ b/user-client/src/main/java/com/hp/user/client/entity/Address.java @@ -0,0 +1,163 @@ +package com.hp.user.client.entity; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author 王怡静 + * @since 2020/11/19 + * 地址类 + */ +public class Address extends Base{ + + /** + * 地址Id + */ + private Long addressId; + /** + * 所属Id + */ + private Long ownerId; + /** + * 地址 + */ + private String address; + /** + * 省份编码 + */ + private String provinceCode; + /** + * 城市编码 + */ + private String cityCode; + /** + * 区县编码 + */ + private String countCode; + /** + * 街道编码 + */ + private String streetCode; + /** + * 维度 + */ + private BigDecimal longitude; + /** + * 经度 + */ + private BigDecimal latitude; + /** + * 是否为默认地址 0:否;1:是 + */ + private Short sysDefault; + /** + * 地址标签;0:家;1:公司 + */ + private Short tag; + + public Address(){} + + public Address(Date createTime, Long createUserId, Date updateTime, Long updateUserId, Long addressId, Long ownerId, String address, String provinceCode, String cityCode, String countCode, String streetCode, BigDecimal longitude, BigDecimal latitude, Short sysDefault, Short tag) { + super(createTime, createUserId, updateTime, updateUserId); + this.addressId = addressId; + this.ownerId = ownerId; + this.address = address; + this.provinceCode = provinceCode; + this.cityCode = cityCode; + this.countCode = countCode; + this.streetCode = streetCode; + this.longitude = longitude; + this.latitude = latitude; + this.sysDefault = sysDefault; + this.tag = tag; + } + + public Long getAddressId() { + return addressId; + } + + public void setAddressId(Long addressId) { + this.addressId = addressId; + } + + public Long getOwnerId() { + return ownerId; + } + + public void setOwnerId(Long ownerId) { + this.ownerId = ownerId; + } + + public String getAddress() { + return address; + } + + public void setAddress(String address) { + this.address = address; + } + + public String getProvinceCode() { + return provinceCode; + } + + public void setProvinceCode(String provinceCode) { + this.provinceCode = provinceCode; + } + + public String getCityCode() { + return cityCode; + } + + public void setCityCode(String cityCode) { + this.cityCode = cityCode; + } + + public String getCountCode() { + return countCode; + } + + public void setCountCode(String countCode) { + this.countCode = countCode; + } + + public String getStreetCode() { + return streetCode; + } + + public void setStreetCode(String streetCode) { + this.streetCode = streetCode; + } + + public BigDecimal getLongitude() { + return longitude; + } + + public void setLongitude(BigDecimal longitude) { + this.longitude = longitude; + } + + public BigDecimal getLatitude() { + return latitude; + } + + public void setLatitude(BigDecimal latitude) { + this.latitude = latitude; + } + + public Short getSysDefault() { + return sysDefault; + } + + public void setSysDefault(Short sysDefault) { + this.sysDefault = sysDefault; + } + + public Short getTag() { + return tag; + } + + public void setTag(Short tag) { + this.tag = tag; + } +} diff --git a/user-client/src/main/java/com/hp/user/client/entity/Area.java b/user-client/src/main/java/com/hp/user/client/entity/Area.java new file mode 100644 index 0000000..3aaf182 --- /dev/null +++ b/user-client/src/main/java/com/hp/user/client/entity/Area.java @@ -0,0 +1,120 @@ +package com.hp.user.client.entity; + +import java.io.Serializable; + +/** + * @author 王怡静 + * @since 2020/11/19 + * 地区类 + */ +public class Area implements Serializable { + /** + * 地区Id + */ + private Long id; + /** + * 区划编码 + */ + private String code; + /** + * 行政区划名称 + */ + private String name; + /** + * 上级行政区划编号 + */ + private String parentCode; + /** + * 行政区划类型:01:省;02:市;03:区县;04:乡镇街道 + */ + private Short type; + /** + * 经度 + */ + private String longitude; + /** + * 纬度 + */ + private String latitude; + /** + * 行政首府 + */ + private String capital; + + public Area(){} + + public Area(Long id, String code, String name, String parentCode, Short type, String longitude, String latitude, String capital) { + this.id = id; + this.code = code; + this.name = name; + this.parentCode = parentCode; + this.type = type; + this.longitude = longitude; + this.latitude = latitude; + this.capital = capital; + } + + public Long getId() { + return id; + } + + public void setId(Long id) { + this.id = id; + } + + public String getCode() { + return code; + } + + public void setCode(String code) { + this.code = code; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getParentCode() { + return parentCode; + } + + public void setParentCode(String parentCode) { + this.parentCode = parentCode; + } + + public Short getType() { + return type; + } + + public void setType(Short type) { + this.type = type; + } + + public String getLongitude() { + return longitude; + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getLatitude() { + return latitude; + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getCapital() { + return capital; + } + + public void setCapital(String capital) { + this.capital = capital; + } +} diff --git a/user-client/src/main/java/com/hp/user/client/entity/Base.java b/user-client/src/main/java/com/hp/user/client/entity/Base.java new file mode 100644 index 0000000..59ef7a5 --- /dev/null +++ b/user-client/src/main/java/com/hp/user/client/entity/Base.java @@ -0,0 +1,70 @@ +package com.hp.user.client.entity; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author 王怡静 + * @since 2020/11/19 + * 基础类 + */ +public class Base implements Serializable { + /** + * 创建时间 + */ + private Date createTime; + /** + * 创建用户Id + */ + private Long createUserId; + /** + * 更新时间 + */ + private Date updateTime; + /** + * 更新用户Id + */ + private Long updateUserId; + + public Base(){ + + } + public Base(Date createTime, Long createUserId, Date updateTime, Long updateUserId) { + this.createTime = createTime; + this.createUserId = createUserId; + this.updateTime = updateTime; + this.updateUserId = updateUserId; + } + + public Date getCreateTime() { + return createTime; + } + + public void setCreateTime(Date createTime) { + this.createTime = createTime; + } + + public Long getCreateUserId() { + return createUserId; + } + + public void setCreateUserId(Long createUserId) { + this.createUserId = createUserId; + } + + public Date getUpdateTime() { + return updateTime; + } + + public void setUpdateTime(Date updateTime) { + this.updateTime = updateTime; + } + + public Long getUpdateUserId() { + return updateUserId; + } + + public void setUpdateUserId(Long updateUserId) { + this.updateUserId = updateUserId; + } +} diff --git a/user-client/src/main/java/com/hp/user/client/entity/Company.java b/user-client/src/main/java/com/hp/user/client/entity/Company.java new file mode 100644 index 0000000..5f12c2a --- /dev/null +++ b/user-client/src/main/java/com/hp/user/client/entity/Company.java @@ -0,0 +1,121 @@ +package com.hp.user.client.entity; + +import java.util.Date; + +/** + * @author 王怡静 + * @since 2020/11/19 + * 公司类 + */ +public class Company extends Base { + /** + * 客户Id + */ + private Long customerId; + /** + * 企业名称 + */ + private String name; + /** + * 企业类型;0服务商,1一般企业 + */ + private Short type; + /** + * 所属行业编码 + */ + private Short industryCode; + /** + * 企业税号 + */ + private String enterpriseTaxNumber; + /** + * 营业执照 + */ + private String businessLicense; + /** + * 企业联系人 + */ + private String businessContact; + /** + * 手机号 + */ + private String phoneNumber; + + public Company(){} + + public Company(Date createTime, Long createUserId, Date updateTime, Long updateUserId, Long customerId, String name, Short type, Short industryCode, String enterpriseTaxNumber, String businessLicense, String businessContact, String phoneNumber) { + super(createTime, createUserId, updateTime, updateUserId); + this.customerId = customerId; + this.name = name; + this.type = type; + this.industryCode = industryCode; + this.enterpriseTaxNumber = enterpriseTaxNumber; + this.businessLicense = businessLicense; + this.businessContact = businessContact; + this.phoneNumber = phoneNumber; + } + + public Long getCustomerId() { + return customerId; + } + + public void setCustomerId(Long customerId) { + this.customerId = customerId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Short getType() { + return type; + } + + public void setType(Short type) { + this.type = type; + } + + public Short getIndustryCode() { + return industryCode; + } + + public void setIndustryCode(Short industryCode) { + this.industryCode = industryCode; + } + + public String getEnterpriseTaxNumber() { + return enterpriseTaxNumber; + } + + public void setEnterpriseTaxNumber(String enterpriseTaxNumber) { + this.enterpriseTaxNumber = enterpriseTaxNumber; + } + + public String getBusinessLicense() { + return businessLicense; + } + + public void setBusinessLicense(String businessLicense) { + this.businessLicense = businessLicense; + } + + public String getBusinessContact() { + return businessContact; + } + + public void setBusinessContact(String businessContact) { + this.businessContact = businessContact; + } + + public String getPhoneNumber() { + return phoneNumber; + } + + public void setPhoneNumber(String phoneNumber) { + this.phoneNumber = phoneNumber; + } +} diff --git a/user-client/src/main/java/com/hp/user/client/entity/ServiceProvider.java b/user-client/src/main/java/com/hp/user/client/entity/ServiceProvider.java new file mode 100644 index 0000000..8a72543 --- /dev/null +++ b/user-client/src/main/java/com/hp/user/client/entity/ServiceProvider.java @@ -0,0 +1,42 @@ +package com.hp.user.client.entity; + +import java.io.Serializable; + +/** + * @author 王怡静 + * @since 2020/11/19 + * 公司与服务商关系类 + */ +public class ServiceProvider implements Serializable { + /** + * 服务商Id + */ + private Long serviceProviderId; + /** + * 企业Id + */ + private Long enterpriseId; + + private ServiceProvider(){} + + public ServiceProvider(Long serviceProviderId, Long enterpriseId) { + this.serviceProviderId = serviceProviderId; + this.enterpriseId = enterpriseId; + } + + public Long getServiceProviderId() { + return serviceProviderId; + } + + public void setServiceProviderId(Long serviceProviderId) { + this.serviceProviderId = serviceProviderId; + } + + public Long getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(Long enterpriseId) { + this.enterpriseId = enterpriseId; + } +} diff --git a/user-client/src/main/java/com/hp/user/client/entity/Station.java b/user-client/src/main/java/com/hp/user/client/entity/Station.java new file mode 100644 index 0000000..458064b --- /dev/null +++ b/user-client/src/main/java/com/hp/user/client/entity/Station.java @@ -0,0 +1,96 @@ +package com.hp.user.client.entity; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * @author 王怡静 + * @since 2020/11/19 + * 站点类 + */ +public class Station extends Base{ + /** + * 站点Id + */ + private Long stationId; + /** + * 站点名称 + */ + private String name; + /** + * 企业Id + */ + private Long enterpriseId; + /** + * 站点联系人 + */ + private String stationContact; + /** + * 电话号码 + */ + private String phone; + /** + * 变压器容量 + */ + private BigDecimal capacity; + + public Station(){} + + public Station(Date createTime, Long createUserId, Date updateTime, Long updateUserId, Long stationId, String name, Long enterpriseId, String stationContact, String phone, BigDecimal capacity) { + super(createTime, createUserId, updateTime, updateUserId); + this.stationId = stationId; + this.name = name; + this.enterpriseId = enterpriseId; + this.stationContact = stationContact; + this.phone = phone; + this.capacity = capacity; + } + + public Long getStationId() { + return stationId; + } + + public void setStationId(Long stationId) { + this.stationId = stationId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Long getEnterpriseId() { + return enterpriseId; + } + + public void setEnterpriseId(Long enterpriseId) { + this.enterpriseId = enterpriseId; + } + + public String getStationContact() { + return stationContact; + } + + public void setStationContact(String stationContact) { + this.stationContact = stationContact; + } + + public String getPhone() { + return phone; + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public BigDecimal getCapacity() { + return capacity; + } + + public void setCapacity(BigDecimal capacity) { + this.capacity = capacity; + } +} diff --git a/user-service/src/main/java/com/hp/user/service/TestService.java b/user-service/src/main/java/com/hp/user/service/TestService.java index 236282e..d16351c 100644 --- a/user-service/src/main/java/com/hp/user/service/TestService.java +++ b/user-service/src/main/java/com/hp/user/service/TestService.java @@ -3,7 +3,7 @@ package com.hp.user.service; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.hp.user.service.entity.Account; +import com.hp.user.client.entity.Account; import com.hp.user.service.mapper.TestMapper; @Service diff --git a/user-service/src/main/java/com/hp/user/service/controller/AreaController.java b/user-service/src/main/java/com/hp/user/service/controller/AreaController.java new file mode 100644 index 0000000..dc3dc51 --- /dev/null +++ b/user-service/src/main/java/com/hp/user/service/controller/AreaController.java @@ -0,0 +1,16 @@ +package com.hp.user.service.controller; + +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +@RequestMapping("/area") +public class AreaController { + /** + * 查询所有地区 + */ + @RequestMapping("/queryAllArea") + public void queryAllArea(){ + + } +} diff --git a/user-service/src/main/java/com/hp/user/service/controller/AuthenticationController.java b/user-service/src/main/java/com/hp/user/service/controller/AuthenticationController.java index ae2ea3c..232dde4 100644 --- a/user-service/src/main/java/com/hp/user/service/controller/AuthenticationController.java +++ b/user-service/src/main/java/com/hp/user/service/controller/AuthenticationController.java @@ -5,6 +5,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController +@RequestMapping("/authentication") public class AuthenticationController { /** * 登录 diff --git a/user-service/src/main/java/com/hp/user/service/controller/CompanyController.java b/user-service/src/main/java/com/hp/user/service/controller/CompanyController.java index 7ec7b14..9ac236b 100644 --- a/user-service/src/main/java/com/hp/user/service/controller/CompanyController.java +++ b/user-service/src/main/java/com/hp/user/service/controller/CompanyController.java @@ -4,6 +4,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController +@RequestMapping("/company") public class CompanyController { /** * 添加企业 diff --git a/user-service/src/main/java/com/hp/user/service/controller/RoleController.java b/user-service/src/main/java/com/hp/user/service/controller/RoleController.java index 8566b19..66fa05d 100644 --- a/user-service/src/main/java/com/hp/user/service/controller/RoleController.java +++ b/user-service/src/main/java/com/hp/user/service/controller/RoleController.java @@ -5,6 +5,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController +@RequestMapping("/role") public class RoleController { /** * 添加角色 diff --git a/user-service/src/main/java/com/hp/user/service/controller/ServiceProviderController.java b/user-service/src/main/java/com/hp/user/service/controller/ServiceProviderController.java index 9d01d07..e4e6c55 100644 --- a/user-service/src/main/java/com/hp/user/service/controller/ServiceProviderController.java +++ b/user-service/src/main/java/com/hp/user/service/controller/ServiceProviderController.java @@ -4,6 +4,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController +@RequestMapping("/serviceProvider") public class ServiceProviderController { /** * 添加服务商 diff --git a/user-service/src/main/java/com/hp/user/service/controller/StationController.java b/user-service/src/main/java/com/hp/user/service/controller/StationController.java index 0e5a06d..d6b73e4 100644 --- a/user-service/src/main/java/com/hp/user/service/controller/StationController.java +++ b/user-service/src/main/java/com/hp/user/service/controller/StationController.java @@ -4,6 +4,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController +@RequestMapping("/station") public class StationController { /** * 添加站点 diff --git a/user-service/src/main/java/com/hp/user/service/controller/TeamController.java b/user-service/src/main/java/com/hp/user/service/controller/TeamController.java index cd62266..4948314 100644 --- a/user-service/src/main/java/com/hp/user/service/controller/TeamController.java +++ b/user-service/src/main/java/com/hp/user/service/controller/TeamController.java @@ -1,7 +1,10 @@ package com.hp.user.service.controller; import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; +@RestController +@RequestMapping("/team") public class TeamController { /** * 添加班组 diff --git a/user-service/src/main/java/com/hp/user/service/controller/UserController.java b/user-service/src/main/java/com/hp/user/service/controller/UserController.java index 41c6317..cab5ee4 100644 --- a/user-service/src/main/java/com/hp/user/service/controller/UserController.java +++ b/user-service/src/main/java/com/hp/user/service/controller/UserController.java @@ -4,6 +4,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController +@RequestMapping("/user") public class UserController { /** * 添加用户 diff --git a/user-service/src/main/java/com/hp/user/service/controller/WorkerController.java b/user-service/src/main/java/com/hp/user/service/controller/WorkerController.java index 824f88b..a307c4a 100644 --- a/user-service/src/main/java/com/hp/user/service/controller/WorkerController.java +++ b/user-service/src/main/java/com/hp/user/service/controller/WorkerController.java @@ -4,6 +4,7 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController +@RequestMapping("/worker") public class WorkerController { /** * 添加工人