| | |
| | | return Result.error("查询失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | @PostMapping("/status/isEvaluate") |
| | | @ApiOperation("更新评价状态") |
| | | public Result<Object> updateOrderInfoIsEvaluate(@ApiParam("订单ID") @RequestParam @NotBlank String orderId){ |
| | | try { |
| | | boolean success = orderInfoService.updateOrderIsEvaluate(orderId); |
| | | return success ? Result.success("评价状态更新成功") : Result.error("评价状态更新失败"); |
| | | } catch (Exception e) { |
| | | log.error("评价状态更新失败", e); |
| | | return Result.error("评价状态更新失败:" + e.getMessage()); |
| | | } |
| | | } |
| | | } |
| | |
| | | @TableLogic |
| | | @TableField("deleted") |
| | | private Integer deleted; |
| | | |
| | | /** |
| | | *是否评论 |
| | | */ |
| | | @TableField("is_evaluate") |
| | | private String isEvaluate; |
| | | |
| | | } |
| | |
| | | * @return 存在返回true,不存在返回false |
| | | */ |
| | | boolean existsCompletedNotCancelledOrderByProductId(String productId); |
| | | |
| | | boolean updateOrderIsEvaluate(String orderId); |
| | | } |
| | |
| | | orderInfo.setPaymentType(createOrderDTO.getPaymentType()); |
| | | orderInfo.setPaymentStatus("未支付"); |
| | | orderInfo.setBuyerRemarks(createOrderDTO.getBuyerRemarks()); |
| | | orderInfo.setIsEvaluate("未评价"); |
| | | orderInfo.setCreatedAt(LocalDateTime.now()); |
| | | orderInfo.setUpdatedAt(LocalDateTime.now()); |
| | | |
| | |
| | | Long count = this.baseMapper.selectCount(wrapper); |
| | | return count != null && count > 0; |
| | | } |
| | | |
| | | @Override |
| | | public boolean updateOrderIsEvaluate(String orderId) { |
| | | if (!StringUtils.hasText(orderId)) { |
| | | throw new BusinessException("订单ID不能为空"); |
| | | } |
| | | OrderInfo orderInfo = this.getById(orderId); |
| | | if (orderInfo == null) { |
| | | throw new BusinessException("订单不存在"); |
| | | } |
| | | orderInfo.setIsEvaluate("已评价"); |
| | | return this.updateById(orderInfo); |
| | | } |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("订单评价") |
| | | private OrderEvaluationVO evaluation; |
| | | |
| | | @ApiModelProperty("是否评价") |
| | | private String isEvaluate; |
| | | } |
| | |
| | | server: |
| | | port: 8080 |
| | | port: 8089 |
| | | servlet: |
| | | context-path: /admin |
| | | |
| | | spring: |
| | | application: |
| | | name: web-manage-back |
| | | name: trade-back |
| | | profiles: |
| | | active: dev |
| | | active: test |
| | | jackson: |
| | | date-format: yyyy-MM-dd HH:mm:ss |
| | | time-zone: GMT+8 |
| | |
| | | <result column="created_at" property="createdAt" jdbcType="TIMESTAMP"/> |
| | | <result column="updated_at" property="updatedAt" jdbcType="TIMESTAMP"/> |
| | | <result column="deleted" property="deleted" jdbcType="INTEGER"/> |
| | | <result column="is_evaluate" property="isEvaluate" jdbcType="VARCHAR"/> |
| | | </resultMap> |
| | | |
| | | <!-- 基础字段列表 --> |
| | | <sql id="Base_Column_List"> |
| | | order_id, product_id, user_id, unit_id, product_name, provider_name, provider_id, |
| | | apply_time, order_status, total_amount, payment_type, payment_status, workflow_id, |
| | | current_step, approval_flow, buyer_remarks, seller_remarks, created_at, updated_at, deleted |
| | | current_step, approval_flow, buyer_remarks, seller_remarks, created_at, updated_at, deleted, is_evaluate |
| | | </sql> |
| | | |
| | | <!-- 分页查询买家订单列表 --> |