diff --git a/ils-sales-api/config/dev.properties b/ils-sales-api/config/dev.properties index ed23bc70bd0c30ec3bbc9378933679a9a64e8062..59ee56a35aee6f6e3f5a7ff7ea9062c44c75a92b 100644 --- a/ils-sales-api/config/dev.properties +++ b/ils-sales-api/config/dev.properties @@ -1,22 +1,3 @@ - -#rdb -jdbc.driver=net.sf.log4jdbc.DriverSpy -master.jdbc.url=jdbc:log4jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -master.jdbc.user=unlcnils -master.jdbc.password=Unlcnils2016! -slave.jdbc.url=jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -slave.jdbc.user=unlcnils -slave.jdbc.password=Unlcnils2016! - -#securekey -secure.key=kyleKEY -secure.bank.key=kyleKEY - -#redis -spring.redis.sentinel.master=mymaster -spring.redis.sentinel.nodes=10.20.30.131:26379 - -#qiniu qiniuDownloadAddress=http://qiniu.test.huiyunche.cn qiniuBucket=huiyunche-test qiniuHtmlAddress=http://qiniu.test.huiyunche.cn @@ -31,23 +12,4 @@ qiniuBankLogoBucket=bank-logo qiniuBankLogoHtmlAddress=https//qiniu.bank-logo.huiyunche.cn qiniuAccessKey=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP qiniuSecretKey=JzR8sAaj8pE76OraXxwDsEpz0ee1sp2B8LNcG5r2 -qiniuInvalidationTime=7200 - -#jpush -jpush.appKey.driver=6f4106828ac68a3bb79d7324 -jpush.masterSecret.driver=7d0f0982b7d46d7e1b945336 -#无关配置,待清理 -jpush.appKey.stan=6744a08a21a26bbfdb81e2c3 -jpush.masterSecret.stan=e4bbc9f806872cf9204e3093 -jpush.appKey.stancity=054e047550c08171f27508c3 -jpush.masterSecret.stancity=13f9f906abc0f7b65bc46c4e -jpush.appKey.kyle=6f4106828ac68a3bb79d7324 -jpush.masterSecret.kyle=7d0f0982b7d46d7e1b945336 - -#quartz -quartz.isClustered=true - -#SC主数据地址 -ils.sc.url=http://ils.unlcn.com/sc-api -#SC主数据地址请求超时 -ils.sc.url.timeout=7200 \ No newline at end of file +qiniuInvalidationTime=7200 \ No newline at end of file diff --git a/ils-sales-api/config/production.properties b/ils-sales-api/config/production.properties index 1d264034ee880627953d84f27a9a2b29a8e543b3..59ee56a35aee6f6e3f5a7ff7ea9062c44c75a92b 100644 --- a/ils-sales-api/config/production.properties +++ b/ils-sales-api/config/production.properties @@ -1,25 +1,3 @@ - -#rdb -jdbc.driver=net.sf.log4jdbc.DriverSpy -master.jdbc.url=jdbc:log4jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -master.jdbc.user=unlcnils -master.jdbc.password=Unlcnils2016! -slave.jdbc.url=jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -slave.jdbc.user=unlcnils -slave.jdbc.password=Unlcnils2016! - -#securekey -secure.key=kyleKEY -secure.bank.key=kyleKEY - -#redis -spring.redis.sentinel.master=mymaster -spring.redis.sentinel.nodes=10.20.30.131:26379 -spring.redis.password=unlcn -spring.redis.hostname=10.20.30.131 -spring.redis.port=6379 - -#qiniu qiniuDownloadAddress=http://qiniu.test.huiyunche.cn qiniuBucket=huiyunche-test qiniuHtmlAddress=http://qiniu.test.huiyunche.cn @@ -34,23 +12,4 @@ qiniuBankLogoBucket=bank-logo qiniuBankLogoHtmlAddress=https//qiniu.bank-logo.huiyunche.cn qiniuAccessKey=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP qiniuSecretKey=JzR8sAaj8pE76OraXxwDsEpz0ee1sp2B8LNcG5r2 -qiniuInvalidationTime=7200 - -#jpush -jpush.appKey.driver=6f4106828ac68a3bb79d7324 -jpush.masterSecret.driver=7d0f0982b7d46d7e1b945336 -#无关配置,待清理 -jpush.appKey.stan=6744a08a21a26bbfdb81e2c3 -jpush.masterSecret.stan=e4bbc9f806872cf9204e3093 -jpush.appKey.stancity=054e047550c08171f27508c3 -jpush.masterSecret.stancity=13f9f906abc0f7b65bc46c4e -jpush.appKey.kyle=6f4106828ac68a3bb79d7324 -jpush.masterSecret.kyle=7d0f0982b7d46d7e1b945336 - -#quartz -quartz.isClustered=true - -#SC主数据地址 -ils.sc.url=http://ils.unlcn.com/sc-api -#SC主数据地址请求超时 -ils.sc.url.timeout=7200 \ No newline at end of file +qiniuInvalidationTime=7200 \ No newline at end of file diff --git a/ils-sales-api/config/uat.properties b/ils-sales-api/config/uat.properties index ed23bc70bd0c30ec3bbc9378933679a9a64e8062..59ee56a35aee6f6e3f5a7ff7ea9062c44c75a92b 100644 --- a/ils-sales-api/config/uat.properties +++ b/ils-sales-api/config/uat.properties @@ -1,22 +1,3 @@ - -#rdb -jdbc.driver=net.sf.log4jdbc.DriverSpy -master.jdbc.url=jdbc:log4jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -master.jdbc.user=unlcnils -master.jdbc.password=Unlcnils2016! -slave.jdbc.url=jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -slave.jdbc.user=unlcnils -slave.jdbc.password=Unlcnils2016! - -#securekey -secure.key=kyleKEY -secure.bank.key=kyleKEY - -#redis -spring.redis.sentinel.master=mymaster -spring.redis.sentinel.nodes=10.20.30.131:26379 - -#qiniu qiniuDownloadAddress=http://qiniu.test.huiyunche.cn qiniuBucket=huiyunche-test qiniuHtmlAddress=http://qiniu.test.huiyunche.cn @@ -31,23 +12,4 @@ qiniuBankLogoBucket=bank-logo qiniuBankLogoHtmlAddress=https//qiniu.bank-logo.huiyunche.cn qiniuAccessKey=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP qiniuSecretKey=JzR8sAaj8pE76OraXxwDsEpz0ee1sp2B8LNcG5r2 -qiniuInvalidationTime=7200 - -#jpush -jpush.appKey.driver=6f4106828ac68a3bb79d7324 -jpush.masterSecret.driver=7d0f0982b7d46d7e1b945336 -#无关配置,待清理 -jpush.appKey.stan=6744a08a21a26bbfdb81e2c3 -jpush.masterSecret.stan=e4bbc9f806872cf9204e3093 -jpush.appKey.stancity=054e047550c08171f27508c3 -jpush.masterSecret.stancity=13f9f906abc0f7b65bc46c4e -jpush.appKey.kyle=6f4106828ac68a3bb79d7324 -jpush.masterSecret.kyle=7d0f0982b7d46d7e1b945336 - -#quartz -quartz.isClustered=true - -#SC主数据地址 -ils.sc.url=http://ils.unlcn.com/sc-api -#SC主数据地址请求超时 -ils.sc.url.timeout=7200 \ No newline at end of file +qiniuInvalidationTime=7200 \ No newline at end of file diff --git a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderAttachDTO.java b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderAttachDTO.java new file mode 100644 index 0000000000000000000000000000000000000000..c9303d073dd6f5955c75bfef98fe227ee8343fe9 --- /dev/null +++ b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderAttachDTO.java @@ -0,0 +1,61 @@ +package com.unlcn.ils.sales.api.dto; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * Created by houjianhui on 2017/8/15. + */ +@ApiModel(value = "OrderAttachDTO", description = "销售订单附件") +public class OrderAttachDTO { + @ApiModelProperty(value = "主键ID") + private Integer id; + @ApiModelProperty(value = "图片KEY") + private String picKey; + @ApiModelProperty(value = "销售订单ID") + private Integer saleOrderId; + @ApiModelProperty(value = "附件地址") + private String url; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPicKey() { + return picKey; + } + + public void setPicKey(String picKey) { + this.picKey = picKey; + } + + public Integer getSaleOrderId() { + return saleOrderId; + } + + public void setSaleOrderId(Integer saleOrderId) { + this.saleOrderId = saleOrderId; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + @Override + public String toString() { + return "OrderAttachDTO{" + + "id=" + id + + ", picKey='" + picKey + '\'' + + ", saleOrderId=" + saleOrderId + + ", url='" + url + '\'' + + '}'; + } +} diff --git a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderDTO.java b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderDTO.java index efc07b81095299f2303e4def3e0ddf2f4771d02e..906108ba161085ecfebee309d2e67519825ec010 100644 --- a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderDTO.java +++ b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderDTO.java @@ -3,6 +3,7 @@ package com.unlcn.ils.sales.api.dto; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; +import java.math.BigDecimal; import java.util.Date; /** @@ -20,6 +21,10 @@ public class OrderDTO { private Date pickDate; @ApiModelProperty(value = "订单物流状态") private Integer orderStatus; + @ApiModelProperty(value = "销售订单建议价格") + private BigDecimal suggestSalePrice; + @ApiModelProperty(value = "订单附件审核状态") + private Integer attachAuditStatus; @ApiModelProperty(value = "订单审核状态") private Integer auditStatus; @ApiModelProperty(value = "起运地名称") @@ -38,6 +43,10 @@ public class OrderDTO { private String brandSeries; @ApiModelProperty(value = "订单物流显示状态") private String orderStatusText; + @ApiModelProperty(value = "订单附件审核显示状态") + private String attachAuditStatusText; + + public Integer getId() { return id; @@ -151,6 +160,30 @@ public class OrderDTO { this.orderStatusText = orderStatusText; } + public Integer getAttachAuditStatus() { + return attachAuditStatus; + } + + public void setAttachAuditStatus(Integer attachAuditStatus) { + this.attachAuditStatus = attachAuditStatus; + } + + public String getAttachAuditStatusText() { + return attachAuditStatusText; + } + + public void setAttachAuditStatusText(String attachAuditStatusText) { + this.attachAuditStatusText = attachAuditStatusText; + } + + public BigDecimal getSuggestSalePrice() { + return suggestSalePrice; + } + + public void setSuggestSalePrice(BigDecimal suggestSalePrice) { + this.suggestSalePrice = suggestSalePrice; + } + @Override public String toString() { return "OrderDTO{" + @@ -159,6 +192,8 @@ public class OrderDTO { ", userId=" + userId + ", pickDate=" + pickDate + ", orderStatus=" + orderStatus + + ", suggestSalePrice=" + suggestSalePrice + + ", attachAuditStatus=" + attachAuditStatus + ", auditStatus=" + auditStatus + ", departRegionName='" + departRegionName + '\'' + ", departContact='" + departContact + '\'' + @@ -168,6 +203,7 @@ public class OrderDTO { ", destPhone='" + destPhone + '\'' + ", brandSeries='" + brandSeries + '\'' + ", orderStatusText='" + orderStatusText + '\'' + + ", attachAuditStatusText='" + attachAuditStatusText + '\'' + '}'; } } diff --git a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderDetailDTO.java b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderDetailDTO.java index a37d4b2da9b468a33ee9bd4fcd3fad2cdb49a730..c3c4156c69c334472e75b8749299a75a8ba57328 100644 --- a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderDetailDTO.java +++ b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/dto/OrderDetailDTO.java @@ -72,6 +72,9 @@ public class OrderDetailDTO { @ApiModelProperty(value = "商品车信息") private List orderSkus; + @ApiModelProperty(value = "销售订单附件信息") + private List attachs; + public Integer getId() { return id; } @@ -280,6 +283,14 @@ public class OrderDetailDTO { this.pctPrice = pctPrice; } + public List getAttachs() { + return attachs; + } + + public void setAttachs(List attachs) { + this.attachs = attachs; + } + @Override public String toString() { return "OrderDetailDTO{" + @@ -298,7 +309,7 @@ public class OrderDetailDTO { ", auditStatus=" + auditStatus + ", comment='" + comment + '\'' + ", auditComment='" + auditComment + '\'' + - ", pctPrice=" + pctPrice + + ", pctPrice='" + pctPrice + '\'' + ", departRegionCode='" + departRegionCode + '\'' + ", departRegionName='" + departRegionName + '\'' + ", departContact='" + departContact + '\'' + @@ -309,6 +320,7 @@ public class OrderDetailDTO { ", destPhone='" + destPhone + '\'' + ", distance=" + distance + ", orderSkus=" + orderSkus + + ", attachs=" + attachs + '}'; } } diff --git a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/OrderAttachRest.java b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/OrderAttachRest.java new file mode 100644 index 0000000000000000000000000000000000000000..cdc704ec8e0898eb16ed2cbf569328cc415761b3 --- /dev/null +++ b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/OrderAttachRest.java @@ -0,0 +1,50 @@ +package com.unlcn.ils.sales.api.rest; + +import cn.huiyunche.commons.domain.ResultDTO; +import cn.huiyunche.commons.exception.BusinessException; +import com.unlcn.ils.sales.backend.service.OrderAttachService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import io.swagger.annotations.ApiParam; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * Created by houjianhui on 2017/8/14. + */ +@Controller +@RequestMapping(value = "/api/orderAttach", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(value = "/orderAttach", description = "销售订单附件") +public class OrderAttachRest { + + private static final Logger LOGGER = LoggerFactory.getLogger(OrderAttachRest.class); + + @Autowired + private OrderAttachService orderAttachService; + + /** + * 保存销售订单附件 + * + * @return + * @throws Exception + */ + @RequestMapping(value = "/save", method = RequestMethod.POST) + @ApiOperation(value = "保存销售订单附件", notes = "保存销售订单附件", produces = MediaType.APPLICATION_JSON_VALUE) + @ResponseBody + public ResultDTO save(@ApiParam(value = "图片", required = true) String attachs, @ApiParam(value = "销售订单ID", required = true) Integer saleOrderId, @ApiParam(value = "销售订单编码", required = true) String saleOrderCode) { + ResultDTO result = new ResultDTO<>(true, null, "保存附件成功"); + try { + result.setData(orderAttachService.save(attachs, saleOrderId, saleOrderCode)); + } catch (Exception e) { + LOGGER.error("OrderAttachRest save error: {}", e); + throw new BusinessException(e.getMessage()); + } + return result; + } +} diff --git a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/OrderRest.java b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/OrderRest.java index ef72f57f3e4eacccda3aa3dc84809e54bc194b1a..cdff2ddb02a4f74228196348dd0479fb16f10fe8 100644 --- a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/OrderRest.java +++ b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/OrderRest.java @@ -4,15 +4,9 @@ import cn.huiyunche.commons.domain.PageVo; import cn.huiyunche.commons.domain.ResultDTO; import cn.huiyunche.commons.exception.BusinessException; import com.google.common.collect.Lists; -import com.unlcn.ils.sales.api.dto.OrderDTO; -import com.unlcn.ils.sales.api.dto.OrderDetailDTO; -import com.unlcn.ils.sales.api.dto.OrderSaveDTO; -import com.unlcn.ils.sales.api.dto.OrderSkuDTO; +import com.unlcn.ils.sales.api.dto.*; import com.unlcn.ils.sales.api.query.OrderQuery; -import com.unlcn.ils.sales.backend.bo.OrderBO; -import com.unlcn.ils.sales.backend.bo.OrderQueryBO; -import com.unlcn.ils.sales.backend.bo.OrderSkuBO; -import com.unlcn.ils.sales.backend.bo.OrderViewBO; +import com.unlcn.ils.sales.backend.bo.*; import com.unlcn.ils.sales.backend.enums.OrderAuditStatusEnum; import com.unlcn.ils.sales.backend.enums.OrderStatusEnum; import com.unlcn.ils.sales.backend.service.OrderService; @@ -128,6 +122,17 @@ public class OrderRest { skuDTOS.add(skuDTO); }); } + + List attachs = viewBO.getAttachs(); + List attachDTOS = Lists.newArrayList(); + if (CollectionUtils.isNotEmpty(attachs)) { + attachs.stream().forEach(val -> { + OrderAttachDTO attachDTO = new OrderAttachDTO(); + BeanUtils.copyProperties(val, attachDTO); + attachDTOS.add(attachDTO); + }); + } + detailDTO.setAttachs(attachDTOS); detailDTO.setOrderSkus(skuDTOS); } result.setData(detailDTO); @@ -245,4 +250,34 @@ public class OrderRest { } + /** + * 销售订单附件审核 + * + * @param orderCode 销售订单编码 + * @param attachAuditStatus 销售订单附件审核状态 + * @return + */ + @RequestMapping(value = "/updateAttachAuditStatus", method = RequestMethod.POST) + @ApiOperation(value = "销售订单附件审核", notes = "销售订单附件审核", produces = MediaType.APPLICATION_JSON_VALUE) + @ApiResponses(value = {@ApiResponse(code = 404, message = "updateAttachAuditStatusByOrderCode not found")}) + @ResponseBody + public ResultDTO updateAttachAuditStatusBySaleOrderCode(@ApiParam(value = "销售订单编码", required = true) String orderCode, + @ApiParam(value = "销售订单附件审核状态", required = true) Integer attachAuditStatus ) { + ResultDTO result = new ResultDTO<>(true, null, "销售订单审核状态更新成功"); + if (StringUtils.isBlank(orderCode)) { + LOGGER.info("OrderRest.updateAttachAuditStatusBySaleOrderCode orderCode must not be null"); + throw new BusinessException("销售订单编码"); + } else if (Objects.equals(attachAuditStatus, null)) { + LOGGER.info("OrderRest.updateAttachAuditStatusBySaleOrderCode attachAuditStatus must not be null"); + throw new BusinessException("销售订单附件审核状态"); + } + try { + result.setData(orderService.updateAttachAuditStatusBySaleOrderCode(orderCode, attachAuditStatus)); + } catch (Exception e) { + LOGGER.error("OrderRest updateAttachAuditStatusBySaleOrderCode error: {}", e); + throw new BusinessException(e.getMessage()); + } + return result; + } + } diff --git a/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/QiniuRest.java b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/QiniuRest.java new file mode 100644 index 0000000000000000000000000000000000000000..dfc051cec2a9fa4c9c0226d251754f139a22ad45 --- /dev/null +++ b/ils-sales-api/src/main/java/com/unlcn/ils/sales/api/rest/QiniuRest.java @@ -0,0 +1,64 @@ +package com.unlcn.ils.sales.api.rest; + +import cn.huiyunche.commons.domain.ResultDTO; +import cn.huiyunche.commons.exception.BusinessException; +import cn.huiyunche.commons.utils.QiniuUtil; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.http.MediaType; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.ResponseBody; + +/** + * Created by houjianhui on 2017/8/14. + */ +@Controller +@RequestMapping(value = "/api/qiniu", produces = MediaType.APPLICATION_JSON_VALUE) +@Api(value = "/qiniu", description = "七牛工具类") +public class QiniuRest { + + private static final Logger LOGGER = LoggerFactory.getLogger(QiniuRest.class); + + /** + * 获取上传凭证 + * + * @return + */ + @RequestMapping(value = "/uploadToken", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "获取上传凭证", notes = "获取上传凭证", produces = MediaType.APPLICATION_JSON_VALUE) + public ResultDTO generateSimpleUploadToken() { + ResultDTO result = new ResultDTO<>(true, null, "获取成功"); + try { + result.setData(QiniuUtil.generateSimpleUploadToken()); + } catch (Exception e) { + LOGGER.error("QiniuRest.generateSimpleUploadToken error: {}", e); + throw new BusinessException(e.getMessage()); + } + return result; + } + + /** + * 获取下载图片接口 + * + * @param key 图片KEY + * @return + */ + @RequestMapping(value = "/downloadUrl", method = RequestMethod.GET) + @ResponseBody + @ApiOperation(value = "获取下载图片链接", notes = "获取下载图片链接", produces = MediaType.APPLICATION_JSON_VALUE) + public ResultDTO generateDownloadURL(String key) { + ResultDTO result = new ResultDTO<>(true, null, "获取下载链接成功"); + try { + result.setData(QiniuUtil.generateDownloadURL(key, "")); + } catch (Exception e) { + LOGGER.error("QiniuRest.generateDownloadURL error: {}", e); + throw new BusinessException(e.getMessage()); + } + return result; + } +} diff --git a/ils-sales-api/src/main/resources/constant.properties b/ils-sales-api/src/main/resources/constant.properties index 1d264034ee880627953d84f27a9a2b29a8e543b3..59ee56a35aee6f6e3f5a7ff7ea9062c44c75a92b 100644 --- a/ils-sales-api/src/main/resources/constant.properties +++ b/ils-sales-api/src/main/resources/constant.properties @@ -1,25 +1,3 @@ - -#rdb -jdbc.driver=net.sf.log4jdbc.DriverSpy -master.jdbc.url=jdbc:log4jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -master.jdbc.user=unlcnils -master.jdbc.password=Unlcnils2016! -slave.jdbc.url=jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -slave.jdbc.user=unlcnils -slave.jdbc.password=Unlcnils2016! - -#securekey -secure.key=kyleKEY -secure.bank.key=kyleKEY - -#redis -spring.redis.sentinel.master=mymaster -spring.redis.sentinel.nodes=10.20.30.131:26379 -spring.redis.password=unlcn -spring.redis.hostname=10.20.30.131 -spring.redis.port=6379 - -#qiniu qiniuDownloadAddress=http://qiniu.test.huiyunche.cn qiniuBucket=huiyunche-test qiniuHtmlAddress=http://qiniu.test.huiyunche.cn @@ -34,23 +12,4 @@ qiniuBankLogoBucket=bank-logo qiniuBankLogoHtmlAddress=https//qiniu.bank-logo.huiyunche.cn qiniuAccessKey=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP qiniuSecretKey=JzR8sAaj8pE76OraXxwDsEpz0ee1sp2B8LNcG5r2 -qiniuInvalidationTime=7200 - -#jpush -jpush.appKey.driver=6f4106828ac68a3bb79d7324 -jpush.masterSecret.driver=7d0f0982b7d46d7e1b945336 -#无关配置,待清理 -jpush.appKey.stan=6744a08a21a26bbfdb81e2c3 -jpush.masterSecret.stan=e4bbc9f806872cf9204e3093 -jpush.appKey.stancity=054e047550c08171f27508c3 -jpush.masterSecret.stancity=13f9f906abc0f7b65bc46c4e -jpush.appKey.kyle=6f4106828ac68a3bb79d7324 -jpush.masterSecret.kyle=7d0f0982b7d46d7e1b945336 - -#quartz -quartz.isClustered=true - -#SC主数据地址 -ils.sc.url=http://ils.unlcn.com/sc-api -#SC主数据地址请求超时 -ils.sc.url.timeout=7200 \ No newline at end of file +qiniuInvalidationTime=7200 \ No newline at end of file diff --git a/ils-sales-api/src/main/resources/spring/applicationContext-security.xml b/ils-sales-api/src/main/resources/spring/applicationContext-security.xml index 9c8ec0d029dfecc5670cbc8e4f534189ec1ee27e..15485e976c2fee2f706a150b2d6336f1d9476772 100644 --- a/ils-sales-api/src/main/resources/spring/applicationContext-security.xml +++ b/ils-sales-api/src/main/resources/spring/applicationContext-security.xml @@ -17,14 +17,16 @@ + + - + diff --git a/ils-sales-api/src/main/webapp/META-INF/autoconf/auto-config.xml b/ils-sales-api/src/main/webapp/META-INF/autoconf/auto-config.xml index b4f79a4285d0a75e2ba6d52216b2f949b2469f20..9f6c8c976753f9a2fd0a25e48341bdc2c018bb8a 100644 --- a/ils-sales-api/src/main/webapp/META-INF/autoconf/auto-config.xml +++ b/ils-sales-api/src/main/webapp/META-INF/autoconf/auto-config.xml @@ -1,13 +1,23 @@ - - - - - + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ils-sales-api/src/main/webapp/META-INF/autoconf/config.vm b/ils-sales-api/src/main/webapp/META-INF/autoconf/config.vm index 86d0c913d94fd0cacbe28129d879aafc1cad840a..fdace6563388bc0a24e29af8aac921c05e06ee92 100644 --- a/ils-sales-api/src/main/webapp/META-INF/autoconf/config.vm +++ b/ils-sales-api/src/main/webapp/META-INF/autoconf/config.vm @@ -1,7 +1,16 @@ -##securekey -secure.key=${secure.key} - -#SC主数据地址 -ils.sc.url=${ils.sc.url} -#SC主数据地址请求超时 -ils.sc.url.timeout=${ils.sc.url.timeout} +##qiniu +qiniuDownloadAddress=${qiniuDownloadAddress} +qiniuHtmlAddress=${qiniuHtmlAddress} +qiniulogoDownloadAddress=${qiniulogoDownloadAddress} +qiniulogoHtmlAddress=${qiniulogoHtmlAddress} +qiniuBankLogoDownloadAddress=${qiniuBankLogoDownloadAddress} +qiniuBankLogoHtmlAddress=${qiniuBankLogoHtmlAddress} +qiniuSendbydriverDownloadAddress=${qiniuSendbydriverDownloadAddress} +qiniuSendbydriverHtmlAddress=${qiniuSendbydriverHtmlAddress} +qiniuAccessKey=wQknukoe-lwcjLKEnsBz-BrL61M1BEMP0Gq_M2qP +qiniuSecretKey=JzR8sAaj8pE76OraXxwDsEpz0ee1sp2B8LNcG5r2 +qiniuInvalidationTime=7200 +qiniuBucket=${qiniuBucket} +qiniulogoBucket=${qiniulogoBucket} +qiniuBankLogoBucket=${qiniuBankLogoBucket} +qiniuSendbydriverBucket=${qiniuSendbydriverBucket} \ No newline at end of file diff --git a/ils-sales-backend/config/dev.properties b/ils-sales-backend/config/dev.properties index 1899184672b4852ed4b6451efd8752ba59de3364..159e0f9211abbf34a625b3bcc7583e1e557e6a4c 100644 --- a/ils-sales-backend/config/dev.properties +++ b/ils-sales-backend/config/dev.properties @@ -1,19 +1,25 @@ #rdb jdbc.driver=net.sf.log4jdbc.DriverSpy -master.jdbc.url=jdbc:log4jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -master.jdbc.user=unlcnils -master.jdbc.password=Unlcnils2016! -slave.jdbc.url=jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -slave.jdbc.user=unlcnils -slave.jdbc.password=Unlcnils2016! +master.jdbc.url=jdbc:log4jdbc:mysql://119.57.140.26:8095/sales?useUnicode=true&characterEncoding=utf8 +master.jdbc.user=sales +master.jdbc.password=Unlcn@12 +slave.jdbc.url=jdbc:mysql://119.57.140.26:8095/sales?useUnicode=true&characterEncoding=utf8 +slave.jdbc.user=sales +slave.jdbc.password=Unlcn@12 #securekey secure.key=kyleKEY secure.bank.key=kyleKEY #redis -spring.redis.sentinel.master=mymaster -spring.redis.sentinel.nodes=10.20.30.131:26379 +#spring.redis.sentinel.master=mymaster +#spring.redis.sentinel.nodes=10.20.30.131:26379 +#spring.redis.password=unlcn +#spring.redis.hostname=10.20.30.131 +#spring.redis.port=6379 +spring.redis.sentinel.master=mymaster1 +spring.redis.sentinel.nodes=119.57.140.26:26380 + #qiniu qiniuDownloadAddress=http://qiniu.test.huiyunche.cn @@ -51,14 +57,19 @@ jpush.masterSecret.kyle=7d0f0982b7d46d7e1b945336 quartz.isClustered=true #SC主数据地址 -ils.sc.url=http://ils.unlcn.com/sc-api +ils.sc.url=http://119.57.140.26/ils-sc-api #SC主数据地址请求超时 ils.sc.url.timeout=7200 #kyle商户端地址 -ils.kyle.url=http://kylecorp.huiyunche.cn +ils.kyle.url=http://119.57.140.26/kylebuss #kyle商户端地址请求超时 ils.kyle.url.timeout=7200 +#BMS端地址 +ils.bms.url=http://119.57.140.26/hyc-bms-api +#kyle商户端地址请求超时 +ils.bms.url.timeout=7200 + #整板数量配置 ils.sale.brands=10 diff --git a/ils-sales-backend/config/production.properties b/ils-sales-backend/config/production.properties index e41505c9f5089090c2eb5e719c480130940116b5..6d9344f41c3661e76aaedd2fdd6c2fe07ce18fd8 100644 --- a/ils-sales-backend/config/production.properties +++ b/ils-sales-backend/config/production.properties @@ -1,22 +1,25 @@ #rdb jdbc.driver=net.sf.log4jdbc.DriverSpy -master.jdbc.url=jdbc:log4jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -master.jdbc.user=unlcnils -master.jdbc.password=Unlcnils2016! -slave.jdbc.url=jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -slave.jdbc.user=unlcnils -slave.jdbc.password=Unlcnils2016! +master.jdbc.url=jdbc:log4jdbc:mysql://119.57.140.26:8095/sales?useUnicode=true&characterEncoding=utf8 +master.jdbc.user=sales +master.jdbc.password=Unlcn@12 +slave.jdbc.url=jdbc:mysql://119.57.140.26:8095/sales?useUnicode=true&characterEncoding=utf8 +slave.jdbc.user=sales +slave.jdbc.password=Unlcn@12 #securekey secure.key=kyleKEY secure.bank.key=kyleKEY #redis -spring.redis.sentinel.master=mymaster -spring.redis.sentinel.nodes=10.20.30.131:26379 -spring.redis.password=unlcn -spring.redis.hostname=10.20.30.131 -spring.redis.port=6379 +#spring.redis.sentinel.master=mymaster +#spring.redis.sentinel.nodes=10.20.30.131:26379 +#spring.redis.password=unlcn +#spring.redis.hostname=10.20.30.131 +#spring.redis.port=6379 +spring.redis.sentinel.master=mymaster1 +spring.redis.sentinel.nodes=119.57.140.26:26380 + #qiniu qiniuDownloadAddress=http://qiniu.test.huiyunche.cn @@ -63,5 +66,10 @@ ils.kyle.url=http://kylebuss.huiyunche.cn #kyle商户端地址请求超时 ils.kyle.url.timeout=7200 +#BMS端地址 +ils.bms.url=http://bms.huiyunche.cn +#kyle商户端地址请求超时 +ils.bms.url.timeout=7200 + #整板数量配置 ils.sale.brands=10 diff --git a/ils-sales-backend/config/uat.properties b/ils-sales-backend/config/uat.properties index 1899184672b4852ed4b6451efd8752ba59de3364..154aa5a1e17b4eca66c68ce1497fa183b748ded8 100644 --- a/ils-sales-backend/config/uat.properties +++ b/ils-sales-backend/config/uat.properties @@ -60,5 +60,10 @@ ils.kyle.url=http://kylecorp.huiyunche.cn #kyle商户端地址请求超时 ils.kyle.url.timeout=7200 +#BMS端地址 +ils.bms.url=http://119.57.140.26/hyc-bms-api +#kyle商户端地址请求超时 +ils.bms.url.timeout=7200 + #整板数量配置 ils.sale.brands=10 diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/bo/OrderAttachViewBO.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/bo/OrderAttachViewBO.java new file mode 100644 index 0000000000000000000000000000000000000000..581edec3497c19caf3eb9c3bc34e5a28d47565ae --- /dev/null +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/bo/OrderAttachViewBO.java @@ -0,0 +1,53 @@ +package com.unlcn.ils.sales.backend.bo; + +/** + * Created by houjianhui on 2017/8/15. + */ +public class OrderAttachViewBO { + private Integer id; + private String picKey; + private Integer saleOrderId; + private String url; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPicKey() { + return picKey; + } + + public void setPicKey(String picKey) { + this.picKey = picKey; + } + + public Integer getSaleOrderId() { + return saleOrderId; + } + + public void setSaleOrderId(Integer saleOrderId) { + this.saleOrderId = saleOrderId; + } + + public String getUrl() { + return url; + } + + public void setUrl(String url) { + this.url = url; + } + + @Override + public String toString() { + return "OrderAttachViewBO{" + + "id=" + id + + ", picKey='" + picKey + '\'' + + ", saleOrderId=" + saleOrderId + + ", url='" + url + '\'' + + '}'; + } +} diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/bo/OrderViewBO.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/bo/OrderViewBO.java index 84fe76be2012a2ca1a896097e0e2ac3e3af7f381..31c8039a7c8a448af062b81d988a0c25af756ebc 100644 --- a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/bo/OrderViewBO.java +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/bo/OrderViewBO.java @@ -24,10 +24,12 @@ public class OrderViewBO { private BigDecimal finalSalePrice; private BigDecimal finalPurchasePrice; private Integer orderStatus; + private Integer attachAuditStatus; private Integer auditStatus; private Integer auditId; private String comment; private String auditComment; + private String attachAuditStatusText; // 销售订单地址表 private String departRegionCode; @@ -44,6 +46,8 @@ public class OrderViewBO { // 销售订单商品车表 private List orderSkus; + private List attachs; + public Integer getId() { return id; } @@ -260,6 +264,30 @@ public class OrderViewBO { this.gmtCreate = gmtCreate; } + public Integer getAttachAuditStatus() { + return attachAuditStatus; + } + + public void setAttachAuditStatus(Integer attachAuditStatus) { + this.attachAuditStatus = attachAuditStatus; + } + + public String getAttachAuditStatusText() { + return attachAuditStatusText; + } + + public void setAttachAuditStatusText(String attachAuditStatusText) { + this.attachAuditStatusText = attachAuditStatusText; + } + + public List getAttachs() { + return attachs; + } + + public void setAttachs(List attachs) { + this.attachs = attachs; + } + @Override public String toString() { return "OrderViewBO{" + @@ -275,10 +303,12 @@ public class OrderViewBO { ", finalSalePrice=" + finalSalePrice + ", finalPurchasePrice=" + finalPurchasePrice + ", orderStatus=" + orderStatus + + ", attachAuditStatus=" + attachAuditStatus + ", auditStatus=" + auditStatus + ", auditId=" + auditId + ", comment='" + comment + '\'' + ", auditComment='" + auditComment + '\'' + + ", attachAuditStatusText='" + attachAuditStatusText + '\'' + ", departRegionCode='" + departRegionCode + '\'' + ", departRegionName='" + departRegionName + '\'' + ", departContact='" + departContact + '\'' + @@ -290,6 +320,7 @@ public class OrderViewBO { ", distance=" + distance + ", gmtCreate=" + gmtCreate + ", orderSkus=" + orderSkus + + ", attachs=" + attachs + '}'; } } diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/constant/AutoConfConstant.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/constant/AutoConfConstant.java new file mode 100644 index 0000000000000000000000000000000000000000..6ffe1e4f1de5ce15fdbdbcd67d4f92f0f0ccdec2 --- /dev/null +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/constant/AutoConfConstant.java @@ -0,0 +1,122 @@ +package com.unlcn.ils.sales.backend.constant; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.annotation.Configuration; + +/** + * Created by houjianhui on 2017/8/17. + */ +@Configuration +public class AutoConfConstant { + + @Value("${ils.sc.url}") + private String sc; + + @Value("${ils.sc.url.timeout}") + private Integer scTime; + + @Value("${ils.kyle.url}") + private String kyle; + + @Value("${ils.kyle.url.timeout}") + private Integer kyleTime; + + @Value("${ils.bms.url}") + private String bms; + + @Value("${ils.bms.url.timeout}") + private Integer bmsTime; + + @Value("${ils.sale.brands}") + private Integer brands; + + @Value("${secure.key}") + private String secure; + + @Value("${qiniuBankLogoBucket}") + private String BankLogo; + + + @Value("${secure.bank.key}") + private String bankSecureKey; + + public String getSc() { + return sc; + } + + public void setSc(String sc) { + this.sc = sc; + } + + public Integer getScTime() { + return scTime; + } + + public void setScTime(Integer scTime) { + this.scTime = scTime; + } + + public String getKyle() { + return kyle; + } + + public void setKyle(String kyle) { + this.kyle = kyle; + } + + public Integer getKyleTime() { + return kyleTime; + } + + public void setKyleTime(Integer kyleTime) { + this.kyleTime = kyleTime; + } + + public String getBms() { + return bms; + } + + public void setBms(String bms) { + this.bms = bms; + } + + public Integer getBmsTime() { + return bmsTime; + } + + public void setBmsTime(Integer bmsTime) { + this.bmsTime = bmsTime; + } + + public Integer getBrands() { + return brands; + } + + public void setBrands(Integer brands) { + this.brands = brands; + } + + public String getSecure() { + return secure; + } + + public void setSecure(String secure) { + this.secure = secure; + } + + public String getBankLogo() { + return BankLogo; + } + + public void setBankLogo(String bankLogo) { + BankLogo = bankLogo; + } + + public String getBankSecureKey() { + return bankSecureKey; + } + + public void setBankSecureKey(String bankSecureKey) { + this.bankSecureKey = bankSecureKey; + } +} diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/enums/AttachAuditStatusEnum.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/enums/AttachAuditStatusEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..5d7e9e916305cccf07f1349f62deff6f86347234 --- /dev/null +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/enums/AttachAuditStatusEnum.java @@ -0,0 +1,37 @@ +package com.unlcn.ils.sales.backend.enums; + +/** + * Created by houjianhui on 2017/6/10. + */ +public enum AttachAuditStatusEnum { + + ORDER_INIT(10, "未提交"), + ORDER_SUBMIT(20, "已提交"), + ORDER_PASS(30, "已通过"), + ORDER_REFUSE(40, "未通过"); + + private final int value; + private final String text; + + AttachAuditStatusEnum(int value, String text) { + this.value = value; + this.text = text; + } + + public int getValue() { + return value; + } + + public String getText() { + return text; + } + + public static AttachAuditStatusEnum getByValue(int value){ + for (AttachAuditStatusEnum temp : AttachAuditStatusEnum.values()) { + if(temp.getValue() == value){ + return temp; + } + } + return null; + } +} diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAddrServiceImpl.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAddrServiceImpl.java index c48e301190b52d55d72f8ff9144f841a91926b2b..e1f03e09d4a128c9c62c6e7493702d26c581e4bf 100644 --- a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAddrServiceImpl.java +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAddrServiceImpl.java @@ -2,11 +2,11 @@ package com.unlcn.ils.sales.backend.service; import cn.huiyunche.commons.exception.BusinessException; import cn.huiyunche.commons.utils.HttpRequestUtil; -import cn.huiyunche.commons.utils.PropertiesUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.unlcn.ils.sales.backend.bo.AreaBO; import com.unlcn.ils.sales.backend.bo.OrderBO; +import com.unlcn.ils.sales.backend.constant.AutoConfConstant; import com.unlcn.ils.sales.base.mapper.SaleOrderAddrMapper; import com.unlcn.ils.sales.base.model.SaleOrderAddr; import org.slf4j.Logger; @@ -17,7 +17,6 @@ import org.springframework.stereotype.Service; import java.util.List; import java.util.Objects; -import java.util.Properties; /** * Created by houjianhui on 2017/5/27. @@ -30,6 +29,9 @@ public class OrderAddrServiceImpl implements OrderAddrService { @Autowired private SaleOrderAddrMapper orderAddrMapper; + @Autowired + private AutoConfConstant autoConfConstant; + private static final String startArea = "startArea", endArea = "endArea", province = "province"; @Override @@ -74,9 +76,8 @@ public class OrderAddrServiceImpl implements OrderAddrService { } private List resolvAreaFormSCResult(String key, Integer startAreaId, Integer endProvinceId, String tag) throws Exception { - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String url = PropertiesUtil.getString(property, "ils.sc.url", ""); - Integer time = PropertiesUtil.getInt(property, "ils.sc.url.timeout", 7200); + String url = autoConfConstant.getSc(); + Integer time = autoConfConstant.getScTime(); if (startArea.equals(tag)) { url = url + "/api/network/lnlines/queryStartArea/" + key; } else if (province.equals(tag)) { diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAttachService.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAttachService.java new file mode 100644 index 0000000000000000000000000000000000000000..18c2af600e837f65b5894e24023f348af9ebaa92 --- /dev/null +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAttachService.java @@ -0,0 +1,27 @@ +package com.unlcn.ils.sales.backend.service; + +/** + * Created by houjianhui on 2017/8/14. + */ +public interface OrderAttachService { + + /** + * 保存销售订单附件 + * + * @param attach 附件JSON字符串 + * @param saleOrderId 销售订单ID + * @param saleOrderId 销售订单编码 + * @return + * @throws Exception + */ + int save(String attach, Integer saleOrderId, String saleOrderCode) throws Exception; + + /** + * 根据销售订单ID删除销售订单附件信息 + * + * @param saleOrderId 销售订单ID + * @return + * @throws Exception + */ + int deleteAttachBySaleOrderId(Integer saleOrderId) throws Exception; +} diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAttachServiceImpl.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAttachServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..7116fdfcfaf375cab5891a0b479a95838439dc9c --- /dev/null +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAttachServiceImpl.java @@ -0,0 +1,117 @@ +package com.unlcn.ils.sales.backend.service; + +import cn.huiyunche.commons.exception.BusinessException; +import cn.huiyunche.commons.utils.HttpRequestUtil; +import com.alibaba.fastjson.JSONArray; +import com.alibaba.fastjson.JSONObject; +import com.unlcn.ils.sales.backend.bo.UserViewBO; +import com.unlcn.ils.sales.backend.constant.AutoConfConstant; +import com.unlcn.ils.sales.backend.enums.AttachAuditStatusEnum; +import com.unlcn.ils.sales.base.mapper.SaleOrderAttachMapper; +import com.unlcn.ils.sales.base.model.SaleOrderAttach; +import com.unlcn.ils.sales.base.model.SaleOrderAttachExample; +import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** + * Created by houjianhui on 2017/8/14. + */ +@Service +public class OrderAttachServiceImpl implements OrderAttachService{ + + private static final Logger LOGGER = LoggerFactory.getLogger(OrderAttachServiceImpl.class); + + @Autowired + private SaleOrderAttachMapper saleOrderAttachMapper; + + @Autowired + private OrderService orderService; + + @Autowired + private AutoConfConstant autoConfConstant; + + @Autowired + private UserService userService; + + @Override + public int save(String attach, Integer saleOrderId, String saleOrderCode) throws Exception { + if (Objects.equals(attach, null) || Objects.equals(attach, "")) { + LOGGER.info("OrderAttachServiceImpl.save param attach must not be null"); + throw new IllegalArgumentException("销售订单附件信息不能为空"); + } else if (Objects.equals(saleOrderId, null) || Objects.equals(saleOrderId, 0)) { + LOGGER.info("OrderAttachServiceImpl.save param saleOrderId must not be null"); + throw new IllegalArgumentException("销售订单主键不能为空"); + } else if (StringUtils.isBlank(saleOrderCode)) { + LOGGER.info("OrderAttachServiceImpl.save param saleOrderCode must not be null"); + throw new IllegalArgumentException("销售订单编码不能为空"); + } + + // 删除历史附件信息 + deleteAttachBySaleOrderId(saleOrderId); + + // 插入最新附件信息 + List attachs = JSONArray.parseArray(attach, String.class); + if (CollectionUtils.isNotEmpty(attachs)) { + SaleOrderAttach orderAttach = new SaleOrderAttach(); + orderAttach.setSaleOrderId(saleOrderId); + attachs.stream().forEach(item -> { + orderAttach.setPicKey(item); + saleOrderAttachMapper.insertSelective(orderAttach); + }); + } + + // 更新销售订单附件审核状态 + orderService.updateAttachAuditStatusBySaleOrderId(saleOrderId, AttachAuditStatusEnum.ORDER_SUBMIT.getValue()); + + UserViewBO user = userService.getCurrentUser(); + + pushSaleOrderFormBmsResult(saleOrderId, saleOrderCode, attach, user.getRealName()); + return 0; + } + + private void pushSaleOrderFormBmsResult(Integer salesOrderId, String salesOrderCode, String picKey, String createUser) throws Exception { + Map map = new HashMap<>(); + map.put("salesOrderId", salesOrderId); + map.put("salesOrderCode", salesOrderCode); + map.put("picKey", picKey); + map.put("createUser", createUser); + String result = HttpRequestUtil.sendHttpPost(autoConfConstant.getBms() + "api/audit/submit", map, autoConfConstant.getBmsTime()); + if (!Objects.equals(result, null)) { + JSONObject jsonObject = JSONObject.parseObject(result); + String msgCode = jsonObject.getString("messageCode"); + String msg = jsonObject.getString("message"); + Boolean success = jsonObject.getBoolean("success"); + if (!success) { + LOGGER.info("OrderAttachServiceImpl.pushSaleOrderFormBmsResult result error"); + throw new BusinessException(msgCode, msg); + } + } + } + + @Override + public int deleteAttachBySaleOrderId(Integer saleOrderId) throws Exception { + if (Objects.equals(saleOrderId, null) || Objects.equals(saleOrderId, "") || Objects.equals(saleOrderId, 0)) { + LOGGER.info("OrderAttachServiceImpl.deleteAttachBySaleOrderId param saleOrderId must not be null"); + throw new IllegalArgumentException("销售订单主键不能为空"); + } + SaleOrderAttachExample example = new SaleOrderAttachExample(); + example.createCriteria().andSaleOrderIdEqualTo(saleOrderId).andDeleteMarkEqualTo(true); + List attaches = saleOrderAttachMapper.selectByExample(example); + if (CollectionUtils.isNotEmpty(attaches)) { + attaches.stream().forEach(item -> { + item.setDeleteMark(false); + saleOrderAttachMapper.updateByPrimaryKeySelective(item); + }); + } + return 0; + } +} diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAuditServiceImpl.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAuditServiceImpl.java index 7ac9a7d0e19e4bf7b8e6cd34e3023da21c8f37b8..cf1a5827b6ef1b0f9c08eb0c0a63c558f720ca00 100644 --- a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAuditServiceImpl.java +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderAuditServiceImpl.java @@ -2,12 +2,12 @@ package com.unlcn.ils.sales.backend.service; import cn.huiyunche.commons.exception.BusinessException; import cn.huiyunche.commons.utils.HttpRequestUtil; -import cn.huiyunche.commons.utils.PropertiesUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.unlcn.ils.sales.backend.bo.OrderAuditBO; import com.unlcn.ils.sales.backend.bo.OrderToKyleBO; import com.unlcn.ils.sales.backend.bo.PriceBO; +import com.unlcn.ils.sales.backend.constant.AutoConfConstant; import com.unlcn.ils.sales.backend.enums.OrderAuditStatusEnum; import com.unlcn.ils.sales.base.mapper.SaleOrderAuditMapper; import com.unlcn.ils.sales.base.mapper.SaleOrderViewMapper; @@ -34,6 +34,9 @@ public class OrderAuditServiceImpl implements OrderAuditService { @Autowired private SaleOrderAuditMapper orderAuditMapper; + @Autowired + private AutoConfConstant autoConfConstant; + @Autowired private SaleOrderViewMapper orderViewMapper; @@ -173,9 +176,8 @@ public class OrderAuditServiceImpl implements OrderAuditService { * @throws Exception */ private void pushSaleOrderToKyle(Map map) throws Exception { - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String url = PropertiesUtil.getString(property, "ils.kyle.url", "") + "/saleOrder/syncSaleOrder"; - Integer time = PropertiesUtil.getInt(property, "ils.kyle.url.timeout", 7200); + String url = autoConfConstant.getKyle() + "/saleOrder/syncSaleOrder"; + Integer time = autoConfConstant.getKyleTime(); String result = HttpRequestUtil.sendHttpPost(url, map, time); if (!Objects.equals(result, null)) { JSONObject jsonObject = JSONObject.parseObject(result); diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderService.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderService.java index 4773dd92184106033d24a233f52b3abab02477f6..01a5e3c2c35065ff8faedc9109f38585ed29fe8d 100644 --- a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderService.java +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderService.java @@ -89,4 +89,24 @@ public interface OrderService { */ Integer updateSaleOrderStatusByKyleOrderStatus() throws Exception; + /** + * 更新销售订单附件审核状态 + * + * @param orderCode 订单编号 + * @param attachAuditStatus 状态 + * @return + * @throws Exception + */ + Integer updateAttachAuditStatusBySaleOrderCode(String orderCode, Integer attachAuditStatus) throws Exception; + + /** + * 更新销售订单附件审核状态 + * + * @param id 销售订单ID + * @param attachAuditStatus 状态 + * @return + * @throws Exception + */ + Integer updateAttachAuditStatusBySaleOrderId(Integer id, Integer attachAuditStatus) throws Exception; + } diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderServiceImpl.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderServiceImpl.java index 403f0faa39d4d1a079a6e870c974008e25f77ec5..b5c6b37b5fe0ec21ff8e6a0ebbc12ba955c43482 100644 --- a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderServiceImpl.java +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderServiceImpl.java @@ -3,19 +3,18 @@ package com.unlcn.ils.sales.backend.service; import cn.huiyunche.commons.domain.PageVo; import cn.huiyunche.commons.exception.BusinessException; import cn.huiyunche.commons.utils.HttpRequestUtil; -import cn.huiyunche.commons.utils.PropertiesUtil; +import cn.huiyunche.commons.utils.QiniuUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.google.common.collect.Lists; import com.unlcn.ils.sales.backend.bo.*; +import com.unlcn.ils.sales.backend.constant.AutoConfConstant; +import com.unlcn.ils.sales.backend.enums.AttachAuditStatusEnum; import com.unlcn.ils.sales.backend.enums.OrderStatusEnum; import com.unlcn.ils.sales.backend.util.UniquenessUtil; import com.unlcn.ils.sales.base.mapper.SaleOrderMapper; import com.unlcn.ils.sales.base.mapper.SaleOrderViewMapper; -import com.unlcn.ils.sales.base.model.OrderSkuViewDAO; -import com.unlcn.ils.sales.base.model.OrderViewDAO; -import com.unlcn.ils.sales.base.model.SaleOrder; -import com.unlcn.ils.sales.base.model.SaleOrderExample; +import com.unlcn.ils.sales.base.model.*; import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -57,6 +56,9 @@ public class OrderServiceImpl implements OrderService { @Autowired private UserService userService; + @Autowired + private AutoConfConstant autoConfConstant; + @Override public int save(OrderBO bo, BindingResult br) throws Exception { LOGGER.info("OrderServiceImpl.save params OrderBO: {}", bo); @@ -199,6 +201,42 @@ public class OrderServiceImpl implements OrderService { return null; } + @Override + public Integer updateAttachAuditStatusBySaleOrderCode(String orderCode, Integer attachAuditStatus) throws Exception { + if (StringUtils.isBlank(orderCode)) { + LOGGER.info("OrderServiceImpl.updateAttachAuditStatusBySaleOrderCode param orderCode must not be null"); + throw new IllegalArgumentException("销售订单编码不能为空"); + } else if (Objects.equals(attachAuditStatus, null) || Objects.equals(attachAuditStatus, "") || Objects.equals(attachAuditStatus, 0)) { + LOGGER.info("OrderServiceImpl.updateAttachAuditStatusBySaleOrderCode param attachAuditStatus must not be null"); + throw new IllegalArgumentException("销售订单附件审核状态不能为空"); + } + SaleOrderExample example = new SaleOrderExample(); + example.createCriteria().andCodeEqualTo(orderCode); + List orders = orderMapper.selectByExample(example); + if (CollectionUtils.isNotEmpty(orders)) { + orders.stream().forEach(item -> { + item.setAttachAuditStatus(AttachAuditStatusEnum.getByValue(attachAuditStatus).getValue()); + orderMapper.updateByPrimaryKeySelective(item); + }); + } + return 0; + } + + @Override + public Integer updateAttachAuditStatusBySaleOrderId(Integer id, Integer attachAuditStatus) throws Exception { + if (Objects.equals(id, null) || Objects.equals(id, "") || Objects.equals(id, 0)) { + LOGGER.info("OrderServiceImpl.updateAttachAuditStatusBySaleOrderId param id must not be null"); + throw new IllegalArgumentException("销售订单ID不能为空"); + } else if (Objects.equals(attachAuditStatus, null) || Objects.equals(attachAuditStatus, "") || Objects.equals(attachAuditStatus, 0)) { + LOGGER.info("OrderServiceImpl.updateAttachAuditStatusBySaleOrderId param attachAuditStatus must not be null"); + throw new IllegalArgumentException("销售订单附件审核状态不能为空"); + } + SaleOrder order = orderMapper.selectByPrimaryKey(id); + order.setAttachAuditStatus(AttachAuditStatusEnum.getByValue(attachAuditStatus).getValue()); + orderMapper.updateByPrimaryKeySelective(order); + return 0; + } + private Map buildListSaleOrder(Map queryMap, PageVo pageVo) throws Exception { String auditStatus = (String) queryMap.get("auditStatus"); if (StringUtils.isNotBlank(auditStatus)) { @@ -253,8 +291,10 @@ public class OrderServiceImpl implements OrderService { OrderViewDAO dao = orderViewMapper.getSaleOrderDetail(queryMap); OrderViewBO bo = new OrderViewBO(); BeanUtils.copyProperties(dao, bo); + // SKU List skuViewDTOS = dao.getOrderSkus(); List skuBOS = Lists.newArrayList(); + if (CollectionUtils.isNotEmpty(skuViewDTOS)) { skuViewDTOS.stream().forEach(va -> { OrderSkuBO skuBO = new OrderSkuBO(); @@ -262,6 +302,20 @@ public class OrderServiceImpl implements OrderService { skuBOS.add(skuBO); }); } + + // attach + List attachs= dao.getAttachs(); + List attachViewBOS = Lists.newArrayList(); + + if (CollectionUtils.isNotEmpty(attachs)) { + attachs.stream().forEach(item -> { + OrderAttachViewBO attachViewBO = new OrderAttachViewBO(); + BeanUtils.copyProperties(item, attachViewBO); + attachViewBO.setUrl(QiniuUtil.generateDownloadURL(item.getPicKey(), "")); + attachViewBOS.add(attachViewBO); + }); + } + bo.setAttachs(attachViewBOS); bo.setOrderSkus(skuBOS); return bo; } catch (Exception e) { @@ -291,6 +345,7 @@ public class OrderServiceImpl implements OrderService { }); } bo.setOrderSkus(skuBOS); + bo.setAttachAuditStatusText(AttachAuditStatusEnum.getByValue(bo.getAttachAuditStatus()).getText()); orderViewBOS.add(bo); }); return orderViewBOS; @@ -319,8 +374,7 @@ public class OrderServiceImpl implements OrderService { BigDecimal dis = BigDecimal.valueOf(0); List fees = new ArrayList<>(); // 获取整板数量 - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - Integer brands = PropertiesUtil.getInt(property, "ils.sale.brands", 10); + Integer brands = autoConfConstant.getBrands(); if (CollectionUtils.isNotEmpty(prices)) { PriceBO priceBO = prices.get(0); BeanUtils.copyProperties(priceBO, bo); @@ -403,9 +457,8 @@ public class OrderServiceImpl implements OrderService { * @throws Exception */ private List resolvPriceFormSCResult(Integer departRegionId, Integer destRegionId) throws Exception { - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String url = PropertiesUtil.getString(property, "ils.sc.url", "") + "/api/price/channel/sale/queryPrice/" + departRegionId + "/" + destRegionId; - Integer time = PropertiesUtil.getInt(property, "ils.sc.url.timeout", 7200); + String url = autoConfConstant.getSc() + "/api/price/channel/sale/queryPrice/" + departRegionId + "/" + destRegionId; + Integer time = autoConfConstant.getScTime(); String result = HttpRequestUtil.sendHttpGet(url, null, time); if (!Objects.equals(result, null)) { JSONObject jsonObject = JSONObject.parseObject(result); @@ -430,9 +483,8 @@ public class OrderServiceImpl implements OrderService { * @throws Exception */ private List getOrderStatusFormKyleResult(String orderCode) throws Exception { - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String url = PropertiesUtil.getString(property, "ils.kyle.url", "") + "/saleOrder/getOrderStatus"; - Integer time = PropertiesUtil.getInt(property, "ils.kyle.url.timeout", 7200); + String url = autoConfConstant.getKyle() + "/saleOrder/getOrderStatus"; + Integer time = autoConfConstant.getKyleTime(); Map map = new HashMap<>(); map.put("orderCode", orderCode); String result = HttpRequestUtil.sendHttpPost(url, map, time); diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderSkuServiceImpl.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderSkuServiceImpl.java index 0ae0a431a5b01e3a646e6ef75bddfc10c75f261a..2070d077a41fef3b5bcc8a0a7e97b37a34bbed19 100644 --- a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderSkuServiceImpl.java +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/OrderSkuServiceImpl.java @@ -2,12 +2,12 @@ package com.unlcn.ils.sales.backend.service; import cn.huiyunche.commons.exception.BusinessException; import cn.huiyunche.commons.utils.HttpRequestUtil; -import cn.huiyunche.commons.utils.PropertiesUtil; import cn.huiyunche.commons.utils.QiniuUtil; import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONObject; import com.unlcn.ils.sales.backend.bo.BrandBO; import com.unlcn.ils.sales.backend.bo.OrderSkuBO; +import com.unlcn.ils.sales.backend.constant.AutoConfConstant; import com.unlcn.ils.sales.base.mapper.SaleOrderSkuMapper; import com.unlcn.ils.sales.base.model.SaleOrderSku; import org.apache.commons.collections4.CollectionUtils; @@ -20,7 +20,6 @@ import org.springframework.stereotype.Service; import java.util.List; import java.util.Objects; -import java.util.Properties; /** * Created by houjianhui on 2017/5/27. @@ -32,6 +31,9 @@ public class OrderSkuServiceImpl implements OrderSkuService { @Autowired private SaleOrderSkuMapper orderSkuMapper; + @Autowired + private AutoConfConstant autoConfConstant; + @Override public Integer save(String bo, Integer saleOrderId) throws Exception { LOGGER.info("OrderSkuServiceImpl.save params OrderSkuBO: {}", bo); @@ -84,9 +86,8 @@ public class OrderSkuServiceImpl implements OrderSkuService { } private List resolvBrandFormSCResult(String key) throws Exception { - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String url = PropertiesUtil.getString(property, "ils.sc.url", "") + "/api/model/base/cv/queryModel/" + key; - Integer time = PropertiesUtil.getInt(property, "ils.sc.url.timeout", 7200); + String url = autoConfConstant.getSc() + "/api/model/base/cv/queryModel/" + key; + Integer time = autoConfConstant.getScTime(); String result = HttpRequestUtil.sendHttpGet(url, null, time); if (!Objects.equals(result, null)) { JSONObject jsonObject = JSONObject.parseObject(result); diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/UserBankcardServiceImpl.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/UserBankcardServiceImpl.java index 0a800a6d261213daff8ba196d30aa3c24652f61f..b732b97b858d560ad5977518f67316e71cc4fca9 100644 --- a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/UserBankcardServiceImpl.java +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/UserBankcardServiceImpl.java @@ -1,13 +1,13 @@ package com.unlcn.ils.sales.backend.service; import cn.huiyunche.commons.exception.BusinessException; -import cn.huiyunche.commons.utils.PropertiesUtil; import cn.huiyunche.commons.utils.QiniuUtil; import com.google.common.collect.Lists; import com.unlcn.ils.sales.backend.bo.BankBO; import com.unlcn.ils.sales.backend.bo.UserBankCardViewBO; import com.unlcn.ils.sales.backend.bo.UserBankcardBO; import com.unlcn.ils.sales.backend.bo.UserViewBO; +import com.unlcn.ils.sales.backend.constant.AutoConfConstant; import com.unlcn.ils.sales.backend.enums.YeepayCardTypeEnum; import com.unlcn.ils.sales.backend.enums.YeepayCardValidEnum; import com.unlcn.ils.sales.backend.util.Encodes; @@ -48,6 +48,9 @@ public class UserBankcardServiceImpl implements UserBankcardService { @Autowired private UserService userService; + @Autowired + private AutoConfConstant autoConfConstant; + @Override public Integer save(UserBankcardBO bo) throws Exception { LOGGER.info("UserBankcardServiceImpl.save param UserBankcardBO: {}", bo); @@ -107,8 +110,7 @@ public class UserBankcardServiceImpl implements UserBankcardService { bankBO = new BankBO(); } String code = decryptBankCard(val.getCode()); - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String bankLogoBucket = PropertiesUtil.getString(property, "qiniuBankLogoBucket", ""); + String bankLogoBucket = autoConfConstant.getBankLogo(); String codeKey = BANK_CARD_PREFIX + code.substring(code.length() - 4, code.length()); bos.add(new UserBankCardViewBO(val.getId(), codeKey , bankBO.getName(), QiniuUtil.generateDownloadURL(bankLogoBucket, bankBO.getLogo(), "", "", ""), QiniuUtil.generateDownloadURL(bankLogoBucket, bankBO.getLogoSecond(), "", "", ""), QiniuUtil.generateDownloadURL(bankLogoBucket, bankBO.getBackgroundLogo(), "", "", ""), @@ -142,9 +144,8 @@ public class UserBankcardServiceImpl implements UserBankcardService { * @param cardCode 银行卡号 * @return 加密之后卡号 */ - public static String encryptBankCard(String cardCode) { - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String key = PropertiesUtil.getString(property, "bankSecureKey", ""); + public String encryptBankCard(String cardCode) { + String key = autoConfConstant.getBankSecureKey(); return Encodes.encryptAES(cardCode, key); } @@ -154,9 +155,8 @@ public class UserBankcardServiceImpl implements UserBankcardService { * @param cardCode 银行卡号 * @return 解密之后卡号 */ - public static String decryptBankCard(String cardCode) { - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String key = PropertiesUtil.getString(property, "bankSecureKey", ""); + public String decryptBankCard(String cardCode) { + String key = autoConfConstant.getBankSecureKey(); if (StringUtils.isNotBlank(cardCode)) { return Encodes.decryptAES(cardCode, key); } diff --git a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/UserServiceImpl.java b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/UserServiceImpl.java index b0c27d318905003ac4a5c0650cf17e6e444a0877..809f5782c1da49ef3a76b5bb42b560a6eaac16fb 100644 --- a/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/UserServiceImpl.java +++ b/ils-sales-backend/src/main/java/com/unlcn/ils/sales/backend/service/UserServiceImpl.java @@ -2,11 +2,11 @@ package com.unlcn.ils.sales.backend.service; import cn.huiyunche.commons.constant.QiniuConstant; import cn.huiyunche.commons.exception.BusinessException; -import cn.huiyunche.commons.utils.PropertiesUtil; import cn.huiyunche.commons.utils.QiniuUtil; import com.google.common.collect.Lists; import com.unlcn.ils.sales.backend.bo.UserBO; import com.unlcn.ils.sales.backend.bo.UserViewBO; +import com.unlcn.ils.sales.backend.constant.AutoConfConstant; import com.unlcn.ils.sales.backend.redis.MindsJedisConnectionFactory; import com.unlcn.ils.sales.backend.security.JwtAuthenicationFilter; import com.unlcn.ils.sales.backend.security.JwtUtils; @@ -28,7 +28,10 @@ import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; import redis.clients.jedis.Jedis; -import java.util.*; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; /** * Created by houjianhui on 2017/6/9. @@ -53,6 +56,9 @@ public class UserServiceImpl implements UserService { @Autowired private SaleUserViewMapper userViewMapper; + @Autowired + private AutoConfConstant autoConfConstant; + @Override public Map login(String loginName, String pwd) throws Exception { LOGGER.info("UserServiceImpl.login prams loginName: {}, pwd: {}", loginName, pwd); @@ -71,9 +77,7 @@ public class UserServiceImpl implements UserService { LOGGER.info("current user is null"); throw new BusinessException("登录失败"); } - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String key = PropertiesUtil.getString(property, "secure.key", ""); - //System.out.println(passwordEncoder.encodePassword(pwd, key)); + String key = autoConfConstant.getSecure(); if (!passwordEncoder.isPasswordValid(userBO.getPwd(), pwd, key)) { LOGGER.info("UserServiceImpl.login pwd is error"); throw new BusinessException("用户名或密码错误"); @@ -205,8 +209,7 @@ public class UserServiceImpl implements UserService { LOGGER.info("UserServiceImpl.restPwd current user doesn't exist"); throw new BusinessException("当前用户不存在"); } - Properties property = PropertiesUtil.loadFromFile("classpath://constant.properties"); - String key = PropertiesUtil.getString(property, "secure.key", ""); + String key = autoConfConstant.getSecure(); bo.setPwd(passwordEncoder.encodePassword(pwd, key)); SaleUser user = new SaleUser(); BeanUtils.copyProperties(bo, user); diff --git a/ils-sales-backend/src/main/resources/META-INF/autoconf/auto-config.xml b/ils-sales-backend/src/main/resources/META-INF/autoconf/auto-config.xml index 0862350a6d81926c532575fceac164cacd782857..e684f87b3583c06800575e9ac303c752a1e0c35a 100644 --- a/ils-sales-backend/src/main/resources/META-INF/autoconf/auto-config.xml +++ b/ils-sales-backend/src/main/resources/META-INF/autoconf/auto-config.xml @@ -16,9 +16,6 @@ - - - @@ -66,6 +63,10 @@ + + + + diff --git a/ils-sales-backend/src/main/resources/META-INF/autoconf/config.vm b/ils-sales-backend/src/main/resources/META-INF/autoconf/config.vm index 7d39987958f8d4664bc0ef516a015eadcf826fee..000c2cde7915ccb53e0a98b517582d8449c3521d 100644 --- a/ils-sales-backend/src/main/resources/META-INF/autoconf/config.vm +++ b/ils-sales-backend/src/main/resources/META-INF/autoconf/config.vm @@ -14,9 +14,6 @@ secure.bank.key=${secure.bank.key} ##redis spring.redis.sentinel.master=${spring.redis.sentinel.master} spring.redis.sentinel.nodes=${spring.redis.sentinel.nodes} -spring.redis.password=${spring.redis.password} -spring.redis.hostname=${spring.redis.hostname} -spring.redis.port=${spring.redis.port} ##qiniu qiniuDownloadAddress=${qiniuDownloadAddress} @@ -63,5 +60,10 @@ ils.kyle.url=${ils.kyle.url} #kyle商户端地址请求超时 ils.kyle.url.timeout=${ils.kyle.url.timeout} +#BMS端地址 +ils.bms.url=${ils.bms.url} +#kBMS端地址请求超时 +ils.bms.url.timeout=${ils.bms.url.timeout} + #整板数量配置 ils.sale.brands=${ils.sale.brands} diff --git a/ils-sales-backend/src/main/resources/constant.properties b/ils-sales-backend/src/main/resources/constant.properties index e41505c9f5089090c2eb5e719c480130940116b5..1c751deca92f3ab86feb38754f52cd8cf50f4dcd 100644 --- a/ils-sales-backend/src/main/resources/constant.properties +++ b/ils-sales-backend/src/main/resources/constant.properties @@ -1,22 +1,25 @@ #rdb jdbc.driver=net.sf.log4jdbc.DriverSpy -master.jdbc.url=jdbc:log4jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -master.jdbc.user=unlcnils -master.jdbc.password=Unlcnils2016! -slave.jdbc.url=jdbc:mysql://10.20.30.131:3306/ils_sales?useUnicode=true&characterEncoding=utf8 -slave.jdbc.user=unlcnils -slave.jdbc.password=Unlcnils2016! +master.jdbc.url=jdbc:log4jdbc:mysql://119.57.140.26:8095/sales?useUnicode=true&characterEncoding=utf8 +master.jdbc.user=sales +master.jdbc.password=Unlcn@12 +slave.jdbc.url=jdbc:mysql://119.57.140.26:8095/sales?useUnicode=true&characterEncoding=utf8 +slave.jdbc.user=sales +slave.jdbc.password=Unlcn@12 #securekey secure.key=kyleKEY secure.bank.key=kyleKEY #redis -spring.redis.sentinel.master=mymaster -spring.redis.sentinel.nodes=10.20.30.131:26379 -spring.redis.password=unlcn -spring.redis.hostname=10.20.30.131 -spring.redis.port=6379 +#spring.redis.sentinel.master=mymaster +#spring.redis.sentinel.nodes=10.20.30.131:26379 +#spring.redis.password=unlcn +#spring.redis.hostname=10.20.30.131 +#spring.redis.port=6379 +spring.redis.sentinel.master=mymaster1 +spring.redis.sentinel.nodes=119.57.140.26:26380 + #qiniu qiniuDownloadAddress=http://qiniu.test.huiyunche.cn @@ -54,14 +57,19 @@ jpush.masterSecret.kyle=7d0f0982b7d46d7e1b945336 quartz.isClustered=true #SC主数据地址 -ils.sc.url=http://ils.unlcn.com/sc-api +ils.sc.url=http://119.57.140.26/ils-sc-api #SC主数据地址请求超时 ils.sc.url.timeout=7200 #kyle商户端地址 -ils.kyle.url=http://kylebuss.huiyunche.cn +ils.kyle.url=http://119.57.140.26/kylebuss #kyle商户端地址请求超时 ils.kyle.url.timeout=7200 + +#BMS端地址 +ils.bms.url=http://192.168.199.151:8080/hyc-bms-api/ +#kyle商户端地址请求超时 +ils.bms.url.timeout=7200 #整板数量配置 ils.sale.brands=10 diff --git a/ils-sales-backend/src/main/resources/spring/applicationContext-cache.xml b/ils-sales-backend/src/main/resources/spring/applicationContext-cache.xml index 932034beee8598413131a8e0f71d37316502c481..9a51cf94e9dd742e2566041a036e9454218b65af 100644 --- a/ils-sales-backend/src/main/resources/spring/applicationContext-cache.xml +++ b/ils-sales-backend/src/main/resources/spring/applicationContext-cache.xml @@ -11,10 +11,10 @@ - + + + + selectByExample(SaleOrderAttachExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + SaleOrderAttach selectByPrimaryKey(Integer id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + int updateByExampleSelective(@Param("record") SaleOrderAttach record, @Param("example") SaleOrderAttachExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + int updateByExample(@Param("record") SaleOrderAttach record, @Param("example") SaleOrderAttachExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + int updateByPrimaryKeySelective(SaleOrderAttach record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + int updateByPrimaryKey(SaleOrderAttach record); +} \ No newline at end of file diff --git a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/mapper/SaleOrderMapper.java b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/mapper/SaleOrderMapper.java index a2843b66271f7cbbbed0dfb66c12d31f08555cab..f4307961fb8a6ed769c40cad9831bde0166d17f9 100644 --- a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/mapper/SaleOrderMapper.java +++ b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/mapper/SaleOrderMapper.java @@ -10,7 +10,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int countByExample(SaleOrderExample example); @@ -18,7 +18,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int deleteByExample(SaleOrderExample example); @@ -26,7 +26,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int deleteByPrimaryKey(Integer id); @@ -34,7 +34,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int insert(SaleOrder record); @@ -42,7 +42,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int insertSelective(SaleOrder record); @@ -50,7 +50,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ List selectByExample(SaleOrderExample example); @@ -58,7 +58,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ SaleOrder selectByPrimaryKey(Integer id); @@ -66,7 +66,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int updateByExampleSelective(@Param("record") SaleOrder record, @Param("example") SaleOrderExample example); @@ -74,7 +74,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int updateByExample(@Param("record") SaleOrder record, @Param("example") SaleOrderExample example); @@ -82,7 +82,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int updateByPrimaryKeySelective(SaleOrder record); @@ -90,7 +90,7 @@ public interface SaleOrderMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ int updateByPrimaryKey(SaleOrder record); } \ No newline at end of file diff --git a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/OrderAttachViewDAO.java b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/OrderAttachViewDAO.java new file mode 100644 index 0000000000000000000000000000000000000000..9ac96bd12e08b1607e3327f681e3485fae8bf3d1 --- /dev/null +++ b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/OrderAttachViewDAO.java @@ -0,0 +1,43 @@ +package com.unlcn.ils.sales.base.model; + +/** + * Created by houjianhui on 2017/8/15. + */ +public class OrderAttachViewDAO { + private Integer id; + private String picKey; + private Integer saleOrderId; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getPicKey() { + return picKey; + } + + public void setPicKey(String picKey) { + this.picKey = picKey; + } + + public Integer getSaleOrderId() { + return saleOrderId; + } + + public void setSaleOrderId(Integer saleOrderId) { + this.saleOrderId = saleOrderId; + } + + @Override + public String toString() { + return "OrderAttachViewDAO{" + + "id=" + id + + ", picKey='" + picKey + '\'' + + ", saleOrderId=" + saleOrderId + + '}'; + } +} diff --git a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/OrderViewDAO.java b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/OrderViewDAO.java index 44e5272c4e0c6c6dcff313d750e6aff2d4a93232..c81ec16d4922e78ceabc04cf6f1a19b6ab054bc7 100644 --- a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/OrderViewDAO.java +++ b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/OrderViewDAO.java @@ -25,12 +25,14 @@ public class OrderViewDAO { private BigDecimal insuranceUnitPrice; private BigDecimal finalPurchasePrice; private Integer orderStatus; + private Integer attachAuditStatus; private Integer auditStatus; private Integer auditId; private Date gmtCreate; private Date gmtUpdate; private String comment; private String auditComment; + private String attachAuditStatusText; // 销售订单地址表 private String departRegionCode; @@ -46,6 +48,8 @@ public class OrderViewDAO { // 销售订单商品车表 private List orderSkus; + private List attachs; + public Integer getId() { return id; } @@ -286,6 +290,30 @@ public class OrderViewDAO { this.auditId = auditId; } + public Integer getAttachAuditStatus() { + return attachAuditStatus; + } + + public void setAttachAuditStatus(Integer attachAuditStatus) { + this.attachAuditStatus = attachAuditStatus; + } + + public String getAttachAuditStatusText() { + return attachAuditStatusText; + } + + public void setAttachAuditStatusText(String attachAuditStatusText) { + this.attachAuditStatusText = attachAuditStatusText; + } + + public List getAttachs() { + return attachs; + } + + public void setAttachs(List attachs) { + this.attachs = attachs; + } + @Override public String toString() { return "OrderViewDAO{" + @@ -303,12 +331,14 @@ public class OrderViewDAO { ", insuranceUnitPrice=" + insuranceUnitPrice + ", finalPurchasePrice=" + finalPurchasePrice + ", orderStatus=" + orderStatus + + ", attachAuditStatus=" + attachAuditStatus + ", auditStatus=" + auditStatus + ", auditId=" + auditId + ", gmtCreate=" + gmtCreate + ", gmtUpdate=" + gmtUpdate + ", comment='" + comment + '\'' + ", auditComment='" + auditComment + '\'' + + ", attachAuditStatusText='" + attachAuditStatusText + '\'' + ", departRegionCode='" + departRegionCode + '\'' + ", departRegionName='" + departRegionName + '\'' + ", departContact='" + departContact + '\'' + @@ -319,6 +349,7 @@ public class OrderViewDAO { ", destPhone='" + destPhone + '\'' + ", distance=" + distance + ", orderSkus=" + orderSkus + + ", attachs=" + attachs + '}'; } } diff --git a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrder.java b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrder.java index 70ef5cc5c22b236796c85a135b82aab447d40c23..b6c4ca6995f2f1bfc662059b4fcebe31aa859f18 100644 --- a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrder.java +++ b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrder.java @@ -9,7 +9,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.id * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Integer id; @@ -17,7 +17,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.code * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private String code; @@ -25,7 +25,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.user_id * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Integer userId; @@ -33,7 +33,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.pick_date * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Date pickDate; @@ -41,7 +41,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.brands * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Integer brands; @@ -49,7 +49,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.series_amt * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Integer seriesAmt; @@ -57,7 +57,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.standard_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private BigDecimal standardSalePrice; @@ -65,7 +65,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.standard_unit_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private BigDecimal standardUnitPrice; @@ -73,7 +73,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.suggest_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private BigDecimal suggestSalePrice; @@ -81,7 +81,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.final_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private BigDecimal finalSalePrice; @@ -89,7 +89,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.final_purchase_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private BigDecimal finalPurchasePrice; @@ -97,7 +97,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.insurance_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private BigDecimal insuranceSalePrice; @@ -105,7 +105,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.insurance_unit_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private BigDecimal insuranceUnitPrice; @@ -113,15 +113,23 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.order_status * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Integer orderStatus; + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column sale_order.attach_audit_status + * + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 + */ + private Integer attachAuditStatus; + /** * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.comment * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private String comment; @@ -129,7 +137,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.delete_mark * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Boolean deleteMark; @@ -137,7 +145,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.gmt_create * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Date gmtCreate; @@ -145,7 +153,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database column sale_order.gmt_update * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private Date gmtUpdate; @@ -153,7 +161,7 @@ public class SaleOrder implements Serializable { * This field was generated by MyBatis Generator. * This field corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ private static final long serialVersionUID = 1L; @@ -163,7 +171,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.id * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Integer getId() { return id; @@ -175,7 +183,7 @@ public class SaleOrder implements Serializable { * * @param id the value for sale_order.id * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setId(Integer id) { this.id = id; @@ -187,7 +195,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.code * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public String getCode() { return code; @@ -199,7 +207,7 @@ public class SaleOrder implements Serializable { * * @param code the value for sale_order.code * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setCode(String code) { this.code = code == null ? null : code.trim(); @@ -211,7 +219,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.user_id * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Integer getUserId() { return userId; @@ -223,7 +231,7 @@ public class SaleOrder implements Serializable { * * @param userId the value for sale_order.user_id * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setUserId(Integer userId) { this.userId = userId; @@ -235,7 +243,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.pick_date * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Date getPickDate() { return pickDate; @@ -247,7 +255,7 @@ public class SaleOrder implements Serializable { * * @param pickDate the value for sale_order.pick_date * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setPickDate(Date pickDate) { this.pickDate = pickDate; @@ -259,7 +267,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.brands * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Integer getBrands() { return brands; @@ -271,7 +279,7 @@ public class SaleOrder implements Serializable { * * @param brands the value for sale_order.brands * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setBrands(Integer brands) { this.brands = brands; @@ -283,7 +291,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.series_amt * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Integer getSeriesAmt() { return seriesAmt; @@ -295,7 +303,7 @@ public class SaleOrder implements Serializable { * * @param seriesAmt the value for sale_order.series_amt * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setSeriesAmt(Integer seriesAmt) { this.seriesAmt = seriesAmt; @@ -307,7 +315,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.standard_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public BigDecimal getStandardSalePrice() { return standardSalePrice; @@ -319,7 +327,7 @@ public class SaleOrder implements Serializable { * * @param standardSalePrice the value for sale_order.standard_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setStandardSalePrice(BigDecimal standardSalePrice) { this.standardSalePrice = standardSalePrice; @@ -331,7 +339,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.standard_unit_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public BigDecimal getStandardUnitPrice() { return standardUnitPrice; @@ -343,7 +351,7 @@ public class SaleOrder implements Serializable { * * @param standardUnitPrice the value for sale_order.standard_unit_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setStandardUnitPrice(BigDecimal standardUnitPrice) { this.standardUnitPrice = standardUnitPrice; @@ -355,7 +363,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.suggest_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public BigDecimal getSuggestSalePrice() { return suggestSalePrice; @@ -367,7 +375,7 @@ public class SaleOrder implements Serializable { * * @param suggestSalePrice the value for sale_order.suggest_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setSuggestSalePrice(BigDecimal suggestSalePrice) { this.suggestSalePrice = suggestSalePrice; @@ -379,7 +387,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.final_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public BigDecimal getFinalSalePrice() { return finalSalePrice; @@ -391,7 +399,7 @@ public class SaleOrder implements Serializable { * * @param finalSalePrice the value for sale_order.final_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setFinalSalePrice(BigDecimal finalSalePrice) { this.finalSalePrice = finalSalePrice; @@ -403,7 +411,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.final_purchase_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public BigDecimal getFinalPurchasePrice() { return finalPurchasePrice; @@ -415,7 +423,7 @@ public class SaleOrder implements Serializable { * * @param finalPurchasePrice the value for sale_order.final_purchase_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setFinalPurchasePrice(BigDecimal finalPurchasePrice) { this.finalPurchasePrice = finalPurchasePrice; @@ -427,7 +435,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.insurance_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public BigDecimal getInsuranceSalePrice() { return insuranceSalePrice; @@ -439,7 +447,7 @@ public class SaleOrder implements Serializable { * * @param insuranceSalePrice the value for sale_order.insurance_sale_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setInsuranceSalePrice(BigDecimal insuranceSalePrice) { this.insuranceSalePrice = insuranceSalePrice; @@ -451,7 +459,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.insurance_unit_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public BigDecimal getInsuranceUnitPrice() { return insuranceUnitPrice; @@ -463,7 +471,7 @@ public class SaleOrder implements Serializable { * * @param insuranceUnitPrice the value for sale_order.insurance_unit_price * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setInsuranceUnitPrice(BigDecimal insuranceUnitPrice) { this.insuranceUnitPrice = insuranceUnitPrice; @@ -475,7 +483,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.order_status * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Integer getOrderStatus() { return orderStatus; @@ -487,19 +495,43 @@ public class SaleOrder implements Serializable { * * @param orderStatus the value for sale_order.order_status * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setOrderStatus(Integer orderStatus) { this.orderStatus = orderStatus; } + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column sale_order.attach_audit_status + * + * @return the value of sale_order.attach_audit_status + * + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 + */ + public Integer getAttachAuditStatus() { + return attachAuditStatus; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column sale_order.attach_audit_status + * + * @param attachAuditStatus the value for sale_order.attach_audit_status + * + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 + */ + public void setAttachAuditStatus(Integer attachAuditStatus) { + this.attachAuditStatus = attachAuditStatus; + } + /** * This method was generated by MyBatis Generator. * This method returns the value of the database column sale_order.comment * * @return the value of sale_order.comment * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public String getComment() { return comment; @@ -511,7 +543,7 @@ public class SaleOrder implements Serializable { * * @param comment the value for sale_order.comment * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setComment(String comment) { this.comment = comment == null ? null : comment.trim(); @@ -523,7 +555,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.delete_mark * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Boolean getDeleteMark() { return deleteMark; @@ -535,7 +567,7 @@ public class SaleOrder implements Serializable { * * @param deleteMark the value for sale_order.delete_mark * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setDeleteMark(Boolean deleteMark) { this.deleteMark = deleteMark; @@ -547,7 +579,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.gmt_create * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Date getGmtCreate() { return gmtCreate; @@ -559,7 +591,7 @@ public class SaleOrder implements Serializable { * * @param gmtCreate the value for sale_order.gmt_create * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setGmtCreate(Date gmtCreate) { this.gmtCreate = gmtCreate; @@ -571,7 +603,7 @@ public class SaleOrder implements Serializable { * * @return the value of sale_order.gmt_update * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Date getGmtUpdate() { return gmtUpdate; @@ -583,7 +615,7 @@ public class SaleOrder implements Serializable { * * @param gmtUpdate the value for sale_order.gmt_update * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setGmtUpdate(Date gmtUpdate) { this.gmtUpdate = gmtUpdate; @@ -593,7 +625,7 @@ public class SaleOrder implements Serializable { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ @Override public String toString() { @@ -615,6 +647,7 @@ public class SaleOrder implements Serializable { sb.append(", insuranceSalePrice=").append(insuranceSalePrice); sb.append(", insuranceUnitPrice=").append(insuranceUnitPrice); sb.append(", orderStatus=").append(orderStatus); + sb.append(", attachAuditStatus=").append(attachAuditStatus); sb.append(", comment=").append(comment); sb.append(", deleteMark=").append(deleteMark); sb.append(", gmtCreate=").append(gmtCreate); diff --git a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderAttach.java b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderAttach.java new file mode 100644 index 0000000000000000000000000000000000000000..2d888f2fdc58cbafea1777e3ca25d08ce7f118cb --- /dev/null +++ b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderAttach.java @@ -0,0 +1,228 @@ +package com.unlcn.ils.sales.base.model; + +import java.io.Serializable; +import java.util.Date; + +public class SaleOrderAttach implements Serializable { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column sale_order_attach.id + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + private Integer id; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column sale_order_attach.sale_order_id + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + private Integer saleOrderId; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column sale_order_attach.pic_key + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + private String picKey; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column sale_order_attach.delete_mark + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + private Boolean deleteMark; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column sale_order_attach.gmt_create + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + private Date gmtCreate; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database column sale_order_attach.gmt_update + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + private Date gmtUpdate; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + private static final long serialVersionUID = 1L; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column sale_order_attach.id + * + * @return the value of sale_order_attach.id + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public Integer getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column sale_order_attach.id + * + * @param id the value for sale_order_attach.id + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setId(Integer id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column sale_order_attach.sale_order_id + * + * @return the value of sale_order_attach.sale_order_id + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public Integer getSaleOrderId() { + return saleOrderId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column sale_order_attach.sale_order_id + * + * @param saleOrderId the value for sale_order_attach.sale_order_id + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setSaleOrderId(Integer saleOrderId) { + this.saleOrderId = saleOrderId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column sale_order_attach.pic_key + * + * @return the value of sale_order_attach.pic_key + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public String getPicKey() { + return picKey; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column sale_order_attach.pic_key + * + * @param picKey the value for sale_order_attach.pic_key + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setPicKey(String picKey) { + this.picKey = picKey == null ? null : picKey.trim(); + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column sale_order_attach.delete_mark + * + * @return the value of sale_order_attach.delete_mark + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public Boolean getDeleteMark() { + return deleteMark; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column sale_order_attach.delete_mark + * + * @param deleteMark the value for sale_order_attach.delete_mark + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setDeleteMark(Boolean deleteMark) { + this.deleteMark = deleteMark; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column sale_order_attach.gmt_create + * + * @return the value of sale_order_attach.gmt_create + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public Date getGmtCreate() { + return gmtCreate; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column sale_order_attach.gmt_create + * + * @param gmtCreate the value for sale_order_attach.gmt_create + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setGmtCreate(Date gmtCreate) { + this.gmtCreate = gmtCreate; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column sale_order_attach.gmt_update + * + * @return the value of sale_order_attach.gmt_update + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public Date getGmtUpdate() { + return gmtUpdate; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column sale_order_attach.gmt_update + * + * @param gmtUpdate the value for sale_order_attach.gmt_update + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setGmtUpdate(Date gmtUpdate) { + this.gmtUpdate = gmtUpdate; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + @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(", saleOrderId=").append(saleOrderId); + sb.append(", picKey=").append(picKey); + sb.append(", deleteMark=").append(deleteMark); + sb.append(", gmtCreate=").append(gmtCreate); + sb.append(", gmtUpdate=").append(gmtUpdate); + sb.append("]"); + return sb.toString(); + } +} \ No newline at end of file diff --git a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderAttachExample.java b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderAttachExample.java new file mode 100644 index 0000000000000000000000000000000000000000..97cf9744deb9adcf18c820be41259783e8d229fe --- /dev/null +++ b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderAttachExample.java @@ -0,0 +1,734 @@ +package com.unlcn.ils.sales.base.model; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class SaleOrderAttachExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + protected List oredCriteria; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + protected int limitStart = -1; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + protected int limitEnd = -1; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public SaleOrderAttachExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setLimitStart(int limitStart) { + this.limitStart=limitStart; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public int getLimitStart() { + return limitStart; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public void setLimitEnd(int limitEnd) { + this.limitEnd=limitEnd; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + public int getLimitEnd() { + return limitEnd; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List 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(Integer value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Integer value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Integer value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Integer value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Integer value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Integer value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Integer value1, Integer value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Integer value1, Integer value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdIsNull() { + addCriterion("sale_order_id is null"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdIsNotNull() { + addCriterion("sale_order_id is not null"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdEqualTo(Integer value) { + addCriterion("sale_order_id =", value, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdNotEqualTo(Integer value) { + addCriterion("sale_order_id <>", value, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdGreaterThan(Integer value) { + addCriterion("sale_order_id >", value, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdGreaterThanOrEqualTo(Integer value) { + addCriterion("sale_order_id >=", value, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdLessThan(Integer value) { + addCriterion("sale_order_id <", value, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdLessThanOrEqualTo(Integer value) { + addCriterion("sale_order_id <=", value, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdIn(List values) { + addCriterion("sale_order_id in", values, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdNotIn(List values) { + addCriterion("sale_order_id not in", values, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdBetween(Integer value1, Integer value2) { + addCriterion("sale_order_id between", value1, value2, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andSaleOrderIdNotBetween(Integer value1, Integer value2) { + addCriterion("sale_order_id not between", value1, value2, "saleOrderId"); + return (Criteria) this; + } + + public Criteria andPicKeyIsNull() { + addCriterion("pic_key is null"); + return (Criteria) this; + } + + public Criteria andPicKeyIsNotNull() { + addCriterion("pic_key is not null"); + return (Criteria) this; + } + + public Criteria andPicKeyEqualTo(String value) { + addCriterion("pic_key =", value, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyNotEqualTo(String value) { + addCriterion("pic_key <>", value, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyGreaterThan(String value) { + addCriterion("pic_key >", value, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyGreaterThanOrEqualTo(String value) { + addCriterion("pic_key >=", value, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyLessThan(String value) { + addCriterion("pic_key <", value, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyLessThanOrEqualTo(String value) { + addCriterion("pic_key <=", value, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyLike(String value) { + addCriterion("pic_key like", value, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyNotLike(String value) { + addCriterion("pic_key not like", value, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyIn(List values) { + addCriterion("pic_key in", values, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyNotIn(List values) { + addCriterion("pic_key not in", values, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyBetween(String value1, String value2) { + addCriterion("pic_key between", value1, value2, "picKey"); + return (Criteria) this; + } + + public Criteria andPicKeyNotBetween(String value1, String value2) { + addCriterion("pic_key not between", value1, value2, "picKey"); + return (Criteria) this; + } + + public Criteria andDeleteMarkIsNull() { + addCriterion("delete_mark is null"); + return (Criteria) this; + } + + public Criteria andDeleteMarkIsNotNull() { + addCriterion("delete_mark is not null"); + return (Criteria) this; + } + + public Criteria andDeleteMarkEqualTo(Boolean value) { + addCriterion("delete_mark =", value, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkNotEqualTo(Boolean value) { + addCriterion("delete_mark <>", value, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkGreaterThan(Boolean value) { + addCriterion("delete_mark >", value, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkGreaterThanOrEqualTo(Boolean value) { + addCriterion("delete_mark >=", value, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkLessThan(Boolean value) { + addCriterion("delete_mark <", value, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkLessThanOrEqualTo(Boolean value) { + addCriterion("delete_mark <=", value, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkIn(List values) { + addCriterion("delete_mark in", values, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkNotIn(List values) { + addCriterion("delete_mark not in", values, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkBetween(Boolean value1, Boolean value2) { + addCriterion("delete_mark between", value1, value2, "deleteMark"); + return (Criteria) this; + } + + public Criteria andDeleteMarkNotBetween(Boolean value1, Boolean value2) { + addCriterion("delete_mark not between", value1, value2, "deleteMark"); + return (Criteria) this; + } + + public Criteria andGmtCreateIsNull() { + addCriterion("gmt_create is null"); + return (Criteria) this; + } + + public Criteria andGmtCreateIsNotNull() { + addCriterion("gmt_create is not null"); + return (Criteria) this; + } + + public Criteria andGmtCreateEqualTo(Date value) { + addCriterion("gmt_create =", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateNotEqualTo(Date value) { + addCriterion("gmt_create <>", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateGreaterThan(Date value) { + addCriterion("gmt_create >", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateGreaterThanOrEqualTo(Date value) { + addCriterion("gmt_create >=", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateLessThan(Date value) { + addCriterion("gmt_create <", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateLessThanOrEqualTo(Date value) { + addCriterion("gmt_create <=", value, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateIn(List values) { + addCriterion("gmt_create in", values, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateNotIn(List values) { + addCriterion("gmt_create not in", values, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateBetween(Date value1, Date value2) { + addCriterion("gmt_create between", value1, value2, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtCreateNotBetween(Date value1, Date value2) { + addCriterion("gmt_create not between", value1, value2, "gmtCreate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateIsNull() { + addCriterion("gmt_update is null"); + return (Criteria) this; + } + + public Criteria andGmtUpdateIsNotNull() { + addCriterion("gmt_update is not null"); + return (Criteria) this; + } + + public Criteria andGmtUpdateEqualTo(Date value) { + addCriterion("gmt_update =", value, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateNotEqualTo(Date value) { + addCriterion("gmt_update <>", value, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateGreaterThan(Date value) { + addCriterion("gmt_update >", value, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateGreaterThanOrEqualTo(Date value) { + addCriterion("gmt_update >=", value, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateLessThan(Date value) { + addCriterion("gmt_update <", value, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateLessThanOrEqualTo(Date value) { + addCriterion("gmt_update <=", value, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateIn(List values) { + addCriterion("gmt_update in", values, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateNotIn(List values) { + addCriterion("gmt_update not in", values, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateBetween(Date value1, Date value2) { + addCriterion("gmt_update between", value1, value2, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andGmtUpdateNotBetween(Date value1, Date value2) { + addCriterion("gmt_update not between", value1, value2, "gmtUpdate"); + return (Criteria) this; + } + + public Criteria andPicKeyLikeInsensitive(String value) { + addCriterion("upper(pic_key) like", value.toUpperCase(), "picKey"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table sale_order_attach + * + * @mbggenerated do_not_delete_during_merge Mon Aug 14 17:17:03 CST 2017 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table sale_order_attach + * + * @mbggenerated Mon Aug 14 17:17:03 CST 2017 + */ + 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); + } + } +} \ No newline at end of file diff --git a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderExample.java b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderExample.java index 228badc6fb988d9cadd84bdeb9d7e4a88baaeb1c..5046cb2bc5209055bdab0e8437c293b307d5895c 100644 --- a/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderExample.java +++ b/ils-sales-base/src/main/java/com/unlcn/ils/sales/base/model/SaleOrderExample.java @@ -11,7 +11,7 @@ public class SaleOrderExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ protected String orderByClause; @@ -19,7 +19,7 @@ public class SaleOrderExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ protected boolean distinct; @@ -27,7 +27,7 @@ public class SaleOrderExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ protected List oredCriteria; @@ -35,7 +35,7 @@ public class SaleOrderExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ protected int limitStart = -1; @@ -43,7 +43,7 @@ public class SaleOrderExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ protected int limitEnd = -1; @@ -51,7 +51,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public SaleOrderExample() { oredCriteria = new ArrayList(); @@ -61,7 +61,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -71,7 +71,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public String getOrderByClause() { return orderByClause; @@ -81,7 +81,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -91,7 +91,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public boolean isDistinct() { return distinct; @@ -101,7 +101,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public List getOredCriteria() { return oredCriteria; @@ -111,7 +111,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -121,7 +121,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -133,7 +133,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -147,7 +147,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -158,7 +158,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void clear() { oredCriteria.clear(); @@ -170,7 +170,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setLimitStart(int limitStart) { this.limitStart=limitStart; @@ -180,7 +180,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public int getLimitStart() { return limitStart; @@ -190,7 +190,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public void setLimitEnd(int limitEnd) { this.limitEnd=limitEnd; @@ -200,7 +200,7 @@ public class SaleOrderExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public int getLimitEnd() { return limitEnd; @@ -210,7 +210,7 @@ public class SaleOrderExample { * This class was generated by MyBatis Generator. * This class corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -1129,6 +1129,66 @@ public class SaleOrderExample { return (Criteria) this; } + public Criteria andAttachAuditStatusIsNull() { + addCriterion("attach_audit_status is null"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusIsNotNull() { + addCriterion("attach_audit_status is not null"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusEqualTo(Integer value) { + addCriterion("attach_audit_status =", value, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusNotEqualTo(Integer value) { + addCriterion("attach_audit_status <>", value, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusGreaterThan(Integer value) { + addCriterion("attach_audit_status >", value, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusGreaterThanOrEqualTo(Integer value) { + addCriterion("attach_audit_status >=", value, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusLessThan(Integer value) { + addCriterion("attach_audit_status <", value, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusLessThanOrEqualTo(Integer value) { + addCriterion("attach_audit_status <=", value, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusIn(List values) { + addCriterion("attach_audit_status in", values, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusNotIn(List values) { + addCriterion("attach_audit_status not in", values, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusBetween(Integer value1, Integer value2) { + addCriterion("attach_audit_status between", value1, value2, "attachAuditStatus"); + return (Criteria) this; + } + + public Criteria andAttachAuditStatusNotBetween(Integer value1, Integer value2) { + addCriterion("attach_audit_status not between", value1, value2, "attachAuditStatus"); + return (Criteria) this; + } + public Criteria andCommentIsNull() { addCriterion("comment is null"); return (Criteria) this; @@ -1394,7 +1454,7 @@ public class SaleOrderExample { * This class was generated by MyBatis Generator. * This class corresponds to the database table sale_order * - * @mbggenerated do_not_delete_during_merge Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated do_not_delete_during_merge Mon Aug 14 16:47:17 CST 2017 */ public static class Criteria extends GeneratedCriteria { @@ -1407,7 +1467,7 @@ public class SaleOrderExample { * This class was generated by MyBatis Generator. * This class corresponds to the database table sale_order * - * @mbggenerated Thu Jun 15 11:10:17 CST 2017 + * @mbggenerated Mon Aug 14 16:47:17 CST 2017 */ public static class Criterion { private String condition; diff --git a/ils-sales-base/src/main/resources/mappers/SaleOrderAttachMapper.xml b/ils-sales-base/src/main/resources/mappers/SaleOrderAttachMapper.xml new file mode 100644 index 0000000000000000000000000000000000000000..4cb033a816f99106920dc9de89c50565384ce2b8 --- /dev/null +++ b/ils-sales-base/src/main/resources/mappers/SaleOrderAttachMapper.xml @@ -0,0 +1,304 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, sale_order_id, pic_key, delete_mark, gmt_create, gmt_update + + + + + + delete from sale_order_attach + where id = #{id,jdbcType=INTEGER} + + + + delete from sale_order_attach + + + + + + + + SELECT LAST_INSERT_ID() + + insert into sale_order_attach (sale_order_id, pic_key, delete_mark, + gmt_create, gmt_update) + values (#{saleOrderId,jdbcType=INTEGER}, #{picKey,jdbcType=VARCHAR}, #{deleteMark,jdbcType=BIT}, + #{gmtCreate,jdbcType=TIMESTAMP}, #{gmtUpdate,jdbcType=TIMESTAMP}) + + + + + SELECT LAST_INSERT_ID() + + insert into sale_order_attach + + + sale_order_id, + + + pic_key, + + + delete_mark, + + + gmt_create, + + + gmt_update, + + + + + #{saleOrderId,jdbcType=INTEGER}, + + + #{picKey,jdbcType=VARCHAR}, + + + #{deleteMark,jdbcType=BIT}, + + + #{gmtCreate,jdbcType=TIMESTAMP}, + + + #{gmtUpdate,jdbcType=TIMESTAMP}, + + + + + + + update sale_order_attach + + + id = #{record.id,jdbcType=INTEGER}, + + + sale_order_id = #{record.saleOrderId,jdbcType=INTEGER}, + + + pic_key = #{record.picKey,jdbcType=VARCHAR}, + + + delete_mark = #{record.deleteMark,jdbcType=BIT}, + + + gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP}, + + + gmt_update = #{record.gmtUpdate,jdbcType=TIMESTAMP}, + + + + + + + + + update sale_order_attach + set id = #{record.id,jdbcType=INTEGER}, + sale_order_id = #{record.saleOrderId,jdbcType=INTEGER}, + pic_key = #{record.picKey,jdbcType=VARCHAR}, + delete_mark = #{record.deleteMark,jdbcType=BIT}, + gmt_create = #{record.gmtCreate,jdbcType=TIMESTAMP}, + gmt_update = #{record.gmtUpdate,jdbcType=TIMESTAMP} + + + + + + + update sale_order_attach + + + sale_order_id = #{saleOrderId,jdbcType=INTEGER}, + + + pic_key = #{picKey,jdbcType=VARCHAR}, + + + delete_mark = #{deleteMark,jdbcType=BIT}, + + + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, + + + gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP}, + + + where id = #{id,jdbcType=INTEGER} + + + + update sale_order_attach + set sale_order_id = #{saleOrderId,jdbcType=INTEGER}, + pic_key = #{picKey,jdbcType=VARCHAR}, + delete_mark = #{deleteMark,jdbcType=BIT}, + gmt_create = #{gmtCreate,jdbcType=TIMESTAMP}, + gmt_update = #{gmtUpdate,jdbcType=TIMESTAMP} + where id = #{id,jdbcType=INTEGER} + + \ No newline at end of file diff --git a/ils-sales-base/src/main/resources/mappers/SaleOrderMapper.xml b/ils-sales-base/src/main/resources/mappers/SaleOrderMapper.xml index 0f536df118a00049ad68ebd93cea012c959ace02..7b650015ba0561b7647fdd9ab13e120255a5cff6 100644 --- a/ils-sales-base/src/main/resources/mappers/SaleOrderMapper.xml +++ b/ils-sales-base/src/main/resources/mappers/SaleOrderMapper.xml @@ -5,7 +5,7 @@ @@ -21,6 +21,7 @@ + @@ -30,7 +31,7 @@ @@ -64,7 +65,7 @@ @@ -98,17 +99,18 @@ id, code, user_id, pick_date, brands, series_amt, standard_sale_price, standard_unit_price, suggest_sale_price, final_sale_price, final_purchase_price, insurance_sale_price, - insurance_unit_price, order_status, comment, delete_mark, gmt_create, gmt_update + insurance_unit_price, order_status, attach_audit_status, comment, delete_mark, gmt_create, + gmt_update SELECT sos.brand_id AS brandId, @@ -195,6 +206,18 @@ AND sos.sale_order_id = #{id} + +