feat: 订单评价后台管理接口增加查询判断

This commit is contained in:
wst 2024-12-02 11:34:49 +08:00
parent d7c17aef8f
commit d19415a44c
2 changed files with 13 additions and 4 deletions

View file

@ -73,7 +73,7 @@ public class OrderComment extends OperatorUserInfo {
private Integer type;
@TableField(value = "start")
@ApiModelProperty(value = "星级(1-5)",required = "required")
@ApiModelProperty(value = "星级(1-5)")
private Integer start;
@TableField(value = "is_comment")

View file

@ -21,6 +21,7 @@ import com.skyeye.common.object.OutputObject;
import com.skyeye.common.util.mybatisplus.MybatisPlusUtil;
import com.skyeye.erp.service.IMaterialNormsService;
import com.skyeye.erp.service.IMaterialService;
import com.skyeye.eve.service.IAuthUserService;
import com.skyeye.exception.CustomException;
import com.skyeye.order.dao.OrderCommentDao;
import com.skyeye.order.entity.OrderComment;
@ -60,6 +61,9 @@ public class OrderCommentServiceImpl extends SkyeyeBusinessServiceImpl<OrderComm
@Autowired
private OrderItemService orderItemService;
@Autowired
private IAuthUserService iAuthUserService;
@Override
public void validatorEntity(OrderComment orderComment) {
if (orderComment.getType() == OrderCommentType.MERCHANT.getKey()) {
@ -118,6 +122,7 @@ public class OrderCommentServiceImpl extends SkyeyeBusinessServiceImpl<OrderComm
List<Map<String, Object>> mapList = super.queryPageDataList(inputObject);
iMaterialService.setMationForMap(mapList, "materialId", "materialMation");
iMaterialNormsService.setMationForMap(mapList, "normsId", "normsMation");
iAuthUserService.setMationForMap(mapList, "createId", "createMation");
return mapList;
}
@ -125,9 +130,13 @@ public class OrderCommentServiceImpl extends SkyeyeBusinessServiceImpl<OrderComm
public QueryWrapper<OrderComment> getQueryWrapper(CommonPageInfo commonPageInfo) {
String typeId = commonPageInfo.getTypeId();
QueryWrapper<OrderComment> queryWrapper = super.getQueryWrapper(commonPageInfo);
queryWrapper.eq(MybatisPlusUtil.toColumns(OrderComment::getType), OrderCommentType.CUSTOMERFiRST.getKey());
queryWrapper.eq(MybatisPlusUtil.toColumns(OrderComment::getType), OrderCommentType.CUSTOMERLATER.getKey());
queryWrapper.eq(MybatisPlusUtil.toColumns(OrderComment::getStoreId), typeId);
queryWrapper.and(wrap -> {
wrap.eq(MybatisPlusUtil.toColumns(OrderComment::getType), OrderCommentType.CUSTOMERFiRST.getKey())
.or().eq(MybatisPlusUtil.toColumns(OrderComment::getType), OrderCommentType.CUSTOMERLATER.getKey());
});
if (StrUtil.isNotEmpty(typeId)) {
queryWrapper.eq(MybatisPlusUtil.toColumns(OrderComment::getStoreId), typeId);
}
return queryWrapper;
}