Commit d28b4772 by 邹磊浩

Merge remote-tracking branch 'origin/dev' into dev

parents 72598f73 0bbe4f0b
package com.pz.applet;
import com.pz.applet.util.CityIdUtils;
import com.pz.common.core.controller.BaseController;
import com.pz.common.core.domain.PageQuery;
import com.pz.common.core.domain.R;
......@@ -35,7 +36,7 @@ public class AppletCarouselController extends BaseController {
*/
@GetMapping("/home")
public R<HomeVo> getHome(HttpServletRequest reques) {
return R.ok(iCarouselService.selectHome(Integer.parseInt(reques.getHeader("city_id"))));
return R.ok(iCarouselService.selectHome(CityIdUtils.setCityIdPasInteger(reques)));
}
/**
* 查询轮播图列表
......
......@@ -54,7 +54,8 @@ public class AppletStoreGoodsController extends BaseController {
* 搜索商品
*/
@GetMapping("/searchShop")
public TableDataInfo<StoreGoodsVo> searchShop(StoreGoodsBo bo, PageQuery pageQuery) {
public TableDataInfo<StoreGoodsVo> searchShop(StoreGoodsBo bo, PageQuery pageQuery, HttpServletRequest reques) {
bo.setCityId(CityIdUtils.setCityIdPasLong(reques));
return iStoreGoodsService.searchAppShop(bo, pageQuery);
}
......@@ -62,8 +63,8 @@ public class AppletStoreGoodsController extends BaseController {
* 商城商品分类列表
*/
@GetMapping("/shopGoodsClassify")
public R<List<StoreApplyVo>> shopGoodsClassify() {
return R.ok(iStoreGoodsService.shopGoodsClassify());
public R<List<StoreApplyVo>> shopGoodsClassify(HttpServletRequest reques) {
return R.ok(iStoreGoodsService.shopGoodsClassify(CityIdUtils.setCityIdPasInteger(reques)));
}
/**
......
......@@ -3,6 +3,9 @@ package com.pz.system.mapper;
import com.pz.system.domain.ArticleComment;
import com.pz.system.domain.vo.ArticleCommentVo;
import com.pz.common.core.mapper.BaseMapperPlus;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 文章评论Mapper接口
......@@ -11,5 +14,5 @@ import com.pz.common.core.mapper.BaseMapperPlus;
* @date 2023-09-07
*/
public interface ArticleCommentMapper extends BaseMapperPlus<ArticleCommentMapper, ArticleComment, ArticleCommentVo> {
List<ArticleCommentVo> selectByArticleComment(@Param("aid") Integer aid);
}
......@@ -45,7 +45,7 @@ public interface IStoreGoodsService {
/**
*查询商品分类
*/
List<StoreApplyVo> shopGoodsClassify();
List<StoreApplyVo> shopGoodsClassify(int cityId);
/**
* 查询商品列表
......
......@@ -80,11 +80,10 @@ public class ArticleServiceImpl implements IArticleService {
articleVo.setCollectNum(Math.toIntExact(collectCount));
// 查询用户评论
List<ArticleCommentVo> articleCommentVos = articleCommentMapper.selectVoList(Wrappers.<ArticleComment>lambdaQuery()
.eq(ArticleComment::getAid, id).eq(ArticleComment::getUid, loginUser.getUserId()));
List<ArticleCommentVo> articleCommentVos = articleCommentMapper.selectByArticleComment(id);
// 查询用户信息并设置到评论中
if (articleCommentVos != null && !articleCommentVos.isEmpty()) {
/*if (articleCommentVos != null && !articleCommentVos.isEmpty()) {
Set<Long> userIds = new HashSet<>();
for (ArticleCommentVo articleCommentVo : articleCommentVos) {
Long uid = articleCommentVo.getUid();
......@@ -112,7 +111,7 @@ public class ArticleServiceImpl implements IArticleService {
}
}
}
*/
articleVo.setComment(articleCommentVos);
return articleVo;
}
......
......@@ -144,11 +144,12 @@ public class StoreGoodsServiceImpl implements IStoreGoodsService {
}
@Override
public List<StoreApplyVo> shopGoodsClassify() {
public List<StoreApplyVo> shopGoodsClassify(int cityId) {
//查询所有商户分类
List<StoreApplyVo> storeApplies = storeApplyMapper.selectVoList(
new LambdaQueryWrapper<StoreApply>().eq(StoreApply::getStatus, 1)
.eq(StoreApply::getCityId,cityId)
);
//查询商户下面的商品
for (StoreApplyVo storeApply : storeApplies) {
......
......@@ -738,8 +738,10 @@ public class TotalOrderServiceImpl implements ITotalOrderService {
// 修改子订单状态
boolean sonOrderFlag = orderService.switchSonOrderStatus(totalOrder.getId(), CommonOrderStatus.REFUND.getCode());
UserRefund userRefund = userRefundMapper.selectOne(new LambdaQueryWrapper<UserRefund>().eq(UserRefund::getOrderId, totalOrder.getId()));
// 除了商城订单和诊前挂号不需要给陪诊员和商户分成
if (totalOrder.getBusinessId() != 0 && totalOrder.getBusinessId() != 6 && totalOrder.getStatus() == 2) {
if (totalOrder.getBusinessId() != 0 && totalOrder.getBusinessId() != 6 && null != userRefund && sonOrderSimpleDataByTotalId.getOrderStatus() == 3) {
Services services = servicesMapper.selectById(totalOrder.getServiceId());
if (services.getFenmo() != 0) {
double money = 0;
......
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.pz.system.mapper.ArticleCommentMapper" >
<select id="selectByArticleComment" resultType="com.pz.system.domain.vo.ArticleCommentVo">
SELECT a.*,s.avatar,s.user_name FROM article_comment a left join sys_user s on s.user_id = a.uid
WHERE a.aid = #{aid}
</select>
</mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment