Browse Source

添加物流园项目

logistics
ma 4 years ago
parent
commit
6e7ba7e737
  1. 75
      logistics/pom.xml
  2. 24
      logistics/src/main/java/com/ccsens/logistics/LogisticsApplication.java
  3. 30
      logistics/src/main/java/com/ccsens/logistics/api/DebugController.java
  4. 52
      logistics/src/main/java/com/ccsens/logistics/api/MbpsController.java
  5. 31
      logistics/src/main/java/com/ccsens/logistics/bean/dto/MbpsDto.java
  6. 161
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsCarRecord.java
  7. 1011
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsCarRecordExample.java
  8. 117
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsEnvironmentRecord.java
  9. 741
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsEnvironmentRecordExample.java
  10. 106
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsEquipment.java
  11. 691
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsEquipmentExample.java
  12. 106
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsParkEquipment.java
  13. 691
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsParkEquipmentExample.java
  14. 84
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsWarehouse.java
  15. 571
      logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsWarehouseExample.java
  16. 74
      logistics/src/main/java/com/ccsens/logistics/bean/vo/MbpsVo.java
  17. 32
      logistics/src/main/java/com/ccsens/logistics/config/BeanConfig.java
  18. 169
      logistics/src/main/java/com/ccsens/logistics/config/SpringConfig.java
  19. 56
      logistics/src/main/java/com/ccsens/logistics/config/SwaggerConfigure.java
  20. 159
      logistics/src/main/java/com/ccsens/logistics/intercept/MybatisInterceptor.java
  21. 79
      logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsCarRecordDao.java
  22. 11
      logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsEnvironmentRecordDao.java
  23. 11
      logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsEquipmentDao.java
  24. 11
      logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsParkEquipmentDao.java
  25. 11
      logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsWarehouseDao.java
  26. 30
      logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsCarRecordMapper.java
  27. 30
      logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsEnvironmentRecordMapper.java
  28. 30
      logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsEquipmentMapper.java
  29. 30
      logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsParkEquipmentMapper.java
  30. 30
      logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsWarehouseMapper.java
  31. 26
      logistics/src/main/java/com/ccsens/logistics/service/IMbpsService.java
  32. 61
      logistics/src/main/java/com/ccsens/logistics/service/MbpsService.java
  33. 30
      logistics/src/main/resources/application-common.yml
  34. 35
      logistics/src/main/resources/application-dev.yml
  35. 40
      logistics/src/main/resources/application-prod.yml
  36. 36
      logistics/src/main/resources/application-test.yml
  37. 6
      logistics/src/main/resources/application.yml
  38. 10
      logistics/src/main/resources/banner.txt
  39. 35
      logistics/src/main/resources/druid-dev.yml
  40. 33
      logistics/src/main/resources/druid-prod.yml
  41. 33
      logistics/src/main/resources/druid-test.yml
  42. 196
      logistics/src/main/resources/logback-spring.xml
  43. 141
      logistics/src/main/resources/mapper_dao/LogisticsCarRecordDao.xml
  44. 5
      logistics/src/main/resources/mapper_dao/LogisticsEnvironmentRecordDao.xml
  45. 5
      logistics/src/main/resources/mapper_dao/LogisticsEquipmentDao.xml
  46. 5
      logistics/src/main/resources/mapper_dao/LogisticsParkEquipmentDao.xml
  47. 5
      logistics/src/main/resources/mapper_dao/LogisticsWarehouseDao.xml
  48. 338
      logistics/src/main/resources/mapper_raw/LogisticsCarRecordMapper.xml
  49. 276
      logistics/src/main/resources/mapper_raw/LogisticsEnvironmentRecordMapper.xml
  50. 259
      logistics/src/main/resources/mapper_raw/LogisticsEquipmentMapper.xml
  51. 258
      logistics/src/main/resources/mapper_raw/LogisticsParkEquipmentMapper.xml
  52. 228
      logistics/src/main/resources/mapper_raw/LogisticsWarehouseMapper.xml
  53. 62
      logistics/src/main/resources/mybatis/mybatis-config.xml
  54. 1
      pom.xml
  55. 4
      tall/src/main/resources/application.yml

75
logistics/pom.xml

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>ccsenscloud</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>logistics</artifactId>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<!--cloud 工具类-->
<dependency>
<artifactId>cloudutil</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
<!--util 工具类-->
<dependency>
<artifactId>util</artifactId>
<groupId>com.ccsens</groupId>
<version>1.0-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.62</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-maven-plugin</artifactId>
<version>1.3.7</version>
<configuration>
<configurationFile>${basedir}/src/main/resources/mbg.xml</configurationFile>
<overwrite>true</overwrite>
</configuration>
<dependencies>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.34</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass>com.ccsens.logistics.LogisticsApplication</mainClass>
<!--<skip>true</skip>-->
</configuration>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

24
logistics/src/main/java/com/ccsens/logistics/LogisticsApplication.java

@ -0,0 +1,24 @@
package com.ccsens.logistics;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.scheduling.annotation.EnableAsync;
@MapperScan(basePackages = {"com.ccsens.logistics.persist.*"})
@ServletComponentScan
@EnableAsync
//开启断路器功能
@EnableCircuitBreaker
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign")
@SpringBootApplication(scanBasePackages = "com.ccsens")
public class LogisticsApplication {
public static void main(String[] args) {
SpringApplication.run(LogisticsApplication.class, args);
}
}

30
logistics/src/main/java/com/ccsens/logistics/api/DebugController.java

@ -0,0 +1,30 @@
package com.ccsens.logistics.api;
import com.ccsens.util.JsonResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
@Slf4j
@Api(tags = "DEBUG" , description = "DebugController | ")
@RestController
@RequestMapping("/debug")
public class DebugController {
@ApiOperation(value = "/测试",notes = "")
@ApiImplicitParams({
})
@RequestMapping(value="",produces = {"application/json;charset=UTF-8"})
public JsonResponse getSmsCode(HttpServletRequest request) throws Exception {
return JsonResponse.newInstance().ok("测试");
}
}

52
logistics/src/main/java/com/ccsens/logistics/api/MbpsController.java

