订单评价
parent
412289968f
commit
c0cd34679f
|
|
@ -88,7 +88,11 @@
|
||||||
<groupId>org.hibernate.validator</groupId>
|
<groupId>org.hibernate.validator</groupId>
|
||||||
<artifactId>hibernate-validator</artifactId>
|
<artifactId>hibernate-validator</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.google.zxing</groupId>
|
||||||
|
<artifactId>core</artifactId>
|
||||||
|
<version>3.5.3</version>
|
||||||
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.hutool</groupId>
|
<groupId>cn.hutool</groupId>
|
||||||
<artifactId>hutool-all</artifactId>
|
<artifactId>hutool-all</artifactId>
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@ import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.entity.DriverEntity;
|
import com.njzscloud.dispose.cst.driver.pojo.entity.DriverEntity;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.param.DriverQueryParam;
|
import com.njzscloud.dispose.cst.driver.pojo.param.DriverQueryParam;
|
||||||
|
import com.njzscloud.dispose.cst.driver.pojo.param.QRCodeParam;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.result.DriverResult;
|
import com.njzscloud.dispose.cst.driver.pojo.result.DriverResult;
|
||||||
import com.njzscloud.dispose.cst.driver.service.DriverService;
|
import com.njzscloud.dispose.cst.driver.service.DriverService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
@ -15,6 +16,7 @@ import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 司机
|
* 司机
|
||||||
|
*
|
||||||
* @author ljw
|
* @author ljw
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
|
|
@ -67,6 +69,15 @@ public class DriverController {
|
||||||
public R<PageResult<DriverResult>> paging(PageParam pageParam, DriverQueryParam queryParam) {
|
public R<PageResult<DriverResult>> paging(PageParam pageParam, DriverQueryParam queryParam) {
|
||||||
return R.success(driverService.paging(pageParam, queryParam));
|
return R.success(driverService.paging(pageParam, queryParam));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取二维码
|
||||||
|
*/
|
||||||
|
@GetMapping("/getCode")
|
||||||
|
public R<?> getCode(QRCodeParam codeParam) {
|
||||||
|
return R.success(driverService.getCode(codeParam));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,37 @@
|
||||||
|
package com.njzscloud.dispose.cst.driver.pojo.param;
|
||||||
|
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
public class QRCodeParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 内容
|
||||||
|
*/
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二维码宽度
|
||||||
|
*/
|
||||||
|
private Integer width;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二维码高度
|
||||||
|
*/
|
||||||
|
private Integer height;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二维码图片类型,jpg 或 png
|
||||||
|
*/
|
||||||
|
private String imgType;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -5,12 +5,14 @@ import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.entity.DriverEntity;
|
import com.njzscloud.dispose.cst.driver.pojo.entity.DriverEntity;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.param.DriverQueryParam;
|
import com.njzscloud.dispose.cst.driver.pojo.param.DriverQueryParam;
|
||||||
|
import com.njzscloud.dispose.cst.driver.pojo.param.QRCodeParam;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.result.DriverResult;
|
import com.njzscloud.dispose.cst.driver.pojo.result.DriverResult;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 司机
|
* 司机
|
||||||
|
*
|
||||||
* @author ljw
|
* @author ljw
|
||||||
*/
|
*/
|
||||||
public interface DriverService extends IService<DriverEntity> {
|
public interface DriverService extends IService<DriverEntity> {
|
||||||
|
|
@ -24,6 +26,9 @@ public interface DriverService extends IService<DriverEntity> {
|
||||||
DriverResult detail(Long id);
|
DriverResult detail(Long id);
|
||||||
|
|
||||||
PageResult<DriverResult> paging(PageParam pageParam, DriverQueryParam queryParam);
|
PageResult<DriverResult> paging(PageParam pageParam, DriverQueryParam queryParam);
|
||||||
|
|
||||||
|
String getCode(QRCodeParam codeParam);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,14 @@
|
||||||
package com.njzscloud.dispose.cst.driver.service.impl;
|
package com.njzscloud.dispose.cst.driver.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.img.ImgUtil;
|
||||||
import cn.hutool.core.util.ObjectUtil;
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import cn.hutool.extra.qrcode.QrCodeUtil;
|
||||||
|
import cn.hutool.extra.qrcode.QrConfig;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.google.common.base.Strings;
|
||||||
import com.njzscloud.common.core.ex.Exceptions;
|
import com.njzscloud.common.core.ex.Exceptions;
|
||||||
import com.njzscloud.common.mp.support.PageParam;
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
import com.njzscloud.common.mp.support.PageResult;
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
|
@ -13,6 +17,7 @@ import com.njzscloud.dispose.cst.customer.pojo.entity.CustomerEntity;
|
||||||
import com.njzscloud.dispose.cst.driver.mapper.DriverMapper;
|
import com.njzscloud.dispose.cst.driver.mapper.DriverMapper;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.entity.DriverEntity;
|
import com.njzscloud.dispose.cst.driver.pojo.entity.DriverEntity;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.param.DriverQueryParam;
|
import com.njzscloud.dispose.cst.driver.pojo.param.DriverQueryParam;
|
||||||
|
import com.njzscloud.dispose.cst.driver.pojo.param.QRCodeParam;
|
||||||
import com.njzscloud.dispose.cst.driver.pojo.result.DriverResult;
|
import com.njzscloud.dispose.cst.driver.pojo.result.DriverResult;
|
||||||
import com.njzscloud.dispose.cst.driver.service.DriverService;
|
import com.njzscloud.dispose.cst.driver.service.DriverService;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
|
|
@ -88,4 +93,23 @@ public class DriverServiceImpl extends ServiceImpl<DriverMapper, DriverEntity> i
|
||||||
|
|
||||||
return PageResult.of(baseMapper.paging(pageParam.toPage(), ew));
|
return PageResult.of(baseMapper.paging(pageParam.toPage(), ew));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String getCode(QRCodeParam codeParam) {
|
||||||
|
Integer width = codeParam.getWidth();
|
||||||
|
Integer height = codeParam.getHeight();
|
||||||
|
if (width == null) {
|
||||||
|
width = 300;
|
||||||
|
}
|
||||||
|
if (height == null) {
|
||||||
|
height = 300;
|
||||||
|
}
|
||||||
|
String imgType = codeParam.getImgType();
|
||||||
|
if (Strings.isNullOrEmpty(imgType)) {
|
||||||
|
imgType = ImgUtil.IMAGE_TYPE_JPG;
|
||||||
|
}
|
||||||
|
|
||||||
|
return QrCodeUtil.generateAsBase64(codeParam.getContent(), new QrConfig(width, height), imgType);
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,79 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.controller;
|
||||||
|
|
||||||
|
import com.njzscloud.common.core.utils.R;
|
||||||
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEvaluateEntity;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.param.CreateOrderEvaluateParam;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.param.OrderEvaluateQueryParam;
|
||||||
|
import com.njzscloud.dispose.cst.order.service.OrderEvaluateService;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单评价表
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/orderEvaluate")
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class OrderEvaluateController {
|
||||||
|
|
||||||
|
private final OrderEvaluateService orderEvaluateService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增
|
||||||
|
*/
|
||||||
|
@PostMapping("/add")
|
||||||
|
public R<?> add(@RequestBody CreateOrderEvaluateParam param) {
|
||||||
|
orderEvaluateService.add(param);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改
|
||||||
|
*/
|
||||||
|
@PostMapping("/modify")
|
||||||
|
public R<?> modify(@RequestBody OrderEvaluateEntity orderEvaluateEntity) {
|
||||||
|
orderEvaluateService.modify(orderEvaluateEntity);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除
|
||||||
|
*/
|
||||||
|
@PostMapping("/del")
|
||||||
|
public R<?> del(@RequestBody List<Long> ids) {
|
||||||
|
orderEvaluateService.del(ids);
|
||||||
|
return R.success();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详情
|
||||||
|
*/
|
||||||
|
@GetMapping("/detail")
|
||||||
|
public R<OrderEvaluateEntity> detail(@RequestParam("id") Long id) {
|
||||||
|
return R.success(orderEvaluateService.detail(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询
|
||||||
|
*/
|
||||||
|
@GetMapping("/paging")
|
||||||
|
public R<PageResult<OrderEvaluateEntity>> paging(PageParam pageParam, OrderEvaluateQueryParam queryParam) {
|
||||||
|
return R.success(orderEvaluateService.paging(pageParam, queryParam));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单ID查询评价
|
||||||
|
*/
|
||||||
|
@GetMapping("/getByOrderId")
|
||||||
|
public R<OrderEvaluateEntity> getByOrderId(@RequestParam("orderId") Long orderId) {
|
||||||
|
return R.success(orderEvaluateService.getByOrderId(orderId));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,14 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.mapper;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEvaluateEntity;
|
||||||
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单评价表
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Mapper
|
||||||
|
public interface OrderEvaluateMapper extends BaseMapper<OrderEvaluateEntity> {
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,122 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.pojo.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.*;
|
||||||
|
import com.njzscloud.common.mp.support.handler.j.JsonTypeHandler;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单评价表
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@TableName(value = "cst_order_evaluate", autoResultMap = true)
|
||||||
|
public class OrderEvaluateEntity {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Id
|
||||||
|
*/
|
||||||
|
@TableId(type = IdType.ASSIGN_ID)
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单 Id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人 Id;sys_user.id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人客户 Id;cst_customer.id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输组织 Id;cst_org.id
|
||||||
|
*/
|
||||||
|
private Long transOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输方客户 Id
|
||||||
|
*/
|
||||||
|
private Long transCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务效率分,满分5
|
||||||
|
*/
|
||||||
|
private BigDecimal efficiencyScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用透明分,满分5
|
||||||
|
*/
|
||||||
|
private BigDecimal feeScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务态度分,满分5
|
||||||
|
*/
|
||||||
|
private BigDecimal attitudeScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合分,满分5
|
||||||
|
*/
|
||||||
|
private BigDecimal overallScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片
|
||||||
|
*/
|
||||||
|
@TableField(typeHandler = JsonTypeHandler.class)
|
||||||
|
private List<String> picture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价内容
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建人 Id; sys_user.id
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private Long creatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改人 Id; sys_user.id
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private Long modifierId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT)
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改时间
|
||||||
|
*/
|
||||||
|
@TableField(fill = FieldFill.INSERT_UPDATE)
|
||||||
|
private LocalDateTime modifyTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否删除; 0-->未删除、1-->已删除
|
||||||
|
*/
|
||||||
|
@TableLogic
|
||||||
|
private Boolean deleted;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,69 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.pojo.param;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新建订单评价参数
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class CreateOrderEvaluateParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单 Id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人 Id;sys_user.id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人客户 Id;cst_customer.id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输组织 Id;cst_org.id
|
||||||
|
*/
|
||||||
|
private Long transOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输方客户 Id
|
||||||
|
*/
|
||||||
|
private Long transCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务效率分,满分5
|
||||||
|
*/
|
||||||
|
private BigDecimal efficiencyScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用透明分,满分5
|
||||||
|
*/
|
||||||
|
private BigDecimal feeScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务态度分,满分5
|
||||||
|
*/
|
||||||
|
private BigDecimal attitudeScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片
|
||||||
|
*/
|
||||||
|
private String picture;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 评价内容
|
||||||
|
*/
|
||||||
|
private String memo;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,64 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.pojo.param;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单评价查询参数
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class OrderEvaluateQueryParam {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单 Id
|
||||||
|
*/
|
||||||
|
private Long orderId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单编号(模糊查询)
|
||||||
|
*/
|
||||||
|
private String sn;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人 Id
|
||||||
|
*/
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 下单人客户 Id
|
||||||
|
*/
|
||||||
|
private Long customerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输组织 Id
|
||||||
|
*/
|
||||||
|
private Long transOrgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运输方客户 Id
|
||||||
|
*/
|
||||||
|
private Long transCustomerId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务效率分
|
||||||
|
*/
|
||||||
|
private BigDecimal efficiencyScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 费用透明分
|
||||||
|
*/
|
||||||
|
private BigDecimal feeScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务态度分
|
||||||
|
*/
|
||||||
|
private BigDecimal attitudeScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 综合分
|
||||||
|
*/
|
||||||
|
private BigDecimal overallScore;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,172 @@
|
||||||
|
package com.njzscloud.dispose.cst.order.service;
|
||||||
|
|
||||||
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
|
import cn.hutool.core.lang.Assert;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.njzscloud.common.core.ex.Exceptions;
|
||||||
|
import com.njzscloud.common.mp.support.PageParam;
|
||||||
|
import com.njzscloud.common.mp.support.PageResult;
|
||||||
|
import com.njzscloud.dispose.cst.order.mapper.OrderEvaluateMapper;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.entity.OrderEvaluateEntity;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.param.CreateOrderEvaluateParam;
|
||||||
|
import com.njzscloud.dispose.cst.order.pojo.param.OrderEvaluateQueryParam;
|
||||||
|
import lombok.RequiredArgsConstructor;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.math.RoundingMode;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单评价表
|
||||||
|
*
|
||||||
|
* @author ljw
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
@RequiredArgsConstructor
|
||||||
|
public class OrderEvaluateService extends ServiceImpl<OrderEvaluateMapper, OrderEvaluateEntity> {
|
||||||
|
|
||||||
|
private final OrderEvaluateMapper orderEvaluateMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 新增订单评价
|
||||||
|
*
|
||||||
|
* @param param 新增参数
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void add(CreateOrderEvaluateParam param) {
|
||||||
|
Assert.notNull(param, () -> Exceptions.clierr("请填写参数"));
|
||||||
|
Assert.notNull(param.getEfficiencyScore(), () -> Exceptions.clierr("服务效率分不可为空"));
|
||||||
|
Assert.notNull(param.getFeeScore(), () -> Exceptions.clierr("费用透明分不可为空"));
|
||||||
|
Assert.notNull(param.getAttitudeScore(), () -> Exceptions.clierr("服务态度分不可为空"));
|
||||||
|
|
||||||
|
// 校验分数范围
|
||||||
|
this.validateScore(param.getEfficiencyScore());
|
||||||
|
this.validateScore(param.getFeeScore());
|
||||||
|
this.validateScore(param.getAttitudeScore());
|
||||||
|
|
||||||
|
// 计算综合评分 = (费用透明分 + 服务效率分 + 服务态度分) / 3
|
||||||
|
// 结果只能是0、0.5、1、1.5、2、2.5、3、3.5、4、4.5、5,有其他值时,向上取值
|
||||||
|
BigDecimal overallScore = this.calculateOverallScore(param.getEfficiencyScore(), param.getFeeScore(), param.getAttitudeScore());
|
||||||
|
|
||||||
|
OrderEvaluateEntity entity = BeanUtil.copyProperties(param, OrderEvaluateEntity.class)
|
||||||
|
.setOverallScore(overallScore);
|
||||||
|
orderEvaluateMapper.insert(entity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改订单评价
|
||||||
|
*
|
||||||
|
* @param orderEvaluateEntity 订单评价实体
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void modify(OrderEvaluateEntity orderEvaluateEntity) {
|
||||||
|
Assert.notNull(orderEvaluateEntity.getId(), () -> Exceptions.clierr("ID不可为空"));
|
||||||
|
|
||||||
|
OrderEvaluateEntity existEntity = this.getById(orderEvaluateEntity.getId());
|
||||||
|
Assert.notNull(existEntity, () -> Exceptions.clierr("评价记录不存在"));
|
||||||
|
|
||||||
|
// 如果有评分字段更新,需要重新计算综合评分
|
||||||
|
if (orderEvaluateEntity.getEfficiencyScore() != null || orderEvaluateEntity.getFeeScore() != null || orderEvaluateEntity.getAttitudeScore() != null) {
|
||||||
|
BigDecimal efficiencyScore = orderEvaluateEntity.getEfficiencyScore() != null ? orderEvaluateEntity.getEfficiencyScore() : existEntity.getEfficiencyScore();
|
||||||
|
BigDecimal feeScore = orderEvaluateEntity.getFeeScore() != null ? orderEvaluateEntity.getFeeScore() : existEntity.getFeeScore();
|
||||||
|
BigDecimal attitudeScore = orderEvaluateEntity.getAttitudeScore() != null ? orderEvaluateEntity.getAttitudeScore() : existEntity.getAttitudeScore();
|
||||||
|
|
||||||
|
// 校验分数范围
|
||||||
|
this.validateScore(efficiencyScore);
|
||||||
|
this.validateScore(feeScore);
|
||||||
|
this.validateScore(attitudeScore);
|
||||||
|
|
||||||
|
// 重新计算综合评分
|
||||||
|
BigDecimal overallScore = this.calculateOverallScore(efficiencyScore, feeScore, attitudeScore);
|
||||||
|
orderEvaluateEntity.setOverallScore(overallScore);
|
||||||
|
}
|
||||||
|
|
||||||
|
orderEvaluateMapper.updateById(orderEvaluateEntity);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除订单评价
|
||||||
|
*
|
||||||
|
* @param ids id集合
|
||||||
|
*/
|
||||||
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
public void del(List<Long> ids) {
|
||||||
|
Assert.notEmpty(ids, () -> Exceptions.clierr("ID集合不可为空"));
|
||||||
|
this.removeBatchByIds(ids);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 查询订单评价详情
|
||||||
|
*
|
||||||
|
* @param id id
|
||||||
|
* @return 订单评价实体
|
||||||
|
*/
|
||||||
|
public OrderEvaluateEntity detail(Long id) {
|
||||||
|
Assert.notNull(id, () -> Exceptions.clierr("ID不可为空"));
|
||||||
|
return this.getById(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 分页查询订单评价
|
||||||
|
*
|
||||||
|
* @param pageParam 分页参数
|
||||||
|
* @param queryParam 查询参数
|
||||||
|
* @return 分页结果
|
||||||
|
*/
|
||||||
|
public PageResult<OrderEvaluateEntity> paging(PageParam pageParam, OrderEvaluateQueryParam queryParam) {
|
||||||
|
return PageResult.of(this.page(pageParam.toPage(), Wrappers.<OrderEvaluateEntity>lambdaQuery()
|
||||||
|
.eq(queryParam.getOrderId() != null, OrderEvaluateEntity::getOrderId, queryParam.getOrderId())
|
||||||
|
.like(queryParam.getSn() != null, OrderEvaluateEntity::getSn, queryParam.getSn())
|
||||||
|
.eq(queryParam.getUserId() != null, OrderEvaluateEntity::getUserId, queryParam.getUserId())
|
||||||
|
.eq(queryParam.getCustomerId() != null, OrderEvaluateEntity::getCustomerId, queryParam.getCustomerId())
|
||||||
|
.eq(queryParam.getTransOrgId() != null, OrderEvaluateEntity::getTransOrgId, queryParam.getTransOrgId())
|
||||||
|
.eq(queryParam.getTransCustomerId() != null, OrderEvaluateEntity::getTransCustomerId, queryParam.getTransCustomerId())
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据订单ID查询评价
|
||||||
|
*
|
||||||
|
* @param orderId 订单ID
|
||||||
|
* @return 订单评价
|
||||||
|
*/
|
||||||
|
public OrderEvaluateEntity getByOrderId(Long orderId) {
|
||||||
|
Assert.notNull(orderId, () -> Exceptions.clierr("订单ID不可为空"));
|
||||||
|
return this.getOne(Wrappers.<OrderEvaluateEntity>lambdaQuery()
|
||||||
|
.eq(OrderEvaluateEntity::getOrderId, orderId)
|
||||||
|
.eq(OrderEvaluateEntity::getDeleted, Boolean.FALSE));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 校验分数范围
|
||||||
|
*
|
||||||
|
* @param score 分数
|
||||||
|
*/
|
||||||
|
private void validateScore(BigDecimal score) {
|
||||||
|
Assert.notNull(score, () -> Exceptions.clierr("分数不可为空"));
|
||||||
|
Assert.isTrue(score.compareTo(BigDecimal.ZERO) >= 0 && score.compareTo(new BigDecimal("5")) <= 0, () -> Exceptions.clierr("分数必须在0-5之间"));
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 计算综合评分
|
||||||
|
* 综合评分 = (费用透明分 + 服务效率分 + 服务态度分) / 3
|
||||||
|
* 结果只能是0、0.5、1、1.5、2、2.5、3、3.5、4、4.5、5,有其他值时,向上取值
|
||||||
|
*
|
||||||
|
* @param efficiencyScore 服务效率分
|
||||||
|
* @param feeScore 费用透明分
|
||||||
|
* @param attitudeScore 服务态度分
|
||||||
|
* @return 综合评分
|
||||||
|
*/
|
||||||
|
private BigDecimal calculateOverallScore(BigDecimal efficiencyScore, BigDecimal feeScore, BigDecimal attitudeScore) {
|
||||||
|
// 计算平均分(乘以2后向上取整,再除以2,实现0.5为步长的向上取整)
|
||||||
|
BigDecimal sum = efficiencyScore.add(feeScore).add(attitudeScore);
|
||||||
|
BigDecimal avgScore = sum.divide(new BigDecimal("3"), 2, RoundingMode.HALF_UP);
|
||||||
|
// 向上取值到最近的0.5倍数
|
||||||
|
return avgScore.multiply(new BigDecimal("2")).setScale(0, RoundingMode.CEILING).divide(new BigDecimal("2"), 1, RoundingMode.UNNECESSARY);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -8,6 +8,7 @@ import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
@ -67,6 +68,14 @@ public class MyResult extends UserDetail {
|
||||||
* 邮箱
|
* 邮箱
|
||||||
*/
|
*/
|
||||||
private String email;
|
private String email;
|
||||||
|
/**
|
||||||
|
* 余额
|
||||||
|
*/
|
||||||
|
private BigDecimal recharge;
|
||||||
|
/**
|
||||||
|
* 营收
|
||||||
|
*/
|
||||||
|
private BigDecimal revenue;
|
||||||
|
|
||||||
public IdentityInfo currentIdentity() {
|
public IdentityInfo currentIdentity() {
|
||||||
Optional<IdentityInfo> identityInfo = identities.stream().filter(it -> Objects.equals(it.getCustomerId(), currentCustomerId)).findFirst();
|
Optional<IdentityInfo> identityInfo = identities.stream().filter(it -> Objects.equals(it.getCustomerId(), currentCustomerId)).findFirst();
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@ import com.njzscloud.common.security.module.password.PasswordLoginForm;
|
||||||
import com.njzscloud.common.security.module.wechat.mini.WechatMiniLoginForm;
|
import com.njzscloud.common.security.module.wechat.mini.WechatMiniLoginForm;
|
||||||
import com.njzscloud.common.security.support.IAuthService;
|
import com.njzscloud.common.security.support.IAuthService;
|
||||||
import com.njzscloud.common.security.support.UserDetail;
|
import com.njzscloud.common.security.support.UserDetail;
|
||||||
|
import com.njzscloud.dispose.finance.mapper.MoneyAccountMapper;
|
||||||
|
import com.njzscloud.dispose.finance.pojo.entity.MoneyAccountEntity;
|
||||||
import com.njzscloud.dispose.sys.auth.mapper.AuthMapper;
|
import com.njzscloud.dispose.sys.auth.mapper.AuthMapper;
|
||||||
import com.njzscloud.dispose.sys.auth.pojo.result.EndpointResource;
|
import com.njzscloud.dispose.sys.auth.pojo.result.EndpointResource;
|
||||||
import com.njzscloud.dispose.sys.auth.pojo.result.IdentityInfo;
|
import com.njzscloud.dispose.sys.auth.pojo.result.IdentityInfo;
|
||||||
|
|
@ -20,6 +22,7 @@ import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
|
@ -34,6 +37,7 @@ import static com.njzscloud.common.security.contant.Constants.ROLE_AUTHENTICATED
|
||||||
@RequiredArgsConstructor
|
@RequiredArgsConstructor
|
||||||
public class AuthService implements IAuthService {
|
public class AuthService implements IAuthService {
|
||||||
private final AuthMapper authMapper;
|
private final AuthMapper authMapper;
|
||||||
|
private final MoneyAccountMapper moneyAccountMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
|
|
@ -79,6 +83,9 @@ public class AuthService implements IAuthService {
|
||||||
List<EndpointResource> endpointResources = authMapper.selectUserEndpoint(userId);
|
List<EndpointResource> endpointResources = authMapper.selectUserEndpoint(userId);
|
||||||
List<IdentityInfo> identityInfoList = authMapper.selectUserIdentity(userId);
|
List<IdentityInfo> identityInfoList = authMapper.selectUserIdentity(userId);
|
||||||
Long currentCustomerId = null;
|
Long currentCustomerId = null;
|
||||||
|
MoneyAccountEntity moneyAccount = moneyAccountMapper.selectOne(Wrappers.<MoneyAccountEntity>lambdaQuery()
|
||||||
|
.eq(MoneyAccountEntity::getUserId, userId)
|
||||||
|
.eq(MoneyAccountEntity::getDeleted, Boolean.FALSE));
|
||||||
|
|
||||||
if (CollUtil.isNotEmpty(identityInfoList)) {
|
if (CollUtil.isNotEmpty(identityInfoList)) {
|
||||||
IdentityInfo identityInfo = identityInfoList.getFirst();
|
IdentityInfo identityInfo = identityInfoList.getFirst();
|
||||||
|
|
@ -88,6 +95,8 @@ public class AuthService implements IAuthService {
|
||||||
roles.add(ROLE_AUTHENTICATED);
|
roles.add(ROLE_AUTHENTICATED);
|
||||||
roles.add(ROLE_ANONYMOUS);
|
roles.add(ROLE_ANONYMOUS);
|
||||||
return BeanUtil.copyProperties(userDetail, MyResult.class)
|
return BeanUtil.copyProperties(userDetail, MyResult.class)
|
||||||
|
.setRecharge(moneyAccount == null ? BigDecimal.ZERO : moneyAccount.getRecharge())
|
||||||
|
.setRevenue(moneyAccount == null ? BigDecimal.ZERO : moneyAccount.getRevenue())
|
||||||
.setCurrentCustomerId(currentCustomerId)
|
.setCurrentCustomerId(currentCustomerId)
|
||||||
.setIdentities(identityInfoList)
|
.setIdentities(identityInfoList)
|
||||||
.setMenus(menuResources)
|
.setMenus(menuResources)
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@ import com.njzscloud.dispose.wechat.pojo.param.WechatParam;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.web.client.RestTemplate;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -65,8 +64,25 @@ public class WechatService {
|
||||||
// 使用code向微信服务器换取session_key和openid
|
// 使用code向微信服务器换取session_key和openid
|
||||||
String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + appid + "&secret=" + secret + "&js_code="
|
String url = "https://api.weixin.qq.com/sns/jscode2session?appid=" + appid + "&secret=" + secret + "&js_code="
|
||||||
+ param.getCode() + "&grant_type=authorization_code";
|
+ param.getCode() + "&grant_type=authorization_code";
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
|
||||||
String response = restTemplate.getForObject(url, String.class);
|
// 使用 Hutool 发送 GET 请求
|
||||||
|
log.info("开始请求微信接口: {}", url);
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
String response;
|
||||||
|
try {
|
||||||
|
HttpResponse httpResponse = HttpRequest.get(url)
|
||||||
|
.timeout(30000)
|
||||||
|
.execute();
|
||||||
|
response = httpResponse.body();
|
||||||
|
long connectTime = System.currentTimeMillis() - startTime;
|
||||||
|
log.info("微信接口连接耗时: {}ms", connectTime);
|
||||||
|
httpResponse.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("调用微信获取openId接口网络异常: ", e);
|
||||||
|
throw Exceptions.clierr("网络请求失败");
|
||||||
|
}
|
||||||
|
long totalTime = System.currentTimeMillis() - startTime;
|
||||||
|
log.info("微信接口总耗时: {}ms", totalTime);
|
||||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
JSONObject jsonObject = JSONObject.parseObject(response);
|
||||||
if (null == jsonObject) {
|
if (null == jsonObject) {
|
||||||
throw Exceptions.clierr("获取小程序信息失败");
|
throw Exceptions.clierr("获取小程序信息失败");
|
||||||
|
|
@ -123,19 +139,25 @@ public class WechatService {
|
||||||
// 4. 使用 Hutool 发送 POST 请求(解决 412 错误)
|
// 4. 使用 Hutool 发送 POST 请求(解决 412 错误)
|
||||||
String requestBody = String.format("{\"code\":\"%s\"}", code);
|
String requestBody = String.format("{\"code\":\"%s\"}", code);
|
||||||
log.info("发送请求到微信接口,请求体: {}", requestBody);
|
log.info("发送请求到微信接口,请求体: {}", requestBody);
|
||||||
|
log.info("开始请求手机号授权接口: {}", url);
|
||||||
|
|
||||||
String response;
|
String response;
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
try {
|
try {
|
||||||
HttpResponse httpResponse = HttpRequest.post(url)
|
HttpResponse httpResponse = HttpRequest.post(url)
|
||||||
.body(requestBody)
|
.body(requestBody)
|
||||||
.timeout(30000)
|
.timeout(30000)
|
||||||
.execute();
|
.execute();
|
||||||
response = httpResponse.body();
|
response = httpResponse.body();
|
||||||
|
long connectTime = System.currentTimeMillis() - startTime;
|
||||||
|
log.info("手机号授权接口连接耗时: {}ms", connectTime);
|
||||||
httpResponse.close();
|
httpResponse.close();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("调用微信授权手机号接口网络异常: ", e);
|
log.error("调用微信授权手机号接口网络异常: ", e);
|
||||||
throw Exceptions.clierr("网络请求失败");
|
throw Exceptions.clierr("网络请求失败");
|
||||||
}
|
}
|
||||||
|
long totalTime = System.currentTimeMillis() - startTime;
|
||||||
|
log.info("手机号授权接口总耗时: {}ms", totalTime);
|
||||||
JSONObject jsonObject = JSONObject.parseObject(response);
|
JSONObject jsonObject = JSONObject.parseObject(response);
|
||||||
log.info("微信接口返回原始数据: {}", response);
|
log.info("微信接口返回原始数据: {}", response);
|
||||||
|
|
||||||
|
|
@ -178,8 +200,25 @@ public class WechatService {
|
||||||
String secret = "ff280a71a4c06fc2956178f8c472ef96";
|
String secret = "ff280a71a4c06fc2956178f8c472ef96";
|
||||||
String tokenUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret;
|
String tokenUrl = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + appid + "&secret=" + secret;
|
||||||
|
|
||||||
RestTemplate restTemplate = new RestTemplate();
|
// 使用 Hutool 发送 GET 请求
|
||||||
String response = restTemplate.getForObject(tokenUrl, String.class);
|
log.info("开始请求accessToken接口: {}", tokenUrl);
|
||||||
|
long startTime = System.currentTimeMillis();
|
||||||
|
String response;
|
||||||
|
try {
|
||||||
|
HttpResponse httpResponse = HttpRequest.get(tokenUrl)
|
||||||
|
.timeout(30000)
|
||||||
|
.execute();
|
||||||
|
response = httpResponse.body();
|
||||||
|
long connectTime = System.currentTimeMillis() - startTime;
|
||||||
|
log.info("accessToken接口连接耗时: {}ms", connectTime);
|
||||||
|
httpResponse.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("调用微信获取accessToken接口网络异常: ", e);
|
||||||
|
throw Exceptions.clierr("网络请求失败");
|
||||||
|
}
|
||||||
|
long totalTime = System.currentTimeMillis() - startTime;
|
||||||
|
log.info("accessToken接口总耗时: {}ms", totalTime);
|
||||||
|
|
||||||
JSONObject jsonResponse = JSONObject.parseObject(response);
|
JSONObject jsonResponse = JSONObject.parseObject(response);
|
||||||
|
|
||||||
if (jsonResponse == null || jsonResponse.containsKey("errcode")) {
|
if (jsonResponse == null || jsonResponse.containsKey("errcode")) {
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
<?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.njzscloud.dispose.cst.order.mapper.OrderEvaluateMapper">
|
||||||
|
<resultMap id="BaseResultMap" autoMapping="true" type="com.njzscloud.dispose.cst.order.pojo.entity.OrderEvaluateEntity">
|
||||||
|
<id column="id" property="id"/>
|
||||||
|
<result column="order_id" property="orderId"/>
|
||||||
|
<result column="sn" property="sn"/>
|
||||||
|
<result column="user_id" property="userId"/>
|
||||||
|
<result column="customer_id" property="customerId"/>
|
||||||
|
<result column="trans_org_id" property="transOrgId"/>
|
||||||
|
<result column="trans_customer_id" property="transCustomerId"/>
|
||||||
|
<result column="efficiency_score" property="efficiencyScore"/>
|
||||||
|
<result column="fee_score" property="feeScore"/>
|
||||||
|
<result column="attitude_score" property="attitudeScore"/>
|
||||||
|
<result column="overall_score" property="overallScore"/>
|
||||||
|
<result column="picture" property="picture" typeHandler="com.njzscloud.common.mp.support.handler.j.JsonTypeHandler"/>
|
||||||
|
<result column="memo" property="memo"/>
|
||||||
|
<result column="creator_id" property="creatorId"/>
|
||||||
|
<result column="modifier_id" property="modifierId"/>
|
||||||
|
<result column="create_time" property="createTime"/>
|
||||||
|
<result column="modify_time" property="modifyTime"/>
|
||||||
|
<result column="deleted" property="deleted"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
id,
|
||||||
|
order_id,
|
||||||
|
sn,
|
||||||
|
user_id,
|
||||||
|
customer_id,
|
||||||
|
trans_org_id,
|
||||||
|
trans_customer_id,
|
||||||
|
efficiency_score,
|
||||||
|
fee_score,
|
||||||
|
attitude_score,
|
||||||
|
overall_score,
|
||||||
|
picture,
|
||||||
|
memo,
|
||||||
|
creator_id,
|
||||||
|
modifier_id,
|
||||||
|
create_time,
|
||||||
|
modify_time,
|
||||||
|
deleted
|
||||||
|
</sql>
|
||||||
|
</mapper>
|
||||||
|
|
@ -19,9 +19,6 @@
|
||||||
<result property="canuse" column="c_canuse"/>
|
<result property="canuse" column="c_canuse"/>
|
||||||
<result property="memo" column="c_memo"/>
|
<result property="memo" column="c_memo"/>
|
||||||
<result property="unit" column="c_unit"/>
|
<result property="unit" column="c_unit"/>
|
||||||
<result property="userScope" column="user_scope" typeHandler="com.njzscloud.common.mp.support.handler.j.JsonTypeHandler"/>
|
|
||||||
<result property="stationScope" column="station_scope" typeHandler="com.njzscloud.common.mp.support.handler.j.JsonTypeHandler"/>
|
|
||||||
<result property="goodsScope" column="goods_scope" typeHandler="com.njzscloud.common.mp.support.handler.j.JsonTypeHandler"/>
|
|
||||||
</association>
|
</association>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="SearchGoodsResultSql">
|
<sql id="SearchGoodsResultSql">
|
||||||
|
|
@ -47,14 +44,10 @@
|
||||||
c.expense_strategy,
|
c.expense_strategy,
|
||||||
c.unit c_unit,
|
c.unit c_unit,
|
||||||
c.tax_rate,
|
c.tax_rate,
|
||||||
c.payer,
|
|
||||||
c.unit_price,
|
c.unit_price,
|
||||||
c.initial_price,
|
c.initial_price,
|
||||||
c.initial_quantity,
|
c.initial_quantity,
|
||||||
c.every_quantity,
|
c.every_quantity,
|
||||||
c.user_scope,
|
|
||||||
c.station_scope,
|
|
||||||
c.goods_scope,
|
|
||||||
c.canuse c_canuse,
|
c.canuse c_canuse,
|
||||||
c.memo c_memo,
|
c.memo c_memo,
|
||||||
c.create_time c_create_time
|
c.create_time c_create_time
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue