无关风月
2025-01-14 6ccd0f9e28c083e5f62d7d5074a85584a77af6bb
Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/qijisheng
8个文件已修改
1个文件已添加
106 ■■■■■ 已修改文件
doc/a.json 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/ConfirmDelivery.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
doc/a.json
New file
@@ -0,0 +1 @@
{"address":"四川省成都市武侯区锦辉西二街天府新谷9号楼二单元1005A","days":10,"name":"平台退货地址嘎嘎嘎嘎","phone":"19912351325"}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/OrderController.java
@@ -250,7 +250,7 @@
    @PostMapping("/confirmDelivery")
    @ApiOperation(value = "已发货操作", tags = {"管理后台-订单管理"})
    public R confirmDelivery(@RequestBody ConfirmDelivery confirmDelivery){
        return orderService.confirmDelivery(confirmDelivery.getOrderId(), confirmDelivery.getCode());
        return orderService.confirmDelivery(confirmDelivery);
    }
    
    
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/OrderService.java
@@ -45,11 +45,9 @@
    
    /**
     * 确认发货操作
     * @param orderId
     * @param code
     * @return
     */
    R confirmDelivery(Long orderId, String code);
    R confirmDelivery(ConfirmDelivery confirmDelivery);
    
    
    /**
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -213,7 +213,7 @@
        }
        // 生成核销码BASE64
        try {
            String base64 = QRCodeGenerator.generateQRCodeBase64(order.getOrderNumber(), 124, 124);
            String base64 = QRCodeGenerator.generateQRCodeBase64(String.valueOf(order.getId()), 124, 124);
            orderDetailVO.setWriteOffCode(base64);
        } catch (Exception e) {
            e.printStackTrace();
@@ -328,7 +328,9 @@
                orderPageListVo.setUserName(appUser.getName());
                orderPageListVo.setPhone(appUser.getPhone());
            }
            RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1"));
//            RefundPass one = refundPassService.getOne(new LambdaQueryWrapper<RefundPass>().eq(RefundPass::getOrderId, orderPageListVo.getId()).eq(RefundPass::getDelFlag, 0).last(" order by create_time desc limit 0,1"));
            RefundPass one = refundPassService.lambdaQuery().eq(RefundPass::getOrderId, orderPageListVo.getId()).one();
            orderPageListVo.setRefundPassId(null != one ? one.getId().toString() : null);
        }
        return pageInfo.setRecords(list);
@@ -371,8 +373,8 @@
     * @return
     */
    @Override
    public R confirmDelivery(Long orderId, String code) {
        Order order = this.getById(orderId);
    public R confirmDelivery(ConfirmDelivery confirmDelivery) {
        Order order = this.getById(confirmDelivery.getOrderId());
        if(1 == order.getPayStatus()){
            return R.fail("订单还未完成支付");
        }
@@ -383,7 +385,13 @@
            return R.fail("无效的操作");
        }
        //添加快递号和修改订单状态
        order.setExpressJson(code);
        order.setExpressJson(confirmDelivery.getCode());
        order.setDeliverProvince(confirmDelivery.getDeliverProvince());
        order.setDeliverProvinceCode(confirmDelivery.getDeliverProvinceCode());
        order.setDeliverCity(confirmDelivery.getDeliverCity());
        order.setDeliverCityCode(confirmDelivery.getDeliverCityCode());
        order.setDeliverDistrict(confirmDelivery.getDeliverDistrict());
        order.setDeliverDistrictCode(confirmDelivery.getDeliverDistrictCode());
        order.setOrderStatus(2);
        //添加查询快递信息队列
        //一小时后定时查询快递信息
@@ -392,7 +400,7 @@
        Integer waitTime = jsonObject.getInteger("waitTime");
        redisTemplate.opsForZSet().add("order_express", order.getId(), LocalDateTime.now().plusHours(waitTime).toEpochSecond(ZoneOffset.UTC));
    
        JSONObject jsonObject1 = JSON.parseObject(code);
        JSONObject jsonObject1 = JSON.parseObject(confirmDelivery.getCode());
        String com = jsonObject1.getString("com");
        String num = jsonObject1.getString("num");
        UserAddress userAddress = JSON.parseObject(order.getAddressJson(), UserAddress.class);
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/vo/ConfirmDelivery.java
@@ -1,5 +1,6 @@
package com.ruoyi.order.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -15,4 +16,22 @@
    private Long orderId;
    @ApiModelProperty("快递json信息{\"com\":\"shunfeng\",\"num\":\"123456\"}")
    private String code;
    @ApiModelProperty(value = "发货省")
    private String deliverProvince;
    @ApiModelProperty(value = "发货省编号")
    private String deliverProvinceCode;
    @ApiModelProperty(value = "发货市")
    private String deliverCity;
    @ApiModelProperty(value = "发货市编号")
    private String deliverCityCode;
    @ApiModelProperty(value = "发货区")
    private String deliverDistrict;
    @ApiModelProperty(value = "发货区编号")
    private String deliverDistrictCode;
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsController.java
@@ -179,11 +179,14 @@
     */
    @GetMapping("/goodsDetail/{goodsId}")
    @ApiOperation(value = "商品详情", tags = {"小程序-商城-首页"})
    public R<GoodsVO> goodsDetail(@PathVariable("goodsId") Long goodsId, String longitude, String latitude){
        return R.ok(goodsService.goodsDetail(goodsId, longitude, latitude));
    public R<GoodsVO> goodsDetail(@PathVariable("goodsId") Long goodsId,
                                  Integer shopId,
                                  String longitude,
                                  String latitude) {
        return R.ok(goodsService.goodsDetail(goodsId, shopId, longitude, latitude));
    }
    /**
     * 根据类型(1=服务商品,2=单品商品)获取商品数据
     * @param type
@@ -195,8 +198,8 @@
        List<Goods> list = goodsService.list(new LambdaQueryWrapper<Goods>().eq(Goods::getType, type).eq(Goods::getDelFlag, 0).eq(Goods::getStatus, 2));
        return R.ok(list);
    }
    /**
     * 根据id获取商品信息
     * @param id
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java
@@ -84,11 +84,8 @@
    @PostMapping("/manage/addorupdate")
    @ApiOperation(value = "添加编辑", tags = {"门店-技师列表"})
    public R<Page<Technician>> add(@RequestBody Technician technician) {
        Long userid = tokenService.getLoginUser().getUserid();
        SysUser sysUser = sysUserClient.getSysUser(userid).getData();
        if (technician.getId()==null) {
            technician.setSubscribeStatus(2);
            List<Technician> list = technicianService.lambdaQuery().eq(Technician::getPhone, technician.getPhone()).eq(Technician::getShopId, sysUser.getObjectId()).list();
@@ -109,18 +106,14 @@
            appUserShopClient.saveAppUserShop(appUserShop);
        }else {
            Technician byId = technicianService.getById(technician.getId());
            if (byId.getPhone()!=technician.getPhone()){
                List<Technician> list = technicianService.lambdaQuery()
                        .eq(Technician::getPhone, technician.getPhone())
                        .ne(Technician::getId, byId.getId()).list();
                if (!list.isEmpty()) {
                    return R.fail("当前号码已经添加");
                }
                R<AppUser> appUserByPhone1 = appUserClient.getAppUserByPhone1(technician.getPhone());
                if (appUserByPhone1.getData()==null){
                    return R.fail("当前号码暂无注册用户");
                }
            List<Technician> list = technicianService.lambdaQuery().eq(Technician::getPhone, technician.getPhone()).eq(Technician::getShopId, sysUser.getObjectId())
                    .ne(Technician::getId, technician.getId()).list();
            if(list.size() > 0){
                return R.fail("当前号码已经添加");
            }
            R<AppUser> appUserByPhone1 = appUserClient.getAppUserByPhone1(technician.getPhone());
            if (appUserByPhone1.getData()==null){
                return R.fail("当前号码暂无注册用户");
            }
        }
        technician.setShopId(sysUser.getObjectId());
@@ -138,7 +131,21 @@
    @GetMapping("/manage/delete")
    @ApiOperation(value = "删除", tags = {"门店-技师列表"})
    public R<Page<Technician>> delete(@RequestParam Integer id) {
        technicianService.removeById(id);
        Technician technician = technicianService.getById(id);
        technician.setDelFlag(1);
        technicianService.updateById(technician);
        //检查删除app_user_shop数据
        AppUserShop appUserShop = new AppUserShop();
        appUserShop.setAppUserId(technician.getAppUserId());
        appUserShop.setShopId(technician.getShopId());
        appUserShop.setRoleType(3);
        appUserShopClient.delAppUserShop(appUserShop);
        List<AppUserShop> userShopList = appUserShopClient.getAppUserShop(technician.getAppUserId()).getData();
        if(userShopList.size() == 0){
            AppUser appUser = appUserClient.getAppUserById(technician.getAppUserId());
            appUser.setUserType(1);
            appUserClient.editAppUserById(appUser);
        }
        return R.ok();
    }
    
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/GoodsService.java
@@ -21,7 +21,7 @@
    PageInfo<GoodsVO> goodsList(Goods goods);
    GoodsVO goodsDetail(Long goodsId, String longitude, String latitude);
    GoodsVO goodsDetail(Long goodsId, Integer shopId, String longitude, String latitude);
    List<Goods> getGoodsListByShopId(PageInfo<Goods> pageInfo, Integer shopId);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsServiceImpl.java
@@ -183,7 +183,7 @@
    }
    @Override
    public GoodsVO goodsDetail(Long goodsId, String longitude, String latitude) {
    public GoodsVO goodsDetail(Long goodsId, Integer shopId, String longitude, String latitude) {
        if (goodsId == null || goodsId <= 0) {
            throw new NullPointerException("商品ID不能为空");
        }
@@ -216,7 +216,7 @@
        BeanUtils.copyBeanProp(goodsVO, goods);
        goodsVO.setGoodsId(goods.getId());
        goodsVO.setGoodsName(goods.getName());
        Price price = getPrice(vipId, goods.getId(), null, 1, provinceCode, cityCode, districtCode);
        Price price = getPrice(vipId, goods.getId(), shopId, 1, provinceCode, cityCode, districtCode);
        if(null != price){
            goodsVO.setPointPayment(price.getPointPayment() ? 1 : 0);
            goodsVO.setCashPayment(price.getCashPayment() ? 1 : 0);