Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/ShopController.java
master
huiqiao 1 month ago
parent
commit
d54b1fedd7
  1. 16
      hiver-admin/test-output/test-report.html
  2. 2
      hiver-core/src/main/java/cc/hiver/core/config/properties/HiverTokenProperties.java
  3. 31
      hiver-core/src/main/java/cc/hiver/core/entity/Worker.java
  4. 117
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommentController.java
  5. 2
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SalesOrderController.java
  6. 15
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/CommentMapper.java
  7. 3
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ShopTakeawayMapper.java
  8. 22
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Comment.java
  9. 25
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/OrderXd.java
  10. 5
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Shop.java
  11. 6
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/WorkerRelaPrice.java
  12. 23
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/CommentQuery.java
  13. 21
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/CommentService.java
  14. 8
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/ShopTakeawayService.java
  15. 53
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/CommentServiceImpl.java
  16. 7
      hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/ShopTakeawayServiceImpl.java
  17. 66
      hiver-modules/hiver-mall/src/main/resources/mapper/CommentMapper.xml
  18. 10
      hiver-modules/hiver-mall/src/main/resources/mapper/ShopTakeawayMapper.xml
  19. 8
      hiver-modules/hiver-mall/src/main/resources/mapper/WorkerRelaPriceMapper.xml

16
hiver-admin/test-output/test-report.html

@ -35,7 +35,7 @@
<a href="#"><span class="badge badge-primary">Hiver</span></a> <a href="#"><span class="badge badge-primary">Hiver</span></a>
</li> </li>
<li class="m-r-10"> <li class="m-r-10">
<a href="#"><span class="badge badge-primary">二月 12, 2026 15:24:12</span></a> <a href="#"><span class="badge badge-primary">三月 06, 2026 18:12:41</span></a>
</li> </li>
</ul> </ul>
</div> </div>
@ -84,7 +84,7 @@
<div class="test-detail"> <div class="test-detail">
<span class="meta text-white badge badge-sm"></span> <span class="meta text-white badge badge-sm"></span>
<p class="name">passTest</p> <p class="name">passTest</p>
<p class="text-sm"><span>15:24:12 下午</span> / <span>0.015 secs</span></p> <p class="text-sm"><span>18:12:41 下午</span> / <span>0.019 secs</span></p>
</div> </div>
<div class="test-contents d-none"> <div class="test-contents d-none">
<div class="detail-head"> <div class="detail-head">
@ -92,9 +92,9 @@
<div class="info"> <div class="info">
<div class='float-right'><span class='badge badge-default'>#test-id=1</span></div> <div class='float-right'><span class='badge badge-default'>#test-id=1</span></div>
<h5 class="test-status text-pass">passTest</h5> <h5 class="test-status text-pass">passTest</h5>
<span class='badge badge-success'>02.12.2026 15:24:12</span> <span class='badge badge-success'>03.06.2026 18:12:41</span>
<span class='badge badge-danger'>02.12.2026 15:24:12</span> <span class='badge badge-danger'>03.06.2026 18:12:41</span>
<span class='badge badge-default'>0.015 secs</span> <span class='badge badge-default'>0.019 secs</span>
</div> </div>
<div class="m-t-10 m-l-5"></div> <div class="m-t-10 m-l-5"></div>
</div> </div>
@ -104,7 +104,7 @@
<tbody> <tbody>
<tr class="event-row"> <tr class="event-row">
<td><span class="badge log pass-bg">Pass</span></td> <td><span class="badge log pass-bg">Pass</span></td>
<td>15:24:12</td> <td>18:12:41</td>
<td> <td>
Test passed Test passed
</td> </td>
@ -128,13 +128,13 @@
<div class="col-md-3"> <div class="col-md-3">
<div class="card"><div class="card-body"> <div class="card"><div class="card-body">
<p class="m-b-0">Started</p> <p class="m-b-0">Started</p>
<h3>二月 12, 2026 15:24:12</h3> <h3>三月 06, 2026 18:12:41</h3>
</div></div> </div></div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">
<div class="card"><div class="card-body"> <div class="card"><div class="card-body">
<p class="m-b-0">Ended</p> <p class="m-b-0">Ended</p>
<h3>二月 12, 2026 15:24:12</h3> <h3>三月 06, 2026 18:12:41</h3>
</div></div> </div></div>
</div> </div>
<div class="col-md-3"> <div class="col-md-3">

