puzhibing
2024-12-09 a41bb438506c3c8072062f50279efb6c889699c9
Merge remote-tracking branch 'origin/master'
13个文件已修改
62 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsEvaluate.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/TechnicianSubscribe.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsEvaluateServiceImpl.java 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
@@ -80,4 +80,7 @@
    @ApiModelProperty(value = "门店id")
    private Integer shopId;
    @ApiModelProperty(value = "技师名称")
    private String technicianName;
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/GoodsEvaluate.java
@@ -87,5 +87,8 @@
    @TableField(exist = false)
    private String goodsImg;
    @TableField(exist = false)
    private String idStr;
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/TechnicianSubscribe.java
@@ -74,6 +74,9 @@
    @TableField(exist = false)
    private Long orderId;
    @TableField(exist = false)
    private String idStr;
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/feignClient/TechnicianClient.java
@@ -5,15 +5,15 @@
import com.ruoyi.other.api.domain.Technician;
import com.ruoyi.other.api.factory.TechnicianClientFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam;
@FeignClient(contextId = "TechnicianClient", value = ServiceNameConstants.OTHER_SERVICE, fallbackFactory = TechnicianClientFallbackFactory.class)
public interface TechnicianClient {
    @PostMapping("/technician/shop/detail")
    R<Technician> shopdetail(@RequestParam("techId") Integer techId);
    @GetMapping("/technician/getById")
    R<Technician> shopdetail(@RequestParam("id") Integer techId);
    @PutMapping("/technician-subscribe/updateStatus")
    R<Void> updateStatus(@RequestParam("status") Integer status, @RequestParam("subscribeId") Integer subscribeId);
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -22,7 +22,6 @@
import com.ruoyi.order.vo.OrderGoodsVO;
import com.ruoyi.order.vo.OrderVO;
import com.ruoyi.other.api.domain.*;
import com.ruoyi.other.api.feignClient.GoodsClient;
import com.ruoyi.other.api.feignClient.ShopClient;
import com.ruoyi.other.api.feignClient.TechnicianClient;
import com.ruoyi.system.api.model.LoginUser;
@@ -128,9 +127,14 @@
            orderDetailVO.setDistributionMode(goods.getDistributionMode());
        }
        R<Technician> shopdetail = technicianClient.shopdetail(order.getTechnicianId());
        if (shopdetail.getCode() != R.SUCCESS){
            throw new ServiceException("获取技师信息失败");
        }
        Technician technician = shopdetail.getData();
        Shop shop = shopR.getData();
        orderDetailVO.setId(order.getId());
        orderDetailVO.setOrderStatus(order.getOrderStatus());
        orderDetailVO.setPoint(order.getPoint());
