diff --git a/ghy-admin/pom.xml b/ghy-admin/pom.xml index 3b470cfe..6ea58c80 100644 --- a/ghy-admin/pom.xml +++ b/ghy-admin/pom.xml @@ -17,6 +17,13 @@ + + com.tencentcloudapi.cls + tencentcloud-cls-logback-appender + 1.0.3 + + + org.springframework.boot diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java index 98233f89..7d6c2fbd 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderDetailController.java @@ -369,7 +369,7 @@ public class OrderDetailController extends BaseController { orderStandard.setWaitServerNum(orderStandard.getStandardNum() - orderStandard.getServerNum()); standardList.add(orderStandard); } - if (this.checkIsOnlyServer(orderMaster.getId(), detail.getWorkerId())) { + if (this.checkIsOnlyServer(orderMaster.getId(), orderMaster.getWorkerId())) { BigDecimal workerFee = financialMaster.getPayMoney(); List financialDetailList = financialDetailService.selectByFinancialMasterId(financialMaster.getId()); for (FinancialDetail param : financialDetailList) { diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java index 8440c45a..95da3a4f 100644 --- a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderMasterController.java @@ -215,9 +215,14 @@ public class OrderMasterController extends BaseController { { ExcelUtil util = new ExcelUtil(SysOrderRequest.class); List jsonObjects = util.importExcel(file.getInputStream()); + boolean flag = false; for (SysOrderRequest model : jsonObjects) { - if(NumberUtil.isNumber(model.getSeq())){ - this.sysOrder(format(model)); + if("序号".equals(model.getSeq())){ + flag = true; + continue; + } + if(flag){ + sysOrder(format(model)); } } return AjaxResult.success(jsonObjects); @@ -231,6 +236,25 @@ public class OrderMasterController extends BaseController { if(StringUtils.isEmpty(orderRequest.getName())){ throw new Exception("导入表格序号" + orderRequest.getSeq() + ",姓名不能为空!"); } + if(StringUtils.isEmpty(orderRequest.getPrice())){ + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",I列,发布价格填写不能为空!"); + } + try { + Integer.parseInt(orderRequest.getPrice()); + }catch (Exception e){ + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",I列,发布价格不能有小数点!"); + } + if(StringUtils.isEmpty(orderRequest.getNum())){ + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",H列,数量填写不能为空!"); + } + try { + Integer.parseInt(orderRequest.getNum()); + }catch (Exception e){ + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",H列,数量不能含小数点。"); + } + if(StringUtils.isEmpty(orderRequest.getLastCategory())){ + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",C列,四级类目不能为空!"); + } request.setCustomerName(orderRequest.getName()); if(StringUtils.isEmpty(orderRequest.getPhone())){ throw new Exception("导入表格序号" + orderRequest.getSeq() + ",导入手机号不能为空!"); @@ -241,7 +265,7 @@ public class OrderMasterController extends BaseController { request.setGoodsBrand(orderRequest.getBrand()); request.setRemark(orderRequest.getRemark()); if(StringUtils.isEmpty(orderRequest.getMode())){ - throw new Exception("导入表格序号" + orderRequest.getSeq() + ",下单模式不能为空!"); + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",G列,下单模式名称有误/或带有其它字符!"); }else { if(orderRequest.getMode().contains("-")){ String orderModel = orderRequest.getMode().split("-")[0]; @@ -251,12 +275,12 @@ public class OrderMasterController extends BaseController { }else if("一票价".equals(orderModel)){ request.setOrderMode("01"); }else { - throw new Exception("导入表格序号" + orderRequest.getSeq() + ",下单模式填写错误!"); + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",G列,下单模式名称有误/或带有其它字符!"); } if("到付".equals(payType)){ - request.setPayMode("02"); - }else { request.setPayMode("01"); + }else { + request.setPayMode("02"); } }else { if("带价下单".equals(orderRequest.getMode())){ @@ -266,14 +290,14 @@ public class OrderMasterController extends BaseController { request.setOrderMode("01"); request.setPayMode("02"); }else { - throw new Exception("导入表格序号" + orderRequest.getSeq() + ",下单模式填写错误!"); + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",G列,下单模式名称有误/或带有其它字符!"); } } } if(StringUtils.isEmpty(orderRequest.getPrice())){ - throw new Exception("导入表格序号" + orderRequest.getSeq() + ",价格不能为空!"); + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",I列,发布价格填写不能为空!\n"); } request.setPrice(new BigDecimal(orderRequest.getPrice())); request.setVideoUrl(orderRequest.getUrl()); @@ -281,10 +305,10 @@ public class OrderMasterController extends BaseController { List goodsStandards = new ArrayList<>(); String [] categoryNames = orderRequest.getCategory().split("-"); if(categoryNames.length != 3){ - throw new Exception("导入表格序号" + orderRequest.getSeq() + ",三级类目数据格式错误"); + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",B列,三级类目名称有误/或格式有误!"); }else { - if(StringUtils.isEmpty(categoryNames[0])||StringUtils.isEmpty(categoryNames[1])||StringUtils.isEmpty(orderRequest.getLastCategory())){ - throw new Exception("导入表格序号" + orderRequest.getSeq() + ",前三级类目不能为空,请参照系统填写"); + if(StringUtils.isEmpty(categoryNames[0])||StringUtils.isEmpty(categoryNames[1])||StringUtils.isEmpty(categoryNames[2])){ + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",B列,三级类目名称有误/或格式有误!"); } try { // 第一层 @@ -323,7 +347,7 @@ public class OrderMasterController extends BaseController { standards.setGoodsStandardName(orderRequest.getLastCategory()); goodsStandards.add(standards); }catch (Exception e){ - throw new Exception("导入表格序号" + orderRequest.getSeq() + ",前三级类目有错误,请参照系统填写"); + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",B列,三级类目名称有误/或格式有误!"); } } @@ -338,7 +362,7 @@ public class OrderMasterController extends BaseController { } } if(addressName.length < 4){ - throw new Exception("导入表格序号" + orderRequest.getSeq() + ",地址数据格式错误"); + throw new Exception("导入表格序号" + orderRequest.getSeq() + ",L列,服务地址不能为空或分隔符不能少于3个!"); }else { // 省 SysArea param1 = new SysArea(); @@ -371,7 +395,7 @@ public class OrderMasterController extends BaseController { return request; } - public void sysOrder(@RequestBody SysOrderAssignRequest request) throws Exception { + public synchronized void sysOrder(@RequestBody SysOrderAssignRequest request) throws Exception { // 判断传递价格是否有小数 if (new BigDecimal(request.getPrice().intValue()).compareTo(request.getPrice())!=0){ @@ -394,20 +418,17 @@ public class OrderMasterController extends BaseController { if (request.getProvinceId() == null || request.getCityId() == null || request.getDistrictId() == null || org.apache.commons.lang3.StringUtils.isBlank(request.getFullAddress())) { throw new Exception("请填写地址"); } - CustomerAddress customerAddress = customerAddressService.selectByCustomerAndAddress(customer.getCustomerId(), - request.getProvinceId(), request.getCityId(), request.getDistrictId(), request.getFullAddress()); - if (customerAddress == null) { - customerAddress = new CustomerAddress(); - customerAddress.setCustomerId(customer.getCustomerId()); - customerAddress.setProvinceId(request.getProvinceId()); - customerAddress.setCityId(request.getCityId()); - customerAddress.setCountryId(request.getDistrictId()); - customerAddress.setAddress(request.getFullAddress()); - customerAddress.setIsDefault(0); - customerAddress.setPhone(request.getCustomerPhone()); - customerAddress.setName(request.getCustomerName()); - customerAddressService.insertCustomerAddress(customerAddress); - } + + CustomerAddress customerAddress = new CustomerAddress(); + customerAddress.setCustomerId(customer.getCustomerId()); + customerAddress.setProvinceId(request.getProvinceId()); + customerAddress.setCityId(request.getCityId()); + customerAddress.setCountryId(request.getDistrictId()); + customerAddress.setAddress(request.getFullAddress()); + customerAddress.setIsDefault(0); + customerAddress.setPhone(request.getCustomerPhone()); + customerAddress.setName(request.getCustomerName()); + customerAddressService.insertCustomerAddress(customerAddress); // 订单总价 不能小于0 BigDecimal orderPrice = request.getPrice().max(BigDecimal.ZERO); diff --git a/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderOperationRecordController.java b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderOperationRecordController.java new file mode 100644 index 00000000..bc4b69c7 --- /dev/null +++ b/ghy-admin/src/main/java/com/ghy/web/controller/order/OrderOperationRecordController.java @@ -0,0 +1,152 @@ +package com.ghy.web.controller.order; + +import java.util.List; + +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.apache.shiro.authz.annotation.RequiresPermissions; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Controller; +import org.springframework.ui.ModelMap; +import org.springframework.web.bind.annotation.*; +import com.ghy.common.annotation.Log; +import com.ghy.common.enums.BusinessType; +import com.ghy.order.domain.OrderOperationRecord; +import com.ghy.order.service.IOrderOperationRecordService; +import com.ghy.common.core.controller.BaseController; +import com.ghy.common.core.domain.AjaxResult; +import com.ghy.common.utils.poi.ExcelUtil; +import com.ghy.common.core.page.TableDataInfo; + +/** + * 订单操作记录Controller + * + * @author clunt + * @date 2024-02-17 + */ +@Api +@Controller +@RequestMapping("/order/operate") +public class OrderOperationRecordController extends BaseController +{ + private String prefix = "order/operate"; + + @Autowired + private IOrderOperationRecordService orderOperationRecordService; + + @RequiresPermissions("order:operate:view") + @GetMapping() + public String record() + { + return prefix + "/operate"; + } + + /** + * 查询订单操作记录列表 + */ + @RequiresPermissions("order:operate:list") + @PostMapping("/list") + @ResponseBody + public TableDataInfo list(OrderOperationRecord orderOperationRecord) + { + startPage(); + List list = orderOperationRecordService.selectOrderOperationRecordList(orderOperationRecord); + return getDataTable(list); + } + + /** + * App查询订单操作记录列表 + */ + @ApiOperation("订单操作记录列表") + @PostMapping("/app/list") + @ResponseBody + public TableDataInfo appList(@RequestBody OrderOperationRecord orderOperationRecord) + { + startPage(); + List list = orderOperationRecordService.selectOrderOperationRecordList(orderOperationRecord); + return getDataTable(list); + } + + /** + * 新增保存订单操作记录 + */ + @ApiOperation("新增订单操作记录") + @PostMapping("/app/add") + @ResponseBody + public AjaxResult appAdd(OrderOperationRecord orderOperationRecord) + { + return toAjax(orderOperationRecordService.insertOrderOperationRecord(orderOperationRecord)); + } + + + /** + * 导出订单操作记录列表 + */ + @RequiresPermissions("order:operate:export") + @Log(title = "订单操作记录", businessType = BusinessType.EXPORT) + @PostMapping("/export") + @ResponseBody + public AjaxResult export(OrderOperationRecord orderOperationRecord) + { + List list = orderOperationRecordService.selectOrderOperationRecordList(orderOperationRecord); + ExcelUtil util = new ExcelUtil(OrderOperationRecord.class); + return util.exportExcel(list, "订单操作记录数据"); + } + + /** + * 新增订单操作记录 + */ + @GetMapping("/add") + public String add() + { + return prefix + "/add"; + } + + /** + * 新增保存订单操作记录 + */ + @RequiresPermissions("order:operate:add") + @Log(title = "订单操作记录", businessType = BusinessType.INSERT) + @PostMapping("/add") + @ResponseBody + public AjaxResult addSave(OrderOperationRecord orderOperationRecord) + { + return toAjax(orderOperationRecordService.insertOrderOperationRecord(orderOperationRecord)); + } + + /** + * 修改订单操作记录 + */ + @RequiresPermissions("order:operate:edit") + @GetMapping("/edit/{id}") + public String edit(@PathVariable("id") Long id, ModelMap mmap) + { + OrderOperationRecord orderOperationRecord = orderOperationRecordService.selectOrderOperationRecordById(id); + mmap.put("orderOperationRecord", orderOperationRecord); + return prefix + "/edit"; + } + + /** + * 修改保存订单操作记录 + */ + @RequiresPermissions("order:operate:edit") + @Log(title = "订单操作记录", businessType = BusinessType.UPDATE) + @PostMapping("/edit") + @ResponseBody + public AjaxResult editSave(OrderOperationRecord orderOperationRecord) + { + return toAjax(orderOperationRecordService.updateOrderOperationRecord(orderOperationRecord)); + } + + /** + * 删除订单操作记录 + */ + @RequiresPermissions("order:operate:remove") + @Log(title = "订单操作记录", businessType = BusinessType.DELETE) + @PostMapping( "/remove") + @ResponseBody + public AjaxResult remove(String ids) + { + return toAjax(orderOperationRecordService.deleteOrderOperationRecordByIds(ids)); + } +} diff --git a/ghy-admin/src/main/java/com/ghy/web/core/config/SwaggerConfig.java b/ghy-admin/src/main/java/com/ghy/web/core/config/SwaggerConfig.java index 64b2bc09..ba97eb97 100644 --- a/ghy-admin/src/main/java/com/ghy/web/core/config/SwaggerConfig.java +++ b/ghy-admin/src/main/java/com/ghy/web/core/config/SwaggerConfig.java @@ -41,7 +41,7 @@ public class SwaggerConfig // 扫描所有有注解的api,用这种方式更灵活 .apis(RequestHandlerSelectors.withMethodAnnotation(ApiOperation.class)) // 扫描指定包中的swagger注解 - .apis(RequestHandlerSelectors.basePackage("com.ghy.web.controller.tool")) + .apis(RequestHandlerSelectors.basePackage("com.ghy.web.controller.order")) // 扫描所有 .apis(RequestHandlerSelectors.any()) .paths(PathSelectors.any()) .build(); diff --git a/ghy-admin/src/main/resources/application.yaml b/ghy-admin/src/main/resources/application.yaml index 9e726bf6..31afcf1c 100644 --- a/ghy-admin/src/main/resources/application.yaml +++ b/ghy-admin/src/main/resources/application.yaml @@ -16,7 +16,7 @@ ruoyi: # 开发环境配置 server: # 服务器的HTTP端口,默认为80 - port: 80 + port: 19001 servlet: # 应用的访问路径 context-path: / @@ -121,7 +121,7 @@ qiniu: adapay: debug: true prod-mode: true - notifyUrl: 'https://www.opsoul.com:8881/adapay/callback' + notifyUrl: 'https://gmhl.opsoul.com/adapay/callback' jim: appKey: '110e8830290152d76e2f1d97' diff --git a/ghy-admin/src/main/resources/templates/order/orderManager.html b/ghy-admin/src/main/resources/templates/order/orderManager.html index 077cccbb..bb7ed328 100644 --- a/ghy-admin/src/main/resources/templates/order/orderManager.html +++ b/ghy-admin/src/main/resources/templates/order/orderManager.html @@ -249,7 +249,7 @@
- +
ghy-payment + + + io.springfox + springfox-boot-starter + + + + + io.swagger + swagger-models + 1.6.2 + + diff --git a/ghy-order/src/main/java/com/ghy/order/domain/OrderMaster.java b/ghy-order/src/main/java/com/ghy/order/domain/OrderMaster.java index 993ea91f..73910408 100644 --- a/ghy-order/src/main/java/com/ghy/order/domain/OrderMaster.java +++ b/ghy-order/src/main/java/com/ghy/order/domain/OrderMaster.java @@ -197,4 +197,19 @@ public class OrderMaster extends BaseEntity { // 商品规格 -- 后台发单才有 private String goodsSpecification; + /** + * 后台关键字搜索 + * */ + private String keywords; + + private String workerPhone; + + private String workerName; + + private String province; + + private String city; + + private String district; + } diff --git a/ghy-order/src/main/java/com/ghy/order/domain/OrderOperationRecord.java b/ghy-order/src/main/java/com/ghy/order/domain/OrderOperationRecord.java new file mode 100644 index 00000000..fee891bf --- /dev/null +++ b/ghy-order/src/main/java/com/ghy/order/domain/OrderOperationRecord.java @@ -0,0 +1,54 @@ +package com.ghy.order.domain; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.apache.commons.lang3.builder.ToStringBuilder; +import org.apache.commons.lang3.builder.ToStringStyle; +import com.ghy.common.annotation.Excel; +import com.ghy.common.core.domain.BaseEntity; + +/** + * 订单操作记录对象 order_operation_record + * + * @author clunt + * @date 2024-02-17 + */ +@Data +@ApiModel(value = "订单操作记录") +public class OrderOperationRecord extends BaseEntity +{ + private static final long serialVersionUID = 1L; + + /** 主键 */ + private Long id; + + /** 订单id */ + @Excel(name = "订单id") + @ApiModelProperty(value = "订单id") + private Long orderId; + + /** 订单类型 01.主单 02.子单 */ + @Excel(name = "订单类型 01.主单 02.子单") + @ApiModelProperty(value = "订单类型 01.主单 02.子单") + private String orderType; + + /** 操作内容 */ + @Excel(name = "操作内容") + @ApiModelProperty(value = "操作内容") + private String content; + + @Override + public String toString() { + return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) + .append("id", getId()) + .append("orderId", getOrderId()) + .append("orderType", getOrderType()) + .append("content", getContent()) + .append("createTime", getCreateTime()) + .append("updateTime", getUpdateTime()) + .append("createBy", getCreateBy()) + .append("updateBy", getUpdateBy()) + .append("remark", getRemark()) + .toString(); + } +} diff --git a/ghy-order/src/main/java/com/ghy/order/mapper/OrderOperationRecordMapper.java b/ghy-order/src/main/java/com/ghy/order/mapper/OrderOperationRecordMapper.java new file mode 100644 index 00000000..58aeb564 --- /dev/null +++ b/ghy-order/src/main/java/com/ghy/order/mapper/OrderOperationRecordMapper.java @@ -0,0 +1,62 @@ +package com.ghy.order.mapper; + +import com.ghy.order.domain.OrderOperationRecord; + +import java.util.List; + +/** + * 订单操作记录Mapper接口 + * + * @author clunt + * @date 2024-02-17 + */ +public interface OrderOperationRecordMapper +{ + /** + * 查询订单操作记录 + * + * @param id 订单操作记录主键 + * @return 订单操作记录 + */ + public OrderOperationRecord selectOrderOperationRecordById(Long id); + + /** + * 查询订单操作记录列表 + * + * @param orderOperationRecord 订单操作记录 + * @return 订单操作记录集合 + */ + public List selectOrderOperationRecordList(OrderOperationRecord orderOperationRecord); + + /** + * 新增订单操作记录 + * + * @param orderOperationRecord 订单操作记录 + * @return 结果 + */ + public int insertOrderOperationRecord(OrderOperationRecord orderOperationRecord); + + /** + * 修改订单操作记录 + * + * @param orderOperationRecord 订单操作记录 + * @return 结果 + */ + public int updateOrderOperationRecord(OrderOperationRecord orderOperationRecord); + + /** + * 删除订单操作记录 + * + * @param id 订单操作记录主键 + * @return 结果 + */ + public int deleteOrderOperationRecordById(Long id); + + /** + * 批量删除订单操作记录 + * + * @param ids 需要删除的数据主键集合 + * @return 结果 + */ + public int deleteOrderOperationRecordByIds(String[] ids); +} diff --git a/ghy-order/src/main/java/com/ghy/order/service/IOrderOperationRecordService.java b/ghy-order/src/main/java/com/ghy/order/service/IOrderOperationRecordService.java new file mode 100644 index 00000000..65253422 --- /dev/null +++ b/ghy-order/src/main/java/com/ghy/order/service/IOrderOperationRecordService.java @@ -0,0 +1,60 @@ +package com.ghy.order.service; +import java.util.List; +import com.ghy.order.domain.OrderOperationRecord; + +/** + * 订单操作记录Service接口 + * + * @author clunt + * @date 2024-02-17 + */ +public interface IOrderOperationRecordService +{ + /** + * 查询订单操作记录 + * + * @param id 订单操作记录主键 + * @return 订单操作记录 + */ + public OrderOperationRecord selectOrderOperationRecordById(Long id); + + /** + * 查询订单操作记录列表 + * + * @param orderOperationRecord 订单操作记录 + * @return 订单操作记录集合 + */ + public List selectOrderOperationRecordList(OrderOperationRecord orderOperationRecord); + + /** + * 新增订单操作记录 + * + * @param orderOperationRecord 订单操作记录 + * @return 结果 + */ + public int insertOrderOperationRecord(OrderOperationRecord orderOperationRecord); + + /** + * 修改订单操作记录 + * + * @param orderOperationRecord 订单操作记录 + * @return 结果 + */ + public int updateOrderOperationRecord(OrderOperationRecord orderOperationRecord); + + /** + * 批量删除订单操作记录 + * + * @param ids 需要删除的订单操作记录主键集合 + * @return 结果 + */ + public int deleteOrderOperationRecordByIds(String ids); + + /** + * 删除订单操作记录信息 + * + * @param id 订单操作记录主键 + * @return 结果 + */ + public int deleteOrderOperationRecordById(Long id); +} diff --git a/ghy-order/src/main/java/com/ghy/order/service/impl/OrderOperationRecordServiceImpl.java b/ghy-order/src/main/java/com/ghy/order/service/impl/OrderOperationRecordServiceImpl.java new file mode 100644 index 00000000..00fe294f --- /dev/null +++ b/ghy-order/src/main/java/com/ghy/order/service/impl/OrderOperationRecordServiceImpl.java @@ -0,0 +1,97 @@ +package com.ghy.order.service.impl; + +import java.util.List; +import com.ghy.common.utils.DateUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import com.ghy.order.mapper.OrderOperationRecordMapper; +import com.ghy.order.domain.OrderOperationRecord; +import com.ghy.order.service.IOrderOperationRecordService; +import com.ghy.common.core.text.Convert; + +/** + * 订单操作记录Service业务层处理 + * + * @author clunt + * @date 2024-02-17 + */ +@Service +public class OrderOperationRecordServiceImpl implements IOrderOperationRecordService +{ + @Autowired + private OrderOperationRecordMapper orderOperationRecordMapper; + + /** + * 查询订单操作记录 + * + * @param id 订单操作记录主键 + * @return 订单操作记录 + */ + @Override + public OrderOperationRecord selectOrderOperationRecordById(Long id) + { + return orderOperationRecordMapper.selectOrderOperationRecordById(id); + } + + /** + * 查询订单操作记录列表 + * + * @param orderOperationRecord 订单操作记录 + * @return 订单操作记录 + */ + @Override + public List selectOrderOperationRecordList(OrderOperationRecord orderOperationRecord) + { + return orderOperationRecordMapper.selectOrderOperationRecordList(orderOperationRecord); + } + + /** + * 新增订单操作记录 + * + * @param orderOperationRecord 订单操作记录 + * @return 结果 + */ + @Override + public int insertOrderOperationRecord(OrderOperationRecord orderOperationRecord) + { + orderOperationRecord.setCreateTime(DateUtils.getNowDate()); + return orderOperationRecordMapper.insertOrderOperationRecord(orderOperationRecord); + } + + /** + * 修改订单操作记录 + * + * @param orderOperationRecord 订单操作记录 + * @return 结果 + */ + @Override + public int updateOrderOperationRecord(OrderOperationRecord orderOperationRecord) + { + orderOperationRecord.setUpdateTime(DateUtils.getNowDate()); + return orderOperationRecordMapper.updateOrderOperationRecord(orderOperationRecord); + } + + /** + * 批量删除订单操作记录 + * + * @param ids 需要删除的订单操作记录主键 + * @return 结果 + */ + @Override + public int deleteOrderOperationRecordByIds(String ids) + { + return orderOperationRecordMapper.deleteOrderOperationRecordByIds(Convert.toStrArray(ids)); + } + + /** + * 删除订单操作记录信息 + * + * @param id 订单操作记录主键 + * @return 结果 + */ + @Override + public int deleteOrderOperationRecordById(Long id) + { + return orderOperationRecordMapper.deleteOrderOperationRecordById(id); + } +} diff --git a/ghy-order/src/main/resources/mapper/order/OrderMasterMapper.xml b/ghy-order/src/main/resources/mapper/order/OrderMasterMapper.xml index 0eb22662..c5176a0a 100644 --- a/ghy-order/src/main/resources/mapper/order/OrderMasterMapper.xml +++ b/ghy-order/src/main/resources/mapper/order/OrderMasterMapper.xml @@ -107,11 +107,35 @@ LEFT JOIN customer_address ca ON ca.customer_address_id = om.address_id LEFT JOIN goods g ON g.goods_id = om.goods_id LEFT JOIN financial_master fm ON om.id = fm.order_master_id + left join worker w on om.worker_id = w.worker_id + + + and order_id = #{orderId} + and order_type = #{orderType} + and content = #{content} + + + + + + + insert into order_operation_record + + order_id, + order_type, + content, + create_time, + update_time, + create_by, + update_by, + remark, + + + #{orderId}, + #{orderType}, + #{content}, + #{createTime}, + #{updateTime}, + #{createBy}, + #{updateBy}, + #{remark}, + + + + + update order_operation_record + + order_id = #{orderId}, + order_type = #{orderType}, + content = #{content}, + create_time = #{createTime}, + update_time = #{updateTime}, + create_by = #{createBy}, + update_by = #{updateBy}, + remark = #{remark}, + + where id = #{id} + + + + delete from order_operation_record where id = #{id} + + + + delete from order_operation_record where id in + + #{id} + + + + \ No newline at end of file diff --git a/ghy-quartz/src/main/java/com/ghy/quartz/service/impl/OrderServiceImpl.java b/ghy-quartz/src/main/java/com/ghy/quartz/service/impl/OrderServiceImpl.java index 50021bdd..172b1bde 100644 --- a/ghy-quartz/src/main/java/com/ghy/quartz/service/impl/OrderServiceImpl.java +++ b/ghy-quartz/src/main/java/com/ghy/quartz/service/impl/OrderServiceImpl.java @@ -76,11 +76,11 @@ public class OrderServiceImpl implements OrderService { } // 查询符合超时的子单 - List orders = orderDetailService.selectByStatus(timeoutOrderStatus); - log.info("扫描到{}条未完成的子订单", orders.size()); - for (OrderDetail order : orders) { - executor.execute(() -> checkTimeout(order)); - } +// List orders = orderDetailService.selectByStatus(timeoutOrderStatus); +// log.info("扫描到{}条未完成的子订单", orders.size()); +// for (OrderDetail order : orders) { +// executor.execute(() -> checkTimeout(order)); +// } } @Transactional(rollbackFor = Exception.class)