mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-05 14:38:06 +08:00
update 批量更新订单审核
This commit is contained in:
@@ -41,7 +41,6 @@ import javax.servlet.http.HttpServletRequest;
|
|||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -1075,4 +1074,22 @@ public class TempController extends BaseController {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping("/batchUpdateOrderReview")
|
||||||
|
public RestApiResponse<?> batchUpdateOrderReview(@RequestBody UpdateOrderReviewDTO dto) {
|
||||||
|
logger.info("批量更新订单评价, param:{}", JSON.toJSONString(dto));
|
||||||
|
RestApiResponse<?> response;
|
||||||
|
try {
|
||||||
|
orderBasicInfoService.batchUpdateOrderReview(dto);
|
||||||
|
response = new RestApiResponse<>();
|
||||||
|
} catch (BusinessException e) {
|
||||||
|
logger.warn("批量更新订单评价 warn", e);
|
||||||
|
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("批量更新订单评价 error", e);
|
||||||
|
response = new RestApiResponse<>("00300002", "批量更新订单评价异常");
|
||||||
|
}
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -215,6 +215,8 @@ public class OrderBasicInfo {
|
|||||||
*/
|
*/
|
||||||
private Date settlementTime;
|
private Date settlementTime;
|
||||||
|
|
||||||
|
private String reviewFlag;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 退款金额
|
* 退款金额
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.jsowell.pile.dto;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@Data
|
||||||
|
public class UpdateOrderReviewDTO {
|
||||||
|
/**
|
||||||
|
* 订单编号列表
|
||||||
|
*/
|
||||||
|
private List<String> orderCodeList;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价标记
|
||||||
|
*/
|
||||||
|
private String reviewFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点编号
|
||||||
|
*/
|
||||||
|
private String stationId;
|
||||||
|
}
|
||||||
@@ -5,11 +5,11 @@ import com.jsowell.pile.domain.OrderDetail;
|
|||||||
import com.jsowell.pile.dto.*;
|
import com.jsowell.pile.dto.*;
|
||||||
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
import com.jsowell.pile.dto.nanrui.NRQueryOrderDTO;
|
||||||
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
import com.jsowell.pile.dto.ningxiajiaotou.NXJTQueryOrdersInfoDTO;
|
||||||
import com.jsowell.pile.vo.uniapp.business.BusinessOrderDetailInfoVO;
|
|
||||||
import com.jsowell.pile.vo.SupStationStatsVO;
|
import com.jsowell.pile.vo.SupStationStatsVO;
|
||||||
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
import com.jsowell.pile.vo.base.MerchantOrderInfoVO;
|
||||||
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
import com.jsowell.pile.vo.lianlian.AccumulativeInfoVO;
|
||||||
import com.jsowell.pile.vo.nanrui.JiangSuOrderInfoVO;
|
import com.jsowell.pile.vo.nanrui.JiangSuOrderInfoVO;
|
||||||
|
import com.jsowell.pile.vo.uniapp.business.BusinessOrderDetailInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
import com.jsowell.pile.vo.uniapp.customer.OrderVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.PersonPileConnectorSumInfoVO;
|
import com.jsowell.pile.vo.uniapp.customer.PersonPileConnectorSumInfoVO;
|
||||||
import com.jsowell.pile.vo.uniapp.customer.SendMessageVO;
|
import com.jsowell.pile.vo.uniapp.customer.SendMessageVO;
|
||||||
@@ -19,7 +19,6 @@ import org.springframework.stereotype.Repository;
|
|||||||
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
@@ -466,4 +465,6 @@ public interface OrderBasicInfoMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<PileConnectorInfoVO> batchQueryChargingConnectorInfo(@Param("pileConnectorCodes") List<String> chargingConnectorCodeList);
|
List<PileConnectorInfoVO> batchQueryChargingConnectorInfo(@Param("pileConnectorCodes") List<String> chargingConnectorCodeList);
|
||||||
|
|
||||||
|
int batchUpdateOrderReview(@Param("dto") UpdateOrderReviewDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -675,4 +675,6 @@ public interface OrderBasicInfoService{
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<RealTimeMonitorData> getRealTimeMonitorDataList(List<String> transactionCodeList);
|
List<RealTimeMonitorData> getRealTimeMonitorDataList(List<String> transactionCodeList);
|
||||||
|
|
||||||
|
int batchUpdateOrderReview(UpdateOrderReviewDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6457,6 +6457,20 @@ public class OrderBasicInfoServiceImpl implements OrderBasicInfoService {
|
|||||||
.build();
|
.build();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int batchUpdateOrderReview(UpdateOrderReviewDTO dto) {
|
||||||
|
if (CollectionUtils.isEmpty(dto.getOrderCodeList())) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(dto.getStationId())) {
|
||||||
|
dto.setStationId("1003");
|
||||||
|
}
|
||||||
|
if (StringUtils.isBlank(dto.getReviewFlag())) {
|
||||||
|
dto.setReviewFlag("0");
|
||||||
|
}
|
||||||
|
return orderBasicInfoMapper.batchUpdateOrderReview(dto);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 批量查询充电枪口信息
|
* 批量查询充电枪口信息
|
||||||
* @param chargingConnectorCodeList
|
* @param chargingConnectorCodeList
|
||||||
|
|||||||
@@ -44,6 +44,7 @@
|
|||||||
<result column="stop_reason_code" jdbcType="VARCHAR" property="stopReasonCode"/>
|
<result column="stop_reason_code" jdbcType="VARCHAR" property="stopReasonCode"/>
|
||||||
<result column="reason" jdbcType="VARCHAR" property="reason"/>
|
<result column="reason" jdbcType="VARCHAR" property="reason"/>
|
||||||
<result column="settlement_time" jdbcType="TIMESTAMP" property="settlementTime"/>
|
<result column="settlement_time" jdbcType="TIMESTAMP" property="settlementTime"/>
|
||||||
|
<result column="review_flag" jdbcType="VARCHAR" property="reviewFlag"/>
|
||||||
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount"/>
|
<result column="refund_amount" jdbcType="DECIMAL" property="refundAmount"/>
|
||||||
<result column="refund_status" jdbcType="VARCHAR" property="refundStatus"/>
|
<result column="refund_status" jdbcType="VARCHAR" property="refundStatus"/>
|
||||||
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
||||||
@@ -59,7 +60,7 @@
|
|||||||
pay_mode, pay_status, pay_amount, pay_time, insurance_amount, plate_number, order_amount, virtual_amount,
|
pay_mode, pay_status, pay_amount, pay_time, insurance_amount, plate_number, order_amount, virtual_amount,
|
||||||
group_code, discount_amount, settle_amount, actual_received_amount, remedial_amount, charge_start_time, charge_end_time,
|
group_code, discount_amount, settle_amount, actual_received_amount, remedial_amount, charge_start_time, charge_end_time,
|
||||||
start_type, reserved_start_time, reserved_end_time, start_soc, end_soc, stop_reason_code, reason,
|
start_type, reserved_start_time, reserved_end_time, start_soc, end_soc, stop_reason_code, reason,
|
||||||
settlement_time, refund_amount,
|
settlement_time, review_flag, refund_amount,
|
||||||
refund_status, create_by, create_time, update_by, update_time, del_flag
|
refund_status, create_by, create_time, update_by, update_time, del_flag
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
@@ -3623,4 +3624,15 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
and order_status = '1'
|
and order_status = '1'
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="batchUpdateOrderReview">
|
||||||
|
update order_basic_info
|
||||||
|
set review_flag = #{dto.reviewFlag}
|
||||||
|
where del_flag = '0'
|
||||||
|
and station_id = #{dto.stationId}
|
||||||
|
and order_code in
|
||||||
|
<foreach item="orderCode" collection="dto.orderCodeList" separator="," open="(" close=")">
|
||||||
|
#{orderCode}
|
||||||
|
</foreach>
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
Reference in New Issue
Block a user