2
hiver-core/src/main/java/cc/hiver/core/config/properties/HiverTokenProperties.java

@ -36,7 +36,7 @@ public class HiverTokenProperties {
/** /**
* 用户选择保存登录状态对应token过期时间 * 用户选择保存登录状态对应token过期时间
*/ */
private Integer saveLoginTime = 365; private Integer saveLoginTime = 1000;
/** /**
* 限制用户登陆错误次数 * 限制用户登陆错误次数

31
hiver-core/src/main/java/cc/hiver/core/entity/Worker.java

@ -202,11 +202,40 @@ public class Worker implements Serializable {
@Column(name = "is_on_line") @Column(name = "is_on_line")
private Integer isOnLine; private Integer isOnLine;
@ApiModelProperty(value = "返佣金额") @ApiModelProperty(value = "交易保障金")
@Column(name = "rebate_amount") @Column(name = "rebate_amount")
private BigDecimal rebateAmount; private BigDecimal rebateAmount;
@Transient @Transient
@ApiModelProperty(value = "手上的订单数") @ApiModelProperty(value = "手上的订单数")
private Integer orderCount; private Integer orderCount;
@ApiModelProperty(value = "用户id")
@Column(name = "user_id")
private String userId;
@ApiModelProperty(value = "当前定位")
@Column(name = "geolocation")
private String geolocation;
@ApiModelProperty(value = "头像")
@Column(name = "icon")
private String icon;
@ApiModelProperty(value = "学生/身份证")
@Column(name = "card_picture")
private String cardPicture;
@ApiModelProperty(value = "0不接指派 1接收")
@Column(name = "get_push_order")
private Integer getPushOrder;
@ApiModelProperty(value = "评分")
@Column(name = "score")
private BigDecimal score;
@ApiModelProperty(value = "平均时长")
@Column(name = "avg_time")
private BigDecimal avgTime;
} }

117
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/CommentController.java

@ -0,0 +1,117 @@
/*
Copyright [2022] [https://hiver.cc]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package cc.hiver.mall.controller;
import cc.hiver.core.common.constant.ShopConstant;
import cc.hiver.core.common.utils.ResultUtil;
import cc.hiver.core.common.utils.StringUtils;
import cc.hiver.core.common.vo.Result;
import cc.hiver.mall.entity.Comment;
import cc.hiver.mall.entity.ShopTakeaway;
import cc.hiver.mall.pojo.query.CommentQuery;
import cc.hiver.mall.pojo.query.ShopTakeawayQuery;
import cc.hiver.mall.pojo.vo.ProductPageVO;
import cc.hiver.mall.service.CommentService;
import cc.hiver.mall.service.ShopTakeawayService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
/**
* 店铺外卖业务配置控制器
*
* @author cc
*/
@Slf4j
@RestController
@Api(tags = "评论接口")
@RequestMapping("/hiver/app/comment")
public class CommentController {
@Autowired
private CommentService commentService;
@RequestMapping(value = "/save", method = RequestMethod.POST)
@ApiOperation("保存")
@ResponseBody
public Result<Comment> save(Comment comment) {
// 1. 获取当前时间
final LocalDateTime now = LocalDateTime.now();
// 2. 定义格式化器 (例如:yyyy-MM-dd HH:mm:ss)
final DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
// 3. 转换为字符串
final String timeStr = now.format(formatter);
comment.setCreateByName(timeStr);
if(StringUtils.isEmpty(comment.getParentId())){
comment.setLevel(ShopConstant.SHOP_STATUS_LOCK);
}else{
comment.setLevel(ShopConstant.SHOP_STATUS_NORMAL);
}
final Integer result = commentService.insert(comment);
return new ResultUtil<Comment>().setData(comment);
}
@RequestMapping(value = "/deleteById", method = RequestMethod.POST)
@ApiOperation("删除")
public Result<Object> deleteById( @RequestParam String id) {
commentService.deleteById(id);
return ResultUtil.success("删除成功");
}
@RequestMapping(value = "/deleteByOrderId", method = RequestMethod.POST)
@ApiOperation("删除")
public Result<Object> deleteByOrderId( @RequestParam String orderId) {
commentService.deleteByOrderId(orderId);
return ResultUtil.success("删除成功");
}
@RequestMapping(value = "/getCommentList", method = RequestMethod.POST)
@ApiOperation("获取店铺评论")
public Result<Page<Comment>> getCommentList( @RequestBody CommentQuery commentQuery) {
//评论分页
final Page<Comment> commentsPage = commentService.getCommentList(commentQuery);
final List<String> parentIds = new ArrayList<>();
commentsPage.getRecords().forEach(e -> {
parentIds.add(e.getId());
});
//封装子级评论
if(parentIds.size() > 0){
final List<Comment> comments = commentService.getCommentListByParentId(parentIds);
commentsPage.getRecords().forEach(e -> {
e.setComments(new ArrayList<>());
if(comments.size() > 0){
comments.forEach(comment -> {
if (e.getId().equals(comment.getParentId())) {
e.getComments().add(comment);
}
});
}
});
}
return ResultUtil.data(commentsPage);
}
}

2
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/controller/SalesOrderController.java

@ -125,7 +125,7 @@ public class SalesOrderController {
order.setOrderNum(num); order.setOrderNum(num);
order.setOrderStatus(OrderConstant.ORDER_STATUS[0]); order.setOrderStatus(OrderConstant.ORDER_STATUS[0]);
order.setTimeout(2); order.setTimeout(2);
order.setOrderBkge(0); order.setOrderBkge(BigDecimal.valueOf(0));
order.setMobile(salesOrder.getConsigneeMobile()); order.setMobile(salesOrder.getConsigneeMobile());
order.setRegion(salesOrderForm.getRegion()); order.setRegion(salesOrderForm.getRegion());
orderService.save(order); orderService.save(order);

15
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/CommentMapper.java

@ -1,9 +1,24 @@
package cc.hiver.mall.dao.mapper; package cc.hiver.mall.dao.mapper;
import cc.hiver.mall.entity.Comment; import cc.hiver.mall.entity.Comment;
import cc.hiver.mall.pojo.query.CommentQuery;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;
import java.util.List;
@Repository @Repository
public interface CommentMapper extends BaseMapper<Comment> { public interface CommentMapper extends BaseMapper<Comment> {
Page<Comment> getCommentList(Page<Comment> page, @Param("comment") CommentQuery comment);
void deleteByOrderId(String orderId);
void deleteById(String id);
int insert(Comment comment);
List<Comment> getCommentListByParentId(@Param("parentIds")List<String> parentIds);
} }

3
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/dao/mapper/ShopTakeawayMapper.java

@ -15,7 +15,6 @@ limitations under the License.
*/ */
package cc.hiver.mall.dao.mapper; package cc.hiver.mall.dao.mapper;
import cc.hiver.mall.entity.Sale;
import cc.hiver.mall.entity.ShopTakeaway; import cc.hiver.mall.entity.ShopTakeaway;
import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -42,4 +41,6 @@ public interface ShopTakeawayMapper extends BaseMapper<ShopTakeaway> {
Page<ShopTakeaway> selectList(Page<ShopTakeaway> page,@Param("regionId")String regionId); Page<ShopTakeaway> selectList(Page<ShopTakeaway> page,@Param("regionId")String regionId);
List<ShopTakeaway> selectListByshopId(@Param("shopIdList")List<String> shopIdList);
} }

22
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Comment.java

@ -1,24 +1,19 @@
package cc.hiver.mall.entity; package cc.hiver.mall.entity;
import cc.hiver.core.base.HiverBaseEntity;
import cc.hiver.core.common.utils.SnowFlakeUtil; import cc.hiver.core.common.utils.SnowFlakeUtil;
import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import javax.persistence.Entity; import javax.persistence.Transient;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.List;
@Data @Data
@ApiModel(value = "客户表") @ApiModel(value = "评论")
@TableName(value = "t_comment", autoResultMap = true) @TableName(value = "t_comment", autoResultMap = true)
public class Comment implements Serializable { public class Comment implements Serializable {
@ -27,7 +22,7 @@ public class Comment implements Serializable {
private String id = SnowFlakeUtil.nextId().toString(); private String id = SnowFlakeUtil.nextId().toString();
@ApiModelProperty(value = "上级id") @ApiModelProperty(value = "上级id")
private String linkedId; private String parentId;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
@ -51,12 +46,17 @@ public class Comment implements Serializable {
private String createByIcon; private String createByIcon;
@ApiModelProperty(value = "评分") @ApiModelProperty(value = "评分")
private String score; private BigDecimal score;
@ApiModelProperty(value = "订单id") @ApiModelProperty(value = "订单id")
private String orderId; private String orderId;
@ApiModelProperty(value = "店铺id") @ApiModelProperty(value = "店铺id或者配送员id")
private String shopId; private String shopId;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "子级评论")
private List<Comment> comments;
} }

25
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/OrderXd.java

@ -24,6 +24,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import javax.persistence.*; import javax.persistence.*;
import javax.validation.constraints.Pattern; import javax.validation.constraints.Pattern;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
@Data @Data
@ -68,7 +69,7 @@ public class OrderXd implements Serializable {
private String orderStreet; private String orderStreet;
/** /**
* 物流方式 * 0-外卖 1-快递 2-跑腿
*/ */
@ApiModelProperty("物流方式") @ApiModelProperty("物流方式")
@Column(name = "order_logistics") @Column(name = "order_logistics")
@ -127,7 +128,11 @@ public class OrderXd implements Serializable {
*/ */
@ApiModelProperty("订单佣金") @ApiModelProperty("订单佣金")
@Column(name = "order_bkge") @Column(name = "order_bkge")
private Integer orderBkge; private BigDecimal orderBkge;
@ApiModelProperty("平台佣金")
@Column(name = "order_bkge_platform")
private BigDecimal orderBkgePlatform;
/** /**
* 抢单工编号 * 抢单工编号
@ -194,6 +199,22 @@ public class OrderXd implements Serializable {
@Column(name = "region") @Column(name = "region")
private String region; private String region;
@ApiModelProperty(value = "取货区域ID")
@Column(name = "pickup_area_id")
private String pickupAreaId;
@ApiModelProperty(value = "取货区域名称")
@Column(name = "pickup_area_name")
private String pickupAreaName;
@ApiModelProperty(value = "送货区域ID")
@Column(name = "delivery_area_id")
private String deliveryAreaId;
@ApiModelProperty(value = "送货区域名称")
@Column(name = "delivery_area_name")
private String deliveryAreaName;
/** /**
* 关联订单工 * 关联订单工
*/ */

5
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/Shop.java

@ -168,4 +168,9 @@ public class Shop extends HiverBaseEntity {
@ApiModelProperty(value = "副标题") @ApiModelProperty(value = "副标题")
private String subtitle; private String subtitle;
@Transient
@TableField(exist = false)
@ApiModelProperty(value = "店铺抽佣等设置")
private ShopTakeaway shopTakeaway;
} }

6
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/entity/WorkerRelaPrice.java

@ -50,4 +50,10 @@ public class WorkerRelaPrice extends HiverBaseEntity {
@ApiModelProperty(value = "配送类型") @ApiModelProperty(value = "配送类型")
private Integer orderType; private Integer orderType;
@ApiModelProperty(value = "超出3楼以上额外费用")
private BigDecimal highFloorFee;
@ApiModelProperty(value = "0 不接收指派 1接收")
private Integer getPushOrder;
} }

23
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/pojo/query/CommentQuery.java

@ -0,0 +1,23 @@
package cc.hiver.mall.pojo.query;
import cc.hiver.core.base.HiverBasePageQuery;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel("分享页查询对象")
@Data
public class CommentQuery extends HiverBasePageQuery {
@ApiModelProperty("店铺id")
private String shopId;
@ApiModelProperty("评论id")
private String orderId;
@ApiModelProperty("评论id")
private Integer picture;
@ApiModelProperty("评论id")
private Integer score;
}

21
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/CommentService.java

@ -0,0 +1,21 @@
package cc.hiver.mall.service;
import cc.hiver.mall.entity.Comment;
import cc.hiver.mall.pojo.query.CommentQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import java.util.List;
public interface CommentService extends IService<Comment> {
Page<Comment> getCommentList(CommentQuery commentQuery);
void deleteByOrderId(String orderId);
void deleteById(String id);
int insert(Comment comment);
List<Comment> getCommentListByParentId(List<String> parentIds);
}

8
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/service/ShopTakeawayService.java

@ -15,16 +15,10 @@ limitations under the License.
*/ */
package cc.hiver.mall.service; package cc.hiver.mall.service;
import cc.hiver.core.base.HiverBaseService;
import cc.hiver.mall.entity.DealingsRecord;
import cc.hiver.mall.entity.Sale;
import cc.hiver.mall.entity.Shop;
import cc.hiver.mall.entity.ShopTakeaway; import cc.hiver.mall.entity.ShopTakeaway;
import cc.hiver.mall.pojo.query.SalePageQuery;
import cc.hiver.mall.pojo.query.ShopTakeawayQuery; import cc.hiver.mall.pojo.query.ShopTakeawayQuery;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService; import com.baomidou.mybatisplus.extension.service.IService;
import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
@ -45,4 +39,6 @@ public interface ShopTakeawayService extends IService<ShopTakeaway> {
void updateByPrimaryKeySelective(ShopTakeaway shopTakeaway); void updateByPrimaryKeySelective(ShopTakeaway shopTakeaway);
Page<ShopTakeaway> selectList(ShopTakeawayQuery shopTakeawayQuery); Page<ShopTakeaway> selectList(ShopTakeawayQuery shopTakeawayQuery);
List<ShopTakeaway> selectListByshopId(List<String> shopIdList);
} }

53
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/CommentServiceImpl.java

@ -0,0 +1,53 @@
package cc.hiver.mall.serviceimpl;
import cc.hiver.mall.dao.mapper.CommentMapper;
import cc.hiver.mall.dao.mapper.ShopTakeawayMapper;
import cc.hiver.mall.entity.Comment;
import cc.hiver.mall.entity.ShopTakeaway;
import cc.hiver.mall.pojo.query.CommentQuery;
import cc.hiver.mall.service.CommentService;
import cc.hiver.mall.service.ShopTakeawayService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Collections;
import java.util.List;
@Slf4j
@Service
@Transactional
public class CommentServiceImpl extends ServiceImpl<CommentMapper, Comment> implements CommentService {
@Autowired
private CommentMapper commentMapper;
@Override
public Page<Comment> getCommentList(CommentQuery commentQuery) {
final Page<Comment> page = new Page<>(commentQuery.getPageNum(), commentQuery.getPageSize());
final Page<Comment> salePage = commentMapper.getCommentList(page, commentQuery);
return salePage;
}
@Override
public void deleteByOrderId(String orderId) {
commentMapper.deleteByOrderId(orderId);
}
@Override
public void deleteById(String id) {
commentMapper.deleteById(id);
}
@Override
public int insert(Comment comment) {
return commentMapper.insert(comment);
}
@Override
public List<Comment> getCommentListByParentId(List<String> parentIds) {
return commentMapper.getCommentListByParentId(parentIds);
}
}

7
hiver-modules/hiver-mall/src/main/java/cc/hiver/mall/serviceimpl/ShopTakeawayServiceImpl.java

@ -28,6 +28,8 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.List;
/** /**
* 店铺外卖业务配置服务实现类 * 店铺外卖业务配置服务实现类
* *
@ -84,4 +86,9 @@ public class ShopTakeawayServiceImpl extends ServiceImpl<ShopTakeawayMapper, Sh
return salePage; return salePage;
} }
@Override
public List<ShopTakeaway> selectListByshopId(List<String> shopIdList) {
return shopTakeawayMapper.selectListByshopId(shopIdList);
}
} }

66
hiver-modules/hiver-mall/src/main/resources/mapper/CommentMapper.xml

@ -3,20 +3,70 @@
<mapper namespace="cc.hiver.mall.dao.mapper.CommentMapper"> <mapper namespace="cc.hiver.mall.dao.mapper.CommentMapper">
<resultMap id="BaseResultMap" type="cc.hiver.mall.entity.Comment"> <resultMap id="BaseResultMap" type="cc.hiver.mall.entity.Comment">
<id column="id" jdbcType="VARCHAR" property="id"/> <id column="id" jdbcType="VARCHAR" property="id"/>
<result column="linked_id" jdbcType="VARCHAR" property="linkedId"/> <result column="parent_id" jdbcType="VARCHAR" property="parentId"/>
<result column="remark" jdbcType="VARCHAR" property="remark"/> <result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="level" jdbcType="INTEGER" property="level"/> <result column="level" jdbcType="INTEGER" property="level"/>
<result column="picture" jdbcType="VARCHAR" property="picture"/> <result column="picture" jdbcType="VARCHAR" property="picture"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> <result column="create_time" jdbcType="VARCHAR" property="createTime"/>
<result column="create_by" jdbcType="VARCHAR" property="createBy"/> <result column="create_by" jdbcType="VARCHAR" property="createBy"/>
<result column="create_by_name" jdbcType="TIMESTAMP" property="createByName"/> <result column="create_by_name" jdbcType="VARCHAR" property="createByName"/>
<result column="create_by_icon" jdbcType="TIMESTAMP" property="createByIcon"/> <result column="create_by_icon" jdbcType="VARCHAR" property="createByIcon"/>
<result column="score" jdbcType="TIMESTAMP" property="score"/> <result column="score" jdbcType="DECIMAL" property="score"/>
<result column="order_id" jdbcType="TIMESTAMP" property="orderId"/> <result column="order_id" jdbcType="VARCHAR" property="orderId"/>
<result column="shop_id" jdbcType="TIMESTAMP" property="shopId"/> <result column="shop_id" jdbcType="VARCHAR" property="shopId"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, linked_id, remark, level, picture, create_time, create_by, create_by_name, create_by_icon, score, order_id, shop_id id, parent_id, remark, level, picture, create_time, create_by, create_by_name, create_by_icon, score, order_id, shop_id
</sql> </sql>
<select id="getCommentList" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from t_comment
where level = 0
<if test="comment.shopId != null" >
and shop_id = #{comment.shopId,jdbcType=VARCHAR}
</if>
<if test="comment.orderId != null" >
and order_id = #{comment.orderId,jdbcType=VARCHAR}
</if>
<if test="comment.picture != 0" >
and picture != ''
</if>
<if test="comment.score != 0" >
and score <![CDATA[ < ]]> 4.5
</if>
order by create_time desc
</select>
<select id="getCommentListByParentId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from t_comment
where parent_id in
<foreach item="item" index="index" collection="parentIds" open="(" close=")" separator=",">
#{item}
</foreach>
order by create_time desc
</select>
<delete id="deleteByOrderId" parameterType="java.lang.String" >
delete from t_comment
where order_id = #{orderId,jdbcType=VARCHAR}
</delete>
<delete id="deleteById" parameterType="java.lang.String" >
delete from t_comment
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="cc.hiver.mall.entity.ShopTakeaway" >
insert into t_shop_takeaway ( id, parent_id, remark, level, picture, create_time, create_by, create_by_name,
create_by_icon, score, order_id, shop_id)
values (#{id,jdbcType=VARCHAR}, #{parentId,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{level,jdbcType=INTEGER}, #{picture,jdbcType=VARCHAR},
#{createTime,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR},
#{createByName,jdbcType=VARCHAR}, #{createByIcon,jdbcType=VARCHAR},#{score,jdbcType=INTEGER},
#{orderId,jdbcType=VARCHAR}, #{shopId,jdbcType=VARCHAR})
</insert>
</mapper> </mapper>

10
hiver-modules/hiver-mall/src/main/resources/mapper/ShopTakeawayMapper.xml

@ -41,6 +41,16 @@
where region_id = #{regionId,jdbcType=VARCHAR} where region_id = #{regionId,jdbcType=VARCHAR}
</select> </select>
<select id="selectListByshopId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from t_shop_takeaway where shop_id in
<foreach item="item" index="index" collection="shopIdList" open="(" close=")" separator=",">
#{item}
</foreach>
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" > <delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from t_shop_takeaway delete from t_shop_takeaway
where shop_id = #{shopId,jdbcType=VARCHAR} where shop_id = #{shopId,jdbcType=VARCHAR}

8
hiver-modules/hiver-mall/src/main/resources/mapper/WorkerRelaPriceMapper.xml

@ -16,10 +16,13 @@
<result column="remark" jdbcType="VARCHAR" property="remark"/> <result column="remark" jdbcType="VARCHAR" property="remark"/>
<result column="order_type" jdbcType="INTEGER" property="orderType"/> <result column="order_type" jdbcType="INTEGER" property="orderType"/>
<result column="order_bkge" jdbcType="DECIMAL" property="orderBkge"/> <result column="order_bkge" jdbcType="DECIMAL" property="orderBkge"/>
<result column="high_floor_fee" jdbcType="DECIMAL" property="highFloorFee"/>
<result column="get_push_order" jdbcType="INTEGER" property="getPushOrder"/>
</resultMap> </resultMap>
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, create_by, create_time, del_flag, update_by, update_time, worker_id, get_area_id, get_area_name, put_area_id, put_area_name, ramark, order_type, order_bkge id, create_by, create_time, del_flag, update_by, update_time, worker_id, get_area_id,
get_area_name, put_area_id, put_area_name, ramark, order_type, order_bkge, high_floor_fee, get_push_order
</sql> </sql>
<insert id="insert" parameterType="cc.hiver.mall.entity.ProductGroupBuyPrice"> <insert id="insert" parameterType="cc.hiver.mall.entity.ProductGroupBuyPrice">
@ -30,7 +33,8 @@
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, #{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
#{workerId,jdbcType=VARCHAR}, #{getAreaId,jdbcType=VARCHAR}, #{getAreaName,jdbcType=VARCHAR}, #{workerId,jdbcType=VARCHAR}, #{getAreaId,jdbcType=VARCHAR}, #{getAreaName,jdbcType=VARCHAR},
#{putAreaId,jdbcType=VARCHAR}, #{putAreaName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, #{putAreaId,jdbcType=VARCHAR}, #{putAreaName,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
#{orderType,jdbcType=INTEGER}, #{orderBkge,jdbcType=DECIMAL}) #{orderType,jdbcType=INTEGER}, #{orderBkge,jdbcType=DECIMAL},, #{highFloorFee,jdbcType=DECIMAL}
,#{getPushOrder,jdbcType=INTEGER})
</insert> </insert>
<select id="selectByWorkerId" parameterType="java.lang.String" resultMap="BaseResultMap"> <select id="selectByWorkerId" parameterType="java.lang.String" resultMap="BaseResultMap">

Loading…
Cancel
Save