60 changed files with 7129 additions and 19 deletions
@ -0,0 +1,73 @@ |
|||||
|
<?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>ct</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> |
||||
|
|
||||
|
|
||||
|
</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.ct.CtApplication</mainClass> |
||||
|
<!--<skip>true</skip>--> |
||||
|
</configuration> |
||||
|
<executions> |
||||
|
<execution> |
||||
|
<goals> |
||||
|
<goal>repackage</goal> |
||||
|
</goals> |
||||
|
</execution> |
||||
|
</executions> |
||||
|
</plugin> |
||||
|
|
||||
|
</plugins> |
||||
|
</build> |
||||
|
|
||||
|
</project> |
@ -0,0 +1,24 @@ |
|||||
|
package com.ccsens.ct; |
||||
|
|
||||
|
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.ct.persist.*"}) |
||||
|
@ServletComponentScan |
||||
|
@EnableAsync |
||||
|
//开启断路器功能
|
||||
|
@EnableCircuitBreaker |
||||
|
@EnableFeignClients(basePackages = "com.ccsens.cloudutil.feign") |
||||
|
@SpringBootApplication(scanBasePackages = "com.ccsens") |
||||
|
public class CtApplication { |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
SpringApplication.run(CtApplication.class, args); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
package com.ccsens.ct.api; |
||||
|
|
||||
|
import com.ccsens.cloudutil.annotation.MustLogin; |
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.vo.BusinessVo; |
||||
|
import com.ccsens.ct.service.IBusinessService; |
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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; |
||||
|
@Slf4j |
||||
|
@Api(tags = "商户相关" , description = "") |
||||
|
@RestController |
||||
|
@RequestMapping("/business") |
||||
|
public class BusinessController { |
||||
|
@Autowired |
||||
|
private IBusinessService businessService; |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "上传商户信息", notes = "") |
||||
|
@RequestMapping(value = "upload", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<BusinessVo.BusinessInfo> uploadBusiness(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessInfo> params) throws Exception { |
||||
|
log.info("上传商户信息:{}",params); |
||||
|
BusinessVo.BusinessInfo businessInfo = businessService.uploadBusiness(params); |
||||
|
return JsonResponse.newInstance().ok(businessInfo); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "查询商户信息", notes = "") |
||||
|
@RequestMapping(value = "info", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<BusinessVo.BusinessInfo> selectBusiness(@ApiParam @Validated @RequestBody QueryDto params) throws Exception { |
||||
|
log.info("查询商户信息:{}",params); |
||||
|
BusinessVo.BusinessInfo businessInfo = businessService.selectBusiness(params); |
||||
|
return JsonResponse.newInstance().ok(businessInfo); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "修改商户信息", notes = "") |
||||
|
@RequestMapping(value = "update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<BusinessVo.BusinessInfo> updateBusiness(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.UpdateBusiness> params) throws Exception { |
||||
|
log.info("修改商户信息:{}",params); |
||||
|
BusinessVo.BusinessInfo businessInfo = businessService.updateBusiness(params); |
||||
|
|
||||
|
return JsonResponse.newInstance().ok(businessInfo); |
||||
|
} |
||||
|
} |
@ -0,0 +1,51 @@ |
|||||
|
package com.ccsens.ct.api; |
||||
|
|
||||
|
import com.ccsens.cloudutil.annotation.MustLogin; |
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.dto.ClockDto; |
||||
|
import com.ccsens.ct.bean.dto.SiteDto; |
||||
|
import com.ccsens.ct.bean.vo.ClockVo; |
||||
|
import com.ccsens.ct.bean.vo.SiteVo; |
||||
|
import com.ccsens.ct.service.IClockService; |
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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 java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Api(tags = "打卡相关" , description = "") |
||||
|
@RestController |
||||
|
@RequestMapping("/clock") |
||||
|
public class ClockController { |
||||
|
@Autowired |
||||
|
private IClockService clockService; |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "打卡", notes = "") |
||||
|
@RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse clockIn(@ApiParam @Validated @RequestBody QueryDto<ClockDto.ClockIn> params) throws Exception { |
||||
|
log.info("打卡:{}",params); |
||||
|
clockService.clockIn(params); |
||||
|
return JsonResponse.newInstance().ok(); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "统计", notes = "") |
||||
|
@RequestMapping(value = "statistics", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<List<ClockVo.ClockStatistics>> clockStatistics(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessId> params) throws Exception { |
||||
|
log.info("打卡:{}",params); |
||||
|
List<ClockVo.ClockStatistics> clockStatisticsList = clockService.clockStatistics(params.getParam().getId(),params.getUserId()); |
||||
|
return JsonResponse.newInstance().ok(clockStatisticsList); |
||||
|
} |
||||
|
|
||||
|
} |
File diff suppressed because one or more lines are too long
@ -0,0 +1,79 @@ |
|||||
|
package com.ccsens.ct.api; |
||||
|
|
||||
|
import com.ccsens.cloudutil.annotation.MustLogin; |
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.dto.SiteDto; |
||||
|
import com.ccsens.ct.bean.po.Site; |
||||
|
import com.ccsens.ct.bean.vo.BusinessVo; |
||||
|
import com.ccsens.ct.bean.vo.SiteVo; |
||||
|
import com.ccsens.ct.service.ISiteService; |
||||
|
import com.ccsens.util.JsonResponse; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
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 java.util.List; |
||||
|
|
||||
|
@Slf4j |
||||
|
@Api(tags = "场所相关" , description = "") |
||||
|
@RestController |
||||
|
@RequestMapping("/sites") |
||||
|
public class SiteController { |
||||
|
@Autowired |
||||
|
private ISiteService siteService; |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "添加场所", notes = "") |
||||
|
@RequestMapping(value = "", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<SiteVo.SiteInfoVo> uploadSite(@ApiParam @Validated @RequestBody QueryDto<SiteDto.SiteInfoDto> params) throws Exception { |
||||
|
log.info("添加场所:{}",params); |
||||
|
SiteVo.SiteInfoVo siteInfoVo = siteService.addSite(params); |
||||
|
return JsonResponse.newInstance().ok(siteInfoVo); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "透过id查看单个场所的信息", notes = "") |
||||
|
@RequestMapping(value = "siteId", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<SiteVo.SiteInfo> selectSite(@ApiParam @Validated @RequestBody QueryDto<SiteDto.SiteId> params) throws Exception { |
||||
|
log.info("透过id查看单个场所的信息:{}",params); |
||||
|
SiteVo.SiteInfo siteInfo = siteService.selectSiteById(params.getParam().getId()); |
||||
|
return JsonResponse.newInstance().ok(siteInfo); |
||||
|
} |
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "修改场所信息", notes = "") |
||||
|
@RequestMapping(value = "update", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<SiteVo.SiteInfoVo> updateSiteInfo(@ApiParam @Validated @RequestBody QueryDto<SiteDto.UpdateSite> params) throws Exception { |
||||
|
log.info("修改场所信息:{}",params); |
||||
|
SiteVo.SiteInfo siteInfoVo = siteService.updateSiteInfo(params); |
||||
|
return JsonResponse.newInstance().ok(siteInfoVo); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
@MustLogin |
||||
|
@ApiOperation(value = "透过商户id查看所有场所的信息", notes = "") |
||||
|
@RequestMapping(value = "siteAll", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"}) |
||||
|
public JsonResponse<SiteVo.SiteInfoVo> selectSiteAllByBusinessId(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessId> params) throws Exception { |
||||
|
log.info("透过商户id查看所有场所的信息:{}",params); |
||||
|
SiteVo.SiteInfoVo siteInfoVo = siteService.selectSiteAllByBusinessId(params); |
||||
|
return JsonResponse.newInstance().ok(siteInfoVo); |
||||
|
} |
||||
|
|
||||
|
// @MustLogin
|
||||
|
// @ApiOperation(value = "下载二维码", notes = "")
|
||||
|
// @RequestMapping(value = "qrcode", method = RequestMethod.POST, produces = {"application/json;charset=UTF-8"})
|
||||
|
// public JsonResponse<String> downloadQrCode(@ApiParam @Validated @RequestBody QueryDto<BusinessDto.BusinessId> params) throws Exception {
|
||||
|
// log.info("下载二维码:{}",params);
|
||||
|
// String path = siteService.downloadQrCode(params.getParam().getId());
|
||||
|
// return JsonResponse.newInstance().ok(path);
|
||||
|
// }
|
||||
|
} |
@ -0,0 +1,57 @@ |
|||||
|
package com.ccsens.ct.bean.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class BusinessDto { |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("上传商户信息") |
||||
|
public static class BusinessInfo{ |
||||
|
@ApiModelProperty("商户名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("详细地址") |
||||
|
private String address; |
||||
|
@ApiModelProperty("申请人姓名") |
||||
|
private String applicantName; |
||||
|
@ApiModelProperty("身份证号") |
||||
|
private String idCard; |
||||
|
@ApiModelProperty("手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("营业执照") |
||||
|
private String businessLicense; |
||||
|
@ApiModelProperty("公众号二维码") |
||||
|
private String qrCode; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("商户id") |
||||
|
public static class BusinessId{ |
||||
|
@ApiModelProperty("商户id") |
||||
|
private Long id; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("修改商户信息") |
||||
|
public static class UpdateBusiness{ |
||||
|
@ApiModelProperty("商户id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("商户名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("详细地址") |
||||
|
private String address; |
||||
|
@ApiModelProperty("申请人姓名") |
||||
|
private String applicantName; |
||||
|
@ApiModelProperty("身份证号") |
||||
|
private String idCard; |
||||
|
@ApiModelProperty("手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("营业执照") |
||||
|
private String businessLicense; |
||||
|
@ApiModelProperty("公众号二维码") |
||||
|
private String qrCode; |
||||
|
} |
||||
|
} |
@ -0,0 +1,22 @@ |
|||||
|
package com.ccsens.ct.bean.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
public class ClockDto { |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("打卡") |
||||
|
public static class ClockIn{ |
||||
|
@ApiModelProperty("二维码的id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("经度") |
||||
|
private BigDecimal longitude; |
||||
|
@ApiModelProperty("纬度") |
||||
|
private BigDecimal latitude; |
||||
|
} |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.ccsens.ct.bean.dto; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import javax.validation.constraints.NotEmpty; |
||||
|
import javax.validation.constraints.NotNull; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class SiteDto { |
||||
|
@Data |
||||
|
@ApiModel("添加场所") |
||||
|
public static class SiteInfoDto{ |
||||
|
@ApiModelProperty("所属商户id") |
||||
|
@NotNull(message = "商户id不能为空") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("场所信息") |
||||
|
private List<SiteInfo> siteInfo; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("添加场所") |
||||
|
public static class SiteInfo{ |
||||
|
@ApiModelProperty("场所名") |
||||
|
@NotEmpty(message = "场所名不能为空") |
||||
|
private String siteName; |
||||
|
@ApiModelProperty("经度") |
||||
|
private BigDecimal longitude; |
||||
|
@ApiModelProperty("纬度") |
||||
|
private BigDecimal latitude; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("修改场所信息") |
||||
|
public static class UpdateSite{ |
||||
|
@ApiModelProperty("场所id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("场所名") |
||||
|
private String siteName; |
||||
|
@ApiModelProperty("经度") |
||||
|
private BigDecimal longitude; |
||||
|
@ApiModelProperty("纬度") |
||||
|
private BigDecimal latitude; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("场所id") |
||||
|
public static class SiteId{ |
||||
|
@ApiModelProperty("场所id") |
||||
|
private Long id; |
||||
|
} |
||||
|
} |
@ -0,0 +1,161 @@ |
|||||
|
package com.ccsens.ct.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class Business implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private String name; |
||||
|
|
||||
|
private String address; |
||||
|
|
||||
|
private String applicantName; |
||||
|
|
||||
|
private String applicantIdCard; |
||||
|
|
||||
|
private String applicantPhone; |
||||
|
|
||||
|
private String businessLicense; |
||||
|
|
||||
|
private String qrCord; |
||||
|
|
||||
|
private Long userId; |
||||
|
|
||||
|
private Byte passed; |
||||
|
|
||||
|
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 String getAddress() { |
||||
|
return address; |
||||
|
} |
||||
|
|
||||
|
public void setAddress(String address) { |
||||
|
this.address = address == null ? null : address.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getApplicantName() { |
||||
|
return applicantName; |
||||
|
} |
||||
|
|
||||
|
public void setApplicantName(String applicantName) { |
||||
|
this.applicantName = applicantName == null ? null : applicantName.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getApplicantIdCard() { |
||||
|
return applicantIdCard; |
||||
|
} |
||||
|
|
||||
|
public void setApplicantIdCard(String applicantIdCard) { |
||||
|
this.applicantIdCard = applicantIdCard == null ? null : applicantIdCard.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getApplicantPhone() { |
||||
|
return applicantPhone; |
||||
|
} |
||||
|
|
||||
|
public void setApplicantPhone(String applicantPhone) { |
||||
|
this.applicantPhone = applicantPhone == null ? null : applicantPhone.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getBusinessLicense() { |
||||
|
return businessLicense; |
||||
|
} |
||||
|
|
||||
|
public void setBusinessLicense(String businessLicense) { |
||||
|
this.businessLicense = businessLicense == null ? null : businessLicense.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getQrCord() { |
||||
|
return qrCord; |
||||
|
} |
||||
|
|
||||
|
public void setQrCord(String qrCord) { |
||||
|
this.qrCord = qrCord == null ? null : qrCord.trim(); |
||||
|
} |
||||
|
|
||||
|
public Long getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Long userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
public Byte getPassed() { |
||||
|
return passed; |
||||
|
} |
||||
|
|
||||
|
public void setPassed(Byte passed) { |
||||
|
this.passed = passed; |
||||
|
} |
||||
|
|
||||
|
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(", address=").append(address); |
||||
|
sb.append(", applicantName=").append(applicantName); |
||||
|
sb.append(", applicantIdCard=").append(applicantIdCard); |
||||
|
sb.append(", applicantPhone=").append(applicantPhone); |
||||
|
sb.append(", businessLicense=").append(businessLicense); |
||||
|
sb.append(", qrCord=").append(qrCord); |
||||
|
sb.append(", userId=").append(userId); |
||||
|
sb.append(", passed=").append(passed); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
@ -0,0 +1,118 @@ |
|||||
|
package com.ccsens.ct.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class Site implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private Long businessId; |
||||
|
|
||||
|
private String siteName; |
||||
|
|
||||
|
private String siteCode; |
||||
|
|
||||
|
private BigDecimal longitude; |
||||
|
|
||||
|
private BigDecimal latitude; |
||||
|
|
||||
|
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 Long getBusinessId() { |
||||
|
return businessId; |
||||
|
} |
||||
|
|
||||
|
public void setBusinessId(Long businessId) { |
||||
|
this.businessId = businessId; |
||||
|
} |
||||
|
|
||||
|
public String getSiteName() { |
||||
|
return siteName; |
||||
|
} |
||||
|
|
||||
|
public void setSiteName(String siteName) { |
||||
|
this.siteName = siteName == null ? null : siteName.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getSiteCode() { |
||||
|
return siteCode; |
||||
|
} |
||||
|
|
||||
|
public void setSiteCode(String siteCode) { |
||||
|
this.siteCode = siteCode == null ? null : siteCode.trim(); |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getLongitude() { |
||||
|
return longitude; |
||||
|
} |
||||
|
|
||||
|
public void setLongitude(BigDecimal longitude) { |
||||
|
this.longitude = longitude; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getLatitude() { |
||||
|
return latitude; |
||||
|
} |
||||
|
|
||||
|
public void setLatitude(BigDecimal latitude) { |
||||
|
this.latitude = latitude; |
||||
|
} |
||||
|
|
||||
|
public 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(", businessId=").append(businessId); |
||||
|
sb.append(", siteName=").append(siteName); |
||||
|
sb.append(", siteCode=").append(siteCode); |
||||
|
sb.append(", longitude=").append(longitude); |
||||
|
sb.append(", latitude=").append(latitude); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,118 @@ |
|||||
|
package com.ccsens.ct.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class SiteClockIn implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private Long qrcodeId; |
||||
|
|
||||
|
private Long time; |
||||
|
|
||||
|
private BigDecimal longitude; |
||||
|
|
||||
|
private BigDecimal latitude; |
||||
|
|
||||
|
private Long userId; |
||||
|
|
||||
|
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 Long getQrcodeId() { |
||||
|
return qrcodeId; |
||||
|
} |
||||
|
|
||||
|
public void setQrcodeId(Long qrcodeId) { |
||||
|
this.qrcodeId = qrcodeId; |
||||
|
} |
||||
|
|
||||
|
public Long getTime() { |
||||
|
return time; |
||||
|
} |
||||
|
|
||||
|
public void setTime(Long time) { |
||||
|
this.time = time; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getLongitude() { |
||||
|
return longitude; |
||||
|
} |
||||
|
|
||||
|
public void setLongitude(BigDecimal longitude) { |
||||
|
this.longitude = longitude; |
||||
|
} |
||||
|
|
||||
|
public BigDecimal getLatitude() { |
||||
|
return latitude; |
||||
|
} |
||||
|
|
||||
|
public void setLatitude(BigDecimal latitude) { |
||||
|
this.latitude = latitude; |
||||
|
} |
||||
|
|
||||
|
public Long getUserId() { |
||||
|
return userId; |
||||
|
} |
||||
|
|
||||
|
public void setUserId(Long userId) { |
||||
|
this.userId = userId; |
||||
|
} |
||||
|
|
||||
|
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(", qrcodeId=").append(qrcodeId); |
||||
|
sb.append(", time=").append(time); |
||||
|
sb.append(", longitude=").append(longitude); |
||||
|
sb.append(", latitude=").append(latitude); |
||||
|
sb.append(", userId=").append(userId); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,742 @@ |
|||||
|
package com.ccsens.ct.bean.po; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class SiteClockInExample { |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
protected boolean distinct; |
||||
|
|
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
public SiteClockInExample() { |
||||
|
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 andQrcodeIdIsNull() { |
||||
|
addCriterion("qrcode_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdIsNotNull() { |
||||
|
addCriterion("qrcode_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdEqualTo(Long value) { |
||||
|
addCriterion("qrcode_id =", value, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdNotEqualTo(Long value) { |
||||
|
addCriterion("qrcode_id <>", value, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdGreaterThan(Long value) { |
||||
|
addCriterion("qrcode_id >", value, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("qrcode_id >=", value, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdLessThan(Long value) { |
||||
|
addCriterion("qrcode_id <", value, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("qrcode_id <=", value, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdIn(List<Long> values) { |
||||
|
addCriterion("qrcode_id in", values, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdNotIn(List<Long> values) { |
||||
|
addCriterion("qrcode_id not in", values, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("qrcode_id between", value1, value2, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodeIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("qrcode_id not between", value1, value2, "qrcodeId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeIsNull() { |
||||
|
addCriterion("time is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeIsNotNull() { |
||||
|
addCriterion("time is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeEqualTo(Long value) { |
||||
|
addCriterion("time =", value, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeNotEqualTo(Long value) { |
||||
|
addCriterion("time <>", value, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeGreaterThan(Long value) { |
||||
|
addCriterion("time >", value, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("time >=", value, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeLessThan(Long value) { |
||||
|
addCriterion("time <", value, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("time <=", value, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeIn(List<Long> values) { |
||||
|
addCriterion("time in", values, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeNotIn(List<Long> values) { |
||||
|
addCriterion("time not in", values, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeBetween(Long value1, Long value2) { |
||||
|
addCriterion("time between", value1, value2, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andTimeNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("time not between", value1, value2, "time"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeIsNull() { |
||||
|
addCriterion("longitude is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeIsNotNull() { |
||||
|
addCriterion("longitude is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeEqualTo(BigDecimal value) { |
||||
|
addCriterion("longitude =", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeNotEqualTo(BigDecimal value) { |
||||
|
addCriterion("longitude <>", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeGreaterThan(BigDecimal value) { |
||||
|
addCriterion("longitude >", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeGreaterThanOrEqualTo(BigDecimal value) { |
||||
|
addCriterion("longitude >=", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeLessThan(BigDecimal value) { |
||||
|
addCriterion("longitude <", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeLessThanOrEqualTo(BigDecimal value) { |
||||
|
addCriterion("longitude <=", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeIn(List<BigDecimal> values) { |
||||
|
addCriterion("longitude in", values, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeNotIn(List<BigDecimal> values) { |
||||
|
addCriterion("longitude not in", values, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeBetween(BigDecimal value1, BigDecimal value2) { |
||||
|
addCriterion("longitude between", value1, value2, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeNotBetween(BigDecimal value1, BigDecimal value2) { |
||||
|
addCriterion("longitude not between", value1, value2, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeIsNull() { |
||||
|
addCriterion("latitude is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeIsNotNull() { |
||||
|
addCriterion("latitude is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeEqualTo(BigDecimal value) { |
||||
|
addCriterion("latitude =", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeNotEqualTo(BigDecimal value) { |
||||
|
addCriterion("latitude <>", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeGreaterThan(BigDecimal value) { |
||||
|
addCriterion("latitude >", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeGreaterThanOrEqualTo(BigDecimal value) { |
||||
|
addCriterion("latitude >=", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeLessThan(BigDecimal value) { |
||||
|
addCriterion("latitude <", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeLessThanOrEqualTo(BigDecimal value) { |
||||
|
addCriterion("latitude <=", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeIn(List<BigDecimal> values) { |
||||
|
addCriterion("latitude in", values, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeNotIn(List<BigDecimal> values) { |
||||
|
addCriterion("latitude not in", values, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeBetween(BigDecimal value1, BigDecimal value2) { |
||||
|
addCriterion("latitude between", value1, value2, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeNotBetween(BigDecimal value1, BigDecimal value2) { |
||||
|
addCriterion("latitude not between", value1, value2, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNull() { |
||||
|
addCriterion("user_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIsNotNull() { |
||||
|
addCriterion("user_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdEqualTo(Long value) { |
||||
|
addCriterion("user_id =", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotEqualTo(Long value) { |
||||
|
addCriterion("user_id <>", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThan(Long value) { |
||||
|
addCriterion("user_id >", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id >=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThan(Long value) { |
||||
|
addCriterion("user_id <", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("user_id <=", value, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdIn(List<Long> values) { |
||||
|
addCriterion("user_id in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotIn(List<Long> values) { |
||||
|
addCriterion("user_id not in", values, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id between", value1, value2, "userId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andUserIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("user_id not between", value1, value2, "userId"); |
||||
|
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); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,762 @@ |
|||||
|
package com.ccsens.ct.bean.po; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class SiteExample { |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
protected boolean distinct; |
||||
|
|
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
public SiteExample() { |
||||
|
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 andBusinessIdIsNull() { |
||||
|
addCriterion("business_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdIsNotNull() { |
||||
|
addCriterion("business_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdEqualTo(Long value) { |
||||
|
addCriterion("business_id =", value, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdNotEqualTo(Long value) { |
||||
|
addCriterion("business_id <>", value, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdGreaterThan(Long value) { |
||||
|
addCriterion("business_id >", value, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("business_id >=", value, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdLessThan(Long value) { |
||||
|
addCriterion("business_id <", value, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("business_id <=", value, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdIn(List<Long> values) { |
||||
|
addCriterion("business_id in", values, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdNotIn(List<Long> values) { |
||||
|
addCriterion("business_id not in", values, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("business_id between", value1, value2, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBusinessIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("business_id not between", value1, value2, "businessId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameIsNull() { |
||||
|
addCriterion("site_name is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameIsNotNull() { |
||||
|
addCriterion("site_name is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameEqualTo(String value) { |
||||
|
addCriterion("site_name =", value, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameNotEqualTo(String value) { |
||||
|
addCriterion("site_name <>", value, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameGreaterThan(String value) { |
||||
|
addCriterion("site_name >", value, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("site_name >=", value, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameLessThan(String value) { |
||||
|
addCriterion("site_name <", value, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameLessThanOrEqualTo(String value) { |
||||
|
addCriterion("site_name <=", value, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameLike(String value) { |
||||
|
addCriterion("site_name like", value, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameNotLike(String value) { |
||||
|
addCriterion("site_name not like", value, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameIn(List<String> values) { |
||||
|
addCriterion("site_name in", values, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameNotIn(List<String> values) { |
||||
|
addCriterion("site_name not in", values, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameBetween(String value1, String value2) { |
||||
|
addCriterion("site_name between", value1, value2, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteNameNotBetween(String value1, String value2) { |
||||
|
addCriterion("site_name not between", value1, value2, "siteName"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeIsNull() { |
||||
|
addCriterion("site_code is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeIsNotNull() { |
||||
|
addCriterion("site_code is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeEqualTo(String value) { |
||||
|
addCriterion("site_code =", value, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeNotEqualTo(String value) { |
||||
|
addCriterion("site_code <>", value, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeGreaterThan(String value) { |
||||
|
addCriterion("site_code >", value, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("site_code >=", value, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeLessThan(String value) { |
||||
|
addCriterion("site_code <", value, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeLessThanOrEqualTo(String value) { |
||||
|
addCriterion("site_code <=", value, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeLike(String value) { |
||||
|
addCriterion("site_code like", value, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeNotLike(String value) { |
||||
|
addCriterion("site_code not like", value, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeIn(List<String> values) { |
||||
|
addCriterion("site_code in", values, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeNotIn(List<String> values) { |
||||
|
addCriterion("site_code not in", values, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeBetween(String value1, String value2) { |
||||
|
addCriterion("site_code between", value1, value2, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteCodeNotBetween(String value1, String value2) { |
||||
|
addCriterion("site_code not between", value1, value2, "siteCode"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeIsNull() { |
||||
|
addCriterion("longitude is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeIsNotNull() { |
||||
|
addCriterion("longitude is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeEqualTo(BigDecimal value) { |
||||
|
addCriterion("longitude =", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeNotEqualTo(BigDecimal value) { |
||||
|
addCriterion("longitude <>", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeGreaterThan(BigDecimal value) { |
||||
|
addCriterion("longitude >", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeGreaterThanOrEqualTo(BigDecimal value) { |
||||
|
addCriterion("longitude >=", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeLessThan(BigDecimal value) { |
||||
|
addCriterion("longitude <", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeLessThanOrEqualTo(BigDecimal value) { |
||||
|
addCriterion("longitude <=", value, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeIn(List<BigDecimal> values) { |
||||
|
addCriterion("longitude in", values, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeNotIn(List<BigDecimal> values) { |
||||
|
addCriterion("longitude not in", values, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeBetween(BigDecimal value1, BigDecimal value2) { |
||||
|
addCriterion("longitude between", value1, value2, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLongitudeNotBetween(BigDecimal value1, BigDecimal value2) { |
||||
|
addCriterion("longitude not between", value1, value2, "longitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeIsNull() { |
||||
|
addCriterion("latitude is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeIsNotNull() { |
||||
|
addCriterion("latitude is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeEqualTo(BigDecimal value) { |
||||
|
addCriterion("latitude =", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeNotEqualTo(BigDecimal value) { |
||||
|
addCriterion("latitude <>", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeGreaterThan(BigDecimal value) { |
||||
|
addCriterion("latitude >", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeGreaterThanOrEqualTo(BigDecimal value) { |
||||
|
addCriterion("latitude >=", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeLessThan(BigDecimal value) { |
||||
|
addCriterion("latitude <", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeLessThanOrEqualTo(BigDecimal value) { |
||||
|
addCriterion("latitude <=", value, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeIn(List<BigDecimal> values) { |
||||
|
addCriterion("latitude in", values, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeNotIn(List<BigDecimal> values) { |
||||
|
addCriterion("latitude not in", values, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeBetween(BigDecimal value1, BigDecimal value2) { |
||||
|
addCriterion("latitude between", value1, value2, "latitude"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andLatitudeNotBetween(BigDecimal value1, BigDecimal value2) { |
||||
|
addCriterion("latitude not between", value1, value2, "latitude"); |
||||
|
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); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,106 @@ |
|||||
|
package com.ccsens.ct.bean.po; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
public class SiteQrcode implements Serializable { |
||||
|
private Long id; |
||||
|
|
||||
|
private Long siteId; |
||||
|
|
||||
|
private Byte outOrIn; |
||||
|
|
||||
|
private String qrcodePath; |
||||
|
|
||||
|
private String bigQrcodePath; |
||||
|
|
||||
|
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 Long getSiteId() { |
||||
|
return siteId; |
||||
|
} |
||||
|
|
||||
|
public void setSiteId(Long siteId) { |
||||
|
this.siteId = siteId; |
||||
|
} |
||||
|
|
||||
|
public Byte getOutOrIn() { |
||||
|
return outOrIn; |
||||
|
} |
||||
|
|
||||
|
public void setOutOrIn(Byte outOrIn) { |
||||
|
this.outOrIn = outOrIn; |
||||
|
} |
||||
|
|
||||
|
public String getQrcodePath() { |
||||
|
return qrcodePath; |
||||
|
} |
||||
|
|
||||
|
public void setQrcodePath(String qrcodePath) { |
||||
|
this.qrcodePath = qrcodePath == null ? null : qrcodePath.trim(); |
||||
|
} |
||||
|
|
||||
|
public String getBigQrcodePath() { |
||||
|
return bigQrcodePath; |
||||
|
} |
||||
|
|
||||
|
public void setBigQrcodePath(String bigQrcodePath) { |
||||
|
this.bigQrcodePath = bigQrcodePath == null ? null : bigQrcodePath.trim(); |
||||
|
} |
||||
|
|
||||
|
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(", siteId=").append(siteId); |
||||
|
sb.append(", outOrIn=").append(outOrIn); |
||||
|
sb.append(", qrcodePath=").append(qrcodePath); |
||||
|
sb.append(", bigQrcodePath=").append(bigQrcodePath); |
||||
|
sb.append(", createdAt=").append(createdAt); |
||||
|
sb.append(", updatedAt=").append(updatedAt); |
||||
|
sb.append(", recStatus=").append(recStatus); |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
} |
@ -0,0 +1,701 @@ |
|||||
|
package com.ccsens.ct.bean.po; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public class SiteQrcodeExample { |
||||
|
protected String orderByClause; |
||||
|
|
||||
|
protected boolean distinct; |
||||
|
|
||||
|
protected List<Criteria> oredCriteria; |
||||
|
|
||||
|
public SiteQrcodeExample() { |
||||
|
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 andSiteIdIsNull() { |
||||
|
addCriterion("site_id is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdIsNotNull() { |
||||
|
addCriterion("site_id is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdEqualTo(Long value) { |
||||
|
addCriterion("site_id =", value, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdNotEqualTo(Long value) { |
||||
|
addCriterion("site_id <>", value, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdGreaterThan(Long value) { |
||||
|
addCriterion("site_id >", value, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdGreaterThanOrEqualTo(Long value) { |
||||
|
addCriterion("site_id >=", value, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdLessThan(Long value) { |
||||
|
addCriterion("site_id <", value, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdLessThanOrEqualTo(Long value) { |
||||
|
addCriterion("site_id <=", value, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdIn(List<Long> values) { |
||||
|
addCriterion("site_id in", values, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdNotIn(List<Long> values) { |
||||
|
addCriterion("site_id not in", values, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdBetween(Long value1, Long value2) { |
||||
|
addCriterion("site_id between", value1, value2, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andSiteIdNotBetween(Long value1, Long value2) { |
||||
|
addCriterion("site_id not between", value1, value2, "siteId"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInIsNull() { |
||||
|
addCriterion("out_or_in is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInIsNotNull() { |
||||
|
addCriterion("out_or_in is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInEqualTo(Byte value) { |
||||
|
addCriterion("out_or_in =", value, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInNotEqualTo(Byte value) { |
||||
|
addCriterion("out_or_in <>", value, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInGreaterThan(Byte value) { |
||||
|
addCriterion("out_or_in >", value, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInGreaterThanOrEqualTo(Byte value) { |
||||
|
addCriterion("out_or_in >=", value, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInLessThan(Byte value) { |
||||
|
addCriterion("out_or_in <", value, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInLessThanOrEqualTo(Byte value) { |
||||
|
addCriterion("out_or_in <=", value, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInIn(List<Byte> values) { |
||||
|
addCriterion("out_or_in in", values, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInNotIn(List<Byte> values) { |
||||
|
addCriterion("out_or_in not in", values, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("out_or_in between", value1, value2, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andOutOrInNotBetween(Byte value1, Byte value2) { |
||||
|
addCriterion("out_or_in not between", value1, value2, "outOrIn"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathIsNull() { |
||||
|
addCriterion("qrcode_path is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathIsNotNull() { |
||||
|
addCriterion("qrcode_path is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathEqualTo(String value) { |
||||
|
addCriterion("qrcode_path =", value, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathNotEqualTo(String value) { |
||||
|
addCriterion("qrcode_path <>", value, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathGreaterThan(String value) { |
||||
|
addCriterion("qrcode_path >", value, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("qrcode_path >=", value, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathLessThan(String value) { |
||||
|
addCriterion("qrcode_path <", value, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathLessThanOrEqualTo(String value) { |
||||
|
addCriterion("qrcode_path <=", value, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathLike(String value) { |
||||
|
addCriterion("qrcode_path like", value, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathNotLike(String value) { |
||||
|
addCriterion("qrcode_path not like", value, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathIn(List<String> values) { |
||||
|
addCriterion("qrcode_path in", values, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathNotIn(List<String> values) { |
||||
|
addCriterion("qrcode_path not in", values, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathBetween(String value1, String value2) { |
||||
|
addCriterion("qrcode_path between", value1, value2, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andQrcodePathNotBetween(String value1, String value2) { |
||||
|
addCriterion("qrcode_path not between", value1, value2, "qrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathIsNull() { |
||||
|
addCriterion("big_qrcode_path is null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathIsNotNull() { |
||||
|
addCriterion("big_qrcode_path is not null"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathEqualTo(String value) { |
||||
|
addCriterion("big_qrcode_path =", value, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathNotEqualTo(String value) { |
||||
|
addCriterion("big_qrcode_path <>", value, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathGreaterThan(String value) { |
||||
|
addCriterion("big_qrcode_path >", value, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathGreaterThanOrEqualTo(String value) { |
||||
|
addCriterion("big_qrcode_path >=", value, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathLessThan(String value) { |
||||
|
addCriterion("big_qrcode_path <", value, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathLessThanOrEqualTo(String value) { |
||||
|
addCriterion("big_qrcode_path <=", value, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathLike(String value) { |
||||
|
addCriterion("big_qrcode_path like", value, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathNotLike(String value) { |
||||
|
addCriterion("big_qrcode_path not like", value, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathIn(List<String> values) { |
||||
|
addCriterion("big_qrcode_path in", values, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathNotIn(List<String> values) { |
||||
|
addCriterion("big_qrcode_path not in", values, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathBetween(String value1, String value2) { |
||||
|
addCriterion("big_qrcode_path between", value1, value2, "bigQrcodePath"); |
||||
|
return (Criteria) this; |
||||
|
} |
||||
|
|
||||
|
public Criteria andBigQrcodePathNotBetween(String value1, String value2) { |
||||
|
addCriterion("big_qrcode_path not between", value1, value2, "bigQrcodePath"); |
||||
|
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); |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,29 @@ |
|||||
|
package com.ccsens.ct.bean.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class BusinessVo { |
||||
|
@Data |
||||
|
@ApiModel("返回商户的信息") |
||||
|
public static class BusinessInfo{ |
||||
|
@ApiModelProperty("id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("商户名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("详细地址") |
||||
|
private String address; |
||||
|
@ApiModelProperty("申请人姓名") |
||||
|
private String applicantName; |
||||
|
@ApiModelProperty("身份证号") |
||||
|
private String idCard; |
||||
|
@ApiModelProperty("手机号") |
||||
|
private String phone; |
||||
|
@ApiModelProperty("营业执照") |
||||
|
private String businessLicense; |
||||
|
@ApiModelProperty("公众号二维码") |
||||
|
private String qrCode; |
||||
|
} |
||||
|
} |
@ -0,0 +1,19 @@ |
|||||
|
package com.ccsens.ct.bean.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
@Data |
||||
|
public class ClockVo { |
||||
|
@Data |
||||
|
@ApiModel("打卡统计") |
||||
|
public static class ClockStatistics{ |
||||
|
@ApiModelProperty("场所名称") |
||||
|
private String siteName; |
||||
|
@ApiModelProperty("进or出 0进 1出") |
||||
|
private Integer type; |
||||
|
@ApiModelProperty("打卡时间") |
||||
|
private Long time; |
||||
|
} |
||||
|
} |
@ -0,0 +1,44 @@ |
|||||
|
package com.ccsens.ct.bean.vo; |
||||
|
|
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Data |
||||
|
public class SiteVo { |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("返回场所信息") |
||||
|
public static class SiteInfoVo{ |
||||
|
@ApiModelProperty("所属商户id") |
||||
|
private Long businessId; |
||||
|
@ApiModelProperty("所属商户名称") |
||||
|
private String businessName; |
||||
|
@ApiModelProperty("统计页面的链接") |
||||
|
private String path; |
||||
|
@ApiModelProperty("打包下载二维码路径") |
||||
|
private String downloadPath; |
||||
|
@ApiModelProperty("场所信息") |
||||
|
private List<SiteInfo> site; |
||||
|
} |
||||
|
|
||||
|
@Data |
||||
|
@ApiModel("场所信息") |
||||
|
public static class SiteInfo{ |
||||
|
@ApiModelProperty("场所id") |
||||
|
private Long id; |
||||
|
@ApiModelProperty("场所名称") |
||||
|
private String name; |
||||
|
@ApiModelProperty("进二维码") |
||||
|
private String outQrCode; |
||||
|
@ApiModelProperty("出二维码") |
||||
|
private String inQrCode; |
||||
|
@ApiModelProperty("经度") |
||||
|
private BigDecimal longitude; |
||||
|
@ApiModelProperty("纬度") |
||||
|
private BigDecimal latitude; |
||||
|
} |
||||
|
} |
@ -0,0 +1,31 @@ |
|||||
|
package com.ccsens.ct.config; |
||||
|
|
||||
|
import com.ccsens.ct.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; |
||||
|
} |
||||
|
} |
@ -0,0 +1,164 @@ |
|||||
|
package com.ccsens.ct.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.Autowired; |
||||
|
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.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 { |
||||
|
@Autowired |
||||
|
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"); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 配置视图解析器 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/tall/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)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,56 @@ |
|||||
|
package com.ccsens.ct.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.ct.api")) |
||||
|
.build() |
||||
|
.globalOperationParameters(setHeaderToken()); |
||||
|
} |
||||
|
|
||||
|
private ApiInfo apiInfo() { |
||||
|
return new ApiInfo("Swagger Tall-game",//大标题 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; |
||||
|
} |
||||
|
} |
@ -0,0 +1,154 @@ |
|||||
|
package com.ccsens.ct.intercept; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import org.apache.ibatis.executor.Executor; |
||||
|
import org.apache.ibatis.mapping.*; |
||||
|
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.Method; |
||||
|
import java.util.List; |
||||
|
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 selectByPrimaryKey = "selectByPrimaryKey"; |
||||
|
|
||||
|
Object[] args = invocation.getArgs(); |
||||
|
MappedStatement statement = (MappedStatement) args[0]; |
||||
|
if (statement.getId().endsWith(selectByExample)) { |
||||
|
//XXXExample
|
||||
|
Object example = args[1]; |
||||
|
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 ("iis_del =".equals(condition)) { |
||||
|
hasDel = true; |
||||
|
} |
||||
|
} |
||||
|
if (!hasDel) { |
||||
|
Method andIsDelEqualTo = criteria.getClass().getMethod("andRecStatusEqualTo", Byte.class); |
||||
|
andIsDelEqualTo.invoke(criteria, WebConstant.REC_STATUS.Normal.value); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
|
||||
|
} 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(); |
||||
|
} |
||||
|
|
||||
|
@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(); |
||||
|
} |
||||
|
|
||||
|
private String getOperateType(Invocation invocation) { |
||||
|
final Object[] args = invocation.getArgs(); |
||||
|
MappedStatement ms = (MappedStatement) args[0]; |
||||
|
SqlCommandType commondType = ms.getSqlCommandType(); |
||||
|
if (commondType.compareTo(SqlCommandType.SELECT) == 0) { |
||||
|
return "select"; |
||||
|
} |
||||
|
if (commondType.compareTo(SqlCommandType.INSERT) == 0) { |
||||
|
return "insert"; |
||||
|
} |
||||
|
if (commondType.compareTo(SqlCommandType.UPDATE) == 0) { |
||||
|
return "update"; |
||||
|
} |
||||
|
if (commondType.compareTo(SqlCommandType.DELETE) == 0) { |
||||
|
return "delete"; |
||||
|
} |
||||
|
return null; |
||||
|
} |
||||
|
// 定义一个内部辅助类,作用是包装sq
|
||||
|
class BoundSqlSqlSource implements SqlSource { |
||||
|
private BoundSql boundSql; |
||||
|
public BoundSqlSqlSource(BoundSql boundSql) { |
||||
|
this.boundSql = boundSql; |
||||
|
} |
||||
|
@Override |
||||
|
public BoundSql getBoundSql(Object parameterObject) { |
||||
|
return boundSql; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
package com.ccsens.ct.persist.dao; |
||||
|
|
||||
|
import com.ccsens.ct.persist.mapper.BusinessMapper; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
@Repository |
||||
|
public interface BusinessDao extends BusinessMapper { |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.ccsens.ct.persist.dao; |
||||
|
|
||||
|
import com.ccsens.ct.bean.po.SiteClockIn; |
||||
|
import com.ccsens.ct.bean.vo.ClockVo; |
||||
|
import com.ccsens.ct.persist.mapper.SiteClockInMapper; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Repository |
||||
|
public interface SiteClockInDao extends SiteClockInMapper { |
||||
|
List<ClockVo.ClockStatistics> selectClockStatistics(@Param("businessId") Long businessId, @Param("userId") Long userId); |
||||
|
} |
@ -0,0 +1,8 @@ |
|||||
|
package com.ccsens.ct.persist.dao; |
||||
|
|
||||
|
import com.ccsens.ct.persist.mapper.SiteMapper; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
@Repository |
||||
|
public interface SiteDao extends SiteMapper { |
||||
|
} |
@ -0,0 +1,9 @@ |
|||||
|
package com.ccsens.ct.persist.dao; |
||||
|
|
||||
|
import com.ccsens.ct.bean.po.SiteQrcode; |
||||
|
import com.ccsens.ct.persist.mapper.SiteQrcodeMapper; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
@Repository |
||||
|
public interface SiteQrcodeDao extends SiteQrcodeMapper { |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.ct.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.ct.bean.po.Business; |
||||
|
import com.ccsens.ct.bean.po.BusinessExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface BusinessMapper { |
||||
|
long countByExample(BusinessExample example); |
||||
|
|
||||
|
int deleteByExample(BusinessExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(Business record); |
||||
|
|
||||
|
int insertSelective(Business record); |
||||
|
|
||||
|
List<Business> selectByExample(BusinessExample example); |
||||
|
|
||||
|
Business selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") Business record, @Param("example") BusinessExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") Business record, @Param("example") BusinessExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(Business record); |
||||
|
|
||||
|
int updateByPrimaryKey(Business record); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.ct.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.ct.bean.po.SiteClockIn; |
||||
|
import com.ccsens.ct.bean.po.SiteClockInExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface SiteClockInMapper { |
||||
|
long countByExample(SiteClockInExample example); |
||||
|
|
||||
|
int deleteByExample(SiteClockInExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(SiteClockIn record); |
||||
|
|
||||
|
int insertSelective(SiteClockIn record); |
||||
|
|
||||
|
List<SiteClockIn> selectByExample(SiteClockInExample example); |
||||
|
|
||||
|
SiteClockIn selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") SiteClockIn record, @Param("example") SiteClockInExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") SiteClockIn record, @Param("example") SiteClockInExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(SiteClockIn record); |
||||
|
|
||||
|
int updateByPrimaryKey(SiteClockIn record); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.ct.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.ct.bean.po.Site; |
||||
|
import com.ccsens.ct.bean.po.SiteExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface SiteMapper { |
||||
|
long countByExample(SiteExample example); |
||||
|
|
||||
|
int deleteByExample(SiteExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(Site record); |
||||
|
|
||||
|
int insertSelective(Site record); |
||||
|
|
||||
|
List<Site> selectByExample(SiteExample example); |
||||
|
|
||||
|
Site selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") Site record, @Param("example") SiteExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") Site record, @Param("example") SiteExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(Site record); |
||||
|
|
||||
|
int updateByPrimaryKey(Site record); |
||||
|
} |
@ -0,0 +1,30 @@ |
|||||
|
package com.ccsens.ct.persist.mapper; |
||||
|
|
||||
|
import com.ccsens.ct.bean.po.SiteQrcode; |
||||
|
import com.ccsens.ct.bean.po.SiteQrcodeExample; |
||||
|
import java.util.List; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
|
||||
|
public interface SiteQrcodeMapper { |
||||
|
long countByExample(SiteQrcodeExample example); |
||||
|
|
||||
|
int deleteByExample(SiteQrcodeExample example); |
||||
|
|
||||
|
int deleteByPrimaryKey(Long id); |
||||
|
|
||||
|
int insert(SiteQrcode record); |
||||
|
|
||||
|
int insertSelective(SiteQrcode record); |
||||
|
|
||||
|
List<SiteQrcode> selectByExample(SiteQrcodeExample example); |
||||
|
|
||||
|
SiteQrcode selectByPrimaryKey(Long id); |
||||
|
|
||||
|
int updateByExampleSelective(@Param("record") SiteQrcode record, @Param("example") SiteQrcodeExample example); |
||||
|
|
||||
|
int updateByExample(@Param("record") SiteQrcode record, @Param("example") SiteQrcodeExample example); |
||||
|
|
||||
|
int updateByPrimaryKeySelective(SiteQrcode record); |
||||
|
|
||||
|
int updateByPrimaryKey(SiteQrcode record); |
||||
|
} |
@ -0,0 +1,170 @@ |
|||||
|
package com.ccsens.ct.service; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import cn.hutool.core.lang.Snowflake; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.po.Business; |
||||
|
import com.ccsens.ct.bean.po.BusinessExample; |
||||
|
import com.ccsens.ct.bean.vo.BusinessVo; |
||||
|
import com.ccsens.ct.persist.dao.BusinessDao; |
||||
|
import com.ccsens.util.Base64FileUtil; |
||||
|
import com.ccsens.util.CodeEnum; |
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
import com.ccsens.util.wx.WxXcxUtil; |
||||
|
import net.bytebuddy.asm.Advice; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public class BusinessService implements IBusinessService{ |
||||
|
@Autowired |
||||
|
private Snowflake snowflake; |
||||
|
@Autowired |
||||
|
private BusinessDao businessDao; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 上传商户的信息 |
||||
|
* @param params |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public BusinessVo.BusinessInfo uploadBusiness(QueryDto<BusinessDto.BusinessInfo> params) throws Exception { |
||||
|
BusinessDto.BusinessInfo businessInfo = params.getParam(); |
||||
|
Long userId = params.getUserId(); |
||||
|
//将base64转化为文件并存入服务器,将路径存入商户信息
|
||||
|
String path = WebConstant.UPLOAD_PATH_BASE + "/business/"; |
||||
|
String fileName = DateUtil.today() + "/"; |
||||
|
//营业执照
|
||||
|
String businessLicensePath = ""; |
||||
|
if(StrUtil.isNotEmpty(businessInfo.getBusinessLicense())) { |
||||
|
String businessLicenseName = Base64FileUtil.base64ToFile(businessInfo.getBusinessLicense(), path, fileName); |
||||
|
businessLicensePath = WebConstant.TEST_URL_BASE_CT + "/business/" + businessLicenseName; |
||||
|
} |
||||
|
//公众号二维码
|
||||
|
String qrCodePath = ""; |
||||
|
if(StrUtil.isNotEmpty(businessInfo.getQrCode())) { |
||||
|
String qrCodeName = Base64FileUtil.base64ToFile(businessInfo.getQrCode(), path, fileName); |
||||
|
qrCodePath = WebConstant.TEST_URL_BASE_CT + "/business/" + qrCodeName; |
||||
|
} |
||||
|
//将商户信息存入数据库
|
||||
|
Business business = new Business(); |
||||
|
business.setId(snowflake.nextId()); |
||||
|
business.setName(businessInfo.getName()); |
||||
|
business.setAddress(businessInfo.getAddress()); |
||||
|
business.setApplicantName(businessInfo.getApplicantName()); |
||||
|
business.setApplicantIdCard(businessInfo.getIdCard()); |
||||
|
business.setApplicantPhone(businessInfo.getPhone()); |
||||
|
business.setBusinessLicense(businessLicensePath); |
||||
|
business.setQrCord(qrCodePath); |
||||
|
business.setUserId(userId); |
||||
|
businessDao.insertSelective(business); |
||||
|
//返回
|
||||
|
BusinessVo.BusinessInfo businessInfoVo = new BusinessVo.BusinessInfo(); |
||||
|
businessInfoVo.setId(business.getId()); |
||||
|
businessInfoVo.setName(business.getName()); |
||||
|
businessInfoVo.setAddress(business.getAddress()); |
||||
|
businessInfoVo.setApplicantName(business.getApplicantName()); |
||||
|
businessInfoVo.setIdCard(business.getApplicantIdCard()); |
||||
|
businessInfoVo.setPhone(business.getApplicantPhone()); |
||||
|
businessInfoVo.setBusinessLicense(business.getBusinessLicense()); |
||||
|
businessInfoVo.setQrCode(business.getQrCord()); |
||||
|
|
||||
|
return businessInfoVo; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 查询商户的信息 |
||||
|
* @param params |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public BusinessVo.BusinessInfo selectBusiness(QueryDto params) { |
||||
|
BusinessVo.BusinessInfo businessInfo = null; |
||||
|
|
||||
|
Long userId = params.getUserId(); |
||||
|
BusinessExample businessExample = new BusinessExample(); |
||||
|
businessExample.createCriteria().andUserIdEqualTo(userId); |
||||
|
List<Business> businessList = businessDao.selectByExample(businessExample); |
||||
|
if(CollectionUtil.isNotEmpty(businessList)){ |
||||
|
Business business = businessList.get(0); |
||||
|
businessInfo = new BusinessVo.BusinessInfo(); |
||||
|
businessInfo.setId(business.getId()); |
||||
|
businessInfo.setName(business.getName()); |
||||
|
businessInfo.setAddress(business.getAddress()); |
||||
|
businessInfo.setIdCard(business.getApplicantIdCard()); |
||||
|
businessInfo.setApplicantName(business.getApplicantName()); |
||||
|
businessInfo.setPhone(business.getApplicantPhone()); |
||||
|
businessInfo.setBusinessLicense(business.getBusinessLicense()); |
||||
|
businessInfo.setQrCode(business.getQrCord()); |
||||
|
} |
||||
|
return businessInfo; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改商户的信息 |
||||
|
* @param params |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public BusinessVo.BusinessInfo updateBusiness(QueryDto<BusinessDto.UpdateBusiness> params) throws Exception { |
||||
|
BusinessDto.UpdateBusiness updateBusiness = params.getParam(); |
||||
|
//查找到原来的商户信息
|
||||
|
Business business = businessDao.selectByPrimaryKey(updateBusiness.getId()); |
||||
|
if(ObjectUtil.isNull(business)){ |
||||
|
throw new BaseException(CodeEnum.NOT_BUSINESS); |
||||
|
} |
||||
|
|
||||
|
if(StrUtil.isNotEmpty(updateBusiness.getName())){ |
||||
|
business.setName(updateBusiness.getName()); |
||||
|
} |
||||
|
if(StrUtil.isNotEmpty(updateBusiness.getAddress())){ |
||||
|
business.setAddress(updateBusiness.getAddress()); |
||||
|
} |
||||
|
if(StrUtil.isNotEmpty(updateBusiness.getApplicantName())){ |
||||
|
business.setApplicantName(updateBusiness.getApplicantName()); |
||||
|
} |
||||
|
if(StrUtil.isNotEmpty(updateBusiness.getIdCard())){ |
||||
|
business.setApplicantIdCard(updateBusiness.getIdCard()); |
||||
|
} |
||||
|
if(StrUtil.isNotEmpty(updateBusiness.getPhone())){ |
||||
|
business.setApplicantPhone(updateBusiness.getPhone()); |
||||
|
} |
||||
|
//如果文件重新上传 重新生成图片和路径
|
||||
|
String path = WebConstant.UPLOAD_PATH_BASE + "/business/"; |
||||
|
String fileName = DateUtil.today() + "/"; |
||||
|
//营业执照
|
||||
|
if(StrUtil.isNotEmpty(updateBusiness.getBusinessLicense())){ |
||||
|
String businessLicenseName = Base64FileUtil.base64ToFile(updateBusiness.getBusinessLicense(),path,fileName); |
||||
|
String businessLicensePath = WebConstant.TEST_URL_BASE_CT + "/business/" + businessLicenseName; |
||||
|
|
||||
|
business.setBusinessLicense(businessLicensePath); |
||||
|
} |
||||
|
//公众号二维码
|
||||
|
if(StrUtil.isNotEmpty(updateBusiness.getQrCode())){ |
||||
|
String qrCodeName = Base64FileUtil.base64ToFile(updateBusiness.getQrCode(),path,fileName); |
||||
|
String qrCodePath = WebConstant.TEST_URL_BASE_CT + "/business/" + qrCodeName; |
||||
|
business.setQrCord(qrCodePath); |
||||
|
} |
||||
|
businessDao.updateByPrimaryKeySelective(business); |
||||
|
//返回
|
||||
|
BusinessVo.BusinessInfo businessInfoVo = new BusinessVo.BusinessInfo(); |
||||
|
businessInfoVo.setId(business.getId()); |
||||
|
businessInfoVo.setName(business.getName()); |
||||
|
businessInfoVo.setApplicantName(business.getApplicantName()); |
||||
|
businessInfoVo.setAddress(business.getAddress()); |
||||
|
businessInfoVo.setIdCard(business.getApplicantIdCard()); |
||||
|
businessInfoVo.setPhone(business.getApplicantPhone()); |
||||
|
businessInfoVo.setBusinessLicense(business.getBusinessLicense()); |
||||
|
businessInfoVo.setQrCode(business.getQrCord()); |
||||
|
|
||||
|
return businessInfoVo; |
||||
|
} |
||||
|
} |
@ -0,0 +1,58 @@ |
|||||
|
package com.ccsens.ct.service; |
||||
|
|
||||
|
import cn.hutool.core.lang.Snowflake; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.dto.ClockDto; |
||||
|
import com.ccsens.ct.bean.po.Business; |
||||
|
import com.ccsens.ct.bean.po.SiteClockIn; |
||||
|
import com.ccsens.ct.bean.vo.ClockVo; |
||||
|
import com.ccsens.ct.persist.dao.SiteClockInDao; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public class ClockService implements IClockService{ |
||||
|
|
||||
|
@Autowired |
||||
|
private SiteClockInDao siteClockInDao; |
||||
|
@Autowired |
||||
|
private Snowflake snowflake; |
||||
|
|
||||
|
/** |
||||
|
* 打卡 |
||||
|
* @param params |
||||
|
*/ |
||||
|
@Override |
||||
|
public void clockIn(QueryDto<ClockDto.ClockIn> params) { |
||||
|
ClockDto.ClockIn clockIn = params.getParam(); |
||||
|
Long userId = params.getUserId(); |
||||
|
//TODO 判断用户是否在打卡的场所附近
|
||||
|
|
||||
|
//添加打卡记录
|
||||
|
SiteClockIn siteClockIn = new SiteClockIn(); |
||||
|
siteClockIn.setId(snowflake.nextId()); |
||||
|
siteClockIn.setQrcodeId(clockIn.getId()); |
||||
|
siteClockIn.setUserId(userId); |
||||
|
siteClockIn.setTime(System.currentTimeMillis()); |
||||
|
siteClockIn.setLongitude(clockIn.getLongitude()); |
||||
|
siteClockIn.setLatitude(clockIn.getLatitude()); |
||||
|
siteClockInDao.insertSelective(siteClockIn); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 统计打卡记录 |
||||
|
* @param |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public List<ClockVo.ClockStatistics> clockStatistics(Long businessId,Long userId) { |
||||
|
//如果商户id不为空,则查询用户在此商户下的打卡记录,否则查询此用户所有的打卡记录
|
||||
|
List<ClockVo.ClockStatistics> clockStatisticsList = siteClockInDao.selectClockStatistics(businessId,userId); |
||||
|
|
||||
|
return clockStatisticsList; |
||||
|
} |
||||
|
} |
@ -0,0 +1,13 @@ |
|||||
|
package com.ccsens.ct.service; |
||||
|
|
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.vo.BusinessVo; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
|
||||
|
public interface IBusinessService { |
||||
|
BusinessVo.BusinessInfo uploadBusiness(QueryDto<BusinessDto.BusinessInfo> params) throws Exception; |
||||
|
|
||||
|
BusinessVo.BusinessInfo selectBusiness(QueryDto params); |
||||
|
|
||||
|
BusinessVo.BusinessInfo updateBusiness(QueryDto<BusinessDto.UpdateBusiness> params) throws Exception; |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
package com.ccsens.ct.service; |
||||
|
|
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.dto.ClockDto; |
||||
|
import com.ccsens.ct.bean.vo.ClockVo; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface IClockService { |
||||
|
void clockIn(QueryDto<ClockDto.ClockIn> params); |
||||
|
|
||||
|
List<ClockVo.ClockStatistics> clockStatistics(Long businessId,Long userId); |
||||
|
} |
@ -0,0 +1,21 @@ |
|||||
|
package com.ccsens.ct.service; |
||||
|
|
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.dto.SiteDto; |
||||
|
import com.ccsens.ct.bean.vo.SiteVo; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
import java.util.List; |
||||
|
|
||||
|
public interface ISiteService { |
||||
|
SiteVo.SiteInfoVo addSite(QueryDto<SiteDto.SiteInfoDto> params) throws IOException; |
||||
|
|
||||
|
SiteVo.SiteInfo selectSiteById(Long siteId); |
||||
|
|
||||
|
SiteVo.SiteInfo updateSiteInfo(QueryDto<SiteDto.UpdateSite> params); |
||||
|
|
||||
|
SiteVo.SiteInfoVo selectSiteAllByBusinessId(QueryDto<BusinessDto.BusinessId> params); |
||||
|
|
||||
|
String downloadQrCode(Long businessId); |
||||
|
} |
@ -0,0 +1,230 @@ |
|||||
|
package com.ccsens.ct.service; |
||||
|
|
||||
|
import cn.hutool.core.collection.CollectionUtil; |
||||
|
import cn.hutool.core.lang.Snowflake; |
||||
|
import cn.hutool.core.util.ObjectUtil; |
||||
|
import cn.hutool.core.util.StrUtil; |
||||
|
import com.ccsens.ct.bean.dto.BusinessDto; |
||||
|
import com.ccsens.ct.bean.dto.SiteDto; |
||||
|
import com.ccsens.ct.bean.po.*; |
||||
|
import com.ccsens.ct.bean.vo.SiteVo; |
||||
|
import com.ccsens.ct.persist.dao.BusinessDao; |
||||
|
import com.ccsens.ct.persist.dao.SiteDao; |
||||
|
import com.ccsens.ct.persist.dao.SiteQrcodeDao; |
||||
|
import com.ccsens.util.CodeEnum; |
||||
|
import com.ccsens.util.QrCodeUtil; |
||||
|
import com.ccsens.util.WebConstant; |
||||
|
import com.ccsens.util.bean.dto.QueryDto; |
||||
|
import com.ccsens.util.exception.BaseException; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.io.IOException; |
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
|
||||
|
@Service |
||||
|
public class SiteService implements ISiteService { |
||||
|
@Autowired |
||||
|
private SiteDao siteDao; |
||||
|
@Autowired |
||||
|
private Snowflake snowflake; |
||||
|
@Autowired |
||||
|
private SiteQrcodeDao siteQrcodeDao; |
||||
|
@Autowired |
||||
|
private BusinessDao businessDao; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 添加场所 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public SiteVo.SiteInfoVo addSite(QueryDto<SiteDto.SiteInfoDto> params) throws IOException { |
||||
|
SiteVo.SiteInfoVo siteInfoVo = new SiteVo.SiteInfoVo(); |
||||
|
List<SiteVo.SiteInfo> siteInfos = new ArrayList<>(); |
||||
|
|
||||
|
SiteDto.SiteInfoDto siteInfoDto = params.getParam(); |
||||
|
if (CollectionUtil.isNotEmpty(siteInfoDto.getSiteInfo())){ |
||||
|
if(siteInfoDto.getSiteInfo().size() > 5){ |
||||
|
throw new BaseException(CodeEnum.SITE_EXCEED); |
||||
|
} |
||||
|
//查找该商户下已有场所
|
||||
|
SiteExample siteExample = new SiteExample(); |
||||
|
siteExample.createCriteria().andBusinessIdEqualTo(siteInfoDto.getId()); |
||||
|
List<Site> siteList = siteDao.selectByExample(siteExample); |
||||
|
//目前一个商户只能添加五个场所
|
||||
|
if(CollectionUtil.isNotEmpty(siteList)) { |
||||
|
if (siteInfoDto.getSiteInfo().size() + siteList.size() > 5) { |
||||
|
throw new BaseException(CodeEnum.SITE_EXCEED); |
||||
|
} |
||||
|
} |
||||
|
//添加场所
|
||||
|
for (SiteDto.SiteInfo siteInfo : siteInfoDto.getSiteInfo()) { |
||||
|
Site site = new Site(); |
||||
|
site.setId(snowflake.nextId()); |
||||
|
site.setBusinessId(siteInfoDto.getId()); |
||||
|
site.setSiteName(siteInfo.getSiteName()); |
||||
|
site.setLongitude(siteInfo.getLongitude()); |
||||
|
site.setLatitude(siteInfo.getLatitude()); |
||||
|
siteDao.insertSelective(site); |
||||
|
|
||||
|
String path = WebConstant.UPLOAD_PATH_BASE + "/"; |
||||
|
//生成进二维码
|
||||
|
SiteQrcode inSiteQrcode = new SiteQrcode(); |
||||
|
inSiteQrcode.setId(snowflake.nextId()); |
||||
|
inSiteQrcode.setSiteId(site.getId()); |
||||
|
inSiteQrcode.setOutOrIn((byte) 0); |
||||
|
String inFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev?id=" + inSiteQrcode.getId(), path,200); |
||||
|
String bigInFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev?id=" + inSiteQrcode.getId(), path,1000); |
||||
|
|
||||
|
inSiteQrcode.setQrcodePath(WebConstant.TEST_URL_BASE_CT + inFileName); |
||||
|
inSiteQrcode.setBigQrcodePath(WebConstant.TEST_URL_BASE_CT + bigInFileName); |
||||
|
siteQrcodeDao.insertSelective(inSiteQrcode); |
||||
|
//生成出二维码
|
||||
|
SiteQrcode outSiteQrcode = new SiteQrcode(); |
||||
|
outSiteQrcode.setId(snowflake.nextId()); |
||||
|
outSiteQrcode.setSiteId(site.getId()); |
||||
|
outSiteQrcode.setOutOrIn((byte) 0); |
||||
|
String outFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev/sign?id=" + outSiteQrcode.getId(), path,200); |
||||
|
String bigOutFileName = QrCodeUtil.urlToQRCodeWithSize("https://test.tall.wiki/ct-dev/sign?id=" + outSiteQrcode.getId(), path,1000); |
||||
|
|
||||
|
outSiteQrcode.setQrcodePath(WebConstant.TEST_URL_BASE_CT + outFileName); |
||||
|
outSiteQrcode.setBigQrcodePath(WebConstant.TEST_URL_BASE_CT + bigOutFileName); |
||||
|
siteQrcodeDao.insertSelective(outSiteQrcode); |
||||
|
//获取返回的场所信息
|
||||
|
SiteVo.SiteInfo siteInfo1 = new SiteVo.SiteInfo(); |
||||
|
siteInfo1.setId(site.getId()); |
||||
|
siteInfo1.setName(site.getSiteName()); |
||||
|
siteInfo1.setLongitude(site.getLongitude()); |
||||
|
siteInfo1.setLatitude(site.getLatitude()); |
||||
|
siteInfo1.setInQrCode(inSiteQrcode.getQrcodePath()); |
||||
|
siteInfo1.setOutQrCode(outSiteQrcode.getQrcodePath()); |
||||
|
siteInfos.add(siteInfo1); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
//查找商户信息
|
||||
|
Business business = businessDao.selectByPrimaryKey(siteInfoDto.getId()); |
||||
|
siteInfoVo.setBusinessId(business.getId()); |
||||
|
siteInfoVo.setBusinessName(business.getName()); |
||||
|
siteInfoVo.setSite(siteInfos); |
||||
|
//TODO
|
||||
|
siteInfoVo.setPath("http://test.tall.wiki/ct-dev/sign-history"); |
||||
|
|
||||
|
return siteInfoVo; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通过id查找场所信息 |
||||
|
* |
||||
|
* @param siteId |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public SiteVo.SiteInfo selectSiteById(Long siteId) { |
||||
|
SiteVo.SiteInfo siteInfo = new SiteVo.SiteInfo(); |
||||
|
String inQrCode = ""; |
||||
|
String outQrCode = ""; |
||||
|
Site site = siteDao.selectByPrimaryKey(siteId); |
||||
|
if (ObjectUtil.isNotNull(site)) { |
||||
|
//进二维码
|
||||
|
SiteQrcodeExample inQrcodeExample = new SiteQrcodeExample(); |
||||
|
inQrcodeExample.createCriteria().andSiteIdEqualTo(site.getId()).andOutOrInEqualTo((byte) 0); |
||||
|
List<SiteQrcode> inQrcodeList = siteQrcodeDao.selectByExample(inQrcodeExample); |
||||
|
if (CollectionUtil.isNotEmpty(inQrcodeList)) { |
||||
|
inQrCode = inQrcodeList.get(0).getQrcodePath(); |
||||
|
} |
||||
|
//进二维码
|
||||
|
SiteQrcodeExample outQrcodeExample = new SiteQrcodeExample(); |
||||
|
outQrcodeExample.createCriteria().andSiteIdEqualTo(site.getId()); |
||||
|
List<SiteQrcode> outQrcodeList = siteQrcodeDao.selectByExample(outQrcodeExample); |
||||
|
if (CollectionUtil.isNotEmpty(outQrcodeList)) { |
||||
|
outQrCode = outQrcodeList.get(0).getQrcodePath(); |
||||
|
} |
||||
|
} |
||||
|
siteInfo.setId(site.getId()); |
||||
|
siteInfo.setName(site.getSiteName()); |
||||
|
siteInfo.setLongitude(site.getLongitude()); |
||||
|
siteInfo.setLatitude(site.getLatitude()); |
||||
|
siteInfo.setInQrCode(inQrCode); |
||||
|
siteInfo.setOutQrCode(outQrCode); |
||||
|
return siteInfo; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 修改场所的信息 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public SiteVo.SiteInfo updateSiteInfo(QueryDto<SiteDto.UpdateSite> params) { |
||||
|
SiteDto.UpdateSite updateSite = params.getParam(); |
||||
|
//查找场所信息
|
||||
|
Site site = siteDao.selectByPrimaryKey(updateSite.getId()); |
||||
|
if (ObjectUtil.isNull(site)) { |
||||
|
throw new BaseException(CodeEnum.NOT_SITE); |
||||
|
} |
||||
|
//修改场所信息
|
||||
|
if (StrUtil.isNotEmpty(updateSite.getSiteName())) { |
||||
|
site.setSiteName(updateSite.getSiteName()); |
||||
|
} |
||||
|
if (ObjectUtil.isNotNull(updateSite.getLongitude())) { |
||||
|
site.setLongitude(updateSite.getLongitude()); |
||||
|
} |
||||
|
if (ObjectUtil.isNotNull(updateSite.getLatitude())) { |
||||
|
site.setLongitude(updateSite.getLatitude()); |
||||
|
} |
||||
|
siteDao.updateByPrimaryKeySelective(site); |
||||
|
//获取返回值
|
||||
|
SiteVo.SiteInfo siteInfo = selectSiteById(site.getId()); |
||||
|
return siteInfo; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 通过商户id查询所有的场所信息 |
||||
|
* |
||||
|
* @param params |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public SiteVo.SiteInfoVo selectSiteAllByBusinessId(QueryDto<BusinessDto.BusinessId> params) { |
||||
|
SiteVo.SiteInfoVo siteInfoVo = new SiteVo.SiteInfoVo(); |
||||
|
//获取商户信息
|
||||
|
Business business = businessDao.selectByPrimaryKey(params.getParam().getId()); |
||||
|
if (ObjectUtil.isNull(business)) { |
||||
|
throw new BaseException(CodeEnum.NOT_BUSINESS); |
||||
|
} |
||||
|
siteInfoVo.setBusinessId(business.getId()); |
||||
|
siteInfoVo.setBusinessName(business.getName()); |
||||
|
//TODO
|
||||
|
siteInfoVo.setPath("http://test.tall.wiki/ct-dev/sign-history"); |
||||
|
//获取场所信息
|
||||
|
List<SiteVo.SiteInfo> siteInfoList = new ArrayList<>(); |
||||
|
SiteExample siteExample = new SiteExample(); |
||||
|
siteExample.createCriteria().andBusinessIdEqualTo(business.getId()); |
||||
|
List<Site> siteList = siteDao.selectByExample(siteExample); |
||||
|
if (CollectionUtil.isNotEmpty(siteList)) { |
||||
|
for (Site site : siteList) { |
||||
|
SiteVo.SiteInfo siteInfo = selectSiteById(site.getId()); |
||||
|
siteInfoList.add(siteInfo); |
||||
|
} |
||||
|
} |
||||
|
siteInfoVo.setSite(siteInfoList); |
||||
|
return siteInfoVo; |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 下载商户下的所有场所的二维码 |
||||
|
* |
||||
|
* @param businessId |
||||
|
* @return |
||||
|
*/ |
||||
|
@Override |
||||
|
public String downloadQrCode(Long businessId) { |
||||
|
return null; |
||||
|
} |
||||
|
} |
@ -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.mtpro.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: 1 |
||||
|
workerId: 1 |
||||
|
|
@ -0,0 +1,29 @@ |
|||||
|
server: |
||||
|
port: 7090 |
||||
|
servlet: |
||||
|
context-path: |
||||
|
spring: |
||||
|
application: |
||||
|
name: ct |
||||
|
datasource: |
||||
|
type: com.alibaba.druid.pool.DruidDataSource |
||||
|
rabbitmq: |
||||
|
host: 49.233.89.188 |
||||
|
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 |
||||
|
|
@ -0,0 +1,31 @@ |
|||||
|
server: |
||||
|
port: 7090 |
||||
|
servlet: |
||||
|
context-path: |
||||
|
spring: |
||||
|
application: |
||||
|
name: ct |
||||
|
datasource: |
||||
|
type: com.alibaba.druid.pool.DruidDataSource |
||||
|
rabbitmq: |
||||
|
host: api.ccsens.com |
||||
|
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: 119.28.76.62 |
@ -0,0 +1,4 @@ |
|||||
|
spring: |
||||
|
profiles: |
||||
|
active: test |
||||
|
include: common, util-test |
@ -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: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9 |
||||
|
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/ct?useUnicode=true&characterEncoding=UTF-8 |
||||
|
username: root |
||||
|
validationQuery: SELECT 1 FROM DUAL |
||||
|
env: CCSENS_GAME |
@ -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/ct?useUnicode=true&characterEncoding=UTF-8 |
||||
|
username: root |
||||
|
validationQuery: SELECT 1 FROM DUAL |
||||
|
env: CCSENS_GAME |
@ -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: 37080c1f223685592316b02dad8816c019290a476e54ebb638f9aa3ba8b6bdb9 |
||||
|
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/ct?useUnicode=true&characterEncoding=UTF-8 |
||||
|
username: root |
||||
|
validationQuery: SELECT 1 FROM DUAL |
||||
|
env: CCSENS_GAME |
@ -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/ct/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> |
@ -0,0 +1,29 @@ |
|||||
|
<?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.ct.persist.dao.SiteClockInDao"> |
||||
|
<resultMap id="resultMap_siteClock" type="com.ccsens.ct.bean.vo.ClockVo$ClockStatistics"> |
||||
|
<result column="sSiteName" property="siteName"/> |
||||
|
<result column="sType" property="type"/> |
||||
|
<result column="sTime" property="time"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="selectClockStatistics" resultMap="resultMap_siteClock" parameterType="java.util.Map"> |
||||
|
select |
||||
|
s.site_name as sSiteName, |
||||
|
q.out_or_in as sType, |
||||
|
c.time as sTime |
||||
|
from |
||||
|
t_site s join t_site_qrcode q on q.site_id = s.id |
||||
|
join t_site_clock_in c on c.qrcode_id = q.id |
||||
|
where |
||||
|
s.rec_status = 0 |
||||
|
<if test="businessId != null"> |
||||
|
and |
||||
|
s.business_id = #{businessId} |
||||
|
</if> |
||||
|
and |
||||
|
c.user_id = #{userId} |
||||
|
ORDER By c.time DESC |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -0,0 +1,28 @@ |
|||||
|
<?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.ct.persist.dao.SiteDao"> |
||||
|
<resultMap id="resultMap_siteInfo" type="com.ccsens.ct.bean.vo.SiteVo$SiteInfo"> |
||||
|
<id column="sId" property="id"/> |
||||
|
<result column="sName" property="name"/> |
||||
|
<result column="sOutQrCode" property="outQrCode"/> |
||||
|
<result column="sInQrCode" property="inQrCode"/> |
||||
|
<result column="sLatitude" property="latitude"/> |
||||
|
<result column="sLongitude" property="longitude"/> |
||||
|
</resultMap> |
||||
|
|
||||
|
<select id="selectSiteById" resultMap="resultMap_siteInfo" parameterType="java.util.Map"> |
||||
|
select |
||||
|
s.id as sId, |
||||
|
s.site_name as sName, |
||||
|
c.time as sTime, |
||||
|
s.longitude as sLongitude, |
||||
|
s.latitude as sLatitude |
||||
|
from |
||||
|
t_site s join t_site_qrcode q on q.site_id = s.id |
||||
|
where |
||||
|
s.rec_status = 0 |
||||
|
and |
||||
|
s.id = #{siteId} |
||||
|
</select> |
||||
|
|
||||
|
</mapper> |
@ -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.ct.persist.mapper.BusinessMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.ct.bean.po.Business"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="name" jdbcType="VARCHAR" property="name" /> |
||||
|
<result column="address" jdbcType="VARCHAR" property="address" /> |
||||
|
<result column="applicant_name" jdbcType="VARCHAR" property="applicantName" /> |
||||
|
<result column="applicant_id_card" jdbcType="VARCHAR" property="applicantIdCard" /> |
||||
|
<result column="applicant_phone" jdbcType="VARCHAR" property="applicantPhone" /> |
||||
|
<result column="business_license" jdbcType="VARCHAR" property="businessLicense" /> |
||||
|
<result column="qr_cord" jdbcType="VARCHAR" property="qrCord" /> |
||||
|
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
||||
|
<result column="passed" jdbcType="TINYINT" property="passed" /> |
||||
|
<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, address, applicant_name, applicant_id_card, applicant_phone, business_license, |
||||
|
qr_cord, user_id, passed, created_at, updated_at, rec_status |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.ct.bean.po.BusinessExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_business |
||||
|
<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_business |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_business |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.ct.bean.po.BusinessExample"> |
||||
|
delete from t_business |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.ct.bean.po.Business"> |
||||
|
insert into t_business (id, name, address, |
||||
|
applicant_name, applicant_id_card, applicant_phone, |
||||
|
business_license, qr_cord, user_id, |
||||
|
passed, created_at, updated_at, |
||||
|
rec_status) |
||||
|
values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, |
||||
|
#{applicantName,jdbcType=VARCHAR}, #{applicantIdCard,jdbcType=VARCHAR}, #{applicantPhone,jdbcType=VARCHAR}, |
||||
|
#{businessLicense,jdbcType=VARCHAR}, #{qrCord,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, |
||||
|
#{passed,jdbcType=TINYINT}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
#{recStatus,jdbcType=TINYINT}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.ct.bean.po.Business"> |
||||
|
insert into t_business |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="name != null"> |
||||
|
name, |
||||
|
</if> |
||||
|
<if test="address != null"> |
||||
|
address, |
||||
|
</if> |
||||
|
<if test="applicantName != null"> |
||||
|
applicant_name, |
||||
|
</if> |
||||
|
<if test="applicantIdCard != null"> |
||||
|
applicant_id_card, |
||||
|
</if> |
||||
|
<if test="applicantPhone != null"> |
||||
|
applicant_phone, |
||||
|
</if> |
||||
|
<if test="businessLicense != null"> |
||||
|
business_license, |
||||
|
</if> |
||||
|
<if test="qrCord != null"> |
||||
|
qr_cord, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id, |
||||
|
</if> |
||||
|
<if test="passed != null"> |
||||
|
passed, |
||||
|
</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="address != null"> |
||||
|
#{address,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="applicantName != null"> |
||||
|
#{applicantName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="applicantIdCard != null"> |
||||
|
#{applicantIdCard,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="applicantPhone != null"> |
||||
|
#{applicantPhone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="businessLicense != null"> |
||||
|
#{businessLicense,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="qrCord != null"> |
||||
|
#{qrCord,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
#{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="passed != null"> |
||||
|
#{passed,jdbcType=TINYINT}, |
||||
|
</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.ct.bean.po.BusinessExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_business |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_business |
||||
|
<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.address != null"> |
||||
|
address = #{record.address,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.applicantName != null"> |
||||
|
applicant_name = #{record.applicantName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.applicantIdCard != null"> |
||||
|
applicant_id_card = #{record.applicantIdCard,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.applicantPhone != null"> |
||||
|
applicant_phone = #{record.applicantPhone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.businessLicense != null"> |
||||
|
business_license = #{record.businessLicense,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.qrCord != null"> |
||||
|
qr_cord = #{record.qrCord,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.userId != null"> |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.passed != null"> |
||||
|
passed = #{record.passed,jdbcType=TINYINT}, |
||||
|
</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_business |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
name = #{record.name,jdbcType=VARCHAR}, |
||||
|
address = #{record.address,jdbcType=VARCHAR}, |
||||
|
applicant_name = #{record.applicantName,jdbcType=VARCHAR}, |
||||
|
applicant_id_card = #{record.applicantIdCard,jdbcType=VARCHAR}, |
||||
|
applicant_phone = #{record.applicantPhone,jdbcType=VARCHAR}, |
||||
|
business_license = #{record.businessLicense,jdbcType=VARCHAR}, |
||||
|
qr_cord = #{record.qrCord,jdbcType=VARCHAR}, |
||||
|
user_id = #{record.userId,jdbcType=BIGINT}, |
||||
|
passed = #{record.passed,jdbcType=TINYINT}, |
||||
|
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.ct.bean.po.Business"> |
||||
|
update t_business |
||||
|
<set> |
||||
|
<if test="name != null"> |
||||
|
name = #{name,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="address != null"> |
||||
|
address = #{address,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="applicantName != null"> |
||||
|
applicant_name = #{applicantName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="applicantIdCard != null"> |
||||
|
applicant_id_card = #{applicantIdCard,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="applicantPhone != null"> |
||||
|
applicant_phone = #{applicantPhone,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="businessLicense != null"> |
||||
|
business_license = #{businessLicense,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="qrCord != null"> |
||||
|
qr_cord = #{qrCord,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id = #{userId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="passed != null"> |
||||
|
passed = #{passed,jdbcType=TINYINT}, |
||||
|
</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.ct.bean.po.Business"> |
||||
|
update t_business |
||||
|
set name = #{name,jdbcType=VARCHAR}, |
||||
|
address = #{address,jdbcType=VARCHAR}, |
||||
|
applicant_name = #{applicantName,jdbcType=VARCHAR}, |
||||
|
applicant_id_card = #{applicantIdCard,jdbcType=VARCHAR}, |
||||
|
applicant_phone = #{applicantPhone,jdbcType=VARCHAR}, |
||||
|
business_license = #{businessLicense,jdbcType=VARCHAR}, |
||||
|
qr_cord = #{qrCord,jdbcType=VARCHAR}, |
||||
|
user_id = #{userId,jdbcType=BIGINT}, |
||||
|
passed = #{passed,jdbcType=TINYINT}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
@ -0,0 +1,275 @@ |
|||||
|
<?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.ct.persist.mapper.SiteClockInMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.ct.bean.po.SiteClockIn"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="qrcode_id" jdbcType="BIGINT" property="qrcodeId" /> |
||||
|
<result column="time" jdbcType="BIGINT" property="time" /> |
||||
|
<result column="longitude" jdbcType="DECIMAL" property="longitude" /> |
||||
|
<result column="latitude" jdbcType="DECIMAL" property="latitude" /> |
||||
|
<result column="user_id" jdbcType="BIGINT" property="userId" /> |
||||
|
<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, qrcode_id, time, longitude, latitude, user_id, created_at, updated_at, rec_status |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.ct.bean.po.SiteClockInExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_site_clock_in |
||||
|
<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_site_clock_in |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_site_clock_in |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.ct.bean.po.SiteClockInExample"> |
||||
|
delete from t_site_clock_in |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.ct.bean.po.SiteClockIn"> |
||||
|
insert into t_site_clock_in (id, qrcode_id, time, |
||||
|
longitude, latitude, user_id, |
||||
|
created_at, updated_at, rec_status |
||||
|
) |
||||
|
values (#{id,jdbcType=BIGINT}, #{qrcodeId,jdbcType=BIGINT}, #{time,jdbcType=BIGINT}, |
||||
|
#{longitude,jdbcType=DECIMAL}, #{latitude,jdbcType=DECIMAL}, #{userId,jdbcType=BIGINT}, |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
||||
|
) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.ct.bean.po.SiteClockIn"> |
||||
|
insert into t_site_clock_in |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="qrcodeId != null"> |
||||
|
qrcode_id, |
||||
|
</if> |
||||
|
<if test="time != null"> |
||||
|
time, |
||||
|
</if> |
||||
|
<if test="longitude != null"> |
||||
|
longitude, |
||||
|
</if> |
||||
|
<if test="latitude != null"> |
||||
|
latitude, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_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="qrcodeId != null"> |
||||
|
#{qrcodeId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="time != null"> |
||||
|
#{time,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="longitude != null"> |
||||
|
#{longitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="latitude != null"> |
||||
|
#{latitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
#{userId,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.ct.bean.po.SiteClockInExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_site_clock_in |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_site_clock_in |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.qrcodeId != null"> |
||||
|
qrcode_id = #{record.qrcodeId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.time != null"> |
||||
|
time = #{record.time,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.longitude != null"> |
||||
|
longitude = #{record.longitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.latitude != null"> |
||||
|
latitude = #{record.latitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.userId != null"> |
||||
|
user_id = #{record.userId,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_site_clock_in |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
qrcode_id = #{record.qrcodeId,jdbcType=BIGINT}, |
||||
|
time = #{record.time,jdbcType=BIGINT}, |
||||
|
longitude = #{record.longitude,jdbcType=DECIMAL}, |
||||
|
latitude = #{record.latitude,jdbcType=DECIMAL}, |
||||
|
user_id = #{record.userId,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.ct.bean.po.SiteClockIn"> |
||||
|
update t_site_clock_in |
||||
|
<set> |
||||
|
<if test="qrcodeId != null"> |
||||
|
qrcode_id = #{qrcodeId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="time != null"> |
||||
|
time = #{time,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="longitude != null"> |
||||
|
longitude = #{longitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="latitude != null"> |
||||
|
latitude = #{latitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="userId != null"> |
||||
|
user_id = #{userId,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.ct.bean.po.SiteClockIn"> |
||||
|
update t_site_clock_in |
||||
|
set qrcode_id = #{qrcodeId,jdbcType=BIGINT}, |
||||
|
time = #{time,jdbcType=BIGINT}, |
||||
|
longitude = #{longitude,jdbcType=DECIMAL}, |
||||
|
latitude = #{latitude,jdbcType=DECIMAL}, |
||||
|
user_id = #{userId,jdbcType=BIGINT}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
@ -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.ct.persist.mapper.SiteMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.ct.bean.po.Site"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="business_id" jdbcType="BIGINT" property="businessId" /> |
||||
|
<result column="site_name" jdbcType="VARCHAR" property="siteName" /> |
||||
|
<result column="site_code" jdbcType="VARCHAR" property="siteCode" /> |
||||
|
<result column="longitude" jdbcType="DECIMAL" property="longitude" /> |
||||
|
<result column="latitude" jdbcType="DECIMAL" property="latitude" /> |
||||
|
<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, business_id, site_name, site_code, longitude, latitude, created_at, updated_at, |
||||
|
rec_status |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.ct.bean.po.SiteExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_site |
||||
|
<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_site |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_site |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.ct.bean.po.SiteExample"> |
||||
|
delete from t_site |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.ct.bean.po.Site"> |
||||
|
insert into t_site (id, business_id, site_name, |
||||
|
site_code, longitude, latitude, |
||||
|
created_at, updated_at, rec_status |
||||
|
) |
||||
|
values (#{id,jdbcType=BIGINT}, #{businessId,jdbcType=BIGINT}, #{siteName,jdbcType=VARCHAR}, |
||||
|
#{siteCode,jdbcType=VARCHAR}, #{longitude,jdbcType=DECIMAL}, #{latitude,jdbcType=DECIMAL}, |
||||
|
#{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT} |
||||
|
) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.ct.bean.po.Site"> |
||||
|
insert into t_site |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="businessId != null"> |
||||
|
business_id, |
||||
|
</if> |
||||
|
<if test="siteName != null"> |
||||
|
site_name, |
||||
|
</if> |
||||
|
<if test="siteCode != null"> |
||||
|
site_code, |
||||
|
</if> |
||||
|
<if test="longitude != null"> |
||||
|
longitude, |
||||
|
</if> |
||||
|
<if test="latitude != null"> |
||||
|
latitude, |
||||
|
</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="businessId != null"> |
||||
|
#{businessId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="siteName != null"> |
||||
|
#{siteName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="siteCode != null"> |
||||
|
#{siteCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="longitude != null"> |
||||
|
#{longitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="latitude != null"> |
||||
|
#{latitude,jdbcType=DECIMAL}, |
||||
|
</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.ct.bean.po.SiteExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_site |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_site |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.businessId != null"> |
||||
|
business_id = #{record.businessId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.siteName != null"> |
||||
|
site_name = #{record.siteName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.siteCode != null"> |
||||
|
site_code = #{record.siteCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.longitude != null"> |
||||
|
longitude = #{record.longitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="record.latitude != null"> |
||||
|
latitude = #{record.latitude,jdbcType=DECIMAL}, |
||||
|
</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_site |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
business_id = #{record.businessId,jdbcType=BIGINT}, |
||||
|
site_name = #{record.siteName,jdbcType=VARCHAR}, |
||||
|
site_code = #{record.siteCode,jdbcType=VARCHAR}, |
||||
|
longitude = #{record.longitude,jdbcType=DECIMAL}, |
||||
|
latitude = #{record.latitude,jdbcType=DECIMAL}, |
||||
|
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.ct.bean.po.Site"> |
||||
|
update t_site |
||||
|
<set> |
||||
|
<if test="businessId != null"> |
||||
|
business_id = #{businessId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="siteName != null"> |
||||
|
site_name = #{siteName,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="siteCode != null"> |
||||
|
site_code = #{siteCode,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="longitude != null"> |
||||
|
longitude = #{longitude,jdbcType=DECIMAL}, |
||||
|
</if> |
||||
|
<if test="latitude != null"> |
||||
|
latitude = #{latitude,jdbcType=DECIMAL}, |
||||
|
</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.ct.bean.po.Site"> |
||||
|
update t_site |
||||
|
set business_id = #{businessId,jdbcType=BIGINT}, |
||||
|
site_name = #{siteName,jdbcType=VARCHAR}, |
||||
|
site_code = #{siteCode,jdbcType=VARCHAR}, |
||||
|
longitude = #{longitude,jdbcType=DECIMAL}, |
||||
|
latitude = #{latitude,jdbcType=DECIMAL}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
@ -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.ct.persist.mapper.SiteQrcodeMapper"> |
||||
|
<resultMap id="BaseResultMap" type="com.ccsens.ct.bean.po.SiteQrcode"> |
||||
|
<id column="id" jdbcType="BIGINT" property="id" /> |
||||
|
<result column="site_id" jdbcType="BIGINT" property="siteId" /> |
||||
|
<result column="out_or_in" jdbcType="TINYINT" property="outOrIn" /> |
||||
|
<result column="qrcode_path" jdbcType="VARCHAR" property="qrcodePath" /> |
||||
|
<result column="big_qrcode_path" jdbcType="VARCHAR" property="bigQrcodePath" /> |
||||
|
<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, site_id, out_or_in, qrcode_path, big_qrcode_path, created_at, updated_at, rec_status |
||||
|
</sql> |
||||
|
<select id="selectByExample" parameterType="com.ccsens.ct.bean.po.SiteQrcodeExample" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<if test="distinct"> |
||||
|
distinct |
||||
|
</if> |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_site_qrcode |
||||
|
<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_site_qrcode |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</select> |
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long"> |
||||
|
delete from t_site_qrcode |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</delete> |
||||
|
<delete id="deleteByExample" parameterType="com.ccsens.ct.bean.po.SiteQrcodeExample"> |
||||
|
delete from t_site_qrcode |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</delete> |
||||
|
<insert id="insert" parameterType="com.ccsens.ct.bean.po.SiteQrcode"> |
||||
|
insert into t_site_qrcode (id, site_id, out_or_in, |
||||
|
qrcode_path, big_qrcode_path, created_at, |
||||
|
updated_at, rec_status) |
||||
|
values (#{id,jdbcType=BIGINT}, #{siteId,jdbcType=BIGINT}, #{outOrIn,jdbcType=TINYINT}, |
||||
|
#{qrcodePath,jdbcType=VARCHAR}, #{bigQrcodePath,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
#{updatedAt,jdbcType=TIMESTAMP}, #{recStatus,jdbcType=TINYINT}) |
||||
|
</insert> |
||||
|
<insert id="insertSelective" parameterType="com.ccsens.ct.bean.po.SiteQrcode"> |
||||
|
insert into t_site_qrcode |
||||
|
<trim prefix="(" suffix=")" suffixOverrides=","> |
||||
|
<if test="id != null"> |
||||
|
id, |
||||
|
</if> |
||||
|
<if test="siteId != null"> |
||||
|
site_id, |
||||
|
</if> |
||||
|
<if test="outOrIn != null"> |
||||
|
out_or_in, |
||||
|
</if> |
||||
|
<if test="qrcodePath != null"> |
||||
|
qrcode_path, |
||||
|
</if> |
||||
|
<if test="bigQrcodePath != null"> |
||||
|
big_qrcode_path, |
||||
|
</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="siteId != null"> |
||||
|
#{siteId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="outOrIn != null"> |
||||
|
#{outOrIn,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="qrcodePath != null"> |
||||
|
#{qrcodePath,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="bigQrcodePath != null"> |
||||
|
#{bigQrcodePath,jdbcType=VARCHAR}, |
||||
|
</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.ct.bean.po.SiteQrcodeExample" resultType="java.lang.Long"> |
||||
|
select count(*) from t_site_qrcode |
||||
|
<if test="_parameter != null"> |
||||
|
<include refid="Example_Where_Clause" /> |
||||
|
</if> |
||||
|
</select> |
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_site_qrcode |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.siteId != null"> |
||||
|
site_id = #{record.siteId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="record.outOrIn != null"> |
||||
|
out_or_in = #{record.outOrIn,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="record.qrcodePath != null"> |
||||
|
qrcode_path = #{record.qrcodePath,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.bigQrcodePath != null"> |
||||
|
big_qrcode_path = #{record.bigQrcodePath,jdbcType=VARCHAR}, |
||||
|
</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_site_qrcode |
||||
|
set id = #{record.id,jdbcType=BIGINT}, |
||||
|
site_id = #{record.siteId,jdbcType=BIGINT}, |
||||
|
out_or_in = #{record.outOrIn,jdbcType=TINYINT}, |
||||
|
qrcode_path = #{record.qrcodePath,jdbcType=VARCHAR}, |
||||
|
big_qrcode_path = #{record.bigQrcodePath,jdbcType=VARCHAR}, |
||||
|
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.ct.bean.po.SiteQrcode"> |
||||
|
update t_site_qrcode |
||||
|
<set> |
||||
|
<if test="siteId != null"> |
||||
|
site_id = #{siteId,jdbcType=BIGINT}, |
||||
|
</if> |
||||
|
<if test="outOrIn != null"> |
||||
|
out_or_in = #{outOrIn,jdbcType=TINYINT}, |
||||
|
</if> |
||||
|
<if test="qrcodePath != null"> |
||||
|
qrcode_path = #{qrcodePath,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="bigQrcodePath != null"> |
||||
|
big_qrcode_path = #{bigQrcodePath,jdbcType=VARCHAR}, |
||||
|
</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.ct.bean.po.SiteQrcode"> |
||||
|
update t_site_qrcode |
||||
|
set site_id = #{siteId,jdbcType=BIGINT}, |
||||
|
out_or_in = #{outOrIn,jdbcType=TINYINT}, |
||||
|
qrcode_path = #{qrcodePath,jdbcType=VARCHAR}, |
||||
|
big_qrcode_path = #{bigQrcodePath,jdbcType=VARCHAR}, |
||||
|
created_at = #{createdAt,jdbcType=TIMESTAMP}, |
||||
|
updated_at = #{updatedAt,jdbcType=TIMESTAMP}, |
||||
|
rec_status = #{recStatus,jdbcType=TINYINT} |
||||
|
where id = #{id,jdbcType=BIGINT} |
||||
|
</update> |
||||
|
</mapper> |
@ -0,0 +1,61 @@ |
|||||
|
<?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" /> |
||||
|
</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> |
File diff suppressed because one or more lines are too long
@ -0,0 +1,34 @@ |
|||||
|
package com.ccsens.util; |
||||
|
|
||||
|
import cn.hutool.core.date.DateUtil; |
||||
|
import net.glxn.qrgen.core.image.ImageType; |
||||
|
import net.glxn.qrgen.javase.QRCode; |
||||
|
import org.junit.Test; |
||||
|
|
||||
|
import java.io.*; |
||||
|
|
||||
|
public class TestQrCord { |
||||
|
|
||||
|
|
||||
|
@Test |
||||
|
public void test01() throws Exception { |
||||
|
String fileName = "zzz/" + DateUtil.today() + "/" + System.currentTimeMillis() + ".png"; |
||||
|
ByteArrayOutputStream stream = QRCode.from("112233").to(ImageType.BMP).withSize(1000,1000).stream(); |
||||
|
byte[] codeByte = stream.toByteArray(); |
||||
|
File file = new File(WebConstant.UPLOAD_PATH_BASE + "/", fileName); |
||||
|
if (!file.getParentFile().exists()) { |
||||
|
file.getParentFile().mkdirs(); |
||||
|
} |
||||
|
OutputStream out = null; |
||||
|
try { |
||||
|
out = new FileOutputStream(file); |
||||
|
out.write(codeByte); |
||||
|
out.flush(); |
||||
|
} finally { |
||||
|
if ( out!= null) { |
||||
|
out.close(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
} |
Loading…
Reference in new issue