@@ -153,6 +157,7 @@
        orderDetailVO.setLongitude(shop.getLongitude());
        orderDetailVO.setLatitude(shop.getLatitude());
        orderDetailVO.setShopId(shop.getId());
        orderDetailVO.setTechnicianName(technician.getName());
        return orderDetailVO;
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/GoodsEvaluateController.java
@@ -44,6 +44,7 @@
            AppUser appUserById = appUserClient.getAppUserById(goodsEvaluate.getAppUserId());
            goodsEvaluate.setUserName(appUserById.getName());
            goodsEvaluate.setAvatar(appUserById.getAvatar());
            goodsEvaluate.setIdStr(String.valueOf(goodsEvaluate.getId()));
        }
        return R.ok(list);
    }
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/ShopController.java
@@ -6,12 +6,10 @@
import com.ruoyi.account.api.model.AppUser;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.common.security.utils.SecurityUtils;
import com.ruoyi.other.api.domain.Shop;
import com.ruoyi.other.api.domain.ShopScore;
import com.ruoyi.other.api.domain.Technician;
import com.ruoyi.other.enums.ShopStatus;
import com.ruoyi.other.service.ShopScoreService;
import com.ruoyi.other.service.ShopService;
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TechnicianController.java
@@ -6,6 +6,7 @@
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.page.TableDataInfo;
import com.ruoyi.common.security.service.TokenService;
import com.ruoyi.other.api.domain.Technician;
import com.ruoyi.other.api.domain.TechnicianScore;
import com.ruoyi.other.service.TechnicianScoreService;
import com.ruoyi.other.service.TechnicianService;
@@ -99,9 +100,16 @@
     */
    @GetMapping("/technicianListByShopId")
    @ApiOperation(value = "技师列表", tags = {"技师列表-小程序"})
    public R<TableDataInfo<TechnicianVO>> technicianListByShopId(@ApiParam("门店id") @RequestParam Long shopId) {
    public R<TableDataInfo<TechnicianVO>> technicianListByShopId(@ApiParam("门店id") @RequestParam Long shopId,@ApiParam("技师姓名") String name) {
        startPage();
        return R.ok(getDataTable(technicianService.getTechnicianListByShopId(shopId)));
        return R.ok(getDataTable(technicianService.getTechnicianListByShopId(shopId,name)));
    }
    @GetMapping("/getById")
    @ApiOperation(value = "技师详情", tags = {"技师详情-小程序"})
    public R<Technician> getById(@RequestParam("id") Integer id){
        Technician byId = technicianService.getById(id);
        return R.ok(byId);
    }
    /**
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TechnicianMapper.java
@@ -17,7 +17,7 @@
 */
public interface TechnicianMapper extends BaseMapper<Technician> {
    List<TechnicianVO> selectTechnicianListByShopId(Long shopId);
    List<TechnicianVO> selectTechnicianListByShopId(Long shopId, String name);
    TechnicianDetailVO selectTechnicianDetail(Long technicianId);
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TechnicianService.java
@@ -16,7 +16,7 @@
 * @since 2024-11-20
 */
public interface TechnicianService extends IService<Technician> {
    List<TechnicianVO> getTechnicianListByShopId(Long shopId);
    List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name);
    TechnicianDetailVO technicianDetail(Long technicianId);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsEvaluateServiceImpl.java
@@ -3,6 +3,7 @@
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.utils.StringUtils;
import com.ruoyi.order.feignClient.RemoteOrderGoodsClient;
import com.ruoyi.order.model.Order;
import com.ruoyi.other.mapper.GoodsEvaluateMapper;
@@ -29,13 +30,18 @@
    private RemoteOrderGoodsClient remoteOrderGoodsClient;
    @Override
    @Transactional
    @Transactional(rollbackFor = Exception.class)
    public void addGoodsEvaluate(GoodsEvaluateVO goodsEvaluateVO) {
        List<GoodsEvaluate> evaluates = goodsEvaluateVO.getEvaluates();
        for (GoodsEvaluate goodsEvaluate : evaluates) {
            goodsEvaluate.setStatus(2);
            if (StringUtils.isNotEmpty(goodsEvaluate.getIdStr())){
                goodsEvaluate.setId(Long.valueOf(goodsEvaluate.getIdStr()));
                saveOrUpdate(goodsEvaluate);
            }else {
                save(goodsEvaluate);
            }
        }
        this.saveOrUpdateBatch(evaluates);
        if (CollectionUtil.isNotEmpty(evaluates)){
            Order order = new Order();
            order.setId(goodsEvaluateVO.getEvaluates().get(0).getOrderId());
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TechnicianServiceImpl.java
@@ -39,8 +39,8 @@
    private TechnicianScoreService technicianScoreService;
    @Override
    public List<TechnicianVO> getTechnicianListByShopId(Long shopId) {
        return technicianMapper.selectTechnicianListByShopId(shopId);
    public List<TechnicianVO> getTechnicianListByShopId(Long shopId, String name) {
        return technicianMapper.selectTechnicianListByShopId(shopId,name);
    }
    @Override
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TechnicianMapper.xml
@@ -17,6 +17,9 @@
          tt.`status` = 2
          AND tt.del_flag = 0
          AND tt.shop_id = #{shopId}
        <if test="name != null and name != ''">
            AND tt.`name` LIKE concat('%', #{name}, '%')
        </if>
        GROUP BY
            tt.id,
            tt.`name`,