mirror of
https://github.com/weizhiqiang1995/erp-pro.git
synced 2025-03-03 19:03:11 +08:00
feat: 订单评价后台管理接口增加查询判断
This commit is contained in:
parent
d7c17aef8f
commit
d19415a44c
2 changed files with 13 additions and 4 deletions
|
@ -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")
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue