puzhibing
2024-08-28 8c9ad0bd2fc6591fe606c793d6e11e2cfbe5a165
合并代码
3个文件已添加
4个文件已修改
302 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserVipDetail.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserVipDetailController.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java 222 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderRefundServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderRefundServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TVipOrderRefundServiceImpl.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserVipDetail.java
@@ -3,6 +3,7 @@
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -57,10 +58,12 @@
    @ApiModelProperty(value = "会员开始时间")
    @TableField("start_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime startTime;
    @ApiModelProperty(value = "会员结束时间")
    @TableField("end_time")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDateTime endTime;
    @TableField("create_time")
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserVipDetailController.java
@@ -5,12 +5,12 @@
import com.ruoyi.account.api.vo.GetAppUserVipDetail;
import com.ruoyi.account.service.TAppUserVipDetailService;
import com.ruoyi.common.core.domain.R;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.security.service.TokenService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
 * @author zhibing.pu
@@ -22,6 +22,8 @@
    
    @Resource
    private TAppUserVipDetailService appUserVipDetailService;
    @Resource
    private TokenService tokenService;
    
    /**
     * 获取用户当前有效的vip明细
@@ -36,6 +38,14 @@
                .last(" and now() between start_time and end_time"));
        return R.ok(one);
    }
    @GetMapping("/getVipUseDetail")
    @ApiOperation(value = "生效会员列表", tags = {"小程序-个人中心"})
    public R<List<TAppUserVipDetail>> getVipUseDetail(){
        Long userId = tokenService.getLoginUserApplet().getUserId();
        List<TAppUserVipDetail> list = appUserVipDetailService.lambdaQuery().eq(TAppUserVipDetail::getAppUserId, userId).last(" and now() between start_time and end_time order by start_time desc").list();
        return R.ok(list);
    }
    
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TChargingOrderController.java
@@ -1,4 +1,5 @@
package com.ruoyi.order.controller;
import java.math.BigDecimal;
import java.time.LocalDateTime;
@@ -55,7 +56,7 @@
/**
 * <p>
 *  前端控制器
 * 前端控制器
 * </p>
 *
 * @author xiaochen
@@ -72,18 +73,18 @@
    private TokenService tokenService;
    @Autowired
    private TOrderEvaluateService orderEvaluateService;
    @Resource
    private WxPaymentClient wxPaymentClient;
    @Resource
    private RedisService redisService;
    @Resource
    private AliPaymentClient aliPaymentClient;
    @Resource
    private TShoppingOrderService shoppingOrderService;
    @Autowired
    private AppUserClient appUserClient;
@@ -91,62 +92,70 @@
    private TVipOrderService vipOrderService;
    @Resource
    private ParkingLotClient parkingLotClient;
    @Resource private TChargingOrderRefundService chargingOrderRefundService;
    @Resource
    private TChargingOrderRefundService chargingOrderRefundService;
    @Resource private TShoppingOrderRefundService shoppingOrderRefundService;
    @Resource private  TVipOrderRefundService vipOrderRefundService;
    @Resource private SiteClient siteClient;
    @Resource private ChargingPileClient chargingPileClient;
    @Resource private ChargingGunClient chargingGunClient;
    @Resource private AppUserCarClient appUserCarClient;
    @Resource private TChargingOrderAccountingStrategyService chargingOrderAccountingStrategyService;
    @Resource
    private TShoppingOrderRefundService shoppingOrderRefundService;
    @Resource
    private TVipOrderRefundService vipOrderRefundService;
    @Resource
    private SiteClient siteClient;
    @Resource
    private ChargingPileClient chargingPileClient;
    @Resource
    private ChargingGunClient chargingGunClient;
    @Resource
    private AppUserCarClient appUserCarClient;
    @Resource
    private TChargingOrderAccountingStrategyService chargingOrderAccountingStrategyService;
    @ResponseBody
    @PostMapping(value = "/pay/order/list")
    @ApiOperation(value = "列表", tags = {"管理后台-支付订单-订单信息"})
    public R<PageInfo<PayOrderDto>> payOrderList(@RequestBody PayOrderQueryDto payOrderQueryDto){
                    return  chargingOrderService.payOrderQuery(payOrderQueryDto);
    public R<PageInfo<PayOrderDto>> payOrderList(@RequestBody PayOrderQueryDto payOrderQueryDto) {
        return chargingOrderService.payOrderQuery(payOrderQueryDto);
    }
    @ResponseBody
    @GetMapping(value = "/pay/order/pay/detail")
    @ApiOperation(value = "支付信息", tags = {"管理后台-支付订单-订单信息"})
    public R<PayOrderInfoDto> payOrderList(Long orderId,Integer type){
            switch (type){
                case 1:
                    TChargingOrder byId = chargingOrderService.getById(orderId);
                    PayOrderInfoDto payOrderInfoDto = new PayOrderInfoDto();
                    payOrderInfoDto.setOrderId(byId.getId().toString());
                    payOrderInfoDto.setCode(byId.getCode());
                    payOrderInfoDto.setTradeNo(byId.getRechargeSerialNumber());
                    payOrderInfoDto.setPayType(byId.getRechargePaymentType());
                    payOrderInfoDto.setPayAmount(byId.getPaymentAmount());
                    payOrderInfoDto.setPayTime(byId.getPayTime());
                    payOrderInfoDto.setRefundAmount(byId.getRefundAmount());
                    return R.ok(payOrderInfoDto);
                case  2:
                    TShoppingOrder byId1 = shoppingOrderService.getById(orderId);
                    PayOrderInfoDto payOrderInfoDto1 = new PayOrderInfoDto();
                    payOrderInfoDto1.setOrderId(byId1.getId().toString());
                    payOrderInfoDto1.setCode(byId1.getCode());
                    payOrderInfoDto1.setTradeNo(byId1.getSerialNumber());
                    payOrderInfoDto1.setPayType(byId1.getPaymentType());
                    payOrderInfoDto1.setPayAmount(byId1.getPaymentAmount());
                    payOrderInfoDto1.setPayTime(byId1.getPayTime());
                    payOrderInfoDto1.setRefundAmount(byId1.getRefundAmount());
                    return R.ok(payOrderInfoDto1);
                case  3 :
                    TVipOrder byId2 = vipOrderService.getById(orderId);
                    PayOrderInfoDto payOrderInfoDto2 = new PayOrderInfoDto();
                    payOrderInfoDto2.setOrderId(byId2.getId().toString());
                    payOrderInfoDto2.setCode(byId2.getCode());
                    payOrderInfoDto2.setTradeNo(byId2.getSerialNumber());
                    payOrderInfoDto2.setPayType(byId2.getPaymentType());
                    payOrderInfoDto2.setPayAmount(byId2.getPaymentAmount());
                    payOrderInfoDto2.setPayTime(byId2.getPayTime());
                    payOrderInfoDto2.setRefundAmount(byId2.getRefundAmount());
                    return R.ok(payOrderInfoDto2);
                    //todo luo 停车场订单
    public R<PayOrderInfoDto> payOrderList(Long orderId, Integer type) {
        switch (type) {
            case 1:
                TChargingOrder byId = chargingOrderService.getById(orderId);
                PayOrderInfoDto payOrderInfoDto = new PayOrderInfoDto();
                payOrderInfoDto.setOrderId(byId.getId().toString());
                payOrderInfoDto.setCode(byId.getCode());
                payOrderInfoDto.setTradeNo(byId.getRechargeSerialNumber());
                payOrderInfoDto.setPayType(byId.getRechargePaymentType());
                payOrderInfoDto.setPayAmount(byId.getPaymentAmount());
                payOrderInfoDto.setPayTime(byId.getPayTime());
                payOrderInfoDto.setRefundAmount(byId.getRefundAmount());
                return R.ok(payOrderInfoDto);
            case 2:
                TShoppingOrder byId1 = shoppingOrderService.getById(orderId);
                PayOrderInfoDto payOrderInfoDto1 = new PayOrderInfoDto();
                payOrderInfoDto1.setOrderId(byId1.getId().toString());
                payOrderInfoDto1.setCode(byId1.getCode());
                payOrderInfoDto1.setTradeNo(byId1.getSerialNumber());
                payOrderInfoDto1.setPayType(byId1.getPaymentType());
                payOrderInfoDto1.setPayAmount(byId1.getPaymentAmount());
                payOrderInfoDto1.setPayTime(byId1.getPayTime());
                payOrderInfoDto1.setRefundAmount(byId1.getRefundAmount());
                return R.ok(payOrderInfoDto1);
            case 3:
                TVipOrder byId2 = vipOrderService.getById(orderId);
                PayOrderInfoDto payOrderInfoDto2 = new PayOrderInfoDto();
                payOrderInfoDto2.setOrderId(byId2.getId().toString());
                payOrderInfoDto2.setCode(byId2.getCode());
                payOrderInfoDto2.setTradeNo(byId2.getSerialNumber());
                payOrderInfoDto2.setPayType(byId2.getPaymentType());
                payOrderInfoDto2.setPayAmount(byId2.getPaymentAmount());
                payOrderInfoDto2.setPayTime(byId2.getPayTime());
                payOrderInfoDto2.setRefundAmount(byId2.getRefundAmount());
                return R.ok(payOrderInfoDto2);
            //todo luo 停车场订单
//                case 4:
//                    TParkingRecord byId3 = parkingLotClient.getRecordById(orderId).getData();
//                    PayOrderInfoDto payOrderInfoDto3 = new PayOrderInfoDto();
@@ -159,16 +168,15 @@
//                    payOrderInfoDto3.setRefundAmount(new BigDecimal("0"));
            }
        }
        return R.ok();
    }
    @ResponseBody
    @GetMapping(value = "/pay/order/refund/detail")
    @ApiOperation(value = "退款信息", tags = {"管理后台-支付订单-订单信息"})
    public R refundDetail(Long orderId,Integer type){
    public R refundDetail(Long orderId, Integer type) {
        switch (type) {
            case 1:
                List<TChargingOrderRefund> byId = chargingOrderRefundService.lambdaQuery().eq(TChargingOrderRefund::getChargingOrderId, orderId).orderByDesc(TChargingOrderRefund::getRefundTime).list();
@@ -188,7 +196,7 @@
    @ResponseBody
    @GetMapping(value = "/pay/order/charging")
    @ApiOperation(value = "充电信息", tags = {"管理后台-支付订单-订单信息"})
    public R refundDetail(Long orderId){
    public R refundDetail(Long orderId) {
        PayOrderChargingInfo payOrderChargingInfo = new PayOrderChargingInfo();
        TChargingOrder byId = chargingOrderService.getById(orderId);
        List<Site> data = siteClient.getSiteByIds(Collections.singletonList(byId.getSiteId())).getData();
@@ -201,41 +209,39 @@
        payOrderChargingInfo.setCarNum(data3.get(0).getLicensePlate());
        return R.ok();
    }
    @ResponseBody
    @GetMapping(value = "/pay/order/charging/details")
    @ApiOperation(value = "充电明细", tags = {"管理后台-支付订单-订单信息"})
    public R<List<TChargingOrderAccountingStrategy>> chargingDetail(Long orderId){
    public R<List<TChargingOrderAccountingStrategy>> chargingDetail(Long orderId) {
        List<TChargingOrderAccountingStrategy> list = chargingOrderAccountingStrategyService.lambdaQuery().eq(TChargingOrderAccountingStrategy::getChargingOrderId, orderId).orderByDesc(TChargingOrderAccountingStrategy::getStartTime).list();
        return R.ok(list);
    }
    @ResponseBody
    @PostMapping(value = "/pay/order/refund/list")
    @ApiOperation(value = "充电信息", tags = {"管理后台-支付订单-退款订单"})
    public R<PageInfo<TChargingOrderRefund>> refundList(@RequestBody ChargingRefundDto chargingRefundDto){
      return    chargingOrderService.getRefundList(chargingRefundDto);
    public R<PageInfo<TChargingOrderRefund>> refundList(@RequestBody ChargingRefundDto chargingRefundDto) {
        return chargingOrderService.getRefundList(chargingRefundDto);
    }
    @ResponseBody
    @PostMapping(value = "/chargingOrder")
    @ApiOperation(value = "充电桩订单列表", tags = {"管理后台-订单管理"})
    public AjaxResult<TCharingOrderVO> chargingOrder(@RequestBody ChargingOrderQuery dto){
    public AjaxResult<TCharingOrderVO> chargingOrder(@RequestBody ChargingOrderQuery dto) {
        List<Long> data = appUserClient.getUserIdsByPhone(dto.getPhone()).getData();
        dto.setUserIds(data);
        TCharingOrderVO res = chargingOrderService.chargingOrder(dto);
        return AjaxResult.success(res);
    }
    @ResponseBody
    @PostMapping(value = "/chargingOrderInfo")
    @ApiOperation(value = "充电桩订单列表查看详情", tags = {"管理后台-订单管理"})
    public AjaxResult<TCharingOrderVO> chargingOrderInfo(String orderId){
    public AjaxResult<TCharingOrderVO> chargingOrderInfo(String orderId) {
        return AjaxResult.success();
    }
@@ -243,13 +249,15 @@
    @ResponseBody
    @PostMapping(value = "/addEvaluate")
    @ApiOperation(value = "添加评价", tags = {"小程序-扫一扫"})
    public AjaxResult getMyChargingOrderList(@RequestBody OrderEvaluateVo dto){
    public AjaxResult getMyChargingOrderList(@RequestBody OrderEvaluateVo dto) {
        dto.setAppUserId(tokenService.getLoginUserApplet().getUserId());
        orderEvaluateService.addOrderEvaluate(dto);
        return AjaxResult.success();
    }
    /**
     * 查询用户最近一次充电记录使用的车辆
     *
     * @param
     * @return
     */
@@ -258,17 +266,18 @@
        List<TChargingOrder> list = chargingOrderService.list(new LambdaQueryWrapper<TChargingOrder>()
                .eq(TChargingOrder::getAppUserId, tokenService.getLoginUserApplet().getUserId())
                .isNotNull(TChargingOrder::getAppUserCarId));
        if (!list.isEmpty()){
        if (!list.isEmpty()) {
            // 最近使用的车辆id
            Long size = list.get(0).getAppUserCarId();
            return R.ok(size);
        }else{
        } else {
            return R.ok(-1L);
        }
    }
    /**
     * 查询会员在本月有多少次享受了充电折扣
     *
     * @param req
     * @return
     */
@@ -276,10 +285,11 @@
    public R<Integer> getChargingCount(@RequestBody TChargingCountQuery req) {
        int size = chargingOrderService.list(new LambdaQueryWrapper<TChargingOrder>()
                .eq(TChargingOrder::getAppUserId, req.getUserId())
                        .eq(TChargingOrder::getRechargePaymentStatus,2)
                .eq(TChargingOrder::getRechargePaymentStatus, 2)
                .between(TChargingOrder::getStartTime, req.getStartTime(), req.getEndTime())).size();
        return R.ok(size);
    }
    //用户订单数量
    @PostMapping(value = "/useOrderCount")
    public R<Long> useOrderCount(@RequestParam("userId") Long userId) {
@@ -287,141 +297,137 @@
        return R.ok(count);
    }
    //订单详情
    @PostMapping(value = "/detail")
    public R<TChargingOrder> detail(@RequestParam("orderId") Long orderId) {
        return R.ok(chargingOrderService.getById(orderId));
    }
    /**
     * 根据充电枪id获取正在进行中的订单
     *
     * @param chargingGunId 充电枪id
     * @return
     */
    @PostMapping(value = "/getOrderDetailByGunId")
    public R<TChargingOrder> getOrderDetailByGunId(@RequestParam("chargingGunId") Integer chargingGunId){
    public R<TChargingOrder> getOrderDetailByGunId(@RequestParam("chargingGunId") Integer chargingGunId) {
        TChargingOrder one = chargingOrderService.getOne(new LambdaQueryWrapper<TChargingOrder>().eq(TChargingOrder::getChargingGunId, chargingGunId)
                .eq(TChargingOrder::getDelFlag, 0).eq(TChargingOrder::getStatus, 3));
        return R.ok(one);
    }
    @ResponseBody
    @GetMapping(value = "/getMyChargingOrderList")
    @ApiOperation(value = "获取充电记录列表", tags = {"小程序-充电记录"})
    public AjaxResult<Map<String, Object>> getMyChargingOrderList(GetMyChargingOrderList query){
    public AjaxResult<Map<String, Object>> getMyChargingOrderList(GetMyChargingOrderList query) {
        Map<String, Object> orderList = chargingOrderService.getMyChargingOrderList(query);
        return AjaxResult.success(orderList);
    }
    @ResponseBody
    @GetMapping(value = "/getMyChargingOrderInfo")
    @ApiOperation(value = "获取充电记订单明细", tags = {"小程序-充电记录"})
    public AjaxResult<MyChargingOrderInfo> getMyChargingOrderInfo(String id){
    public AjaxResult<MyChargingOrderInfo> getMyChargingOrderInfo(String id) {
        MyChargingOrderInfo myChargingOrderInfo = chargingOrderService.getMyChargingOrderInfo(id);
        return AjaxResult.success(myChargingOrderInfo);
    }
    @ResponseBody
    @GetMapping(value = "/getNoInvoicedOrder")
    @ApiOperation(value = "获取未开票的订单数据", tags = {"小程序-充电发票"})
    public AjaxResult<List<MyChargingOrderList>> getNoInvoicedOrder(GetNoInvoicedOrder query){
    public AjaxResult<List<MyChargingOrderList>> getNoInvoicedOrder(GetNoInvoicedOrder query) {
        List<MyChargingOrderList> list = chargingOrderService.getNoInvoicedOrder(query);
        return AjaxResult.success(list);
    }
    @ResponseBody
    @PostMapping(value = "/paymentChargingOrder")
    @ApiOperation(value = "支付充电充值费用", tags = {"小程序-扫一扫"})
    public AjaxResult paymentChargingOrder(@RequestBody AddChargingOrder addChargingOrder){
    public AjaxResult paymentChargingOrder(@RequestBody AddChargingOrder addChargingOrder) {
        return chargingOrderService.paymentChargingOrder(addChargingOrder);
    }
    /**
     * 充电充值支付回调
     *
     * @param request
     */
    @ResponseBody
    @PostMapping(value = "/chargingOrderWXCallback")
    public void chargingOrderWXCallback(HttpServletRequest request){
    public void chargingOrderWXCallback(HttpServletRequest request) {
        Map<String, Object> data = wxPaymentClient.payNotify(request).getData();
        if(null != data){
        if (null != data) {
            String out_trade_no = data.get("out_trade_no").toString();
            String transaction_id = data.get("transaction_id").toString();
            String attach = data.get("attach").toString();
            AjaxResult ajaxResult = chargingOrderService.chargingOrderCallback(1, out_trade_no, transaction_id, attach);
            if(ajaxResult.isSuccess()){
            if (ajaxResult.isSuccess()) {
                wxPaymentClient.ack();
            }
        }
    }
    /**
     * 支付宝支付成功后的回调
     */
    @ResponseBody
    @PostMapping(value = "/chargingOrderALICallback")
    public void chargingOrderALICallback(@RequestBody AliQueryOrder aliQueryOrder, HttpServletResponse response){
    public void chargingOrderALICallback(@RequestBody AliQueryOrder aliQueryOrder, HttpServletResponse response) {
        try {
            String out_trade_no = aliQueryOrder.getOutTradeNo();
            String transaction_id = aliQueryOrder.getTradeNo();
            String attach = aliQueryOrder.getPassbackParams();
            AjaxResult ajaxResult = chargingOrderService.chargingOrderCallback(2, out_trade_no, transaction_id, attach);
            if(ajaxResult.isSuccess()){
            if (ajaxResult.isSuccess()) {
                PrintWriter writer = response.getWriter();
                writer.println("success");
                writer.flush();
                writer.close();
            }
        }catch (Exception e){
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
    @ResponseBody
    @GetMapping(value = "/preChargeCheck/{id}")
    @ApiOperation(value = "获取安全检测数据", tags = {"小程序-扫一扫"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "充电枪id", required = true)
    })
    public AjaxResult<PreChargeCheck> preChargeCheck(@PathVariable Integer id){
    public AjaxResult<PreChargeCheck> preChargeCheck(@PathVariable Integer id) {
        String key = "AQJC_" + id;
        Object cacheObject = redisService.getCacheObject(key);
        return AjaxResult.success(cacheObject);
    }
    @ResponseBody
    @GetMapping(value = "/getChargingDetails/{id}")
    @ApiOperation(value = "获取充电中页面数据", tags = {"小程序-扫一扫"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "充电枪id", required = true)
    })
    public AjaxResult<ChargingDetails> getChargingDetails(@PathVariable Integer id){
    public AjaxResult<ChargingDetails> getChargingDetails(@PathVariable Integer id) {
        ChargingDetails chargingDetails = chargingOrderService.getChargingDetails(id);
        return AjaxResult.success(chargingDetails);
    }
    @ResponseBody
    @PutMapping(value = "/stopCharging/{id}")
    @ApiOperation(value = "手动停止充电", tags = {"小程序-扫一扫"})
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "订单id", required = true)
    })
    public AjaxResult stopCharging(@PathVariable String id){
    public AjaxResult stopCharging(@PathVariable String id) {
        return chargingOrderService.stopCharging(id);
    }
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TChargingOrderRefundServiceImpl.java
New file
@@ -0,0 +1,15 @@
package com.ruoyi.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.order.api.model.TChargingOrderRefund;
import com.ruoyi.order.mapper.TChargingOrderRefundMapper;
import com.ruoyi.order.service.TChargingOrderRefundService;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @date 2024/8/28 15:18
 */
@Service
public class TChargingOrderRefundServiceImpl extends ServiceImpl<TChargingOrderRefundMapper, TChargingOrderRefund> implements TChargingOrderRefundService {
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderRefundServiceImpl.java
New file
@@ -0,0 +1,15 @@
package com.ruoyi.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.order.api.model.TShoppingOrderRefund;
import com.ruoyi.order.mapper.TShoppingOrderRefundMapper;
import com.ruoyi.order.service.TShoppingOrderRefundService;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @date 2024/8/28 15:16
 */
@Service
public class TShoppingOrderRefundServiceImpl extends ServiceImpl<TShoppingOrderRefundMapper, TShoppingOrderRefund> implements TShoppingOrderRefundService {
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java
@@ -186,7 +186,7 @@
                name = goods.getName();
                imgUrl = goods.getCoverPicture();
            }else{
                TCoupon coupon = couponClient.getCouponById1(tShoppingOrder.getGoodsId()).getData();
                TCoupon coupon = couponClient.getCouponById1(tShoppingOrder.getCouponId()).getData();
                name = coupon.getName();
                imgUrl = coupon.getCoverPicture();
            }
@@ -227,7 +227,7 @@
            name = goods.getName();
            imgUrl = goods.getCoverPicture();
        }else{
            TCoupon coupon = couponClient.getCouponById1(shoppingOrder.getGoodsId()).getData();
            TCoupon coupon = couponClient.getCouponById1(shoppingOrder.getCouponId()).getData();
            info.setCouponType(coupon.getType());
            info.setDays(coupon.getDays());
            info.setEndTime(coupon.getEndTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
@@ -243,8 +243,12 @@
        info.setCreateTime(shoppingOrder.getCreateTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
        info.setPaymentAmount(shoppingOrder.getPaymentAmount());
        info.setRemark(shoppingOrder.getRemark());
        info.setDeliveryTime(shoppingOrder.getConsignerTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
        info.setFinishTime(shoppingOrder.getReceivingTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
        if(null != shoppingOrder.getConsignerTime()){
            info.setDeliveryTime(shoppingOrder.getConsignerTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
        }
        if(null != shoppingOrder.getReceivingTime()){
            info.setFinishTime(shoppingOrder.getReceivingTime().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss")));
        }
        return info;
    }
    
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TVipOrderRefundServiceImpl.java
New file
@@ -0,0 +1,15 @@
package com.ruoyi.order.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.order.api.model.TVipOrderRefund;
import com.ruoyi.order.mapper.TVipOrderRefundMapper;
import com.ruoyi.order.service.TVipOrderRefundService;
import org.springframework.stereotype.Service;
/**
 * @author zhibing.pu
 * @date 2024/8/28 15:19
 */
@Service
public class TVipOrderRefundServiceImpl extends ServiceImpl<TVipOrderRefundMapper, TVipOrderRefund> implements TVipOrderRefundService {
}