Merge remote-tracking branch 'origin/master' into multiple_refund
This commit is contained in:
commit
3b4376f8f5
|
|
@ -7,7 +7,9 @@ import com.ghy.common.core.page.TableDataInfo;
|
|||
import com.ghy.common.enums.BusinessType;
|
||||
import com.ghy.common.utils.poi.ExcelUtil;
|
||||
import com.ghy.order.domain.AfterServiceRecord;
|
||||
import com.ghy.order.domain.OrderDetail;
|
||||
import com.ghy.order.service.IAfterServiceRecordService;
|
||||
import com.ghy.order.service.OrderDetailService;
|
||||
import org.apache.commons.lang3.exception.ExceptionUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
|
@ -32,6 +34,9 @@ public class AfterServiceRecordController extends BaseController {
|
|||
@Autowired
|
||||
private IAfterServiceRecordService afterServiceRecordService;
|
||||
|
||||
@Autowired
|
||||
private OrderDetailService orderDetailService;
|
||||
|
||||
@RequiresPermissions("worker:record:view")
|
||||
@GetMapping()
|
||||
public String record() {
|
||||
|
|
@ -102,6 +107,10 @@ public class AfterServiceRecordController extends BaseController {
|
|||
@ResponseBody
|
||||
public AjaxResult addSave(@RequestBody AfterServiceRecord afterServiceRecord) {
|
||||
logger.info("新增售后记录:{}", afterServiceRecord);
|
||||
OrderDetail orderDetail = orderDetailService.selectById(afterServiceRecord.getOrderDetailId());
|
||||
if(orderDetail.getDrawCashTime() != null){
|
||||
return AjaxResult.error("已发起分账子单,请联系师傅处理线下售后!");
|
||||
}
|
||||
return toAjax(afterServiceRecordService.insertAfterServiceRecord(afterServiceRecord));
|
||||
}
|
||||
|
||||
|
|
@ -125,6 +134,10 @@ public class AfterServiceRecordController extends BaseController {
|
|||
public AjaxResult editSave(@RequestBody AfterServiceRecord afterServiceRecord) {
|
||||
logger.info("修改售后记录:{}", afterServiceRecord);
|
||||
try {
|
||||
OrderDetail orderDetail = orderDetailService.selectById(afterServiceRecord.getOrderDetailId());
|
||||
if(orderDetail.getDrawCashTime() != null){
|
||||
return AjaxResult.error("已发起分账子单,请联系师傅处理线下售后!");
|
||||
}
|
||||
return toAjax(afterServiceRecordService.updateAfterServiceRecord(afterServiceRecord));
|
||||
} catch (Exception exception) {
|
||||
logger.error(ExceptionUtils.getStackTrace(exception));
|
||||
|
|
|
|||
Loading…
Reference in New Issue