@ -0,0 +1,52 @@
package com.ccsens.logistics.api;
import com.ccsens.logistics.bean.dto.MbpsDto;
import com.ccsens.logistics.bean.vo.MbpsVo;
import com.ccsens.logistics.service.IMbpsService;
import com.ccsens.util.JsonResponse;
import com.ccsens.util.bean.dto.QueryDto;
import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Api(tags = "吞吐量相关接口" , description = "")
@RestController
@RequestMapping("/Mbps")
public class MbpsController {
@Resource
private IMbpsService iMbpsService;
@ApiOperation(value = "查询总吞吐量", notes = "mz:查询总吞吐量")
@RequestMapping(value = "/selAllMbps", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<MbpsVo.AllMbps> selAllMbps(@ApiParam @Validated @RequestBody QueryDto<MbpsDto.SelAllMbpsSerch> params) {
log.info("查看交付物的历史记录:{}",params);
MbpsVo.AllMbps allMbps = iMbpsService.selAllMbps(params.getParam());
log.info("查看交付物的历史记录:{}",allMbps);
return JsonResponse.newInstance().ok(allMbps);
}
@ApiOperation(value = "查看吞吐量折线图", notes = "mz:查看吞吐量折线图")
@RequestMapping(value = "/selMbpsByTime", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
public JsonResponse<MbpsVo.SelMbpsByTime> selMbpsByTime(@ApiParam @Validated @RequestBody QueryDto<MbpsDto.SelMbpsByTime> params) {
log.info("查看交付物的历史记录:{}",params);
MbpsVo.SelMbpsByTime allMbps = iMbpsService.selMbpsByTime(params.getParam());
log.info("查看交付物的历史记录:{}",allMbps);
return JsonResponse.newInstance().ok(allMbps);
}
}

31
logistics/src/main/java/com/ccsens/logistics/bean/dto/MbpsDto.java

@ -0,0 +1,31 @@
package com.ccsens.logistics.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author
*/
@Data
public class MbpsDto {
@Data
@ApiModel
public static class SelAllMbpsSerch{
@ApiModelProperty("仓库id")
private Long warehouseId;
}
@Data
@ApiModel
public static class SelMbpsByTime{
@ApiModelProperty("查询类型(0-按天,1-按周,2-按月,3-按年)")
private Byte queryType;
@ApiModelProperty("开始时间")
private Long startTime;
@ApiModelProperty("结束时间")
private Long endTime;
}
}

161
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsCarRecord.java

@ -0,0 +1,161 @@
package com.ccsens.logistics.bean.po;
import java.io.Serializable;
import java.util.Date;
public class LogisticsCarRecord implements Serializable {
private Long id;
private Byte carType;
private String licensePlate;
private Byte plateType;
private String filesId;
private Long carWeight;
private Byte inOut;
private String carBrand;
private Long warehouseId;
private Long recordTime;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Byte getCarType() {
return carType;
}
public void setCarType(Byte carType) {
this.carType = carType;
}
public String getLicensePlate() {
return licensePlate;
}
public void setLicensePlate(String licensePlate) {
this.licensePlate = licensePlate == null ? null : licensePlate.trim();
}
public Byte getPlateType() {
return plateType;
}
public void setPlateType(Byte plateType) {
this.plateType = plateType;
}
public String getFilesId() {
return filesId;
}
public void setFilesId(String filesId) {
this.filesId = filesId == null ? null : filesId.trim();
}
public Long getCarWeight() {
return carWeight;
}
public void setCarWeight(Long carWeight) {
this.carWeight = carWeight;
}
public Byte getInOut() {
return inOut;
}
public void setInOut(Byte inOut) {
this.inOut = inOut;
}
public String getCarBrand() {
return carBrand;
}
public void setCarBrand(String carBrand) {
this.carBrand = carBrand == null ? null : carBrand.trim();
}
public Long getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(Long warehouseId) {
this.warehouseId = warehouseId;
}
public Long getRecordTime() {
return recordTime;
}
public void setRecordTime(Long recordTime) {
this.recordTime = recordTime;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", carType=").append(carType);
sb.append(", licensePlate=").append(licensePlate);
sb.append(", plateType=").append(plateType);
sb.append(", filesId=").append(filesId);
sb.append(", carWeight=").append(carWeight);
sb.append(", inOut=").append(inOut);
sb.append(", carBrand=").append(carBrand);
sb.append(", warehouseId=").append(warehouseId);
sb.append(", recordTime=").append(recordTime);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

1011
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsCarRecordExample.java

File diff suppressed because it is too large

117
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsEnvironmentRecord.java

@ -0,0 +1,117 @@
package com.ccsens.logistics.bean.po;
import java.io.Serializable;
import java.util.Date;
public class LogisticsEnvironmentRecord implements Serializable {
private Long id;
private Integer numValue;
private Byte numType;
private Long equipmentId;
private Long warehouseId;
private Long recordTime;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Integer getNumValue() {
return numValue;
}
public void setNumValue(Integer numValue) {
this.numValue = numValue;
}
public Byte getNumType() {
return numType;
}
public void setNumType(Byte numType) {
this.numType = numType;
}
public Long getEquipmentId() {
return equipmentId;
}
public void setEquipmentId(Long equipmentId) {
this.equipmentId = equipmentId;
}
public Long getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(Long warehouseId) {
this.warehouseId = warehouseId;
}
public Long getRecordTime() {
return recordTime;
}
public void setRecordTime(Long recordTime) {
this.recordTime = recordTime;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", numValue=").append(numValue);
sb.append(", numType=").append(numType);
sb.append(", equipmentId=").append(equipmentId);
sb.append(", warehouseId=").append(warehouseId);
sb.append(", recordTime=").append(recordTime);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

741
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsEnvironmentRecordExample.java

@ -0,0 +1,741 @@
package com.ccsens.logistics.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LogisticsEnvironmentRecordExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public LogisticsEnvironmentRecordExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNumValueIsNull() {
addCriterion("num_value is null");
return (Criteria) this;
}
public Criteria andNumValueIsNotNull() {
addCriterion("num_value is not null");
return (Criteria) this;
}
public Criteria andNumValueEqualTo(Integer value) {
addCriterion("num_value =", value, "numValue");
return (Criteria) this;
}
public Criteria andNumValueNotEqualTo(Integer value) {
addCriterion("num_value <>", value, "numValue");
return (Criteria) this;
}
public Criteria andNumValueGreaterThan(Integer value) {
addCriterion("num_value >", value, "numValue");
return (Criteria) this;
}
public Criteria andNumValueGreaterThanOrEqualTo(Integer value) {
addCriterion("num_value >=", value, "numValue");
return (Criteria) this;
}
public Criteria andNumValueLessThan(Integer value) {
addCriterion("num_value <", value, "numValue");
return (Criteria) this;
}
public Criteria andNumValueLessThanOrEqualTo(Integer value) {
addCriterion("num_value <=", value, "numValue");
return (Criteria) this;
}
public Criteria andNumValueIn(List<Integer> values) {
addCriterion("num_value in", values, "numValue");
return (Criteria) this;
}
public Criteria andNumValueNotIn(List<Integer> values) {
addCriterion("num_value not in", values, "numValue");
return (Criteria) this;
}
public Criteria andNumValueBetween(Integer value1, Integer value2) {
addCriterion("num_value between", value1, value2, "numValue");
return (Criteria) this;
}
public Criteria andNumValueNotBetween(Integer value1, Integer value2) {
addCriterion("num_value not between", value1, value2, "numValue");
return (Criteria) this;
}
public Criteria andNumTypeIsNull() {
addCriterion("num_type is null");
return (Criteria) this;
}
public Criteria andNumTypeIsNotNull() {
addCriterion("num_type is not null");
return (Criteria) this;
}
public Criteria andNumTypeEqualTo(Byte value) {
addCriterion("num_type =", value, "numType");
return (Criteria) this;
}
public Criteria andNumTypeNotEqualTo(Byte value) {
addCriterion("num_type <>", value, "numType");
return (Criteria) this;
}
public Criteria andNumTypeGreaterThan(Byte value) {
addCriterion("num_type >", value, "numType");
return (Criteria) this;
}
public Criteria andNumTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("num_type >=", value, "numType");
return (Criteria) this;
}
public Criteria andNumTypeLessThan(Byte value) {
addCriterion("num_type <", value, "numType");
return (Criteria) this;
}
public Criteria andNumTypeLessThanOrEqualTo(Byte value) {
addCriterion("num_type <=", value, "numType");
return (Criteria) this;
}
public Criteria andNumTypeIn(List<Byte> values) {
addCriterion("num_type in", values, "numType");
return (Criteria) this;
}
public Criteria andNumTypeNotIn(List<Byte> values) {
addCriterion("num_type not in", values, "numType");
return (Criteria) this;
}
public Criteria andNumTypeBetween(Byte value1, Byte value2) {
addCriterion("num_type between", value1, value2, "numType");
return (Criteria) this;
}
public Criteria andNumTypeNotBetween(Byte value1, Byte value2) {
addCriterion("num_type not between", value1, value2, "numType");
return (Criteria) this;
}
public Criteria andEquipmentIdIsNull() {
addCriterion("equipment_id is null");
return (Criteria) this;
}
public Criteria andEquipmentIdIsNotNull() {
addCriterion("equipment_id is not null");
return (Criteria) this;
}
public Criteria andEquipmentIdEqualTo(Long value) {
addCriterion("equipment_id =", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotEqualTo(Long value) {
addCriterion("equipment_id <>", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThan(Long value) {
addCriterion("equipment_id >", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdGreaterThanOrEqualTo(Long value) {
addCriterion("equipment_id >=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThan(Long value) {
addCriterion("equipment_id <", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdLessThanOrEqualTo(Long value) {
addCriterion("equipment_id <=", value, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdIn(List<Long> values) {
addCriterion("equipment_id in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotIn(List<Long> values) {
addCriterion("equipment_id not in", values, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdBetween(Long value1, Long value2) {
addCriterion("equipment_id between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andEquipmentIdNotBetween(Long value1, Long value2) {
addCriterion("equipment_id not between", value1, value2, "equipmentId");
return (Criteria) this;
}
public Criteria andWarehouseIdIsNull() {
addCriterion("warehouse_id is null");
return (Criteria) this;
}
public Criteria andWarehouseIdIsNotNull() {
addCriterion("warehouse_id is not null");
return (Criteria) this;
}
public Criteria andWarehouseIdEqualTo(Long value) {
addCriterion("warehouse_id =", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdNotEqualTo(Long value) {
addCriterion("warehouse_id <>", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdGreaterThan(Long value) {
addCriterion("warehouse_id >", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdGreaterThanOrEqualTo(Long value) {
addCriterion("warehouse_id >=", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdLessThan(Long value) {
addCriterion("warehouse_id <", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdLessThanOrEqualTo(Long value) {
addCriterion("warehouse_id <=", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdIn(List<Long> values) {
addCriterion("warehouse_id in", values, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdNotIn(List<Long> values) {
addCriterion("warehouse_id not in", values, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdBetween(Long value1, Long value2) {
addCriterion("warehouse_id between", value1, value2, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdNotBetween(Long value1, Long value2) {
addCriterion("warehouse_id not between", value1, value2, "warehouseId");
return (Criteria) this;
}
public Criteria andRecordTimeIsNull() {
addCriterion("record_time is null");
return (Criteria) this;
}
public Criteria andRecordTimeIsNotNull() {
addCriterion("record_time is not null");
return (Criteria) this;
}
public Criteria andRecordTimeEqualTo(Long value) {
addCriterion("record_time =", value, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeNotEqualTo(Long value) {
addCriterion("record_time <>", value, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeGreaterThan(Long value) {
addCriterion("record_time >", value, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeGreaterThanOrEqualTo(Long value) {
addCriterion("record_time >=", value, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeLessThan(Long value) {
addCriterion("record_time <", value, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeLessThanOrEqualTo(Long value) {
addCriterion("record_time <=", value, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeIn(List<Long> values) {
addCriterion("record_time in", values, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeNotIn(List<Long> values) {
addCriterion("record_time not in", values, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeBetween(Long value1, Long value2) {
addCriterion("record_time between", value1, value2, "recordTime");
return (Criteria) this;
}
public Criteria andRecordTimeNotBetween(Long value1, Long value2) {
addCriterion("record_time not between", value1, value2, "recordTime");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

106
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsEquipment.java

@ -0,0 +1,106 @@
package com.ccsens.logistics.bean.po;
import java.io.Serializable;
import java.util.Date;
public class LogisticsEquipment implements Serializable {
private Long id;
private String name;
private Integer equipmentNumber;
private Byte equipmentType;
private Long warehouseId;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Integer getEquipmentNumber() {
return equipmentNumber;
}
public void setEquipmentNumber(Integer equipmentNumber) {
this.equipmentNumber = equipmentNumber;
}
public Byte getEquipmentType() {
return equipmentType;
}
public void setEquipmentType(Byte equipmentType) {
this.equipmentType = equipmentType;
}
public Long getWarehouseId() {
return warehouseId;
}
public void setWarehouseId(Long warehouseId) {
this.warehouseId = warehouseId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", equipmentNumber=").append(equipmentNumber);
sb.append(", equipmentType=").append(equipmentType);
sb.append(", warehouseId=").append(warehouseId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

691
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsEquipmentExample.java

@ -0,0 +1,691 @@
package com.ccsens.logistics.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LogisticsEquipmentExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public LogisticsEquipmentExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andEquipmentNumberIsNull() {
addCriterion("equipment_number is null");
return (Criteria) this;
}
public Criteria andEquipmentNumberIsNotNull() {
addCriterion("equipment_number is not null");
return (Criteria) this;
}
public Criteria andEquipmentNumberEqualTo(Integer value) {
addCriterion("equipment_number =", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberNotEqualTo(Integer value) {
addCriterion("equipment_number <>", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberGreaterThan(Integer value) {
addCriterion("equipment_number >", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberGreaterThanOrEqualTo(Integer value) {
addCriterion("equipment_number >=", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberLessThan(Integer value) {
addCriterion("equipment_number <", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberLessThanOrEqualTo(Integer value) {
addCriterion("equipment_number <=", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberIn(List<Integer> values) {
addCriterion("equipment_number in", values, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberNotIn(List<Integer> values) {
addCriterion("equipment_number not in", values, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberBetween(Integer value1, Integer value2) {
addCriterion("equipment_number between", value1, value2, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberNotBetween(Integer value1, Integer value2) {
addCriterion("equipment_number not between", value1, value2, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentTypeIsNull() {
addCriterion("equipment_type is null");
return (Criteria) this;
}
public Criteria andEquipmentTypeIsNotNull() {
addCriterion("equipment_type is not null");
return (Criteria) this;
}
public Criteria andEquipmentTypeEqualTo(Byte value) {
addCriterion("equipment_type =", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeNotEqualTo(Byte value) {
addCriterion("equipment_type <>", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeGreaterThan(Byte value) {
addCriterion("equipment_type >", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("equipment_type >=", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeLessThan(Byte value) {
addCriterion("equipment_type <", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeLessThanOrEqualTo(Byte value) {
addCriterion("equipment_type <=", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeIn(List<Byte> values) {
addCriterion("equipment_type in", values, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeNotIn(List<Byte> values) {
addCriterion("equipment_type not in", values, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeBetween(Byte value1, Byte value2) {
addCriterion("equipment_type between", value1, value2, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeNotBetween(Byte value1, Byte value2) {
addCriterion("equipment_type not between", value1, value2, "equipmentType");
return (Criteria) this;
}
public Criteria andWarehouseIdIsNull() {
addCriterion("warehouse_id is null");
return (Criteria) this;
}
public Criteria andWarehouseIdIsNotNull() {
addCriterion("warehouse_id is not null");
return (Criteria) this;
}
public Criteria andWarehouseIdEqualTo(Long value) {
addCriterion("warehouse_id =", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdNotEqualTo(Long value) {
addCriterion("warehouse_id <>", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdGreaterThan(Long value) {
addCriterion("warehouse_id >", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdGreaterThanOrEqualTo(Long value) {
addCriterion("warehouse_id >=", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdLessThan(Long value) {
addCriterion("warehouse_id <", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdLessThanOrEqualTo(Long value) {
addCriterion("warehouse_id <=", value, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdIn(List<Long> values) {
addCriterion("warehouse_id in", values, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdNotIn(List<Long> values) {
addCriterion("warehouse_id not in", values, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdBetween(Long value1, Long value2) {
addCriterion("warehouse_id between", value1, value2, "warehouseId");
return (Criteria) this;
}
public Criteria andWarehouseIdNotBetween(Long value1, Long value2) {
addCriterion("warehouse_id not between", value1, value2, "warehouseId");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

106
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsParkEquipment.java

@ -0,0 +1,106 @@
package com.ccsens.logistics.bean.po;
import java.io.Serializable;
import java.util.Date;
public class LogisticsParkEquipment implements Serializable {
private Long id;
private String name;
private Integer equipmentNumber;
private Byte equipmentType;
private Long parkId;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Integer getEquipmentNumber() {
return equipmentNumber;
}
public void setEquipmentNumber(Integer equipmentNumber) {
this.equipmentNumber = equipmentNumber;
}
public Byte getEquipmentType() {
return equipmentType;
}
public void setEquipmentType(Byte equipmentType) {
this.equipmentType = equipmentType;
}
public Long getParkId() {
return parkId;
}
public void setParkId(Long parkId) {
this.parkId = parkId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", equipmentNumber=").append(equipmentNumber);
sb.append(", equipmentType=").append(equipmentType);
sb.append(", parkId=").append(parkId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

691
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsParkEquipmentExample.java

@ -0,0 +1,691 @@
package com.ccsens.logistics.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LogisticsParkEquipmentExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public LogisticsParkEquipmentExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andEquipmentNumberIsNull() {
addCriterion("equipment_number is null");
return (Criteria) this;
}
public Criteria andEquipmentNumberIsNotNull() {
addCriterion("equipment_number is not null");
return (Criteria) this;
}
public Criteria andEquipmentNumberEqualTo(Integer value) {
addCriterion("equipment_number =", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberNotEqualTo(Integer value) {
addCriterion("equipment_number <>", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberGreaterThan(Integer value) {
addCriterion("equipment_number >", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberGreaterThanOrEqualTo(Integer value) {
addCriterion("equipment_number >=", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberLessThan(Integer value) {
addCriterion("equipment_number <", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberLessThanOrEqualTo(Integer value) {
addCriterion("equipment_number <=", value, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberIn(List<Integer> values) {
addCriterion("equipment_number in", values, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberNotIn(List<Integer> values) {
addCriterion("equipment_number not in", values, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberBetween(Integer value1, Integer value2) {
addCriterion("equipment_number between", value1, value2, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentNumberNotBetween(Integer value1, Integer value2) {
addCriterion("equipment_number not between", value1, value2, "equipmentNumber");
return (Criteria) this;
}
public Criteria andEquipmentTypeIsNull() {
addCriterion("equipment_type is null");
return (Criteria) this;
}
public Criteria andEquipmentTypeIsNotNull() {
addCriterion("equipment_type is not null");
return (Criteria) this;
}
public Criteria andEquipmentTypeEqualTo(Byte value) {
addCriterion("equipment_type =", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeNotEqualTo(Byte value) {
addCriterion("equipment_type <>", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeGreaterThan(Byte value) {
addCriterion("equipment_type >", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeGreaterThanOrEqualTo(Byte value) {
addCriterion("equipment_type >=", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeLessThan(Byte value) {
addCriterion("equipment_type <", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeLessThanOrEqualTo(Byte value) {
addCriterion("equipment_type <=", value, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeIn(List<Byte> values) {
addCriterion("equipment_type in", values, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeNotIn(List<Byte> values) {
addCriterion("equipment_type not in", values, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeBetween(Byte value1, Byte value2) {
addCriterion("equipment_type between", value1, value2, "equipmentType");
return (Criteria) this;
}
public Criteria andEquipmentTypeNotBetween(Byte value1, Byte value2) {
addCriterion("equipment_type not between", value1, value2, "equipmentType");
return (Criteria) this;
}
public Criteria andParkIdIsNull() {
addCriterion("park_id is null");
return (Criteria) this;
}
public Criteria andParkIdIsNotNull() {
addCriterion("park_id is not null");
return (Criteria) this;
}
public Criteria andParkIdEqualTo(Long value) {
addCriterion("park_id =", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdNotEqualTo(Long value) {
addCriterion("park_id <>", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdGreaterThan(Long value) {
addCriterion("park_id >", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdGreaterThanOrEqualTo(Long value) {
addCriterion("park_id >=", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdLessThan(Long value) {
addCriterion("park_id <", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdLessThanOrEqualTo(Long value) {
addCriterion("park_id <=", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdIn(List<Long> values) {
addCriterion("park_id in", values, "parkId");
return (Criteria) this;
}
public Criteria andParkIdNotIn(List<Long> values) {
addCriterion("park_id not in", values, "parkId");
return (Criteria) this;
}
public Criteria andParkIdBetween(Long value1, Long value2) {
addCriterion("park_id between", value1, value2, "parkId");
return (Criteria) this;
}
public Criteria andParkIdNotBetween(Long value1, Long value2) {
addCriterion("park_id not between", value1, value2, "parkId");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

84
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsWarehouse.java

@ -0,0 +1,84 @@
package com.ccsens.logistics.bean.po;
import java.io.Serializable;
import java.util.Date;
public class LogisticsWarehouse implements Serializable {
private Long id;
private String name;
private Long parkId;
private Date createdAt;
private Date updatedAt;
private Byte recStatus;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public Long getParkId() {
return parkId;
}
public void setParkId(Long parkId) {
this.parkId = parkId;
}
public Date getCreatedAt() {
return createdAt;
}
public void setCreatedAt(Date createdAt) {
this.createdAt = createdAt;
}
public Date getUpdatedAt() {
return updatedAt;
}
public void setUpdatedAt(Date updatedAt) {
this.updatedAt = updatedAt;
}
public Byte getRecStatus() {
return recStatus;
}
public void setRecStatus(Byte recStatus) {
this.recStatus = recStatus;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", name=").append(name);
sb.append(", parkId=").append(parkId);
sb.append(", createdAt=").append(createdAt);
sb.append(", updatedAt=").append(updatedAt);
sb.append(", recStatus=").append(recStatus);
sb.append("]");
return sb.toString();
}
}

571
logistics/src/main/java/com/ccsens/logistics/bean/po/LogisticsWarehouseExample.java

@ -0,0 +1,571 @@
package com.ccsens.logistics.bean.po;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class LogisticsWarehouseExample {
protected String orderByClause;
protected boolean distinct;
protected List<Criteria> oredCriteria;
public LogisticsWarehouseExample() {
oredCriteria = new ArrayList<Criteria>();
}
public void setOrderByClause(String orderByClause) {
this.orderByClause = orderByClause;
}
public String getOrderByClause() {
return orderByClause;
}
public void setDistinct(boolean distinct) {
this.distinct = distinct;
}
public boolean isDistinct() {
return distinct;
}
public List<Criteria> getOredCriteria() {
return oredCriteria;
}
public void or(Criteria criteria) {
oredCriteria.add(criteria);
}
public Criteria or() {
Criteria criteria = createCriteriaInternal();
oredCriteria.add(criteria);
return criteria;
}
public Criteria createCriteria() {
Criteria criteria = createCriteriaInternal();
if (oredCriteria.size() == 0) {
oredCriteria.add(criteria);
}
return criteria;
}
protected Criteria createCriteriaInternal() {
Criteria criteria = new Criteria();
return criteria;
}
public void clear() {
oredCriteria.clear();
orderByClause = null;
distinct = false;
}
protected abstract static class GeneratedCriteria {
protected List<Criterion> criteria;
protected GeneratedCriteria() {
super();
criteria = new ArrayList<Criterion>();
}
public boolean isValid() {
return criteria.size() > 0;
}
public List<Criterion> getAllCriteria() {
return criteria;
}
public List<Criterion> getCriteria() {
return criteria;
}
protected void addCriterion(String condition) {
if (condition == null) {
throw new RuntimeException("Value for condition cannot be null");
}
criteria.add(new Criterion(condition));
}
protected void addCriterion(String condition, Object value, String property) {
if (value == null) {
throw new RuntimeException("Value for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value));
}
protected void addCriterion(String condition, Object value1, Object value2, String property) {
if (value1 == null || value2 == null) {
throw new RuntimeException("Between values for " + property + " cannot be null");
}
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(Long value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(Long value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(Long value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(Long value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(Long value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(Long value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<Long> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<Long> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(Long value1, Long value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(Long value1, Long value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andNameIsNull() {
addCriterion("name is null");
return (Criteria) this;
}
public Criteria andNameIsNotNull() {
addCriterion("name is not null");
return (Criteria) this;
}
public Criteria andNameEqualTo(String value) {
addCriterion("name =", value, "name");
return (Criteria) this;
}
public Criteria andNameNotEqualTo(String value) {
addCriterion("name <>", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThan(String value) {
addCriterion("name >", value, "name");
return (Criteria) this;
}
public Criteria andNameGreaterThanOrEqualTo(String value) {
addCriterion("name >=", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThan(String value) {
addCriterion("name <", value, "name");
return (Criteria) this;
}
public Criteria andNameLessThanOrEqualTo(String value) {
addCriterion("name <=", value, "name");
return (Criteria) this;
}
public Criteria andNameLike(String value) {
addCriterion("name like", value, "name");
return (Criteria) this;
}
public Criteria andNameNotLike(String value) {
addCriterion("name not like", value, "name");
return (Criteria) this;
}
public Criteria andNameIn(List<String> values) {
addCriterion("name in", values, "name");
return (Criteria) this;
}
public Criteria andNameNotIn(List<String> values) {
addCriterion("name not in", values, "name");
return (Criteria) this;
}
public Criteria andNameBetween(String value1, String value2) {
addCriterion("name between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andNameNotBetween(String value1, String value2) {
addCriterion("name not between", value1, value2, "name");
return (Criteria) this;
}
public Criteria andParkIdIsNull() {
addCriterion("park_id is null");
return (Criteria) this;
}
public Criteria andParkIdIsNotNull() {
addCriterion("park_id is not null");
return (Criteria) this;
}
public Criteria andParkIdEqualTo(Long value) {
addCriterion("park_id =", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdNotEqualTo(Long value) {
addCriterion("park_id <>", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdGreaterThan(Long value) {
addCriterion("park_id >", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdGreaterThanOrEqualTo(Long value) {
addCriterion("park_id >=", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdLessThan(Long value) {
addCriterion("park_id <", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdLessThanOrEqualTo(Long value) {
addCriterion("park_id <=", value, "parkId");
return (Criteria) this;
}
public Criteria andParkIdIn(List<Long> values) {
addCriterion("park_id in", values, "parkId");
return (Criteria) this;
}
public Criteria andParkIdNotIn(List<Long> values) {
addCriterion("park_id not in", values, "parkId");
return (Criteria) this;
}
public Criteria andParkIdBetween(Long value1, Long value2) {
addCriterion("park_id between", value1, value2, "parkId");
return (Criteria) this;
}
public Criteria andParkIdNotBetween(Long value1, Long value2) {
addCriterion("park_id not between", value1, value2, "parkId");
return (Criteria) this;
}
public Criteria andCreatedAtIsNull() {
addCriterion("created_at is null");
return (Criteria) this;
}
public Criteria andCreatedAtIsNotNull() {
addCriterion("created_at is not null");
return (Criteria) this;
}
public Criteria andCreatedAtEqualTo(Date value) {
addCriterion("created_at =", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotEqualTo(Date value) {
addCriterion("created_at <>", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThan(Date value) {
addCriterion("created_at >", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("created_at >=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThan(Date value) {
addCriterion("created_at <", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtLessThanOrEqualTo(Date value) {
addCriterion("created_at <=", value, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtIn(List<Date> values) {
addCriterion("created_at in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotIn(List<Date> values) {
addCriterion("created_at not in", values, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtBetween(Date value1, Date value2) {
addCriterion("created_at between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andCreatedAtNotBetween(Date value1, Date value2) {
addCriterion("created_at not between", value1, value2, "createdAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNull() {
addCriterion("updated_at is null");
return (Criteria) this;
}
public Criteria andUpdatedAtIsNotNull() {
addCriterion("updated_at is not null");
return (Criteria) this;
}
public Criteria andUpdatedAtEqualTo(Date value) {
addCriterion("updated_at =", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotEqualTo(Date value) {
addCriterion("updated_at <>", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThan(Date value) {
addCriterion("updated_at >", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtGreaterThanOrEqualTo(Date value) {
addCriterion("updated_at >=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThan(Date value) {
addCriterion("updated_at <", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtLessThanOrEqualTo(Date value) {
addCriterion("updated_at <=", value, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtIn(List<Date> values) {
addCriterion("updated_at in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotIn(List<Date> values) {
addCriterion("updated_at not in", values, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtBetween(Date value1, Date value2) {
addCriterion("updated_at between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andUpdatedAtNotBetween(Date value1, Date value2) {
addCriterion("updated_at not between", value1, value2, "updatedAt");
return (Criteria) this;
}
public Criteria andRecStatusIsNull() {
addCriterion("rec_status is null");
return (Criteria) this;
}
public Criteria andRecStatusIsNotNull() {
addCriterion("rec_status is not null");
return (Criteria) this;
}
public Criteria andRecStatusEqualTo(Byte value) {
addCriterion("rec_status =", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotEqualTo(Byte value) {
addCriterion("rec_status <>", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThan(Byte value) {
addCriterion("rec_status >", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusGreaterThanOrEqualTo(Byte value) {
addCriterion("rec_status >=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThan(Byte value) {
addCriterion("rec_status <", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusLessThanOrEqualTo(Byte value) {
addCriterion("rec_status <=", value, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusIn(List<Byte> values) {
addCriterion("rec_status in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotIn(List<Byte> values) {
addCriterion("rec_status not in", values, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusBetween(Byte value1, Byte value2) {
addCriterion("rec_status between", value1, value2, "recStatus");
return (Criteria) this;
}
public Criteria andRecStatusNotBetween(Byte value1, Byte value2) {
addCriterion("rec_status not between", value1, value2, "recStatus");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {
protected Criteria() {
super();
}
}
public static class Criterion {
private String condition;
private Object value;
private Object secondValue;
private boolean noValue;
private boolean singleValue;
private boolean betweenValue;
private boolean listValue;
private String typeHandler;
public String getCondition() {
return condition;
}
public Object getValue() {
return value;
}
public Object getSecondValue() {
return secondValue;
}
public boolean isNoValue() {
return noValue;
}
public boolean isSingleValue() {
return singleValue;
}
public boolean isBetweenValue() {
return betweenValue;
}
public boolean isListValue() {
return listValue;
}
public String getTypeHandler() {
return typeHandler;
}
protected Criterion(String condition) {
super();
this.condition = condition;
this.typeHandler = null;
this.noValue = true;
}
protected Criterion(String condition, Object value, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.typeHandler = typeHandler;
if (value instanceof List<?>) {
this.listValue = true;
} else {
this.singleValue = true;
}
}
protected Criterion(String condition, Object value) {
this(condition, value, null);
}
protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
super();
this.condition = condition;
this.value = value;
this.secondValue = secondValue;
this.typeHandler = typeHandler;
this.betweenValue = true;
}
protected Criterion(String condition, Object value, Object secondValue) {
this(condition, value, secondValue, null);
}
}
}

74
logistics/src/main/java/com/ccsens/logistics/bean/vo/MbpsVo.java

@ -0,0 +1,74 @@
package com.ccsens.logistics.bean.vo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* @author
*/
@Data
public class MbpsVo {
@Data
@ApiModel("总吞吐量")
public static class AllMbps{
@ApiModelProperty("吞进量(车辆进入次数)")
private Long carOfIn;
@ApiModelProperty("吞出量(车辆出去次数)")
private Long carOfOut;
@ApiModelProperty("入库的重量")
private Long weightOfIn;
@ApiModelProperty("出库的重量")
private Long weightOfOut;
}
@Data
@ApiModel("总吞吐量折线版")
public static class SelMbpsByTime{
@ApiModelProperty("吞进量")
private List<CarOfInByTime> carOfInsByTime = new ArrayList<>();
@ApiModelProperty("吐出量")
private List<CarOfOutByTime> carOfOutsByTime = new ArrayList<>();
@ApiModelProperty("入库的重量")
private List<WeightOfInByTime> weightOfInsByTime = new ArrayList<>();
@ApiModelProperty("出库的重量")
private List<WeightOfOutByTime> weightOfOutsByTime = new ArrayList<>();
}
@Data
@ApiModel("吞进量(车辆进入次数)")
public static class CarOfInByTime{
@ApiModelProperty("时间")
private String time;
@ApiModelProperty("吞进量")
private Long carOfIn;
}
@Data
@ApiModel("吞出量(车辆出去次数)")
public static class CarOfOutByTime{
@ApiModelProperty("时间")
private String time;
@ApiModelProperty("吐出量")
private Long carOfOut;
}
@Data
@ApiModel("入库的重量")
public static class WeightOfInByTime{
@ApiModelProperty("时间")
private String time;
@ApiModelProperty("入库重量")
private Long weightOfIn;
}
@Data
@ApiModel("出库的重量")
public static class WeightOfOutByTime{
@ApiModelProperty("时间")
private String time;
@ApiModelProperty("出库重量")
private Long weightOfOut;
}
}

32
logistics/src/main/java/com/ccsens/logistics/config/BeanConfig.java

@ -0,0 +1,32 @@
package com.ccsens.logistics.config;
import com.ccsens.logistics.intercept.MybatisInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/03 18:01
*/
@Configuration
public class BeanConfig {
// @Bean
// public static PropertySourcesPlaceholderConfigurer properties(){
// PropertySourcesPlaceholderConfigurer conf = new PropertySourcesPlaceholderConfigurer();
// YamlPropertiesFactoryBean yml = new YamlPropertiesFactoryBean();
// yml.setResources(new ClassPathResource("business.yml"));
// conf.setProperties(yml.getObject());
// return conf;
// }
/**
* 注册拦截器
*/
@Bean
public MybatisInterceptor mybatisInterceptor() {
MybatisInterceptor interceptor = new MybatisInterceptor();
return interceptor;
}
}

169
logistics/src/main/java/com/ccsens/logistics/config/SpringConfig.java

@ -0,0 +1,169 @@
package com.ccsens.logistics.config;
import cn.hutool.core.lang.Snowflake;
import cn.hutool.core.util.IdUtil;
import com.ccsens.util.config.DruidProps;
import com.fasterxml.jackson.databind.DeserializationFeature;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
import org.springframework.web.servlet.config.annotation.*;
import javax.annotation.Resource;
import javax.sql.DataSource;
import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
@Configuration
//public class SpringConfig extends WebMvcConfigurationSupport {
public class SpringConfig implements WebMvcConfigurer {
@Resource
private DruidProps druidPropsUtil;
@Value("${spring.snowflake.workerId}")
private String workerId;
@Value("${spring.snowflake.datacenterId}")
private String datacenterId;
/**
* 配置Converter
* @return
*/
@Bean
public HttpMessageConverter<String> responseStringConverter() {
StringHttpMessageConverter converter = new StringHttpMessageConverter(
Charset.forName("UTF-8"));
return converter;
}
@Bean
public HttpMessageConverter<Object> responseJsonConverter(){
MappingJackson2HttpMessageConverter converter = new MappingJackson2HttpMessageConverter();
List<MediaType> mediaTypeList = new ArrayList<>();
mediaTypeList.add(MediaType.TEXT_HTML);
mediaTypeList.add(MediaType.APPLICATION_JSON_UTF8);
converter.setSupportedMediaTypes(mediaTypeList);
//converter.setObjectMapper();
ObjectMapper objectMapper = new ObjectMapper();
SimpleModule simpleModule = new SimpleModule();
simpleModule.addSerializer(Long.class, ToStringSerializer.instance);
simpleModule.addSerializer(Long.TYPE, ToStringSerializer.instance);
objectMapper.registerModule(simpleModule);
objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
converter.setObjectMapper(objectMapper);
return converter;
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> converters) {
//super.configureMessageConverters(converters);
converters.add(responseStringConverter());
converters.add(responseJsonConverter());
}
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
configurer.favorPathExtension(false);
}
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**").allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
// .allowedMethods("*") // 允许提交请求的方法,*表示全部允许
.allowedOrigins("*") // #允许向该服务器提交请求的URI,*表示全部允许
.allowCredentials(true) // 允许cookies跨域
.allowedHeaders("*") // #允许访问的头信息,*表示全部
.maxAge(18000L); // 预检请求的缓存时间(秒),即在这个时间段里,对于相同的跨域请求不会再预检了
}
/**
* 配置视图解析器 SpringBoot建议使用Thymeleaf代替jsp动态页面默认路径resources/template静态页面默认路径: resources/static
* @return
*/
// @Bean
// public ViewResolver getViewResolver() {
// InternalResourceViewResolver resolver = new InternalResourceViewResolver();
// resolver.setPrefix("/WEB-INF/views/");
// resolver.setSuffix(".jsp");
// return resolver;
// }
// @Override
// public void configureDefaultServletHandling(
// DefaultServletHandlerConfigurer configurer) {
// configurer.enable();
// }
/**
* 配置静态资源
*/
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("swagger-ui.html")
.addResourceLocations("classpath:/META-INF/resources/");
registry.addResourceHandler("/webjars/**")
.addResourceLocations("classpath:/META-INF/resources/webjars/");
registry.addResourceHandler("/uploads/**")
.addResourceLocations("file:///home/cloud/logistics/uploads/");
//super.addResourceHandlers(registry);
}
/**
* 配置拦截器
* @param registry
*/
@Override
public void addInterceptors(InterceptorRegistry registry) {
//addPathPatterns 用于添加拦截规则
//excludePathPatterns 用于排除拦截
// registry.addInterceptor(tokenInterceptor())
// .addPathPatterns("/projects/**")
// .addPathPatterns("/messages/**")
// .addPathPatterns("/users/**")
// .excludePathPatterns("/users/signin")
// .excludePathPatterns("/users/smscode")
// .excludePathPatterns("/users/signup")
// .excludePathPatterns("/users/password")
// .excludePathPatterns("/users/account")
// .excludePathPatterns("/users/token")
// .excludePathPatterns("/users/claims")
// .addPathPatterns("/plugins/**")
// .addPathPatterns("/delivers/**")
// .addPathPatterns("/tasks/**")
// .addPathPatterns("/members/**")
// .addPathPatterns("/templates/**")
// .addPathPatterns("/hardware/**");
//super.addInterceptors(registry);
}
//
// @Bean
// public TokenInterceptor tokenInterceptor(){
// return new TokenInterceptor();
// }
/**
* 配置数据源单数据源
*/
@Bean
public DataSource dataSource(){
return druidPropsUtil.createDruidDataSource();
}
@Bean
public Snowflake snowflake(){
// return new Snowflake(Long.valueOf(workerId),Long.valueOf(datacenterId));
return IdUtil.createSnowflake(Long.valueOf(workerId),Long.valueOf(datacenterId));
}
}

56
logistics/src/main/java/com/ccsens/logistics/config/SwaggerConfigure.java

@ -0,0 +1,56 @@
package com.ccsens.logistics.config;
import com.ccsens.util.WebConstant;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ParameterBuilder;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.schema.ModelRef;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Parameter;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.ArrayList;
import java.util.List;
@Configuration
@EnableSwagger2
@ConditionalOnExpression("${swagger.enable}")
//public class SwaggerConfigure extends WebMvcConfigurationSupport {
public class SwaggerConfigure /*implements WebMvcConfigurer*/ {
@Bean
public Docket customDocket() {
//
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors
.basePackage("com.ccsens.logistics.web"))
.build()
.globalOperationParameters(setHeaderToken());
}
private ApiInfo apiInfo() {
return new ApiInfo("Swagger Tall-ptpro",//大标题 title
"This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.",//小标题
"1.0.0",//版本
"http://swagger.io/terms/",//termsOfServiceUrl
"zhangsan",//作者
"Apache 2.0",//链接显示文字
"http://www.apache.org/licenses/LICENSE-2.0.html"//网站链接
);
}
private List<Parameter> setHeaderToken() {
ParameterBuilder tokenPar = new ParameterBuilder();
List<Parameter> pars = new ArrayList<>();
tokenPar.name(WebConstant.HEADER_KEY_TOKEN).description("token")
.defaultValue(WebConstant.HEADER_KEY_TOKEN_PREFIX)
.modelRef(new ModelRef("string")).parameterType("header").required(false).build();
pars.add(tokenPar.build());
return pars;
}
}

159
logistics/src/main/java/com/ccsens/logistics/intercept/MybatisInterceptor.java

@ -0,0 +1,159 @@
package com.ccsens.logistics.intercept;
import cn.hutool.core.collection.CollectionUtil;
import com.ccsens.util.WebConstant;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.ResultMap;
import org.apache.ibatis.mapping.SqlSource;
import org.apache.ibatis.plugin.*;
import org.apache.ibatis.reflection.DefaultReflectorFactory;
import org.apache.ibatis.reflection.MetaObject;
import org.apache.ibatis.reflection.factory.DefaultObjectFactory;
import org.apache.ibatis.reflection.wrapper.DefaultObjectWrapperFactory;
import org.apache.ibatis.session.ResultHandler;
import org.apache.ibatis.session.RowBounds;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.List;
import java.util.Map;
import java.util.Properties;
/**
* @description:
* @author: wuHuiJuan
* @create: 2019/12/11 10:58
*/
@Intercepts({
@Signature(
type = Executor.class,
method = "query",
args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}
)
})
public class MybatisInterceptor implements Interceptor {
@Override
public Object intercept(Invocation invocation) throws Throwable {
String selectByExample = "selectByExample";
String countByExample = "countByExample";
String countByExample2 = "selectByExample_COUNT";
String selectByPrimaryKey = "selectByPrimaryKey";
Object[] args = invocation.getArgs();
MappedStatement statement = (MappedStatement) args[0];
if (statement.getId().endsWith(selectByExample)
|| statement.getId().endsWith(countByExample)
|| statement.getId().endsWith(countByExample2)) {
//XXXExample
Object example = args[1];
addCondition(statement, example);
} else if (statement.getId().endsWith(selectByPrimaryKey)) {
BoundSql boundSql = statement.getBoundSql(args[1]);
String sql = boundSql.getSql() + " and rec_status = 0";
MappedStatement newStatement = newMappedStatement(statement, new BoundSqlSqlSource(boundSql));
MetaObject msObject = MetaObject.forObject(newStatement, new DefaultObjectFactory(), new DefaultObjectWrapperFactory(),new DefaultReflectorFactory());
msObject.setValue("sqlSource.boundSql.sql", sql);
args[0] = newStatement;
}
return invocation.proceed();
}
private void addCondition(MappedStatement statement, Object example) throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, ClassNotFoundException {
if (example instanceof Map) {
example = ((Map) example).get("_ORIGINAL_PARAMETER_OBJECT");
}
Method method = example.getClass().getMethod("getOredCriteria", null);
//获取到条件数组,第一个是Criteria
List list = (List) method.invoke(example);
if (CollectionUtil.isEmpty(list)) {
Class clazz = ((ResultMap) statement.getResultMaps().get(0)).getType();
String exampleName = clazz.getName() + "Example";
Object paramExample = Class.forName(exampleName).newInstance();
Method createCriteria = paramExample.getClass().getMethod("createCriteria");
Object criteria = createCriteria.invoke(paramExample);
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
list.add(criteria);
} else {
Object criteria = list.get(0);
Method getCriteria = criteria.getClass().getMethod("getCriteria");
List params = (List) getCriteria.invoke(criteria);
boolean hasDel = false;
for (Object param : params) {
Method getCondition = param.getClass().getMethod("getCondition");
Object condition = getCondition.invoke(param);
if ("rec_status =".equals(condition)) {
hasDel = true;
}
}
if (!hasDel) {
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class);
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value);
}
}
}
@Override
public Object plugin(Object target) {
return Plugin.wrap(target, this);
}
@Override
public void setProperties(Properties properties) {
}
private MappedStatement newMappedStatement(MappedStatement ms, SqlSource newSqlSource) {
MappedStatement.Builder builder =
new MappedStatement.Builder(ms.getConfiguration(), ms.getId(), newSqlSource, ms.getSqlCommandType());
builder.resource(ms.getResource());
builder.fetchSize(ms.getFetchSize());
builder.statementType(ms.getStatementType());
builder.keyGenerator(ms.getKeyGenerator());
if (ms.getKeyProperties() != null && ms.getKeyProperties().length != 0) {
StringBuilder keyProperties = new StringBuilder();
for (String keyProperty : ms.getKeyProperties()) {
keyProperties.append(keyProperty).append(",");
}
keyProperties.delete(keyProperties.length() - 1, keyProperties.length());
builder.keyProperty(keyProperties.toString());
}
builder.timeout(ms.getTimeout());
builder.parameterMap(ms.getParameterMap());
builder.resultMaps(ms.getResultMaps());
builder.resultSetType(ms.getResultSetType());
builder.cache(ms.getCache());
builder.flushCacheRequired(ms.isFlushCacheRequired());
builder.useCache(ms.isUseCache());
return builder.build();
}
// 定义一个内部辅助类,作用是包装sq
class BoundSqlSqlSource implements SqlSource {
private BoundSql boundSql;
public BoundSqlSqlSource(BoundSql boundSql) {
this.boundSql = boundSql;
}
@Override
public BoundSql getBoundSql(Object parameterObject) {
return boundSql;
}
}
}

79
logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsCarRecordDao.java

@ -0,0 +1,79 @@
package com.ccsens.logistics.persist.dao;
import com.ccsens.logistics.bean.vo.MbpsVo;
import com.ccsens.logistics.persist.mapper.LogisticsCarRecordMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* @author
*/
@Repository
public interface LogisticsCarRecordDao extends LogisticsCarRecordMapper {
/**
* 查询车辆吞进量
* @param warehouseId 仓库id
* @return 车辆吞进量
*/
Long selCarOfIn(Long warehouseId);
/**
* 查询车辆吐出量
* @param warehouseId 仓库id
* @return 车辆吐出量
*/
Long selCarOfOut(Long warehouseId);
/**
* 查询入库吨数
* @param warehouseId 仓库id
* @return 入库吨数
*/
Long selWeightOfIn(Long warehouseId);
/**
* 查询出货吨数
* @param warehouseId 仓库id
* @return 出货吨数
*/
Long selWeightOfOut(Long warehouseId);
/**
* 根据时间查询车辆吞进量
* @param queryType 查询类型
* @param startTime 开始时间
* @param endTime 结束时间
* @return 该时间车辆吞进量
*/
List<MbpsVo.CarOfInByTime> selCarOfInByTime(@Param("queryType") Byte queryType,@Param("startTime") Long startTime,@Param("endTime") Long endTime);
/**
* 根据时间查询车辆吐出量
*@param queryType 查询类型
* @param startTime 开始时间
* @param endTime 结束时间
* @return 该时间车辆吐出量
*/
List<MbpsVo.CarOfOutByTime> selCarOfOutByTime(@Param("queryType") Byte queryType,@Param("startTime") Long startTime,@Param("endTime") Long endTime);
/**
* 根据时间查询入货量
* @param queryType 查询类型
* @param startTime 开始时间
* @param endTime 结束时间
* @return 该时间入货量
*/
List<MbpsVo.WeightOfInByTime> selWeightOfInByTime(@Param("queryType") Byte queryType,@Param("startTime") Long startTime,@Param("endTime") Long endTime);
/**
* 根据时间查询出货量
* @param queryType 查询类型
* @param startTime 开始时间
* @param endTime 结束时间
* @return 该时间车辆出货量
*/
List<MbpsVo.WeightOfOutByTime> selWeightOfOutByTime(@Param("queryType") Byte queryType,@Param("startTime") Long startTime,@Param("endTime") Long endTime);
}

11
logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsEnvironmentRecordDao.java

@ -0,0 +1,11 @@
package com.ccsens.logistics.persist.dao;
import com.ccsens.logistics.persist.mapper.LogisticsEnvironmentRecordMapper;
import org.springframework.stereotype.Repository;
/**
* @author
*/
@Repository
public interface LogisticsEnvironmentRecordDao extends LogisticsEnvironmentRecordMapper {
}

11
logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsEquipmentDao.java

@ -0,0 +1,11 @@
package com.ccsens.logistics.persist.dao;
import com.ccsens.logistics.persist.mapper.LogisticsEquipmentMapper;
import org.springframework.stereotype.Repository;
/**
* @author
*/
@Repository
public interface LogisticsEquipmentDao extends LogisticsEquipmentMapper {
}

11
logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsParkEquipmentDao.java

@ -0,0 +1,11 @@
package com.ccsens.logistics.persist.dao;
import com.ccsens.logistics.persist.mapper.LogisticsParkEquipmentMapper;
import org.springframework.stereotype.Repository;
/**
* @author
*/
@Repository
public interface LogisticsParkEquipmentDao extends LogisticsParkEquipmentMapper {
}

11
logistics/src/main/java/com/ccsens/logistics/persist/dao/LogisticsWarehouseDao.java

@ -0,0 +1,11 @@
package com.ccsens.logistics.persist.dao;
import com.ccsens.logistics.persist.mapper.LogisticsWarehouseMapper;
import org.springframework.stereotype.Repository;
/**
* @author
*/
@Repository
public interface LogisticsWarehouseDao extends LogisticsWarehouseMapper {
}

30
logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsCarRecordMapper.java

@ -0,0 +1,30 @@
package com.ccsens.logistics.persist.mapper;
import com.ccsens.logistics.bean.po.LogisticsCarRecord;
import com.ccsens.logistics.bean.po.LogisticsCarRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface LogisticsCarRecordMapper {
long countByExample(LogisticsCarRecordExample example);
int deleteByExample(LogisticsCarRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(LogisticsCarRecord record);
int insertSelective(LogisticsCarRecord record);
List<LogisticsCarRecord> selectByExample(LogisticsCarRecordExample example);
LogisticsCarRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") LogisticsCarRecord record, @Param("example") LogisticsCarRecordExample example);
int updateByExample(@Param("record") LogisticsCarRecord record, @Param("example") LogisticsCarRecordExample example);
int updateByPrimaryKeySelective(LogisticsCarRecord record);
int updateByPrimaryKey(LogisticsCarRecord record);
}

30
logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsEnvironmentRecordMapper.java

@ -0,0 +1,30 @@
package com.ccsens.logistics.persist.mapper;
import com.ccsens.logistics.bean.po.LogisticsEnvironmentRecord;
import com.ccsens.logistics.bean.po.LogisticsEnvironmentRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface LogisticsEnvironmentRecordMapper {
long countByExample(LogisticsEnvironmentRecordExample example);
int deleteByExample(LogisticsEnvironmentRecordExample example);
int deleteByPrimaryKey(Long id);
int insert(LogisticsEnvironmentRecord record);
int insertSelective(LogisticsEnvironmentRecord record);
List<LogisticsEnvironmentRecord> selectByExample(LogisticsEnvironmentRecordExample example);
LogisticsEnvironmentRecord selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") LogisticsEnvironmentRecord record, @Param("example") LogisticsEnvironmentRecordExample example);
int updateByExample(@Param("record") LogisticsEnvironmentRecord record, @Param("example") LogisticsEnvironmentRecordExample example);
int updateByPrimaryKeySelective(LogisticsEnvironmentRecord record);
int updateByPrimaryKey(LogisticsEnvironmentRecord record);
}

30
logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsEquipmentMapper.java

@ -0,0 +1,30 @@
package com.ccsens.logistics.persist.mapper;
import com.ccsens.logistics.bean.po.LogisticsEquipment;
import com.ccsens.logistics.bean.po.LogisticsEquipmentExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface LogisticsEquipmentMapper {
long countByExample(LogisticsEquipmentExample example);
int deleteByExample(LogisticsEquipmentExample example);
int deleteByPrimaryKey(Long id);
int insert(LogisticsEquipment record);
int insertSelective(LogisticsEquipment record);
List<LogisticsEquipment> selectByExample(LogisticsEquipmentExample example);
LogisticsEquipment selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") LogisticsEquipment record, @Param("example") LogisticsEquipmentExample example);
int updateByExample(@Param("record") LogisticsEquipment record, @Param("example") LogisticsEquipmentExample example);
int updateByPrimaryKeySelective(LogisticsEquipment record);
int updateByPrimaryKey(LogisticsEquipment record);
}

30
logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsParkEquipmentMapper.java

@ -0,0 +1,30 @@
package com.ccsens.logistics.persist.mapper;
import com.ccsens.logistics.bean.po.LogisticsParkEquipment;
import com.ccsens.logistics.bean.po.LogisticsParkEquipmentExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface LogisticsParkEquipmentMapper {
long countByExample(LogisticsParkEquipmentExample example);
int deleteByExample(LogisticsParkEquipmentExample example);
int deleteByPrimaryKey(Long id);
int insert(LogisticsParkEquipment record);
int insertSelective(LogisticsParkEquipment record);
List<LogisticsParkEquipment> selectByExample(LogisticsParkEquipmentExample example);
LogisticsParkEquipment selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") LogisticsParkEquipment record, @Param("example") LogisticsParkEquipmentExample example);
int updateByExample(@Param("record") LogisticsParkEquipment record, @Param("example") LogisticsParkEquipmentExample example);
int updateByPrimaryKeySelective(LogisticsParkEquipment record);
int updateByPrimaryKey(LogisticsParkEquipment record);
}

30
logistics/src/main/java/com/ccsens/logistics/persist/mapper/LogisticsWarehouseMapper.java

@ -0,0 +1,30 @@
package com.ccsens.logistics.persist.mapper;
import com.ccsens.logistics.bean.po.LogisticsWarehouse;
import com.ccsens.logistics.bean.po.LogisticsWarehouseExample;
import java.util.List;
import org.apache.ibatis.annotations.Param;
public interface LogisticsWarehouseMapper {
long countByExample(LogisticsWarehouseExample example);
int deleteByExample(LogisticsWarehouseExample example);
int deleteByPrimaryKey(Long id);
int insert(LogisticsWarehouse record);
int insertSelective(LogisticsWarehouse record);
List<LogisticsWarehouse> selectByExample(LogisticsWarehouseExample example);
LogisticsWarehouse selectByPrimaryKey(Long id);
int updateByExampleSelective(@Param("record") LogisticsWarehouse record, @Param("example") LogisticsWarehouseExample example);
int updateByExample(@Param("record") LogisticsWarehouse record, @Param("example") LogisticsWarehouseExample example);
int updateByPrimaryKeySelective(LogisticsWarehouse record);
int updateByPrimaryKey(LogisticsWarehouse record);
}

26
logistics/src/main/java/com/ccsens/logistics/service/IMbpsService.java

@ -0,0 +1,26 @@
package com.ccsens.logistics.service;
import com.ccsens.logistics.bean.dto.MbpsDto;
import com.ccsens.logistics.bean.vo.MbpsVo;
import java.util.List;
/**
* @author
*/
public interface IMbpsService {
/**
* 查询总吞吐量
* @param param 仓库id
* @return 总吞吐量
*/
MbpsVo.AllMbps selAllMbps(MbpsDto.SelAllMbpsSerch param);
/**
* 查询车次货物吞吐量折线图
* @param param 开始结束时间查询类型
* @return 当前时间段的数据
*/
MbpsVo.SelMbpsByTime selMbpsByTime(MbpsDto.SelMbpsByTime param);
}

61
logistics/src/main/java/com/ccsens/logistics/service/MbpsService.java

@ -0,0 +1,61 @@
package com.ccsens.logistics.service;
import com.ccsens.logistics.bean.dto.MbpsDto;
import com.ccsens.logistics.bean.vo.MbpsVo;
import com.ccsens.logistics.persist.dao.LogisticsCarRecordDao;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.List;
/**
* @author
*/
@Slf4j
@Service
@Transactional(propagation = Propagation.REQUIRED,rollbackFor = Exception.class)
public class MbpsService implements IMbpsService {
@Resource
private LogisticsCarRecordDao carRecordDao;
@Override
public MbpsVo.AllMbps selAllMbps(MbpsDto.SelAllMbpsSerch param) {
MbpsVo.AllMbps allMbps = new MbpsVo.AllMbps();
//查询吞进量
Long carOfIn = carRecordDao.selCarOfIn(param.getWarehouseId());
allMbps.setCarOfIn(carOfIn);
//查询吐出量
Long carOfOut = carRecordDao.selCarOfOut(param.getWarehouseId());
allMbps.setCarOfOut(carOfOut);
//查询入库吨数
Long weightOfIn = carRecordDao.selWeightOfIn(param.getWarehouseId());
allMbps.setWeightOfIn(weightOfIn);
//查询出货吨数
Long weightOfOut = carRecordDao.selWeightOfOut(param.getWarehouseId());
allMbps.setWeightOfOut(weightOfOut);
return allMbps;
}
@Override
public MbpsVo.SelMbpsByTime selMbpsByTime(MbpsDto.SelMbpsByTime param) {
MbpsVo.SelMbpsByTime selMbpsByTime = new MbpsVo.SelMbpsByTime();
//查询吞进量
List<MbpsVo.CarOfInByTime> carOfInByTimeList = carRecordDao.selCarOfInByTime(param.getQueryType(),param.getStartTime(),param.getEndTime());
selMbpsByTime.getCarOfInsByTime().addAll(carOfInByTimeList);
//查询吐出量
List<MbpsVo.CarOfOutByTime> carOfOutByTimeList = carRecordDao.selCarOfOutByTime(param.getQueryType(),param.getStartTime(),param.getEndTime());
selMbpsByTime.getCarOfOutsByTime().addAll(carOfOutByTimeList);
//查询入库吨数
List<MbpsVo.WeightOfInByTime> weightOfInByTimeList = carRecordDao.selWeightOfInByTime(param.getQueryType(),param.getStartTime(),param.getEndTime());
selMbpsByTime.getWeightOfInsByTime().addAll(weightOfInByTimeList);
//查询出货吨数
List<MbpsVo.WeightOfOutByTime> weightOfOutByTimeList =carRecordDao.selWeightOfOutByTime(param.getQueryType(),param.getStartTime(),param.getEndTime());
selMbpsByTime.getWeightOfOutsByTime().addAll(weightOfOutByTimeList);
return selMbpsByTime;
}
}

30
logistics/src/main/resources/application-common.yml

@ -0,0 +1,30 @@
logging:
level:
com:
favorites: DEBUG
org:
hibernate: ERROR
springframework:
web: DEBUG
mybatis:
config-location: classpath:mybatis/mybatis-config.xml
mapper-locations: classpath*:mapper_*/*.xml
type-aliases-package: com.ccsens.logistics.bean
#server:
# tomcat:
# uri-encoding: UTF-8
spring:
http:
encoding:
charset: UTF-8
enabled: true
force: true
log-request-details: true
servlet:
multipart:
max-file-size: 10MB
max-request-size: 100MB
snowflake:
datacenterId: 2
workerId: 2

35
logistics/src/main/resources/application-dev.yml

@ -0,0 +1,35 @@
server:
port: 7170
servlet:
context-path:
spring:
application:
name: logistics
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 192.168.31.13
password: guest
port: 5672
username: guest
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true
file:
path: /home/cloud/logistics/uploads/
signUpUrl: https://test.tall.wiki/compete/
domain: https://test.tall.wiki/gateway/logistics/
imgDomain: https://test.tall.wiki/gateway/logistics/uploads/
logging:
path:

40
logistics/src/main/resources/application-prod.yml

@ -0,0 +1,40 @@
server:
port: 7170
servlet:
context-path:
spring:
application:
name: logistics
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
# password: ''
password: 'areowqr!@43ef'
port: 6379
timeout: 1000ms
swagger:
enable: true
eureka:
instance:
ip-address: 121.36.3.207
gatewayUrl: https://www.tall.wiki/gateway/
notGatewayUrl: https://www.tall.wiki/
file:
path: /home/cloud/logistics/uploads/
signUpUrl: https://www.tall.wiki/compete/
domain: https://www.tall.wiki/gateway/logistics/
imgDomain: https://www.tall.wiki/gateway/logistics/uploads/

36
logistics/src/main/resources/application-test.yml

@ -0,0 +1,36 @@
server:
port: 7170
servlet:
context-path:
spring:
application:
name: logistics
datasource:
type: com.alibaba.druid.pool.DruidDataSource
rabbitmq:
host: 127.0.0.1
password: 111111
port: 5672
username: admin
redis:
database: 0
host: 127.0.0.1
jedis:
pool:
max-active: 200
max-idle: 10
max-wait: -1ms
min-idle: 0
password: ''
port: 6379
timeout: 1000ms
swagger:
enable: true
eureka:
instance:
ip-address: 192.168.31.13
file:
path: /home/cloud/logistics/uploads/
signUpUrl: https://test.tall.wiki/compete/
domain: https://test.tall.wiki/gateway/logistics/
imgDomain: https://test.tall.wiki/gateway/logistics/uploads/

6
logistics/src/main/resources/application.yml

@ -0,0 +1,6 @@
spring:
profiles:
active: dev
include: common, util-dev

10
logistics/src/main/resources/banner.txt

@ -0,0 +1,10 @@
_ _ U _____ u _ _ U ___ u U ___ u ____ _ ____
|'| |'| \| ___"|/ |"| |"| \/"_ \/ __ __ \/"_ \/U | _"\ u |"| | _"\
/| |_| |\ | _|" U | | u U | | u | | | | \"\ /"/ | | | | \| |_) |/U | | u /| | | |
U| _ |u | |___ \| |/__ \| |/__.-,_| |_| | /\ \ /\ / /\.-,_| |_| | | _ < \| |/__U| |_| |\
|_| |_| |_____| |_____| |_____|\_)-\___/ U \ V V / U\_)-\___/ |_| \_\ |_____||____/ u
// \\ << >> // \\ // \\ \\ .-,_\ /\ /_,-. \\ // \\_ // \\ |||_
(_") ("_)(__) (__)(_")("_)(_")("_) (__) \_)-' '-(_/ (__) (__) (__)(_")("_)(__)_)

35
logistics/src/main/resources/druid-dev.yml

@ -0,0 +1,35 @@
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
driverClassName: com.mysql.cj.jdbc.Driver
dynamicUrl: jdbc:mysql://localhost:3306/${schema}
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filterName: druidFilter
filterProfileEnable: true
filterUrlPattern: /*
filters: stat,wall
initialSize: 5
maxActive: 20
maxPoolPreparedStatementPerConnectionSize: 20
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
# password: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
servletLoginUsername: druid
servletName: druidServlet
servletResetEnable: true
servletUrlMapping: /druid/*
testOnBorrow: false
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://49.233.89.188:3306/logisticspark?useUnicode=true&characterEncoding=UTF-8
username: root
validationQuery: SELECT 1 FROM DUAL
# env: CCSENS_GAME
env: CCSENS_TALL

33
logistics/src/main/resources/druid-prod.yml

@ -0,0 +1,33 @@
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
driverClassName: com.mysql.cj.jdbc.Driver
dynamicUrl: jdbc:mysql://localhost:3306/${schema}
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filterName: druidFilter
filterProfileEnable: true
filterUrlPattern: /*
filters: stat,wall
initialSize: 5
maxActive: 20
maxPoolPreparedStatementPerConnectionSize: 20
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
password:
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
servletLoginUsername: druid
servletName: druidServlet
servletResetEnable: true
servletUrlMapping: /druid/*
testOnBorrow: false
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://127.0.0.1/logisticspark?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai&autoReconnect=true
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_GAME

33
logistics/src/main/resources/druid-test.yml

@ -0,0 +1,33 @@
spring:
datasource:
druid:
connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000
driverClassName: com.mysql.cj.jdbc.Driver
dynamicUrl: jdbc:mysql://localhost:3306/${schema}
filterExclusions: '*.js,*.gif,*.jpg,*.png,*.css,*.ico,/druid/*'
filterName: druidFilter
filterProfileEnable: true
filterUrlPattern: /*
filters: stat,wall
initialSize: 5
maxActive: 20
maxPoolPreparedStatementPerConnectionSize: 20
maxWait: 60000
minEvictableIdleTimeMillis: 300000
minIdle: 5
password: 68073a279b399baa1fa12cf39bfbb65bfc1480ffee7b659ccc81cf19be8c4473
poolPreparedStatements: true
servletLogSlowSql: true
servletLoginPassword: 111111
servletLoginUsername: druid
servletName: druidServlet
servletResetEnable: true
servletUrlMapping: /druid/*
testOnBorrow: false
testOnReturn: false
testWhileIdle: true
timeBetweenEvictionRunsMillis: 60000
url: jdbc:mysql://test.tall.wiki/logisticspark?useUnicode=true&characterEncoding=UTF-8
username: root
validationQuery: SELECT 1 FROM DUAL
env: CCSENS_TALL

196
logistics/src/main/resources/logback-spring.xml

@ -0,0 +1,196 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,如果设置为WARN,则低于WARN的信息都不会输出 -->
<!-- scan:当此属性设置为true时,配置文件如果发生改变,将会被重新加载,默认值为true -->
<!-- scanPeriod:设置监测配置文件是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 -->
<!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 -->
<configuration scan="true" scanPeriod="10 seconds">
<!--<include resource="org/springframework/boot/logging/logback/base.xml" />-->
<contextName>logback</contextName>
<!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义变量后,可以使“${}”来使用变量。 -->
<property name="log.path" value="/home/cloud/mt/log/" />
<!-- 彩色日志 -->
<!-- 彩色日志依赖的渲染类 -->
<conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" />
<conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" />
<conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" />
<!-- 彩色日志格式 -->
<property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/>
<!--输出到控制台-->
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
<!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息-->
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
<level>info</level>
</filter>
<encoder>
<Pattern>${CONSOLE_LOG_PATTERN}</Pattern>
<!-- 设置字符集 -->
<charset>UTF-8</charset>
</encoder>
</appender>
<!--输出到文件-->
<!-- 时间滚动输出 level为 DEBUG 日志 -->
<appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_debug.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 日志归档 -->
<fileNamePattern>${log.path}/debug/log-debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录debug级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>debug</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 INFO 日志 -->
<appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_info.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset>
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- 每天日志归档路径以及格式 -->
<fileNamePattern>${log.path}/info/log-info-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录info级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>info</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 WARN 日志 -->
<appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_warn.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/warn/log-warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录warn级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>warn</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!-- 时间滚动输出 level为 ERROR 日志 -->
<appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<!-- 正在记录的日志文件的路径及文件名 -->
<file>${log.path}/log_error.log</file>
<!--日志文件输出格式-->
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern>
<charset>UTF-8</charset> <!-- 此处设置字符集 -->
</encoder>
<!-- 日志记录器的滚动策略,按日期,按大小记录 -->
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>${log.path}/error/log-error-%d{yyyy-MM-dd}.%i.log</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!--日志文件保留天数-->
<maxHistory>15</maxHistory>
</rollingPolicy>
<!-- 此日志文件只记录ERROR级别的 -->
<filter class="ch.qos.logback.classic.filter.LevelFilter">
<level>ERROR</level>
<onMatch>ACCEPT</onMatch>
<onMismatch>DENY</onMismatch>
</filter>
</appender>
<!--
<logger>用来设置某一个包或者具体的某一个类的日志打印级别、
以及指定<appender><logger>仅有一个name属性,
一个可选的level和一个可选的addtivity属性。
name:用来指定受此logger约束的某一个包或者具体的某一个类。
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
还有一个特俗值INHERITED或者同义词NULL,代表强制执行上级的级别。
如果未设置此属性,那么当前logger将会继承上级的级别。
addtivity:是否向上级logger传递打印信息。默认是true。
-->
<!--<logger name="org.springframework.web" level="info"/>-->
<!--<logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/>-->
<!--
使用mybatis的时候,sql语句是debug下才会打印,而这里我们只配置了info,所以想要查看sql语句的话,有以下两种操作:
第一种把<root level="info">改成<root level="DEBUG">这样就会打印sql,不过这样日志那边会出现很多其他消息
第二种就是单独给dao下目录配置debug模式,代码如下,这样配置sql语句会打印,其他还是正常info级别:
-->
<!--
root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性
level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF,
不能设置为INHERITED或者同义词NULL。默认是DEBUG
可以包含零个或多个元素,标识这个appender将会添加到这个logger。
-->
<!--开发环境:打印控制台-->
<springProfile name="dev">
<logger name="com.ccsens.ptpro.persist.*" level="debug"/>
</springProfile>
<root level="info">
<appender-ref ref="CONSOLE" />
<appender-ref ref="DEBUG_FILE" />
<appender-ref ref="INFO_FILE" />
<appender-ref ref="WARN_FILE" />
<appender-ref ref="ERROR_FILE" />
</root>
<!--生产环境:输出到文件-->
<!--<springProfile name="pro">-->
<!--<root level="info">-->
<!--<appender-ref ref="CONSOLE" />-->
<!--<appender-ref ref="DEBUG_FILE" />-->
<!--<appender-ref ref="INFO_FILE" />-->
<!--<appender-ref ref="ERROR_FILE" />-->
<!--<appender-ref ref="WARN_FILE" />-->
<!--</root>-->
<!--</springProfile>-->
</configuration>

141
logistics/src/main/resources/mapper_dao/LogisticsCarRecordDao.xml

@ -0,0 +1,141 @@
<?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.ccsens.logistics.persist.dao.LogisticsCarRecordDao">
<select id="selCarOfIn" resultType="java.lang.Long">
SELECT COUNT(cr.id) FROM t_logistics_car_record AS cr WHERE cr.in_out = 0 AND cr.rec_status = 0
<if test="warehouseId!=null and warehouseId!=''">
AND cr.warehouse_id = #{warehouseId}
</if>
</select>
<select id="selCarOfOut" resultType="java.lang.Long">
SELECT COUNT(cr.id) FROM t_logistics_car_record AS cr WHERE cr.in_out = 1 AND cr.rec_status = 0
<if test="warehouseId!=null and warehouseId!=''">
AND cr.warehouse_id = #{warehouseId}
</if>
</select>
<select id="selWeightOfIn" resultType="java.lang.Long">
SELECT SUM(cr.car_weight) FROM t_logistics_car_record AS cr WHERE cr.in_out = 0 AND cr.rec_status = 0
<if test="warehouseId!=null and warehouseId!=''">
AND cr.warehouse_id = #{warehouseId}
</if>
</select>
<select id="selWeightOfOut" resultType="java.lang.Long">
SELECT SUM(cr.car_weight) FROM t_logistics_car_record AS cr WHERE cr.in_out = 1 AND cr.rec_status = 0
<if test="warehouseId!=null and warehouseId!=''">
AND cr.warehouse_id = #{warehouseId}
</if>
</select>
<select id="selCarOfInByTime" resultType="com.ccsens.logistics.bean.vo.MbpsVo$CarOfInByTime">
SELECT
FROM_UNIXTIME(cr.record_time, '%Y-%m-%d') AS time,
COUNT(cr.id) AS carOfIn
FROM
t_logistics_car_record AS cr
WHERE
cr.in_out = 0 AND cr.rec_status = 0
AND cr.record_time BETWEEN #{startTime} AND #{endTime}
<if test="queryType==0">
GROUP BY
DAY(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==1">
GROUP BY
WEEK(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==2">
GROUP BY
MONTH(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==3">
GROUP BY
YEAR(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
</select>
<select id="selCarOfOutByTime" resultType="com.ccsens.logistics.bean.vo.MbpsVo$CarOfOutByTime">
SELECT
FROM_UNIXTIME(cr.record_time, '%Y-%m-%d') AS time,
COUNT(cr.id) AS carOfOut
FROM
t_logistics_car_record AS cr
WHERE
cr.in_out = 1 AND cr.rec_status = 0
AND cr.record_time BETWEEN #{startTime} AND #{endTime}
<if test="queryType==0">
GROUP BY
DAY(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==1">
GROUP BY
WEEK(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==2">
GROUP BY
MONTH(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==3">
GROUP BY
YEAR(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
</select>
<select id="selWeightOfInByTime" resultType="com.ccsens.logistics.bean.vo.MbpsVo$WeightOfInByTime">
SELECT
FROM_UNIXTIME(cr.record_time, '%Y-%m-%d') AS time,
SUM(cr.car_weight) AS weightOfIn
FROM
t_logistics_car_record AS cr
WHERE
cr.in_out = 0 AND cr.rec_status = 0
AND cr.record_time BETWEEN #{startTime} AND #{endTime}
<if test="queryType==0">
GROUP BY
DAY(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==1">
GROUP BY
WEEK(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==2">
GROUP BY
MONTH(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==3">
GROUP BY
YEAR(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
</select>
<select id="selWeightOfOutByTime" resultType="com.ccsens.logistics.bean.vo.MbpsVo$WeightOfOutByTime">
SELECT
FROM_UNIXTIME(cr.record_time, '%Y-%m-%d') AS time,
SUM(cr.car_weight) AS weightOfOut
FROM
t_logistics_car_record AS cr
WHERE
cr.in_out = 1 AND cr.rec_status = 0
AND cr.record_time BETWEEN #{startTime} AND #{endTime}
<if test="queryType==0">
GROUP BY
DAY(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==1">
GROUP BY
WEEK(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==2">
GROUP BY
MONTH(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
<if test="queryType==3">
GROUP BY
YEAR(FROM_UNIXTIME(cr.record_time, '%Y-%m-%d'));
</if>
</select>
</mapper>

5
logistics/src/main/resources/mapper_dao/LogisticsEnvironmentRecordDao.xml

@ -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.ccsens.logistics.persist.dao.LogisticsEnvironmentRecordDao">
</mapper>

5
logistics/src/main/resources/mapper_dao/LogisticsEquipmentDao.xml

@ -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.ccsens.logistics.persist.dao.LogisticsEquipmentDao">
</mapper>

5
logistics/src/main/resources/mapper_dao/LogisticsParkEquipmentDao.xml

@ -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.ccsens.logistics.persist.dao.LogisticsParkEquipmentDao">
</mapper>

5
logistics/src/main/resources/mapper_dao/LogisticsWarehouseDao.xml

@ -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.ccsens.logistics.persist.dao.LogisticsWarehouseDao">
</mapper>

338
logistics/src/main/resources/mapper_raw/LogisticsCarRecordMapper.xml

@ -0,0 +1,338 @@
<?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.ccsens.logistics.persist.mapper.LogisticsCarRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.logistics.bean.po.LogisticsCarRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="car_type" jdbcType="TINYINT" property="carType" />
<result column="license_plate" jdbcType="VARCHAR" property="licensePlate" />
<result column="plate_type" jdbcType="TINYINT" property="plateType" />
<result column="files_id" jdbcType="VARCHAR" property="filesId" />
<result column="car_weight" jdbcType="BIGINT" property="carWeight" />
<result column="in_out" jdbcType="TINYINT" property="inOut" />
<result column="car_brand" jdbcType="VARCHAR" property="carBrand" />
<result column="warehouse_id" jdbcType="BIGINT" property="warehouseId" />
<result column="record_time" jdbcType="BIGINT" property="recordTime" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, car_type, license_plate, plate_type, files_id, car_weight, in_out, car_brand,
warehouse_id, record_time, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_logistics_car_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_car_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_logistics_car_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecordExample">
delete from t_logistics_car_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecord">
insert into t_logistics_car_record (id, car_type, license_plate,
plate_type, files_id, car_weight,
in_out, car_brand, warehouse_id,
record_time, created_at, updated_at,
rec_status)
values (#{id,jdbcType=BIGINT}, #{carType,jdbcType=TINYINT}, #{licensePlate,jdbcType=VARCHAR},
#{plateType,jdbcType=TINYINT}, #{filesId,jdbcType=VARCHAR}, #{carWeight,jdbcType=BIGINT},
#{inOut,jdbcType=TINYINT}, #{carBrand,jdbcType=VARCHAR}, #{warehouseId,jdbcType=BIGINT},
#{recordTime,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
#{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecord">
insert into t_logistics_car_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="carType != null">
car_type,
</if>
<if test="licensePlate != null">
license_plate,
</if>
<if test="plateType != null">
plate_type,
</if>
<if test="filesId != null">
files_id,
</if>
<if test="carWeight != null">
car_weight,
</if>
<if test="inOut != null">
in_out,
</if>
<if test="carBrand != null">
car_brand,
</if>
<if test="warehouseId != null">
warehouse_id,
</if>
<if test="recordTime != null">
record_time,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="carType != null">
#{carType,jdbcType=TINYINT},
</if>
<if test="licensePlate != null">
#{licensePlate,jdbcType=VARCHAR},
</if>
<if test="plateType != null">
#{plateType,jdbcType=TINYINT},
</if>
<if test="filesId != null">
#{filesId,jdbcType=VARCHAR},
</if>
<if test="carWeight != null">
#{carWeight,jdbcType=BIGINT},
</if>
<if test="inOut != null">
#{inOut,jdbcType=TINYINT},
</if>
<if test="carBrand != null">
#{carBrand,jdbcType=VARCHAR},
</if>
<if test="warehouseId != null">
#{warehouseId,jdbcType=BIGINT},
</if>
<if test="recordTime != null">
#{recordTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecordExample" resultType="java.lang.Long">
select count(*) from t_logistics_car_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_car_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.carType != null">
car_type = #{record.carType,jdbcType=TINYINT},
</if>
<if test="record.licensePlate != null">
license_plate = #{record.licensePlate,jdbcType=VARCHAR},
</if>
<if test="record.plateType != null">
plate_type = #{record.plateType,jdbcType=TINYINT},
</if>
<if test="record.filesId != null">
files_id = #{record.filesId,jdbcType=VARCHAR},
</if>
<if test="record.carWeight != null">
car_weight = #{record.carWeight,jdbcType=BIGINT},
</if>
<if test="record.inOut != null">
in_out = #{record.inOut,jdbcType=TINYINT},
</if>
<if test="record.carBrand != null">
car_brand = #{record.carBrand,jdbcType=VARCHAR},
</if>
<if test="record.warehouseId != null">
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
</if>
<if test="record.recordTime != null">
record_time = #{record.recordTime,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_logistics_car_record
set id = #{record.id,jdbcType=BIGINT},
car_type = #{record.carType,jdbcType=TINYINT},
license_plate = #{record.licensePlate,jdbcType=VARCHAR},
plate_type = #{record.plateType,jdbcType=TINYINT},
files_id = #{record.filesId,jdbcType=VARCHAR},
car_weight = #{record.carWeight,jdbcType=BIGINT},
in_out = #{record.inOut,jdbcType=TINYINT},
car_brand = #{record.carBrand,jdbcType=VARCHAR},
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
record_time = #{record.recordTime,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecord">
update t_logistics_car_record
<set>
<if test="carType != null">
car_type = #{carType,jdbcType=TINYINT},
</if>
<if test="licensePlate != null">
license_plate = #{licensePlate,jdbcType=VARCHAR},
</if>
<if test="plateType != null">
plate_type = #{plateType,jdbcType=TINYINT},
</if>
<if test="filesId != null">
files_id = #{filesId,jdbcType=VARCHAR},
</if>
<if test="carWeight != null">
car_weight = #{carWeight,jdbcType=BIGINT},
</if>
<if test="inOut != null">
in_out = #{inOut,jdbcType=TINYINT},
</if>
<if test="carBrand != null">
car_brand = #{carBrand,jdbcType=VARCHAR},
</if>
<if test="warehouseId != null">
warehouse_id = #{warehouseId,jdbcType=BIGINT},
</if>
<if test="recordTime != null">
record_time = #{recordTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.logistics.bean.po.LogisticsCarRecord">
update t_logistics_car_record
set car_type = #{carType,jdbcType=TINYINT},
license_plate = #{licensePlate,jdbcType=VARCHAR},
plate_type = #{plateType,jdbcType=TINYINT},
files_id = #{filesId,jdbcType=VARCHAR},
car_weight = #{carWeight,jdbcType=BIGINT},
in_out = #{inOut,jdbcType=TINYINT},
car_brand = #{carBrand,jdbcType=VARCHAR},
warehouse_id = #{warehouseId,jdbcType=BIGINT},
record_time = #{recordTime,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

276
logistics/src/main/resources/mapper_raw/LogisticsEnvironmentRecordMapper.xml

@ -0,0 +1,276 @@
<?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.ccsens.logistics.persist.mapper.LogisticsEnvironmentRecordMapper">
<resultMap id="BaseResultMap" type="com.ccsens.logistics.bean.po.LogisticsEnvironmentRecord">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="num_value" jdbcType="INTEGER" property="numValue" />
<result column="num_type" jdbcType="TINYINT" property="numType" />
<result column="equipment_id" jdbcType="BIGINT" property="equipmentId" />
<result column="warehouse_id" jdbcType="BIGINT" property="warehouseId" />
<result column="record_time" jdbcType="BIGINT" property="recordTime" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, num_value, num_type, equipment_id, warehouse_id, record_time, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEnvironmentRecordExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_logistics_environment_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_environment_record
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_logistics_environment_record
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEnvironmentRecordExample">
delete from t_logistics_environment_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.logistics.bean.po.LogisticsEnvironmentRecord">
insert into t_logistics_environment_record (id, num_value, num_type,
equipment_id, warehouse_id, record_time,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{numValue,jdbcType=INTEGER}, #{numType,jdbcType=TINYINT},
#{equipmentId,jdbcType=BIGINT}, #{warehouseId,jdbcType=BIGINT}, #{recordTime,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.logistics.bean.po.LogisticsEnvironmentRecord">
insert into t_logistics_environment_record
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="numValue != null">
num_value,
</if>
<if test="numType != null">
num_type,
</if>
<if test="equipmentId != null">
equipment_id,
</if>
<if test="warehouseId != null">
warehouse_id,
</if>
<if test="recordTime != null">
record_time,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="numValue != null">
#{numValue,jdbcType=INTEGER},
</if>
<if test="numType != null">
#{numType,jdbcType=TINYINT},
</if>
<if test="equipmentId != null">
#{equipmentId,jdbcType=BIGINT},
</if>
<if test="warehouseId != null">
#{warehouseId,jdbcType=BIGINT},
</if>
<if test="recordTime != null">
#{recordTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEnvironmentRecordExample" resultType="java.lang.Long">
select count(*) from t_logistics_environment_record
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_environment_record
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.numValue != null">
num_value = #{record.numValue,jdbcType=INTEGER},
</if>
<if test="record.numType != null">
num_type = #{record.numType,jdbcType=TINYINT},
</if>
<if test="record.equipmentId != null">
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
</if>
<if test="record.warehouseId != null">
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
</if>
<if test="record.recordTime != null">
record_time = #{record.recordTime,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_logistics_environment_record
set id = #{record.id,jdbcType=BIGINT},
num_value = #{record.numValue,jdbcType=INTEGER},
num_type = #{record.numType,jdbcType=TINYINT},
equipment_id = #{record.equipmentId,jdbcType=BIGINT},
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
record_time = #{record.recordTime,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.logistics.bean.po.LogisticsEnvironmentRecord">
update t_logistics_environment_record
<set>
<if test="numValue != null">
num_value = #{numValue,jdbcType=INTEGER},
</if>
<if test="numType != null">
num_type = #{numType,jdbcType=TINYINT},
</if>
<if test="equipmentId != null">
equipment_id = #{equipmentId,jdbcType=BIGINT},
</if>
<if test="warehouseId != null">
warehouse_id = #{warehouseId,jdbcType=BIGINT},
</if>
<if test="recordTime != null">
record_time = #{recordTime,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.logistics.bean.po.LogisticsEnvironmentRecord">
update t_logistics_environment_record
set num_value = #{numValue,jdbcType=INTEGER},
num_type = #{numType,jdbcType=TINYINT},
equipment_id = #{equipmentId,jdbcType=BIGINT},
warehouse_id = #{warehouseId,jdbcType=BIGINT},
record_time = #{recordTime,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

259
logistics/src/main/resources/mapper_raw/LogisticsEquipmentMapper.xml

@ -0,0 +1,259 @@
<?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.ccsens.logistics.persist.mapper.LogisticsEquipmentMapper">
<resultMap id="BaseResultMap" type="com.ccsens.logistics.bean.po.LogisticsEquipment">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="equipment_number" jdbcType="INTEGER" property="equipmentNumber" />
<result column="equipment_type" jdbcType="TINYINT" property="equipmentType" />
<result column="warehouse_id" jdbcType="BIGINT" property="warehouseId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name, equipment_number, equipment_type, warehouse_id, created_at, updated_at,
rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipmentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_logistics_equipment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_equipment
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_logistics_equipment
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipmentExample">
delete from t_logistics_equipment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipment">
insert into t_logistics_equipment (id, name, equipment_number,
equipment_type, warehouse_id, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{equipmentNumber,jdbcType=INTEGER},
#{equipmentType,jdbcType=TINYINT}, #{warehouseId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipment">
insert into t_logistics_equipment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="equipmentNumber != null">
equipment_number,
</if>
<if test="equipmentType != null">
equipment_type,
</if>
<if test="warehouseId != null">
warehouse_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="equipmentNumber != null">
#{equipmentNumber,jdbcType=INTEGER},
</if>
<if test="equipmentType != null">
#{equipmentType,jdbcType=TINYINT},
</if>
<if test="warehouseId != null">
#{warehouseId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipmentExample" resultType="java.lang.Long">
select count(*) from t_logistics_equipment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_equipment
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.equipmentNumber != null">
equipment_number = #{record.equipmentNumber,jdbcType=INTEGER},
</if>
<if test="record.equipmentType != null">
equipment_type = #{record.equipmentType,jdbcType=TINYINT},
</if>
<if test="record.warehouseId != null">
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_logistics_equipment
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
equipment_number = #{record.equipmentNumber,jdbcType=INTEGER},
equipment_type = #{record.equipmentType,jdbcType=TINYINT},
warehouse_id = #{record.warehouseId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipment">
update t_logistics_equipment
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="equipmentNumber != null">
equipment_number = #{equipmentNumber,jdbcType=INTEGER},
</if>
<if test="equipmentType != null">
equipment_type = #{equipmentType,jdbcType=TINYINT},
</if>
<if test="warehouseId != null">
warehouse_id = #{warehouseId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.logistics.bean.po.LogisticsEquipment">
update t_logistics_equipment
set name = #{name,jdbcType=VARCHAR},
equipment_number = #{equipmentNumber,jdbcType=INTEGER},
equipment_type = #{equipmentType,jdbcType=TINYINT},
warehouse_id = #{warehouseId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

258
logistics/src/main/resources/mapper_raw/LogisticsParkEquipmentMapper.xml

@ -0,0 +1,258 @@
<?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.ccsens.logistics.persist.mapper.LogisticsParkEquipmentMapper">
<resultMap id="BaseResultMap" type="com.ccsens.logistics.bean.po.LogisticsParkEquipment">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="equipment_number" jdbcType="INTEGER" property="equipmentNumber" />
<result column="equipment_type" jdbcType="TINYINT" property="equipmentType" />
<result column="park_id" jdbcType="BIGINT" property="parkId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name, equipment_number, equipment_type, park_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsParkEquipmentExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_logistics_park_equipment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_park_equipment
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_logistics_park_equipment
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsParkEquipmentExample">
delete from t_logistics_park_equipment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.logistics.bean.po.LogisticsParkEquipment">
insert into t_logistics_park_equipment (id, name, equipment_number,
equipment_type, park_id, created_at,
updated_at, rec_status)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{equipmentNumber,jdbcType=INTEGER},
#{equipmentType,jdbcType=TINYINT}, #{parkId,jdbcType=BIGINT}, #{createdAt,jdbcType=TIMESTAMP},
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT})
</insert>
<insert id="insertSelective" parameterType="com.ccsens.logistics.bean.po.LogisticsParkEquipment">
insert into t_logistics_park_equipment
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="equipmentNumber != null">
equipment_number,
</if>
<if test="equipmentType != null">
equipment_type,
</if>
<if test="parkId != null">
park_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="equipmentNumber != null">
#{equipmentNumber,jdbcType=INTEGER},
</if>
<if test="equipmentType != null">
#{equipmentType,jdbcType=TINYINT},
</if>
<if test="parkId != null">
#{parkId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsParkEquipmentExample" resultType="java.lang.Long">
select count(*) from t_logistics_park_equipment
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_park_equipment
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.equipmentNumber != null">
equipment_number = #{record.equipmentNumber,jdbcType=INTEGER},
</if>
<if test="record.equipmentType != null">
equipment_type = #{record.equipmentType,jdbcType=TINYINT},
</if>
<if test="record.parkId != null">
park_id = #{record.parkId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_logistics_park_equipment
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
equipment_number = #{record.equipmentNumber,jdbcType=INTEGER},
equipment_type = #{record.equipmentType,jdbcType=TINYINT},
park_id = #{record.parkId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.logistics.bean.po.LogisticsParkEquipment">
update t_logistics_park_equipment
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="equipmentNumber != null">
equipment_number = #{equipmentNumber,jdbcType=INTEGER},
</if>
<if test="equipmentType != null">
equipment_type = #{equipmentType,jdbcType=TINYINT},
</if>
<if test="parkId != null">
park_id = #{parkId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.logistics.bean.po.LogisticsParkEquipment">
update t_logistics_park_equipment
set name = #{name,jdbcType=VARCHAR},
equipment_number = #{equipmentNumber,jdbcType=INTEGER},
equipment_type = #{equipmentType,jdbcType=TINYINT},
park_id = #{parkId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

228
logistics/src/main/resources/mapper_raw/LogisticsWarehouseMapper.xml

@ -0,0 +1,228 @@
<?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.ccsens.logistics.persist.mapper.LogisticsWarehouseMapper">
<resultMap id="BaseResultMap" type="com.ccsens.logistics.bean.po.LogisticsWarehouse">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="park_id" jdbcType="BIGINT" property="parkId" />
<result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
<result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
<result column="rec_status" jdbcType="TINYINT" property="recStatus" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, name, park_id, created_at, updated_at, rec_status
</sql>
<select id="selectByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsWarehouseExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
<include refid="Base_Column_List" />
from t_logistics_warehouse
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from t_logistics_warehouse
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from t_logistics_warehouse
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsWarehouseExample">
delete from t_logistics_warehouse
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.ccsens.logistics.bean.po.LogisticsWarehouse">
insert into t_logistics_warehouse (id, name, park_id,
created_at, updated_at, rec_status
)
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{parkId,jdbcType=BIGINT},
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}
)
</insert>
<insert id="insertSelective" parameterType="com.ccsens.logistics.bean.po.LogisticsWarehouse">
insert into t_logistics_warehouse
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="parkId != null">
park_id,
</if>
<if test="createdAt != null">
created_at,
</if>
<if test="updatedAt != null">
updated_at,
</if>
<if test="recStatus != null">
rec_status,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=BIGINT},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="parkId != null">
#{parkId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
#{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
#{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
#{recStatus,jdbcType=TINYINT},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.ccsens.logistics.bean.po.LogisticsWarehouseExample" resultType="java.lang.Long">
select count(*) from t_logistics_warehouse
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update t_logistics_warehouse
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.name != null">
name = #{record.name,jdbcType=VARCHAR},
</if>
<if test="record.parkId != null">
park_id = #{record.parkId,jdbcType=BIGINT},
</if>
<if test="record.createdAt != null">
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
</if>
<if test="record.updatedAt != null">
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="record.recStatus != null">
rec_status = #{record.recStatus,jdbcType=TINYINT},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update t_logistics_warehouse
set id = #{record.id,jdbcType=BIGINT},
name = #{record.name,jdbcType=VARCHAR},
park_id = #{record.parkId,jdbcType=BIGINT},
created_at = #{record.createdAt,jdbcType=TIMESTAMP},
updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
rec_status = #{record.recStatus,jdbcType=TINYINT}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.ccsens.logistics.bean.po.LogisticsWarehouse">
update t_logistics_warehouse
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="parkId != null">
park_id = #{parkId,jdbcType=BIGINT},
</if>
<if test="createdAt != null">
created_at = #{createdAt,jdbcType=TIMESTAMP},
</if>
<if test="updatedAt != null">
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
</if>
<if test="recStatus != null">
rec_status = #{recStatus,jdbcType=TINYINT},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.ccsens.logistics.bean.po.LogisticsWarehouse">
update t_logistics_warehouse
set name = #{name,jdbcType=VARCHAR},
park_id = #{parkId,jdbcType=BIGINT},
created_at = #{createdAt,jdbcType=TIMESTAMP},
updated_at = #{updatedAt,jdbcType=TIMESTAMP},
rec_status = #{recStatus,jdbcType=TINYINT}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>

62
logistics/src/main/resources/mybatis/mybatis-config.xml

@ -0,0 +1,62 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE configuration
PUBLIC "-//mybatis.org//DTD Config 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-config.dtd">
<configuration>
<!-- 全局参数 -->
<settings>
<!-- 打印SQL语句 -->
<setting name="logImpl" value="STDOUT_LOGGING" />
<!-- 使全局的映射器启用或禁用缓存。 -->
<setting name="cacheEnabled" value="true"/>
<!-- 全局启用或禁用延迟加载。当禁用时,所有关联对象都会即时加载。 -->
<setting name="lazyLoadingEnabled" value="true"/>
<!-- 当启用时,有延迟加载属性的对象在被调用时将会完全加载任意属性。否则,每种属性将会按需要加载。 -->
<setting name="aggressiveLazyLoading" value="true"/>
<!-- 是否允许单条sql 返回多个数据集 (取决于驱动的兼容性) default:true -->
<setting name="multipleResultSetsEnabled" value="true"/>
<!-- 是否可以使用列的别名 (取决于驱动的兼容性) default:true -->
<setting name="useColumnLabel" value="true"/>
<!-- 允许JDBC 生成主键。需要驱动器支持。如果设为了true,这个设置将强制使用被生成的主键,有一些驱动器不兼容不过仍然可以执行。 default:false -->
<setting name="useGeneratedKeys" value="true"/>
<!-- 指定 MyBatis 如何自动映射 数据基表的列 NONE:不隐射 PARTIAL:部分 FULL:全部 -->
<setting name="autoMappingBehavior" value="PARTIAL"/>
<!-- 这是默认的执行类型 (SIMPLE: 简单; REUSE: 执行器可能重复使用prepared statements语句;BATCH: 执行器可以重复执行语句和批量更新) -->
<setting name="defaultExecutorType" value="SIMPLE"/>
<!-- 使用驼峰命名法转换字段。 -->
<setting name="mapUnderscoreToCamelCase" value="true"/>
<!-- 设置本地缓存范围 session:就会有数据的共享 statement:语句范围 (这样就不会有数据的共享 ) defalut:session -->
<setting name="localCacheScope" value="SESSION"/>
<!-- 设置但JDBC类型为空时,某些驱动程序 要指定值,default:OTHER,插入空值时不需要指定类型 -->
<setting name="jdbcTypeForNull" value="NULL"/>
</settings>
<typeAliases>
<typeAlias alias="Integer" type="java.lang.Integer" />
<typeAlias alias="Long" type="java.lang.Long" />
<typeAlias alias="HashMap" type="java.util.HashMap" />
<typeAlias alias="LinkedHashMap" type="java.util.LinkedHashMap" />
<typeAlias alias="ArrayList" type="java.util.ArrayList" />
<typeAlias alias="LinkedList" type="java.util.LinkedList" />
<typeAlias alias="String" type="java.lang.String" />
</typeAliases>
<plugins>
<!-- com.github.pagehelper为PageHelper类所在包名 -->
<plugin interceptor="com.github.pagehelper.PageHelper">
<property name="dialect" value="mysql"/>
<!-- 该参数默认为false -->
<!-- 设置为true时,会将RowBounds第一个参数offset当成pageNum页码使用 -->
<!-- 和startPage中的pageNum效果一样-->
<property name="offsetAsPageNum" value="false"/>
<!-- 该参数默认为false -->
<!-- 设置为true时,使用RowBounds分页会进行count查询 -->
<property name="rowBoundsWithCount" value="false"/>
<property name="pageSizeZero" value="true"/>
<property name="reasonable" value="false"/>
<property name="supportMethodsArguments" value="false"/>
<property name="returnPageInfo" value="none"/>
</plugin>
</plugins>
</configuration>

1
pom.xml

@ -21,6 +21,7 @@
<!-- <module>ct</module>--> <!-- <module>ct</module>-->
<module>tcm</module> <module>tcm</module>
<!-- <module>ocr</module>--> <!-- <module>ocr</module>-->
<module>logistics</module>
</modules> </modules>

4
tall/src/main/resources/application.yml

@ -1,5 +1,5 @@
spring: spring:
profiles: profiles:
active: dev active: test
include: util-dev,common include: util-test,common

Loading…
Cancel
Save