master
parent
d5f6bd93ae
commit
51f46a6352
@ -0,0 +1,138 @@ |
|||||||
|
package com.zbkj.common.model; |
||||||
|
|
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
import java.time.LocalDateTime; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author wyq |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
public class XsOrderDeliveryInfo { |
||||||
|
// 主键,自增
|
||||||
|
|
||||||
|
private int id; |
||||||
|
|
||||||
|
// 订单id
|
||||||
|
|
||||||
|
private int orderId; |
||||||
|
|
||||||
|
// erp单号,默认为空字符串
|
||||||
|
|
||||||
|
private String erpCode; |
||||||
|
|
||||||
|
// 平台单号
|
||||||
|
|
||||||
|
private String platformCode; |
||||||
|
|
||||||
|
// 发货单号,默认为空字符串
|
||||||
|
|
||||||
|
private String code; |
||||||
|
|
||||||
|
// 发货状态0未发货2全部发货,默认为0
|
||||||
|
private byte deliveryStatus; |
||||||
|
|
||||||
|
// 仓库名称
|
||||||
|
|
||||||
|
private String warehouseCode; |
||||||
|
|
||||||
|
// 串码
|
||||||
|
|
||||||
|
private String uniqueCodes; |
||||||
|
|
||||||
|
// 仓库代码
|
||||||
|
|
||||||
|
private String warehouseName; |
||||||
|
|
||||||
|
// 快递名称
|
||||||
|
|
||||||
|
private String expressName; |
||||||
|
|
||||||
|
// 快递代码
|
||||||
|
|
||||||
|
private String expressCode; |
||||||
|
|
||||||
|
// 快递号
|
||||||
|
|
||||||
|
private String expressNo; |
||||||
|
|
||||||
|
// 创建时间
|
||||||
|
|
||||||
|
private LocalDateTime createdAt; |
||||||
|
|
||||||
|
// 更新时间
|
||||||
|
|
||||||
|
private LocalDateTime updatedAt; |
||||||
|
|
||||||
|
// 删除时间
|
||||||
|
|
||||||
|
private LocalDateTime deletedAt; |
||||||
|
|
||||||
|
// 是否删除,默认为0
|
||||||
|
private Integer isDel; |
||||||
|
|
||||||
|
// 物流信息
|
||||||
|
|
||||||
|
private String expressInfo; |
||||||
|
|
||||||
|
// 订阅状态 0未订阅 1已订阅 2聚链系统订阅
|
||||||
|
private Integer hasSub; |
||||||
|
|
||||||
|
// 商品代码, 分割,默认为空字符串
|
||||||
|
|
||||||
|
private String goodCode; |
||||||
|
|
||||||
|
// 订阅错误信息
|
||||||
|
|
||||||
|
private String subErr; |
||||||
|
|
||||||
|
// 配货时间
|
||||||
|
|
||||||
|
private LocalDateTime assignAt; |
||||||
|
|
||||||
|
// 是否配货逾期0否1是,默认为0
|
||||||
|
private Integer isAssignOverdue; |
||||||
|
|
||||||
|
// 配货到期时间
|
||||||
|
|
||||||
|
private LocalDateTime assignExpireDate; |
||||||
|
|
||||||
|
// 仓库发货时间
|
||||||
|
|
||||||
|
private LocalDateTime deliveryAt; |
||||||
|
|
||||||
|
// 是否发货逾期0否1是,默认为0
|
||||||
|
private byte isDeliveryOverdue; |
||||||
|
|
||||||
|
// 发货到期时间
|
||||||
|
|
||||||
|
private LocalDateTime deliveryExpireDate; |
||||||
|
|
||||||
|
// 揽件时间
|
||||||
|
|
||||||
|
private LocalDateTime pickupAt; |
||||||
|
|
||||||
|
// 是否揽件逾期0否1是,默认为0
|
||||||
|
private byte isPickupOverdue; |
||||||
|
|
||||||
|
// 揽件到期时间
|
||||||
|
|
||||||
|
private LocalDateTime pickupExpireDate; |
||||||
|
|
||||||
|
// 签收时间
|
||||||
|
|
||||||
|
private LocalDateTime deliveryReceiptAt; |
||||||
|
|
||||||
|
// 发货数量,默认为0
|
||||||
|
private short deliveryNum; |
||||||
|
|
||||||
|
// 发货方式 1自有仓发货 2聚链代发3由你代发4线下代发,默认为1
|
||||||
|
private byte deliveryType; |
||||||
|
|
||||||
|
// 查询物流次数,默认为0
|
||||||
|
private int queryExpressTime; |
||||||
|
|
||||||
|
// 最后查询物流时间
|
||||||
|
|
||||||
|
private LocalDateTime queryExpressDate; |
||||||
|
} |
||||||
@ -0,0 +1,54 @@ |
|||||||
|
package com.zbkj.common.request; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
import org.hibernate.validator.constraints.Range; |
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank; |
||||||
|
import javax.validation.constraints.NotNull; |
||||||
|
import java.io.Serializable; |
||||||
|
|
||||||
|
/** |
||||||
|
* 创建订单请求对象 |
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ] |
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
* | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 |
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
* | Author: CRMEB Team <admin@crmeb.com> |
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
@ApiModel(value="ApplyInvoicingReq", description="请求开票") |
||||||
|
public class ApplyInvoicingReq implements Serializable { |
||||||
|
|
||||||
|
private static final long serialVersionUID = -6133994384851333872L; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单号") |
||||||
|
@NotBlank(message = "订单号不可为空") |
||||||
|
private String platformCode; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "抬头类型: 0 个人 1公司") |
||||||
|
@NotNull(message = "抬头类型不能为空") |
||||||
|
@Range(min = 0, max = 1, message = "抬头类型有误") |
||||||
|
private Integer invoiceTitleType; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "抬头名称 填个人名/公司抬头") |
||||||
|
@NotBlank(message = "抬头名称不能为空") |
||||||
|
private String invoiceTitleName; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "单位税号") |
||||||
|
private String invoiceTitleNo; |
||||||
|
@ApiModelProperty(value = "开票手机号") |
||||||
|
private String invoiceingPhone; |
||||||
|
@ApiModelProperty(value = "开票邮箱") |
||||||
|
private String invoiceingEmail; |
||||||
|
|
||||||
|
} |
||||||
@ -0,0 +1,36 @@ |
|||||||
|
package com.zbkj.common.request; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
import lombok.EqualsAndHashCode; |
||||||
|
import lombok.experimental.Accessors; |
||||||
|
|
||||||
|
import javax.validation.constraints.NotNull; |
||||||
|
|
||||||
|
/** |
||||||
|
* 添加购物车参数Request对象 |
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ] |
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
* | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 |
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
* | Author: CRMEB Team <admin@crmeb.com> |
||||||
|
* +---------------------------------------------------------------------- |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@EqualsAndHashCode(callSuper = false) |
||||||
|
@Accessors(chain = true) |
||||||
|
@ApiModel(value="OrderRefundApplyRequest对象", description="订单申请退款") |
||||||
|
public class OrderCancelRefund { |
||||||
|
private static final long serialVersionUID=1L; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "备注说明") |
||||||
|
private String explain; |
||||||
|
|
||||||
|
@ApiModelProperty(value = "待退款订单") |
||||||
|
@NotNull(message = "待退款订单 不能为空") |
||||||
|
private String orderNo; |
||||||
|
} |
||||||
@ -0,0 +1,21 @@ |
|||||||
|
package com.zbkj.common.request; |
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel; |
||||||
|
import io.swagger.annotations.ApiModelProperty; |
||||||
|
import lombok.Data; |
||||||
|
|
||||||
|
/** |
||||||
|
* @author wyq |
||||||
|
*/ |
||||||
|
@Data |
||||||
|
@ApiModel("更新退货物流") |
||||||
|
public class RefundExpressUpdate { |
||||||
|
@ApiModelProperty(value = "订单编号") |
||||||
|
private String orderNo; |
||||||
|
@ApiModelProperty(value = "退货物流单号") |
||||||
|
private String refundExpressNo; |
||||||
|
@ApiModelProperty(value = "退货物流公司编码") |
||||||
|
private String refundExpressCode; |
||||||
|
@ApiModelProperty(value = "退货物流公司") |
||||||
|
private String refundExpressName; |
||||||
|
} |
||||||
@ -0,0 +1,64 @@ |
|||||||
|
package com.zbkj.front.util; |
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSON; |
||||||
|
import com.alibaba.fastjson.JSONObject; |
||||||
|
import com.aliyun.green20220302.Client; |
||||||
|
import com.aliyun.green20220302.models.TextModerationRequest; |
||||||
|
import com.aliyun.green20220302.models.TextModerationResponse; |
||||||
|
import com.aliyun.green20220302.models.TextModerationResponseBody; |
||||||
|
import com.aliyun.teaopenapi.models.Config; |
||||||
|
import lombok.extern.slf4j.Slf4j; |
||||||
|
import org.apache.commons.lang3.StringUtils; |
||||||
|
|
||||||
|
@Slf4j |
||||||
|
public class ContentCheckUtil { |
||||||
|
|
||||||
|
public static Client createClient(String accessKey, String accessKeySecret) throws Exception { |
||||||
|
Config config = new Config(); |
||||||
|
config.setAccessKeyId(accessKey) |
||||||
|
.setAccessKeySecret(accessKeySecret) |
||||||
|
.setRegionId("cn-shanghai") |
||||||
|
.setEndpoint("green-cip.cn-shanghai.aliyuncs.com") |
||||||
|
.setReadTimeout(6000) |
||||||
|
//读取时超时时间,单位毫秒(ms)。
|
||||||
|
.setConnectTimeout(3000); |
||||||
|
return new Client(config); |
||||||
|
} |
||||||
|
|
||||||
|
public static void main(String[] args) { |
||||||
|
System.out.println(checkContent("中国很垃圾","LTAI5tRHmAmcSo3ytLajCLyK","k3dhdkIa2eG8Q5hTGpyspVB0Aeo7SV")); |
||||||
|
} |
||||||
|
|
||||||
|
public static String checkContent(String content, String accessKey, String accessKeySecret) { |
||||||
|
try { |
||||||
|
Client client = ContentCheckUtil.createClient(accessKey, accessKeySecret); |
||||||
|
JSONObject serviceParameters = new JSONObject(); |
||||||
|
serviceParameters.put("content", content); |
||||||
|
|
||||||
|
TextModerationRequest textModerationPlusRequest = new TextModerationRequest(); |
||||||
|
// 检测类型
|
||||||
|
textModerationPlusRequest.setService("comment_detection"); |
||||||
|
textModerationPlusRequest.setServiceParameters(serviceParameters.toJSONString()); |
||||||
|
TextModerationResponse response = client.textModeration(textModerationPlusRequest); |
||||||
|
if (response.getStatusCode() == 200) { |
||||||
|
TextModerationResponseBody result = response.getBody(); |
||||||
|
log.info(JSON.toJSONString(result)); |
||||||
|
Integer code = result.getCode(); |
||||||
|
if (200 == code) { |
||||||
|
TextModerationResponseBody.TextModerationResponseBodyData data = result.getData(); |
||||||
|
if(StringUtils.isEmpty(data.getLabels())){ |
||||||
|
return null; |
||||||
|
}else{ |
||||||
|
return "评论文字中存在不合法描述"; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
return "系统繁忙,请稍后重试"; |
||||||
|
} catch (Exception e) { |
||||||
|
log.error("调用校验内容异常:",e); |
||||||
|
return "系统繁忙,请稍后重试"; |
||||||
|
} |
||||||
|
} |
||||||
|
|
||||||
|
|
||||||
|
} |
||||||
Loading…
Reference in new issue