Merge remote-tracking branch 'origin/dev' into dev

master
袁野 6 months ago
commit 3e069a3b98
  1. 255
      order/src/main/java/com/order/controller/OrderAfterSalesApplyController.java
  2. 127
      order/src/main/java/com/order/controller/OrderRefundController.java
  3. 203
      service/src/main/java/com/hfkj/dao/BsOrderAfterSalesApplyMapper.java
  4. 7
      service/src/main/java/com/hfkj/dao/BsOrderAfterSalesApplyMapperExt.java
  5. 598
      service/src/main/java/com/hfkj/dao/BsOrderAfterSalesApplySqlProvider.java
  6. 125
      service/src/main/java/com/hfkj/dao/BsOrderAfterSalesOpRecordMapper.java
  7. 7
      service/src/main/java/com/hfkj/dao/BsOrderAfterSalesOpRecordMapperExt.java
  8. 332
      service/src/main/java/com/hfkj/dao/BsOrderAfterSalesOpRecordSqlProvider.java
  9. 56
      service/src/main/java/com/hfkj/dao/BsOrderRefundMapper.java
  10. 76
      service/src/main/java/com/hfkj/dao/BsOrderRefundSqlProvider.java
  11. 537
      service/src/main/java/com/hfkj/entity/BsOrderAfterSalesApply.java
  12. 2234
      service/src/main/java/com/hfkj/entity/BsOrderAfterSalesApplyExample.java
  13. 232
      service/src/main/java/com/hfkj/entity/BsOrderAfterSalesOpRecord.java
  14. 1013
      service/src/main/java/com/hfkj/entity/BsOrderAfterSalesOpRecordExample.java
  15. 78
      service/src/main/java/com/hfkj/entity/BsOrderRefund.java
  16. 274
      service/src/main/java/com/hfkj/entity/BsOrderRefundExample.java
  17. 76
      service/src/main/java/com/hfkj/service/order/BsOrderAfterSalesApplyService.java
  18. 27
      service/src/main/java/com/hfkj/service/order/BsOrderAfterSalesOpRecordService.java
  19. 6
      service/src/main/java/com/hfkj/service/order/BsOrderChildService.java
  20. 49
      service/src/main/java/com/hfkj/service/order/BsOrderRefundService.java
  21. 7
      service/src/main/java/com/hfkj/service/order/BsOrderService.java
  22. 292
      service/src/main/java/com/hfkj/service/order/impl/BsOrderAfterSalesApplyServiceImpl.java
  23. 38
      service/src/main/java/com/hfkj/service/order/impl/BsOrderAfterSalesOpRecordServiceImpl.java
  24. 14
      service/src/main/java/com/hfkj/service/order/impl/BsOrderChildServiceImpl.java
  25. 210
      service/src/main/java/com/hfkj/service/order/impl/BsOrderRefundServiceImpl.java
  26. 15
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java
  27. 2
      service/src/main/java/com/hfkj/service/pay/HuiPayService.java
  28. 44
      service/src/main/java/com/hfkj/sysenum/order/OrderAfterSalesApplyStatusEnum.java
  29. 42
      service/src/main/java/com/hfkj/sysenum/order/OrderAfterSalesApplyTypeEnum.java
  30. 6
      service/src/main/java/com/hfkj/sysenum/order/OrderPayChannelEnum.java
  31. 34
      service/src/main/java/com/hfkj/sysenum/order/OrderRefundStatusEnum.java

@ -0,0 +1,255 @@
package com.order.controller;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsOrderAfterSalesApply;
import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject;
import com.hfkj.model.UserSessionObject;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.model.order.OrderModel;
import com.hfkj.service.order.BsOrderAfterSalesApplyService;
import com.hfkj.service.order.BsOrderAfterSalesOpRecordService;
import com.hfkj.service.order.BsOrderChildService;
import com.hfkj.sysenum.SecUserObjectTypeEnum;
import com.hfkj.sysenum.UserStatusEnum;
import com.hfkj.sysenum.order.OrderAfterSalesApplyTypeEnum;
import com.hfkj.sysenum.order.OrderChildProductTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
/**
* @className: OrderAfterSalesApplyController
* @author: HuRui
* @date: 2024/5/15
**/
@Controller
@RequestMapping(value="/afterSales")
@Api(value="订单售后业务")
public class OrderAfterSalesApplyController {
Logger log = LoggerFactory.getLogger(OrderAfterSalesApplyController.class);
@Resource
private UserCenter userCenter;
@Resource
private BsOrderAfterSalesApplyService orderAfterSalesApplyService;
@Resource
private BsOrderAfterSalesOpRecordService orderAfterSalesOpRecordService;
@Resource
private BsOrderChildService orderChildService;
@RequestMapping(value="/apply",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "申请")
public ResponseData apply(@RequestBody JSONObject body) {
try {
if (body == null
|| body.getInteger("type") == null
|| StringUtils.isBlank(body.getString("childOrderNo"))
|| body.getInteger("productCount") == null
|| StringUtils.isBlank(body.getString("remarks"))
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
// 申请类型
OrderAfterSalesApplyTypeEnum applyType = OrderAfterSalesApplyTypeEnum.getData(body.getInteger("type"));
if (applyType == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的申请类型");
}
orderAfterSalesApplyService.createApply(applyType,
body.getString("childOrderNo"),
body.getInteger("productCount"),
body.getString("photo"),
body.getString("remarks")
);
return ResponseMsgUtil.success("提交成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/audit",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "申请审核")
public ResponseData audit(@RequestBody JSONObject body) {
try {
SecUserSessionObject secUserSessionObject = userCenter.getSessionModel(SecUserSessionObject.class);
if (secUserSessionObject == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, "");
}
if (body == null
|| StringUtils.isBlank(body.getString("applyNo"))
|| body.getBoolean("auditStatus") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
orderAfterSalesApplyService.audit(
body.getString("applyNo"),
body.getBoolean("auditStatus"),
body.getString("remarks"),
secUserSessionObject.getAccount().getId());
return ResponseMsgUtil.success("提交成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/sendExpress",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "邮寄")
public ResponseData sendExpress(@RequestBody JSONObject body) {
try {
if (body == null
|| StringUtils.isBlank(body.getString("applyNo"))
|| StringUtils.isBlank(body.getString("sendExpressNo"))
) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
orderAfterSalesApplyService.sendExpress(body.getString("applyNo"),body.getString("sendExpressNo"));
return ResponseMsgUtil.success("提交成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/finish",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "完成")
public ResponseData finish(@RequestBody JSONObject body) {
try {
if (body == null || StringUtils.isBlank(body.getString("applyNo"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
SecUserSessionObject secUserSessionObject = userCenter.getSessionModel(SecUserSessionObject.class);
if (secUserSessionObject == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, "");
}
orderAfterSalesApplyService.finish(body.getString("applyNo"), secUserSessionObject.getAccount().getId());
return ResponseMsgUtil.success("提交成功");
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryApply",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询申请")
public ResponseData queryApply(@RequestParam(value = "applyNo" , required = true) String applyNo) {
try {
// 查询申请
BsOrderAfterSalesApply apply = orderAfterSalesApplyService.getDetailByApplyNo(applyNo);
if (apply == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的申请");
}
Map<String,Object> map = new HashMap<>();
map.put("applyDetail", apply);
map.put("childOrder", orderChildService.getDetail(apply.getChildOrderNo()));
map.put("applyOpRecord", orderAfterSalesOpRecordService.getRecordList(applyNo));
return ResponseMsgUtil.success(map);
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryApplyList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询申请列表")
public ResponseData queryApplyList(@RequestParam(value = "merId" , required = false) Long merId,
@RequestParam(value = "type" , required = false) Integer type,
@RequestParam(value = "userPhone" , required = false) String userPhone,
@RequestParam(value = "childOrderNo" , required = false) String childOrderNo,
@RequestParam(value = "applyNo" , required = false) String applyNo,
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "createTimeS" , required = false) Long createTimeS,
@RequestParam(value = "createTimeE" , required = false) Long createTimeE,
@RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try {
SecUserSessionObject secUserSessionObject = userCenter.getSessionModel(SecUserSessionObject.class);
if (secUserSessionObject == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, "");
}
Map<String,Object> param = new HashMap<>();
if (secUserSessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) {
param.put("merId", merId);
} else if (secUserSessionObject.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) {
param.put("merId", secUserSessionObject.getAccount().getObjectId());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知权限");
}
param.put("type", type);
param.put("userPhone", userPhone);
param.put("childOrderNo", childOrderNo);
param.put("applyNo", applyNo);
param.put("status", status);
param.put("createTimeS", createTimeS);
param.put("createTimeE", createTimeE);
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(orderAfterSalesApplyService.getApplyList(param)));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryUserApplyList",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询用户申请列表")
public ResponseData queryUserApplyList(@RequestParam(value = "childOrderNo" , required = false) String childOrderNo,
@RequestParam(value = "applyNo" , required = false) String applyNo,
@RequestParam(value = "status" , required = false) Integer status,
@RequestParam(value = "pageNum" , required = true) Integer pageNum,
@RequestParam(value = "pageSize" , required = true) Integer pageSize) {
try {
UserSessionObject userSessionObject = userCenter.getSessionModel(UserSessionObject.class);
if (userSessionObject == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, "");
}
Map<String,Object> param = new HashMap<>();
param.put("userId", userSessionObject.getUser().getId());
param.put("childOrderNo", childOrderNo);
param.put("applyNo", applyNo);
param.put("status", status);
PageHelper.startPage(pageNum,pageSize);
return ResponseMsgUtil.success(new PageInfo<>(orderAfterSalesApplyService.getApplyList(param)));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -0,0 +1,127 @@
package com.order.controller;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsOrderRefund;
import com.hfkj.model.ResponseData;
import com.hfkj.model.UserSessionObject;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.model.order.OrderModel;
import com.hfkj.service.order.BsOrderRefundService;
import com.hfkj.service.order.BsOrderService;
import com.hfkj.sysenum.UserStatusEnum;
import com.hfkj.sysenum.order.OrderChildProductTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
/**
* @className: OrderController
* @author: HuRui
* @date: 2024/4/30
**/
@Controller
@RequestMapping(value="/refund")
@Api(value="订单退款业务")
public class OrderRefundController {
Logger log = LoggerFactory.getLogger(OrderRefundController.class);
@Resource
private UserCenter userCenter;
@Resource
private BsOrderRefundService orderRefundService;
@RequestMapping(value="/tradeOrder",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "退款交易订单")
public ResponseData tradeOrder(@RequestBody JSONObject body) {
try {
// 用户session
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
if (userSession == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, "");
}
if (body == null || StringUtils.isBlank(body.getString("orderNo"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
return ResponseMsgUtil.success(orderRefundService.tradeOrderRefund(body.getString("orderNo"),body.getString("remark")));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/tradeOrderChild",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "退款交易子订单")
public ResponseData tradeOrderChild(@RequestBody JSONObject body) {
try {
// 用户session
UserSessionObject userSession = userCenter.getSessionModel(UserSessionObject.class);
if (userSession == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, "");
}
if (!userSession.getUser().getStatus().equals(UserStatusEnum.status1.getCode())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "该账户已被禁用,无法进行交易");
}
if (body == null
|| StringUtils.isBlank(body.getString("childOrderNo"))
|| body.getInteger("productCount") == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
return ResponseMsgUtil.success(orderRefundService.tradeOrderChildRefund(
body.getString("childOrderNo"),
body.getInteger("productCount"),
body.getString("remark")
));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryOrderRefund",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "查询退款订单")
public ResponseData queryOrderRefund(@RequestParam(value = "orderNo" , required = false) String orderNo,
@RequestParam(value = "orderChildNo" , required = false) String orderChildNo,
@RequestParam(value = "refundOrderNo" , required = false) String refundOrderNo) {
try {
if (StringUtils.isBlank(orderNo)
&& StringUtils.isBlank(orderChildNo)
&& StringUtils.isBlank(refundOrderNo)) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
Map<String,Object> param = new HashMap<>();
param.put("orderNo", orderNo);
param.put("orderChildNo", orderChildNo);
param.put("refundOrderNo", refundOrderNo);
return ResponseMsgUtil.success(orderRefundService.getRefundList(param));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -0,0 +1,203 @@
package com.hfkj.dao;
import com.hfkj.entity.BsOrderAfterSalesApply;
import com.hfkj.entity.BsOrderAfterSalesApplyExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface BsOrderAfterSalesApplyMapper extends BsOrderAfterSalesApplyMapperExt {
@SelectProvider(type=BsOrderAfterSalesApplySqlProvider.class, method="countByExample")
long countByExample(BsOrderAfterSalesApplyExample example);
@DeleteProvider(type=BsOrderAfterSalesApplySqlProvider.class, method="deleteByExample")
int deleteByExample(BsOrderAfterSalesApplyExample example);
@Delete({
"delete from bs_order_after_sales_apply",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_order_after_sales_apply (user_id, user_phone, ",
"mer_id, apply_no, `type`, ",
"order_no, child_order_no, ",
"product_type, product_id, ",
"product_name, product_img, ",
"product_spec_id, product_spec_name, ",
"product_count, photo, ",
"remarks, send_express_no, ",
"refund_order_no, refund_price, ",
"refund_integral, `status`, ",
"audit_remarks, create_time, ",
"audit_time, send_express_time, ",
"finish_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values (#{userId,jdbcType=BIGINT}, #{userPhone,jdbcType=VARCHAR}, ",
"#{merId,jdbcType=BIGINT}, #{applyNo,jdbcType=VARCHAR}, #{type,jdbcType=INTEGER}, ",
"#{orderNo,jdbcType=VARCHAR}, #{childOrderNo,jdbcType=VARCHAR}, ",
"#{productType,jdbcType=INTEGER}, #{productId,jdbcType=BIGINT}, ",
"#{productName,jdbcType=VARCHAR}, #{productImg,jdbcType=VARCHAR}, ",
"#{productSpecId,jdbcType=BIGINT}, #{productSpecName,jdbcType=VARCHAR}, ",
"#{productCount,jdbcType=INTEGER}, #{photo,jdbcType=VARCHAR}, ",
"#{remarks,jdbcType=VARCHAR}, #{sendExpressNo,jdbcType=VARCHAR}, ",
"#{refundOrderNo,jdbcType=VARCHAR}, #{refundPrice,jdbcType=DECIMAL}, ",
"#{refundIntegral,jdbcType=BIGINT}, #{status,jdbcType=INTEGER}, ",
"#{auditRemarks,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{auditTime,jdbcType=TIMESTAMP}, #{sendExpressTime,jdbcType=TIMESTAMP}, ",
"#{finishTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsOrderAfterSalesApply record);
@InsertProvider(type=BsOrderAfterSalesApplySqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsOrderAfterSalesApply record);
@SelectProvider(type=BsOrderAfterSalesApplySqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER),
@Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT),
@Result(column="product_name", property="productName", jdbcType=JdbcType.VARCHAR),
@Result(column="product_img", property="productImg", jdbcType=JdbcType.VARCHAR),
@Result(column="product_spec_id", property="productSpecId", jdbcType=JdbcType.BIGINT),
@Result(column="product_spec_name", property="productSpecName", jdbcType=JdbcType.VARCHAR),
@Result(column="product_count", property="productCount", jdbcType=JdbcType.INTEGER),
@Result(column="photo", property="photo", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="send_express_no", property="sendExpressNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_order_no", property="refundOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_integral", property="refundIntegral", jdbcType=JdbcType.BIGINT),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="audit_remarks", property="auditRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="audit_time", property="auditTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="send_express_time", property="sendExpressTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<BsOrderAfterSalesApply> selectByExample(BsOrderAfterSalesApplyExample example);
@Select({
"select",
"id, user_id, user_phone, mer_id, apply_no, `type`, order_no, child_order_no, ",
"product_type, product_id, product_name, product_img, product_spec_id, product_spec_name, ",
"product_count, photo, remarks, send_express_no, refund_order_no, refund_price, ",
"refund_integral, `status`, audit_remarks, create_time, audit_time, send_express_time, ",
"finish_time, update_time, ext_1, ext_2, ext_3",
"from bs_order_after_sales_apply",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
@Result(column="type", property="type", jdbcType=JdbcType.INTEGER),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="child_order_no", property="childOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="product_type", property="productType", jdbcType=JdbcType.INTEGER),
@Result(column="product_id", property="productId", jdbcType=JdbcType.BIGINT),
@Result(column="product_name", property="productName", jdbcType=JdbcType.VARCHAR),
@Result(column="product_img", property="productImg", jdbcType=JdbcType.VARCHAR),
@Result(column="product_spec_id", property="productSpecId", jdbcType=JdbcType.BIGINT),
@Result(column="product_spec_name", property="productSpecName", jdbcType=JdbcType.VARCHAR),
@Result(column="product_count", property="productCount", jdbcType=JdbcType.INTEGER),
@Result(column="photo", property="photo", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="send_express_no", property="sendExpressNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_order_no", property="refundOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_integral", property="refundIntegral", jdbcType=JdbcType.BIGINT),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="audit_remarks", property="auditRemarks", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="audit_time", property="auditTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="send_express_time", property="sendExpressTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="finish_time", property="finishTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="update_time", property="updateTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
BsOrderAfterSalesApply selectByPrimaryKey(Long id);
@UpdateProvider(type=BsOrderAfterSalesApplySqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsOrderAfterSalesApply record, @Param("example") BsOrderAfterSalesApplyExample example);
@UpdateProvider(type=BsOrderAfterSalesApplySqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsOrderAfterSalesApply record, @Param("example") BsOrderAfterSalesApplyExample example);
@UpdateProvider(type=BsOrderAfterSalesApplySqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsOrderAfterSalesApply record);
@Update({
"update bs_order_after_sales_apply",
"set user_id = #{userId,jdbcType=BIGINT},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"mer_id = #{merId,jdbcType=BIGINT},",
"apply_no = #{applyNo,jdbcType=VARCHAR},",
"`type` = #{type,jdbcType=INTEGER},",
"order_no = #{orderNo,jdbcType=VARCHAR},",
"child_order_no = #{childOrderNo,jdbcType=VARCHAR},",
"product_type = #{productType,jdbcType=INTEGER},",
"product_id = #{productId,jdbcType=BIGINT},",
"product_name = #{productName,jdbcType=VARCHAR},",
"product_img = #{productImg,jdbcType=VARCHAR},",
"product_spec_id = #{productSpecId,jdbcType=BIGINT},",
"product_spec_name = #{productSpecName,jdbcType=VARCHAR},",
"product_count = #{productCount,jdbcType=INTEGER},",
"photo = #{photo,jdbcType=VARCHAR},",
"remarks = #{remarks,jdbcType=VARCHAR},",
"send_express_no = #{sendExpressNo,jdbcType=VARCHAR},",
"refund_order_no = #{refundOrderNo,jdbcType=VARCHAR},",
"refund_price = #{refundPrice,jdbcType=DECIMAL},",
"refund_integral = #{refundIntegral,jdbcType=BIGINT},",
"`status` = #{status,jdbcType=INTEGER},",
"audit_remarks = #{auditRemarks,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"audit_time = #{auditTime,jdbcType=TIMESTAMP},",
"send_express_time = #{sendExpressTime,jdbcType=TIMESTAMP},",
"finish_time = #{finishTime,jdbcType=TIMESTAMP},",
"update_time = #{updateTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsOrderAfterSalesApply record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface BsOrderAfterSalesApplyMapperExt {
}

@ -0,0 +1,598 @@
package com.hfkj.dao;
import com.hfkj.entity.BsOrderAfterSalesApply;
import com.hfkj.entity.BsOrderAfterSalesApplyExample.Criteria;
import com.hfkj.entity.BsOrderAfterSalesApplyExample.Criterion;
import com.hfkj.entity.BsOrderAfterSalesApplyExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsOrderAfterSalesApplySqlProvider {
public String countByExample(BsOrderAfterSalesApplyExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_order_after_sales_apply");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsOrderAfterSalesApplyExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_order_after_sales_apply");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsOrderAfterSalesApply record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_order_after_sales_apply");
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.VALUES("user_phone", "#{userPhone,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getApplyNo() != null) {
sql.VALUES("apply_no", "#{applyNo,jdbcType=VARCHAR}");
}
if (record.getType() != null) {
sql.VALUES("`type`", "#{type,jdbcType=INTEGER}");
}
if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.VALUES("child_order_no", "#{childOrderNo,jdbcType=VARCHAR}");
}
if (record.getProductType() != null) {
sql.VALUES("product_type", "#{productType,jdbcType=INTEGER}");
}
if (record.getProductId() != null) {
sql.VALUES("product_id", "#{productId,jdbcType=BIGINT}");
}
if (record.getProductName() != null) {
sql.VALUES("product_name", "#{productName,jdbcType=VARCHAR}");
}
if (record.getProductImg() != null) {
sql.VALUES("product_img", "#{productImg,jdbcType=VARCHAR}");
}
if (record.getProductSpecId() != null) {
sql.VALUES("product_spec_id", "#{productSpecId,jdbcType=BIGINT}");
}
if (record.getProductSpecName() != null) {
sql.VALUES("product_spec_name", "#{productSpecName,jdbcType=VARCHAR}");
}
if (record.getProductCount() != null) {
sql.VALUES("product_count", "#{productCount,jdbcType=INTEGER}");
}
if (record.getPhoto() != null) {
sql.VALUES("photo", "#{photo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.VALUES("remarks", "#{remarks,jdbcType=VARCHAR}");
}
if (record.getSendExpressNo() != null) {
sql.VALUES("send_express_no", "#{sendExpressNo,jdbcType=VARCHAR}");
}
if (record.getRefundOrderNo() != null) {
sql.VALUES("refund_order_no", "#{refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getRefundPrice() != null) {
sql.VALUES("refund_price", "#{refundPrice,jdbcType=DECIMAL}");
}
if (record.getRefundIntegral() != null) {
sql.VALUES("refund_integral", "#{refundIntegral,jdbcType=BIGINT}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getAuditRemarks() != null) {
sql.VALUES("audit_remarks", "#{auditRemarks,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getAuditTime() != null) {
sql.VALUES("audit_time", "#{auditTime,jdbcType=TIMESTAMP}");
}
if (record.getSendExpressTime() != null) {
sql.VALUES("send_express_time", "#{sendExpressTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.VALUES("finish_time", "#{finishTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.VALUES("update_time", "#{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(BsOrderAfterSalesApplyExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("user_id");
sql.SELECT("user_phone");
sql.SELECT("mer_id");
sql.SELECT("apply_no");
sql.SELECT("`type`");
sql.SELECT("order_no");
sql.SELECT("child_order_no");
sql.SELECT("product_type");
sql.SELECT("product_id");
sql.SELECT("product_name");
sql.SELECT("product_img");
sql.SELECT("product_spec_id");
sql.SELECT("product_spec_name");
sql.SELECT("product_count");
sql.SELECT("photo");
sql.SELECT("remarks");
sql.SELECT("send_express_no");
sql.SELECT("refund_order_no");
sql.SELECT("refund_price");
sql.SELECT("refund_integral");
sql.SELECT("`status`");
sql.SELECT("audit_remarks");
sql.SELECT("create_time");
sql.SELECT("audit_time");
sql.SELECT("send_express_time");
sql.SELECT("finish_time");
sql.SELECT("update_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_order_after_sales_apply");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
BsOrderAfterSalesApply record = (BsOrderAfterSalesApply) parameter.get("record");
BsOrderAfterSalesApplyExample example = (BsOrderAfterSalesApplyExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_order_after_sales_apply");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getApplyNo() != null) {
sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}");
}
if (record.getType() != null) {
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}");
}
if (record.getProductType() != null) {
sql.SET("product_type = #{record.productType,jdbcType=INTEGER}");
}
if (record.getProductId() != null) {
sql.SET("product_id = #{record.productId,jdbcType=BIGINT}");
}
if (record.getProductName() != null) {
sql.SET("product_name = #{record.productName,jdbcType=VARCHAR}");
}
if (record.getProductImg() != null) {
sql.SET("product_img = #{record.productImg,jdbcType=VARCHAR}");
}
if (record.getProductSpecId() != null) {
sql.SET("product_spec_id = #{record.productSpecId,jdbcType=BIGINT}");
}
if (record.getProductSpecName() != null) {
sql.SET("product_spec_name = #{record.productSpecName,jdbcType=VARCHAR}");
}
if (record.getProductCount() != null) {
sql.SET("product_count = #{record.productCount,jdbcType=INTEGER}");
}
if (record.getPhoto() != null) {
sql.SET("photo = #{record.photo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
}
if (record.getSendExpressNo() != null) {
sql.SET("send_express_no = #{record.sendExpressNo,jdbcType=VARCHAR}");
}
if (record.getRefundOrderNo() != null) {
sql.SET("refund_order_no = #{record.refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getRefundPrice() != null) {
sql.SET("refund_price = #{record.refundPrice,jdbcType=DECIMAL}");
}
if (record.getRefundIntegral() != null) {
sql.SET("refund_integral = #{record.refundIntegral,jdbcType=BIGINT}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getAuditRemarks() != null) {
sql.SET("audit_remarks = #{record.auditRemarks,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getAuditTime() != null) {
sql.SET("audit_time = #{record.auditTime,jdbcType=TIMESTAMP}");
}
if (record.getSendExpressTime() != null) {
sql.SET("send_express_time = #{record.sendExpressTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("bs_order_after_sales_apply");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}");
sql.SET("`type` = #{record.type,jdbcType=INTEGER}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("child_order_no = #{record.childOrderNo,jdbcType=VARCHAR}");
sql.SET("product_type = #{record.productType,jdbcType=INTEGER}");
sql.SET("product_id = #{record.productId,jdbcType=BIGINT}");
sql.SET("product_name = #{record.productName,jdbcType=VARCHAR}");
sql.SET("product_img = #{record.productImg,jdbcType=VARCHAR}");
sql.SET("product_spec_id = #{record.productSpecId,jdbcType=BIGINT}");
sql.SET("product_spec_name = #{record.productSpecName,jdbcType=VARCHAR}");
sql.SET("product_count = #{record.productCount,jdbcType=INTEGER}");
sql.SET("photo = #{record.photo,jdbcType=VARCHAR}");
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
sql.SET("send_express_no = #{record.sendExpressNo,jdbcType=VARCHAR}");
sql.SET("refund_order_no = #{record.refundOrderNo,jdbcType=VARCHAR}");
sql.SET("refund_price = #{record.refundPrice,jdbcType=DECIMAL}");
sql.SET("refund_integral = #{record.refundIntegral,jdbcType=BIGINT}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("audit_remarks = #{record.auditRemarks,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("audit_time = #{record.auditTime,jdbcType=TIMESTAMP}");
sql.SET("send_express_time = #{record.sendExpressTime,jdbcType=TIMESTAMP}");
sql.SET("finish_time = #{record.finishTime,jdbcType=TIMESTAMP}");
sql.SET("update_time = #{record.updateTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
BsOrderAfterSalesApplyExample example = (BsOrderAfterSalesApplyExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsOrderAfterSalesApply record) {
SQL sql = new SQL();
sql.UPDATE("bs_order_after_sales_apply");
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
sql.SET("user_phone = #{userPhone,jdbcType=VARCHAR}");
}
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getApplyNo() != null) {
sql.SET("apply_no = #{applyNo,jdbcType=VARCHAR}");
}
if (record.getType() != null) {
sql.SET("`type` = #{type,jdbcType=INTEGER}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
}
if (record.getChildOrderNo() != null) {
sql.SET("child_order_no = #{childOrderNo,jdbcType=VARCHAR}");
}
if (record.getProductType() != null) {
sql.SET("product_type = #{productType,jdbcType=INTEGER}");
}
if (record.getProductId() != null) {
sql.SET("product_id = #{productId,jdbcType=BIGINT}");
}
if (record.getProductName() != null) {
sql.SET("product_name = #{productName,jdbcType=VARCHAR}");
}
if (record.getProductImg() != null) {
sql.SET("product_img = #{productImg,jdbcType=VARCHAR}");
}
if (record.getProductSpecId() != null) {
sql.SET("product_spec_id = #{productSpecId,jdbcType=BIGINT}");
}
if (record.getProductSpecName() != null) {
sql.SET("product_spec_name = #{productSpecName,jdbcType=VARCHAR}");
}
if (record.getProductCount() != null) {
sql.SET("product_count = #{productCount,jdbcType=INTEGER}");
}
if (record.getPhoto() != null) {
sql.SET("photo = #{photo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.SET("remarks = #{remarks,jdbcType=VARCHAR}");
}
if (record.getSendExpressNo() != null) {
sql.SET("send_express_no = #{sendExpressNo,jdbcType=VARCHAR}");
}
if (record.getRefundOrderNo() != null) {
sql.SET("refund_order_no = #{refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getRefundPrice() != null) {
sql.SET("refund_price = #{refundPrice,jdbcType=DECIMAL}");
}
if (record.getRefundIntegral() != null) {
sql.SET("refund_integral = #{refundIntegral,jdbcType=BIGINT}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getAuditRemarks() != null) {
sql.SET("audit_remarks = #{auditRemarks,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getAuditTime() != null) {
sql.SET("audit_time = #{auditTime,jdbcType=TIMESTAMP}");
}
if (record.getSendExpressTime() != null) {
sql.SET("send_express_time = #{sendExpressTime,jdbcType=TIMESTAMP}");
}
if (record.getFinishTime() != null) {
sql.SET("finish_time = #{finishTime,jdbcType=TIMESTAMP}");
}
if (record.getUpdateTime() != null) {
sql.SET("update_time = #{updateTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, BsOrderAfterSalesApplyExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -0,0 +1,125 @@
package com.hfkj.dao;
import com.hfkj.entity.BsOrderAfterSalesOpRecord;
import com.hfkj.entity.BsOrderAfterSalesOpRecordExample;
import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.DeleteProvider;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectProvider;
import org.apache.ibatis.annotations.Update;
import org.apache.ibatis.annotations.UpdateProvider;
import org.apache.ibatis.type.JdbcType;
import org.springframework.stereotype.Repository;
/**
*
* 代码由工具生成,请勿修改!!!
* 如果需要扩展请在其父类进行扩展
*
**/
@Repository
public interface BsOrderAfterSalesOpRecordMapper extends BsOrderAfterSalesOpRecordMapperExt {
@SelectProvider(type=BsOrderAfterSalesOpRecordSqlProvider.class, method="countByExample")
long countByExample(BsOrderAfterSalesOpRecordExample example);
@DeleteProvider(type=BsOrderAfterSalesOpRecordSqlProvider.class, method="deleteByExample")
int deleteByExample(BsOrderAfterSalesOpRecordExample example);
@Delete({
"delete from bs_order_after_sales_op_record",
"where id = #{id,jdbcType=BIGINT}"
})
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_order_after_sales_op_record (apply_no, `status`, ",
"photo, remarks, ",
"op_user_type, op_user_id, ",
"op_user_name, create_time, ",
"ext_1, ext_2, ext_3)",
"values (#{applyNo,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, ",
"#{photo,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, ",
"#{opUserType,jdbcType=INTEGER}, #{opUserId,jdbcType=BIGINT}, ",
"#{opUserName,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, ",
"#{ext1,jdbcType=VARCHAR}, #{ext2,jdbcType=VARCHAR}, #{ext3,jdbcType=VARCHAR})"
})
@Options(useGeneratedKeys=true,keyProperty="id")
int insert(BsOrderAfterSalesOpRecord record);
@InsertProvider(type=BsOrderAfterSalesOpRecordSqlProvider.class, method="insertSelective")
@Options(useGeneratedKeys=true,keyProperty="id")
int insertSelective(BsOrderAfterSalesOpRecord record);
@SelectProvider(type=BsOrderAfterSalesOpRecordSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="photo", property="photo", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="op_user_type", property="opUserType", jdbcType=JdbcType.INTEGER),
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT),
@Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
List<BsOrderAfterSalesOpRecord> selectByExample(BsOrderAfterSalesOpRecordExample example);
@Select({
"select",
"id, apply_no, `status`, photo, remarks, op_user_type, op_user_id, op_user_name, ",
"create_time, ext_1, ext_2, ext_3",
"from bs_order_after_sales_op_record",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="apply_no", property="applyNo", jdbcType=JdbcType.VARCHAR),
@Result(column="status", property="status", jdbcType=JdbcType.INTEGER),
@Result(column="photo", property="photo", jdbcType=JdbcType.VARCHAR),
@Result(column="remarks", property="remarks", jdbcType=JdbcType.VARCHAR),
@Result(column="op_user_type", property="opUserType", jdbcType=JdbcType.INTEGER),
@Result(column="op_user_id", property="opUserId", jdbcType=JdbcType.BIGINT),
@Result(column="op_user_name", property="opUserName", jdbcType=JdbcType.VARCHAR),
@Result(column="create_time", property="createTime", jdbcType=JdbcType.TIMESTAMP),
@Result(column="ext_1", property="ext1", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_2", property="ext2", jdbcType=JdbcType.VARCHAR),
@Result(column="ext_3", property="ext3", jdbcType=JdbcType.VARCHAR)
})
BsOrderAfterSalesOpRecord selectByPrimaryKey(Long id);
@UpdateProvider(type=BsOrderAfterSalesOpRecordSqlProvider.class, method="updateByExampleSelective")
int updateByExampleSelective(@Param("record") BsOrderAfterSalesOpRecord record, @Param("example") BsOrderAfterSalesOpRecordExample example);
@UpdateProvider(type=BsOrderAfterSalesOpRecordSqlProvider.class, method="updateByExample")
int updateByExample(@Param("record") BsOrderAfterSalesOpRecord record, @Param("example") BsOrderAfterSalesOpRecordExample example);
@UpdateProvider(type=BsOrderAfterSalesOpRecordSqlProvider.class, method="updateByPrimaryKeySelective")
int updateByPrimaryKeySelective(BsOrderAfterSalesOpRecord record);
@Update({
"update bs_order_after_sales_op_record",
"set apply_no = #{applyNo,jdbcType=VARCHAR},",
"`status` = #{status,jdbcType=INTEGER},",
"photo = #{photo,jdbcType=VARCHAR},",
"remarks = #{remarks,jdbcType=VARCHAR},",
"op_user_type = #{opUserType,jdbcType=INTEGER},",
"op_user_id = #{opUserId,jdbcType=BIGINT},",
"op_user_name = #{opUserName,jdbcType=VARCHAR},",
"create_time = #{createTime,jdbcType=TIMESTAMP},",
"ext_1 = #{ext1,jdbcType=VARCHAR},",
"ext_2 = #{ext2,jdbcType=VARCHAR},",
"ext_3 = #{ext3,jdbcType=VARCHAR}",
"where id = #{id,jdbcType=BIGINT}"
})
int updateByPrimaryKey(BsOrderAfterSalesOpRecord record);
}

@ -0,0 +1,7 @@
package com.hfkj.dao;
/**
* mapper扩展类
*/
public interface BsOrderAfterSalesOpRecordMapperExt {
}

@ -0,0 +1,332 @@
package com.hfkj.dao;
import com.hfkj.entity.BsOrderAfterSalesOpRecord;
import com.hfkj.entity.BsOrderAfterSalesOpRecordExample.Criteria;
import com.hfkj.entity.BsOrderAfterSalesOpRecordExample.Criterion;
import com.hfkj.entity.BsOrderAfterSalesOpRecordExample;
import java.util.List;
import java.util.Map;
import org.apache.ibatis.jdbc.SQL;
public class BsOrderAfterSalesOpRecordSqlProvider {
public String countByExample(BsOrderAfterSalesOpRecordExample example) {
SQL sql = new SQL();
sql.SELECT("count(*)").FROM("bs_order_after_sales_op_record");
applyWhere(sql, example, false);
return sql.toString();
}
public String deleteByExample(BsOrderAfterSalesOpRecordExample example) {
SQL sql = new SQL();
sql.DELETE_FROM("bs_order_after_sales_op_record");
applyWhere(sql, example, false);
return sql.toString();
}
public String insertSelective(BsOrderAfterSalesOpRecord record) {
SQL sql = new SQL();
sql.INSERT_INTO("bs_order_after_sales_op_record");
if (record.getApplyNo() != null) {
sql.VALUES("apply_no", "#{applyNo,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.VALUES("`status`", "#{status,jdbcType=INTEGER}");
}
if (record.getPhoto() != null) {
sql.VALUES("photo", "#{photo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.VALUES("remarks", "#{remarks,jdbcType=VARCHAR}");
}
if (record.getOpUserType() != null) {
sql.VALUES("op_user_type", "#{opUserType,jdbcType=INTEGER}");
}
if (record.getOpUserId() != null) {
sql.VALUES("op_user_id", "#{opUserId,jdbcType=BIGINT}");
}
if (record.getOpUserName() != null) {
sql.VALUES("op_user_name", "#{opUserName,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.VALUES("create_time", "#{createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.VALUES("ext_1", "#{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.VALUES("ext_2", "#{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.VALUES("ext_3", "#{ext3,jdbcType=VARCHAR}");
}
return sql.toString();
}
public String selectByExample(BsOrderAfterSalesOpRecordExample example) {
SQL sql = new SQL();
if (example != null && example.isDistinct()) {
sql.SELECT_DISTINCT("id");
} else {
sql.SELECT("id");
}
sql.SELECT("apply_no");
sql.SELECT("`status`");
sql.SELECT("photo");
sql.SELECT("remarks");
sql.SELECT("op_user_type");
sql.SELECT("op_user_id");
sql.SELECT("op_user_name");
sql.SELECT("create_time");
sql.SELECT("ext_1");
sql.SELECT("ext_2");
sql.SELECT("ext_3");
sql.FROM("bs_order_after_sales_op_record");
applyWhere(sql, example, false);
if (example != null && example.getOrderByClause() != null) {
sql.ORDER_BY(example.getOrderByClause());
}
return sql.toString();
}
public String updateByExampleSelective(Map<String, Object> parameter) {
BsOrderAfterSalesOpRecord record = (BsOrderAfterSalesOpRecord) parameter.get("record");
BsOrderAfterSalesOpRecordExample example = (BsOrderAfterSalesOpRecordExample) parameter.get("example");
SQL sql = new SQL();
sql.UPDATE("bs_order_after_sales_op_record");
if (record.getId() != null) {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getApplyNo() != null) {
sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
}
if (record.getPhoto() != null) {
sql.SET("photo = #{record.photo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
}
if (record.getOpUserType() != null) {
sql.SET("op_user_type = #{record.opUserType,jdbcType=INTEGER}");
}
if (record.getOpUserId() != null) {
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}");
}
if (record.getOpUserName() != null) {
sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
}
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByExample(Map<String, Object> parameter) {
SQL sql = new SQL();
sql.UPDATE("bs_order_after_sales_op_record");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("apply_no = #{record.applyNo,jdbcType=VARCHAR}");
sql.SET("`status` = #{record.status,jdbcType=INTEGER}");
sql.SET("photo = #{record.photo,jdbcType=VARCHAR}");
sql.SET("remarks = #{record.remarks,jdbcType=VARCHAR}");
sql.SET("op_user_type = #{record.opUserType,jdbcType=INTEGER}");
sql.SET("op_user_id = #{record.opUserId,jdbcType=BIGINT}");
sql.SET("op_user_name = #{record.opUserName,jdbcType=VARCHAR}");
sql.SET("create_time = #{record.createTime,jdbcType=TIMESTAMP}");
sql.SET("ext_1 = #{record.ext1,jdbcType=VARCHAR}");
sql.SET("ext_2 = #{record.ext2,jdbcType=VARCHAR}");
sql.SET("ext_3 = #{record.ext3,jdbcType=VARCHAR}");
BsOrderAfterSalesOpRecordExample example = (BsOrderAfterSalesOpRecordExample) parameter.get("example");
applyWhere(sql, example, true);
return sql.toString();
}
public String updateByPrimaryKeySelective(BsOrderAfterSalesOpRecord record) {
SQL sql = new SQL();
sql.UPDATE("bs_order_after_sales_op_record");
if (record.getApplyNo() != null) {
sql.SET("apply_no = #{applyNo,jdbcType=VARCHAR}");
}
if (record.getStatus() != null) {
sql.SET("`status` = #{status,jdbcType=INTEGER}");
}
if (record.getPhoto() != null) {
sql.SET("photo = #{photo,jdbcType=VARCHAR}");
}
if (record.getRemarks() != null) {
sql.SET("remarks = #{remarks,jdbcType=VARCHAR}");
}
if (record.getOpUserType() != null) {
sql.SET("op_user_type = #{opUserType,jdbcType=INTEGER}");
}
if (record.getOpUserId() != null) {
sql.SET("op_user_id = #{opUserId,jdbcType=BIGINT}");
}
if (record.getOpUserName() != null) {
sql.SET("op_user_name = #{opUserName,jdbcType=VARCHAR}");
}
if (record.getCreateTime() != null) {
sql.SET("create_time = #{createTime,jdbcType=TIMESTAMP}");
}
if (record.getExt1() != null) {
sql.SET("ext_1 = #{ext1,jdbcType=VARCHAR}");
}
if (record.getExt2() != null) {
sql.SET("ext_2 = #{ext2,jdbcType=VARCHAR}");
}
if (record.getExt3() != null) {
sql.SET("ext_3 = #{ext3,jdbcType=VARCHAR}");
}
sql.WHERE("id = #{id,jdbcType=BIGINT}");
return sql.toString();
}
protected void applyWhere(SQL sql, BsOrderAfterSalesOpRecordExample example, boolean includeExamplePhrase) {
if (example == null) {
return;
}
String parmPhrase1;
String parmPhrase1_th;
String parmPhrase2;
String parmPhrase2_th;
String parmPhrase3;
String parmPhrase3_th;
if (includeExamplePhrase) {
parmPhrase1 = "%s #{example.oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{example.oredCriteria[%d].allCriteria[%d].value} and #{example.oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{example.oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{example.oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{example.oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{example.oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
} else {
parmPhrase1 = "%s #{oredCriteria[%d].allCriteria[%d].value}";
parmPhrase1_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s}";
parmPhrase2 = "%s #{oredCriteria[%d].allCriteria[%d].value} and #{oredCriteria[%d].criteria[%d].secondValue}";
parmPhrase2_th = "%s #{oredCriteria[%d].allCriteria[%d].value,typeHandler=%s} and #{oredCriteria[%d].criteria[%d].secondValue,typeHandler=%s}";
parmPhrase3 = "#{oredCriteria[%d].allCriteria[%d].value[%d]}";
parmPhrase3_th = "#{oredCriteria[%d].allCriteria[%d].value[%d],typeHandler=%s}";
}
StringBuilder sb = new StringBuilder();
List<Criteria> oredCriteria = example.getOredCriteria();
boolean firstCriteria = true;
for (int i = 0; i < oredCriteria.size(); i++) {
Criteria criteria = oredCriteria.get(i);
if (criteria.isValid()) {
if (firstCriteria) {
firstCriteria = false;
} else {
sb.append(" or ");
}
sb.append('(');
List<Criterion> criterions = criteria.getAllCriteria();
boolean firstCriterion = true;
for (int j = 0; j < criterions.size(); j++) {
Criterion criterion = criterions.get(j);
if (firstCriterion) {
firstCriterion = false;
} else {
sb.append(" and ");
}
if (criterion.isNoValue()) {
sb.append(criterion.getCondition());
} else if (criterion.isSingleValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase1, criterion.getCondition(), i, j));
} else {
sb.append(String.format(parmPhrase1_th, criterion.getCondition(), i, j,criterion.getTypeHandler()));
}
} else if (criterion.isBetweenValue()) {
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase2, criterion.getCondition(), i, j, i, j));
} else {
sb.append(String.format(parmPhrase2_th, criterion.getCondition(), i, j, criterion.getTypeHandler(), i, j, criterion.getTypeHandler()));
}
} else if (criterion.isListValue()) {
sb.append(criterion.getCondition());
sb.append(" (");
List<?> listItems = (List<?>) criterion.getValue();
boolean comma = false;
for (int k = 0; k < listItems.size(); k++) {
if (comma) {
sb.append(", ");
} else {
comma = true;
}
if (criterion.getTypeHandler() == null) {
sb.append(String.format(parmPhrase3, i, j, k));
} else {
sb.append(String.format(parmPhrase3_th, i, j, k, criterion.getTypeHandler()));
}
}
sb.append(')');
}
}
sb.append(')');
}
}
if (sb.length() > 0) {
sql.WHERE(sb.toString());
}
}
}

@ -39,11 +39,10 @@ public interface BsOrderRefundMapper extends BsOrderRefundMapperExt {
int deleteByPrimaryKey(Long id);
@Insert({
"insert into bs_order_refund (order_id, order_no, ",
"order_child_id, order_child_no, ",
"user_id, user_name, ",
"insert into bs_order_refund (mer_id, order_no, ",
"order_child_no, user_id, ",
"user_phone, refund_order_no, ",
"account_merchant_num, refund_pay_channel, ",
"account_merchant_no, refund_pay_channel, ",
"reufnd_pay_type, refund_serial_no, ",
"refund_pay_channel_order_no, refund_price, ",
"refund_integral, refund_remark, ",
@ -52,14 +51,13 @@ public interface BsOrderRefundMapper extends BsOrderRefundMapperExt {
"finish_time, op_user_type, ",
"op_user_id, op_user_name, ",
"ext_1, ext_2, ext_3)",
"values (#{orderId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{orderChildId,jdbcType=BIGINT}, #{orderChildNo,jdbcType=VARCHAR}, ",
"#{userId,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, ",
"values (#{merId,jdbcType=BIGINT}, #{orderNo,jdbcType=VARCHAR}, ",
"#{orderChildNo,jdbcType=VARCHAR}, #{userId,jdbcType=BIGINT}, ",
"#{userPhone,jdbcType=VARCHAR}, #{refundOrderNo,jdbcType=VARCHAR}, ",
"#{accountMerchantNum,jdbcType=VARCHAR}, #{refundPayChannel,jdbcType=INTEGER}, ",
"#{accountMerchantNo,jdbcType=VARCHAR}, #{refundPayChannel,jdbcType=INTEGER}, ",
"#{reufndPayType,jdbcType=INTEGER}, #{refundSerialNo,jdbcType=VARCHAR}, ",
"#{refundPayChannelOrderNo,jdbcType=VARCHAR}, #{refundPrice,jdbcType=DECIMAL}, ",
"#{refundIntegral,jdbcType=INTEGER}, #{refundRemark,jdbcType=VARCHAR}, ",
"#{refundIntegral,jdbcType=BIGINT}, #{refundRemark,jdbcType=VARCHAR}, ",
"#{refundStatus,jdbcType=INTEGER}, #{refundFailReason,jdbcType=VARCHAR}, ",
"#{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}, ",
"#{finishTime,jdbcType=TIMESTAMP}, #{opUserType,jdbcType=INTEGER}, ",
@ -76,21 +74,19 @@ public interface BsOrderRefundMapper extends BsOrderRefundMapperExt {
@SelectProvider(type=BsOrderRefundSqlProvider.class, method="selectByExample")
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_child_id", property="orderChildId", jdbcType=JdbcType.BIGINT),
@Result(column="order_child_no", property="orderChildNo", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
@Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_order_no", property="refundOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
@Result(column="account_merchant_no", property="accountMerchantNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_pay_channel", property="refundPayChannel", jdbcType=JdbcType.INTEGER),
@Result(column="reufnd_pay_type", property="reufndPayType", jdbcType=JdbcType.INTEGER),
@Result(column="refund_serial_no", property="refundSerialNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_pay_channel_order_no", property="refundPayChannelOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_integral", property="refundIntegral", jdbcType=JdbcType.INTEGER),
@Result(column="refund_integral", property="refundIntegral", jdbcType=JdbcType.BIGINT),
@Result(column="refund_remark", property="refundRemark", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_status", property="refundStatus", jdbcType=JdbcType.INTEGER),
@Result(column="refund_fail_reason", property="refundFailReason", jdbcType=JdbcType.VARCHAR),
@ -108,31 +104,29 @@ public interface BsOrderRefundMapper extends BsOrderRefundMapperExt {
@Select({
"select",
"id, order_id, order_no, order_child_id, order_child_no, user_id, user_name, ",
"user_phone, refund_order_no, account_merchant_num, refund_pay_channel, reufnd_pay_type, ",
"refund_serial_no, refund_pay_channel_order_no, refund_price, refund_integral, ",
"refund_remark, refund_status, refund_fail_reason, create_time, update_time, ",
"finish_time, op_user_type, op_user_id, op_user_name, ext_1, ext_2, ext_3",
"id, mer_id, order_no, order_child_no, user_id, user_phone, refund_order_no, ",
"account_merchant_no, refund_pay_channel, reufnd_pay_type, refund_serial_no, ",
"refund_pay_channel_order_no, refund_price, refund_integral, refund_remark, refund_status, ",
"refund_fail_reason, create_time, update_time, finish_time, op_user_type, op_user_id, ",
"op_user_name, ext_1, ext_2, ext_3",
"from bs_order_refund",
"where id = #{id,jdbcType=BIGINT}"
})
@Results({
@Result(column="id", property="id", jdbcType=JdbcType.BIGINT, id=true),
@Result(column="order_id", property="orderId", jdbcType=JdbcType.BIGINT),
@Result(column="mer_id", property="merId", jdbcType=JdbcType.BIGINT),
@Result(column="order_no", property="orderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="order_child_id", property="orderChildId", jdbcType=JdbcType.BIGINT),
@Result(column="order_child_no", property="orderChildNo", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.INTEGER),
@Result(column="user_name", property="userName", jdbcType=JdbcType.VARCHAR),
@Result(column="user_id", property="userId", jdbcType=JdbcType.BIGINT),
@Result(column="user_phone", property="userPhone", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_order_no", property="refundOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="account_merchant_num", property="accountMerchantNum", jdbcType=JdbcType.VARCHAR),
@Result(column="account_merchant_no", property="accountMerchantNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_pay_channel", property="refundPayChannel", jdbcType=JdbcType.INTEGER),
@Result(column="reufnd_pay_type", property="reufndPayType", jdbcType=JdbcType.INTEGER),
@Result(column="refund_serial_no", property="refundSerialNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_pay_channel_order_no", property="refundPayChannelOrderNo", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_price", property="refundPrice", jdbcType=JdbcType.DECIMAL),
@Result(column="refund_integral", property="refundIntegral", jdbcType=JdbcType.INTEGER),
@Result(column="refund_integral", property="refundIntegral", jdbcType=JdbcType.BIGINT),
@Result(column="refund_remark", property="refundRemark", jdbcType=JdbcType.VARCHAR),
@Result(column="refund_status", property="refundStatus", jdbcType=JdbcType.INTEGER),
@Result(column="refund_fail_reason", property="refundFailReason", jdbcType=JdbcType.VARCHAR),
@ -159,21 +153,19 @@ public interface BsOrderRefundMapper extends BsOrderRefundMapperExt {
@Update({
"update bs_order_refund",
"set order_id = #{orderId,jdbcType=BIGINT},",
"set mer_id = #{merId,jdbcType=BIGINT},",
"order_no = #{orderNo,jdbcType=VARCHAR},",
"order_child_id = #{orderChildId,jdbcType=BIGINT},",
"order_child_no = #{orderChildNo,jdbcType=VARCHAR},",
"user_id = #{userId,jdbcType=INTEGER},",
"user_name = #{userName,jdbcType=VARCHAR},",
"user_id = #{userId,jdbcType=BIGINT},",
"user_phone = #{userPhone,jdbcType=VARCHAR},",
"refund_order_no = #{refundOrderNo,jdbcType=VARCHAR},",
"account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR},",
"account_merchant_no = #{accountMerchantNo,jdbcType=VARCHAR},",
"refund_pay_channel = #{refundPayChannel,jdbcType=INTEGER},",
"reufnd_pay_type = #{reufndPayType,jdbcType=INTEGER},",
"refund_serial_no = #{refundSerialNo,jdbcType=VARCHAR},",
"refund_pay_channel_order_no = #{refundPayChannelOrderNo,jdbcType=VARCHAR},",
"refund_price = #{refundPrice,jdbcType=DECIMAL},",
"refund_integral = #{refundIntegral,jdbcType=INTEGER},",
"refund_integral = #{refundIntegral,jdbcType=BIGINT},",
"refund_remark = #{refundRemark,jdbcType=VARCHAR},",
"refund_status = #{refundStatus,jdbcType=INTEGER},",
"refund_fail_reason = #{refundFailReason,jdbcType=VARCHAR},",

@ -28,28 +28,20 @@ public class BsOrderRefundSqlProvider {
SQL sql = new SQL();
sql.INSERT_INTO("bs_order_refund");
if (record.getOrderId() != null) {
sql.VALUES("order_id", "#{orderId,jdbcType=BIGINT}");
if (record.getMerId() != null) {
sql.VALUES("mer_id", "#{merId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.VALUES("order_no", "#{orderNo,jdbcType=VARCHAR}");
}
if (record.getOrderChildId() != null) {
sql.VALUES("order_child_id", "#{orderChildId,jdbcType=BIGINT}");
}
if (record.getOrderChildNo() != null) {
sql.VALUES("order_child_no", "#{orderChildNo,jdbcType=VARCHAR}");
}
if (record.getUserId() != null) {
sql.VALUES("user_id", "#{userId,jdbcType=INTEGER}");
}
if (record.getUserName() != null) {
sql.VALUES("user_name", "#{userName,jdbcType=VARCHAR}");
sql.VALUES("user_id", "#{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
@ -60,8 +52,8 @@ public class BsOrderRefundSqlProvider {
sql.VALUES("refund_order_no", "#{refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getAccountMerchantNum() != null) {
sql.VALUES("account_merchant_num", "#{accountMerchantNum,jdbcType=VARCHAR}");
if (record.getAccountMerchantNo() != null) {
sql.VALUES("account_merchant_no", "#{accountMerchantNo,jdbcType=VARCHAR}");
}
if (record.getRefundPayChannel() != null) {
@ -85,7 +77,7 @@ public class BsOrderRefundSqlProvider {
}
if (record.getRefundIntegral() != null) {
sql.VALUES("refund_integral", "#{refundIntegral,jdbcType=INTEGER}");
sql.VALUES("refund_integral", "#{refundIntegral,jdbcType=BIGINT}");
}
if (record.getRefundRemark() != null) {
@ -146,15 +138,13 @@ public class BsOrderRefundSqlProvider {
} else {
sql.SELECT("id");
}
sql.SELECT("order_id");
sql.SELECT("mer_id");
sql.SELECT("order_no");
sql.SELECT("order_child_id");
sql.SELECT("order_child_no");
sql.SELECT("user_id");
sql.SELECT("user_name");
sql.SELECT("user_phone");
sql.SELECT("refund_order_no");
sql.SELECT("account_merchant_num");
sql.SELECT("account_merchant_no");
sql.SELECT("refund_pay_channel");
sql.SELECT("reufnd_pay_type");
sql.SELECT("refund_serial_no");
@ -194,28 +184,20 @@ public class BsOrderRefundSqlProvider {
sql.SET("id = #{record.id,jdbcType=BIGINT}");
}
if (record.getOrderId() != null) {
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
if (record.getMerId() != null) {
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
}
if (record.getOrderChildId() != null) {
sql.SET("order_child_id = #{record.orderChildId,jdbcType=BIGINT}");
}
if (record.getOrderChildNo() != null) {
sql.SET("order_child_no = #{record.orderChildNo,jdbcType=VARCHAR}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}");
}
if (record.getUserName() != null) {
sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
@ -226,8 +208,8 @@ public class BsOrderRefundSqlProvider {
sql.SET("refund_order_no = #{record.refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getAccountMerchantNum() != null) {
sql.SET("account_merchant_num = #{record.accountMerchantNum,jdbcType=VARCHAR}");
if (record.getAccountMerchantNo() != null) {
sql.SET("account_merchant_no = #{record.accountMerchantNo,jdbcType=VARCHAR}");
}
if (record.getRefundPayChannel() != null) {
@ -251,7 +233,7 @@ public class BsOrderRefundSqlProvider {
}
if (record.getRefundIntegral() != null) {
sql.SET("refund_integral = #{record.refundIntegral,jdbcType=INTEGER}");
sql.SET("refund_integral = #{record.refundIntegral,jdbcType=BIGINT}");
}
if (record.getRefundRemark() != null) {
@ -311,21 +293,19 @@ public class BsOrderRefundSqlProvider {
sql.UPDATE("bs_order_refund");
sql.SET("id = #{record.id,jdbcType=BIGINT}");
sql.SET("order_id = #{record.orderId,jdbcType=BIGINT}");
sql.SET("mer_id = #{record.merId,jdbcType=BIGINT}");
sql.SET("order_no = #{record.orderNo,jdbcType=VARCHAR}");
sql.SET("order_child_id = #{record.orderChildId,jdbcType=BIGINT}");
sql.SET("order_child_no = #{record.orderChildNo,jdbcType=VARCHAR}");
sql.SET("user_id = #{record.userId,jdbcType=INTEGER}");
sql.SET("user_name = #{record.userName,jdbcType=VARCHAR}");
sql.SET("user_id = #{record.userId,jdbcType=BIGINT}");
sql.SET("user_phone = #{record.userPhone,jdbcType=VARCHAR}");
sql.SET("refund_order_no = #{record.refundOrderNo,jdbcType=VARCHAR}");
sql.SET("account_merchant_num = #{record.accountMerchantNum,jdbcType=VARCHAR}");
sql.SET("account_merchant_no = #{record.accountMerchantNo,jdbcType=VARCHAR}");
sql.SET("refund_pay_channel = #{record.refundPayChannel,jdbcType=INTEGER}");
sql.SET("reufnd_pay_type = #{record.reufndPayType,jdbcType=INTEGER}");
sql.SET("refund_serial_no = #{record.refundSerialNo,jdbcType=VARCHAR}");
sql.SET("refund_pay_channel_order_no = #{record.refundPayChannelOrderNo,jdbcType=VARCHAR}");
sql.SET("refund_price = #{record.refundPrice,jdbcType=DECIMAL}");
sql.SET("refund_integral = #{record.refundIntegral,jdbcType=INTEGER}");
sql.SET("refund_integral = #{record.refundIntegral,jdbcType=BIGINT}");
sql.SET("refund_remark = #{record.refundRemark,jdbcType=VARCHAR}");
sql.SET("refund_status = #{record.refundStatus,jdbcType=INTEGER}");
sql.SET("refund_fail_reason = #{record.refundFailReason,jdbcType=VARCHAR}");
@ -348,28 +328,20 @@ public class BsOrderRefundSqlProvider {
SQL sql = new SQL();
sql.UPDATE("bs_order_refund");
if (record.getOrderId() != null) {
sql.SET("order_id = #{orderId,jdbcType=BIGINT}");
if (record.getMerId() != null) {
sql.SET("mer_id = #{merId,jdbcType=BIGINT}");
}
if (record.getOrderNo() != null) {
sql.SET("order_no = #{orderNo,jdbcType=VARCHAR}");
}
if (record.getOrderChildId() != null) {
sql.SET("order_child_id = #{orderChildId,jdbcType=BIGINT}");
}
if (record.getOrderChildNo() != null) {
sql.SET("order_child_no = #{orderChildNo,jdbcType=VARCHAR}");
}
if (record.getUserId() != null) {
sql.SET("user_id = #{userId,jdbcType=INTEGER}");
}
if (record.getUserName() != null) {
sql.SET("user_name = #{userName,jdbcType=VARCHAR}");
sql.SET("user_id = #{userId,jdbcType=BIGINT}");
}
if (record.getUserPhone() != null) {
@ -380,8 +352,8 @@ public class BsOrderRefundSqlProvider {
sql.SET("refund_order_no = #{refundOrderNo,jdbcType=VARCHAR}");
}
if (record.getAccountMerchantNum() != null) {
sql.SET("account_merchant_num = #{accountMerchantNum,jdbcType=VARCHAR}");
if (record.getAccountMerchantNo() != null) {
sql.SET("account_merchant_no = #{accountMerchantNo,jdbcType=VARCHAR}");
}
if (record.getRefundPayChannel() != null) {
@ -405,7 +377,7 @@ public class BsOrderRefundSqlProvider {
}
if (record.getRefundIntegral() != null) {
sql.SET("refund_integral = #{refundIntegral,jdbcType=INTEGER}");
sql.SET("refund_integral = #{refundIntegral,jdbcType=BIGINT}");
}
if (record.getRefundRemark() != null) {

@ -0,0 +1,537 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* bs_order_after_sales_apply
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsOrderAfterSalesApply implements Serializable {
/**
* 主键ID
*/
private Long id;
/**
* 用户id
*/
private Long userId;
/**
* 用户电话
*/
private String userPhone;
/**
* 商户id
*/
private Long merId;
/**
* 申请单号
*/
private String applyNo;
/**
* 售后类型 1退款申请 2退货申请
*/
private Integer type;
/**
* 订单号
*/
private String orderNo;
/**
* 子订单号
*/
private String childOrderNo;
/**
* 产品类型
*/
private Integer productType;
/**
* 产品id
*/
private Long productId;
/**
* 产品名称
*/
private String productName;
/**
* 产品图片
*/
private String productImg;
/**
* 产品规格id
*/
private Long productSpecId;
/**
* 产品规格名称
*/
private String productSpecName;
/**
* 产品数量
*/
private Integer productCount;
/**
* 照片
*/
private String photo;
/**
* 备注
*/
private String remarks;
/**
* 邮寄快递单号
*/
private String sendExpressNo;
/**
* 退款单号
*/
private String refundOrderNo;
/**
* 退款金额
*/
private BigDecimal refundPrice;
/**
* 退款积分金额
*/
private Long refundIntegral;
/**
* 状态 1审核中 2审核驳回 3待邮寄 4邮寄中 5完成
*/
private Integer status;
/**
* 审核备注
*/
private String auditRemarks;
/**
* 创建时间
*/
private Date createTime;
/**
* 审核时间
*/
private Date auditTime;
/**
* 邮寄时间
*/
private Date sendExpressTime;
/**
* 完成时间
*/
private Date finishTime;
/**
* 更新时间
*/
private Date updateTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserPhone() {
return userPhone;
}
public void setUserPhone(String userPhone) {
this.userPhone = userPhone;
}
public Long getMerId() {
return merId;
}
public void setMerId(Long merId) {
this.merId = merId;
}
public String getApplyNo() {
return applyNo;
}
public void setApplyNo(String applyNo) {
this.applyNo = applyNo;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getOrderNo() {
return orderNo;
}
public void setOrderNo(String orderNo) {
this.orderNo = orderNo;
}
public String getChildOrderNo() {
return childOrderNo;
}
public void setChildOrderNo(String childOrderNo) {
this.childOrderNo = childOrderNo;
}
public Integer getProductType() {
return productType;
}
public void setProductType(Integer productType) {
this.productType = productType;
}
public Long getProductId() {
return productId;
}
public void setProductId(Long productId) {
this.productId = productId;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public String getProductImg() {
return productImg;
}
public void setProductImg(String productImg) {
this.productImg = productImg;
}
public Long getProductSpecId() {
return productSpecId;
}
public void setProductSpecId(Long productSpecId) {
this.productSpecId = productSpecId;
}
public String getProductSpecName() {
return productSpecName;
}
public void setProductSpecName(String productSpecName) {
this.productSpecName = productSpecName;
}
public Integer getProductCount() {
return productCount;
}
public void setProductCount(Integer productCount) {
this.productCount = productCount;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public String getSendExpressNo() {
return sendExpressNo;
}
public void setSendExpressNo(String sendExpressNo) {
this.sendExpressNo = sendExpressNo;
}
public String getRefundOrderNo() {
return refundOrderNo;
}
public void setRefundOrderNo(String refundOrderNo) {
this.refundOrderNo = refundOrderNo;
}
public BigDecimal getRefundPrice() {
return refundPrice;
}
public void setRefundPrice(BigDecimal refundPrice) {
this.refundPrice = refundPrice;
}
public Long getRefundIntegral() {
return refundIntegral;
}
public void setRefundIntegral(Long refundIntegral) {
this.refundIntegral = refundIntegral;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getAuditRemarks() {
return auditRemarks;
}
public void setAuditRemarks(String auditRemarks) {
this.auditRemarks = auditRemarks;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getAuditTime() {
return auditTime;
}
public void setAuditTime(Date auditTime) {
this.auditTime = auditTime;
}
public Date getSendExpressTime() {
return sendExpressTime;
}
public void setSendExpressTime(Date sendExpressTime) {
this.sendExpressTime = sendExpressTime;
}
public Date getFinishTime() {
return finishTime;
}
public void setFinishTime(Date finishTime) {
this.finishTime = finishTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
BsOrderAfterSalesApply other = (BsOrderAfterSalesApply) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getApplyNo() == null ? other.getApplyNo() == null : this.getApplyNo().equals(other.getApplyNo()))
&& (this.getType() == null ? other.getType() == null : this.getType().equals(other.getType()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getChildOrderNo() == null ? other.getChildOrderNo() == null : this.getChildOrderNo().equals(other.getChildOrderNo()))
&& (this.getProductType() == null ? other.getProductType() == null : this.getProductType().equals(other.getProductType()))
&& (this.getProductId() == null ? other.getProductId() == null : this.getProductId().equals(other.getProductId()))
&& (this.getProductName() == null ? other.getProductName() == null : this.getProductName().equals(other.getProductName()))
&& (this.getProductImg() == null ? other.getProductImg() == null : this.getProductImg().equals(other.getProductImg()))
&& (this.getProductSpecId() == null ? other.getProductSpecId() == null : this.getProductSpecId().equals(other.getProductSpecId()))
&& (this.getProductSpecName() == null ? other.getProductSpecName() == null : this.getProductSpecName().equals(other.getProductSpecName()))
&& (this.getProductCount() == null ? other.getProductCount() == null : this.getProductCount().equals(other.getProductCount()))
&& (this.getPhoto() == null ? other.getPhoto() == null : this.getPhoto().equals(other.getPhoto()))
&& (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
&& (this.getSendExpressNo() == null ? other.getSendExpressNo() == null : this.getSendExpressNo().equals(other.getSendExpressNo()))
&& (this.getRefundOrderNo() == null ? other.getRefundOrderNo() == null : this.getRefundOrderNo().equals(other.getRefundOrderNo()))
&& (this.getRefundPrice() == null ? other.getRefundPrice() == null : this.getRefundPrice().equals(other.getRefundPrice()))
&& (this.getRefundIntegral() == null ? other.getRefundIntegral() == null : this.getRefundIntegral().equals(other.getRefundIntegral()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getAuditRemarks() == null ? other.getAuditRemarks() == null : this.getAuditRemarks().equals(other.getAuditRemarks()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getAuditTime() == null ? other.getAuditTime() == null : this.getAuditTime().equals(other.getAuditTime()))
&& (this.getSendExpressTime() == null ? other.getSendExpressTime() == null : this.getSendExpressTime().equals(other.getSendExpressTime()))
&& (this.getFinishTime() == null ? other.getFinishTime() == null : this.getFinishTime().equals(other.getFinishTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getApplyNo() == null) ? 0 : getApplyNo().hashCode());
result = prime * result + ((getType() == null) ? 0 : getType().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getChildOrderNo() == null) ? 0 : getChildOrderNo().hashCode());
result = prime * result + ((getProductType() == null) ? 0 : getProductType().hashCode());
result = prime * result + ((getProductId() == null) ? 0 : getProductId().hashCode());
result = prime * result + ((getProductName() == null) ? 0 : getProductName().hashCode());
result = prime * result + ((getProductImg() == null) ? 0 : getProductImg().hashCode());
result = prime * result + ((getProductSpecId() == null) ? 0 : getProductSpecId().hashCode());
result = prime * result + ((getProductSpecName() == null) ? 0 : getProductSpecName().hashCode());
result = prime * result + ((getProductCount() == null) ? 0 : getProductCount().hashCode());
result = prime * result + ((getPhoto() == null) ? 0 : getPhoto().hashCode());
result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
result = prime * result + ((getSendExpressNo() == null) ? 0 : getSendExpressNo().hashCode());
result = prime * result + ((getRefundOrderNo() == null) ? 0 : getRefundOrderNo().hashCode());
result = prime * result + ((getRefundPrice() == null) ? 0 : getRefundPrice().hashCode());
result = prime * result + ((getRefundIntegral() == null) ? 0 : getRefundIntegral().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getAuditRemarks() == null) ? 0 : getAuditRemarks().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getAuditTime() == null) ? 0 : getAuditTime().hashCode());
result = prime * result + ((getSendExpressTime() == null) ? 0 : getSendExpressTime().hashCode());
result = prime * result + ((getFinishTime() == null) ? 0 : getFinishTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", userId=").append(userId);
sb.append(", userPhone=").append(userPhone);
sb.append(", merId=").append(merId);
sb.append(", applyNo=").append(applyNo);
sb.append(", type=").append(type);
sb.append(", orderNo=").append(orderNo);
sb.append(", childOrderNo=").append(childOrderNo);
sb.append(", productType=").append(productType);
sb.append(", productId=").append(productId);
sb.append(", productName=").append(productName);
sb.append(", productImg=").append(productImg);
sb.append(", productSpecId=").append(productSpecId);
sb.append(", productSpecName=").append(productSpecName);
sb.append(", productCount=").append(productCount);
sb.append(", photo=").append(photo);
sb.append(", remarks=").append(remarks);
sb.append(", sendExpressNo=").append(sendExpressNo);
sb.append(", refundOrderNo=").append(refundOrderNo);
sb.append(", refundPrice=").append(refundPrice);
sb.append(", refundIntegral=").append(refundIntegral);
sb.append(", status=").append(status);
sb.append(", auditRemarks=").append(auditRemarks);
sb.append(", createTime=").append(createTime);
sb.append(", auditTime=").append(auditTime);
sb.append(", sendExpressTime=").append(sendExpressTime);
sb.append(", finishTime=").append(finishTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -0,0 +1,232 @@
package com.hfkj.entity;
import java.io.Serializable;
import java.util.Date;
/**
* bs_order_after_sales_op_record
* @author
*/
/**
*
* 代码由工具生成
*
**/
public class BsOrderAfterSalesOpRecord implements Serializable {
/**
* 主键ID
*/
private Long id;
/**
* 申请单号
*/
private String applyNo;
/**
* 状态 1审核中 2审核驳回 3待邮寄 4邮寄中 5完成
*/
private Integer status;
/**
* 照片
*/
private String photo;
/**
* 备注
*/
private String remarks;
/**
* 操作人类型 1系统人员 2用户
*/
private Integer opUserType;
/**
* 操作人id
*/
private Long opUserId;
/**
* 操作人名称
*/
private String opUserName;
/**
* 创建时间
*/
private Date createTime;
private String ext1;
private String ext2;
private String ext3;
private static final long serialVersionUID = 1L;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getApplyNo() {
return applyNo;
}
public void setApplyNo(String applyNo) {
this.applyNo = applyNo;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public String getRemarks() {
return remarks;
}
public void setRemarks(String remarks) {
this.remarks = remarks;
}
public Integer getOpUserType() {
return opUserType;
}
public void setOpUserType(Integer opUserType) {
this.opUserType = opUserType;
}
public Long getOpUserId() {
return opUserId;
}
public void setOpUserId(Long opUserId) {
this.opUserId = opUserId;
}
public String getOpUserName() {
return opUserName;
}
public void setOpUserName(String opUserName) {
this.opUserName = opUserName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public String getExt1() {
return ext1;
}
public void setExt1(String ext1) {
this.ext1 = ext1;
}
public String getExt2() {
return ext2;
}
public void setExt2(String ext2) {
this.ext2 = ext2;
}
public String getExt3() {
return ext3;
}
public void setExt3(String ext3) {
this.ext3 = ext3;
}
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
BsOrderAfterSalesOpRecord other = (BsOrderAfterSalesOpRecord) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getApplyNo() == null ? other.getApplyNo() == null : this.getApplyNo().equals(other.getApplyNo()))
&& (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
&& (this.getPhoto() == null ? other.getPhoto() == null : this.getPhoto().equals(other.getPhoto()))
&& (this.getRemarks() == null ? other.getRemarks() == null : this.getRemarks().equals(other.getRemarks()))
&& (this.getOpUserType() == null ? other.getOpUserType() == null : this.getOpUserType().equals(other.getOpUserType()))
&& (this.getOpUserId() == null ? other.getOpUserId() == null : this.getOpUserId().equals(other.getOpUserId()))
&& (this.getOpUserName() == null ? other.getOpUserName() == null : this.getOpUserName().equals(other.getOpUserName()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getExt1() == null ? other.getExt1() == null : this.getExt1().equals(other.getExt1()))
&& (this.getExt2() == null ? other.getExt2() == null : this.getExt2().equals(other.getExt2()))
&& (this.getExt3() == null ? other.getExt3() == null : this.getExt3().equals(other.getExt3()));
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getApplyNo() == null) ? 0 : getApplyNo().hashCode());
result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
result = prime * result + ((getPhoto() == null) ? 0 : getPhoto().hashCode());
result = prime * result + ((getRemarks() == null) ? 0 : getRemarks().hashCode());
result = prime * result + ((getOpUserType() == null) ? 0 : getOpUserType().hashCode());
result = prime * result + ((getOpUserId() == null) ? 0 : getOpUserId().hashCode());
result = prime * result + ((getOpUserName() == null) ? 0 : getOpUserName().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getExt1() == null) ? 0 : getExt1().hashCode());
result = prime * result + ((getExt2() == null) ? 0 : getExt2().hashCode());
result = prime * result + ((getExt3() == null) ? 0 : getExt3().hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(getClass().getSimpleName());
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", applyNo=").append(applyNo);
sb.append(", status=").append(status);
sb.append(", photo=").append(photo);
sb.append(", remarks=").append(remarks);
sb.append(", opUserType=").append(opUserType);
sb.append(", opUserId=").append(opUserId);
sb.append(", opUserName=").append(opUserName);
sb.append(", createTime=").append(createTime);
sb.append(", ext1=").append(ext1);
sb.append(", ext2=").append(ext2);
sb.append(", ext3=").append(ext3);
sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]");
return sb.toString();
}
}

@ -20,20 +20,15 @@ public class BsOrderRefund implements Serializable {
private Long id;
/**
* 交易订单id
* 商户id
*/
private Long orderId;
private Long merId;
/**
* 交易订单号
*/
private String orderNo;
/**
* 子订单id
*/
private Long orderChildId;
/**
* 子订单号
*/
@ -42,12 +37,7 @@ public class BsOrderRefund implements Serializable {
/**
* 用户id
*/
private Integer userId;
/**
* 用户名称
*/
private String userName;
private Long userId;
/**
* 用户手机号
@ -62,7 +52,7 @@ public class BsOrderRefund implements Serializable {
/**
* 退款入账商户号
*/
private String accountMerchantNum;
private String accountMerchantNo;
/**
* 支付渠道 1惠支付 2微信合作商 3贵州银行
@ -92,7 +82,7 @@ public class BsOrderRefund implements Serializable {
/**
* 退款积分
*/
private Integer refundIntegral;
private Long refundIntegral;
/**
* 退款备注
@ -158,12 +148,12 @@ public class BsOrderRefund implements Serializable {
this.id = id;
}
public Long getOrderId() {
return orderId;
public Long getMerId() {
return merId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
public void setMerId(Long merId) {
this.merId = merId;
}
public String getOrderNo() {
@ -174,14 +164,6 @@ public class BsOrderRefund implements Serializable {
this.orderNo = orderNo;
}
public Long getOrderChildId() {
return orderChildId;
}
public void setOrderChildId(Long orderChildId) {
this.orderChildId = orderChildId;
}
public String getOrderChildNo() {
return orderChildNo;
}
@ -190,22 +172,14 @@ public class BsOrderRefund implements Serializable {
this.orderChildNo = orderChildNo;
}
public Integer getUserId() {
public Long getUserId() {
return userId;
}
public void setUserId(Integer userId) {
public void setUserId(Long userId) {
this.userId = userId;
}
public String getUserName() {
return userName;
}
public void setUserName(String userName) {
this.userName = userName;
}
public String getUserPhone() {
return userPhone;
}
@ -222,12 +196,12 @@ public class BsOrderRefund implements Serializable {
this.refundOrderNo = refundOrderNo;
}
public String getAccountMerchantNum() {
return accountMerchantNum;
public String getAccountMerchantNo() {
return accountMerchantNo;
}
public void setAccountMerchantNum(String accountMerchantNum) {
this.accountMerchantNum = accountMerchantNum;
public void setAccountMerchantNo(String accountMerchantNo) {
this.accountMerchantNo = accountMerchantNo;
}
public Integer getRefundPayChannel() {
@ -270,11 +244,11 @@ public class BsOrderRefund implements Serializable {
this.refundPrice = refundPrice;
}
public Integer getRefundIntegral() {
public Long getRefundIntegral() {
return refundIntegral;
}
public void setRefundIntegral(Integer refundIntegral) {
public void setRefundIntegral(Long refundIntegral) {
this.refundIntegral = refundIntegral;
}
@ -387,15 +361,13 @@ public class BsOrderRefund implements Serializable {
}
BsOrderRefund other = (BsOrderRefund) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (this.getOrderId() == null ? other.getOrderId() == null : this.getOrderId().equals(other.getOrderId()))
&& (this.getMerId() == null ? other.getMerId() == null : this.getMerId().equals(other.getMerId()))
&& (this.getOrderNo() == null ? other.getOrderNo() == null : this.getOrderNo().equals(other.getOrderNo()))
&& (this.getOrderChildId() == null ? other.getOrderChildId() == null : this.getOrderChildId().equals(other.getOrderChildId()))
&& (this.getOrderChildNo() == null ? other.getOrderChildNo() == null : this.getOrderChildNo().equals(other.getOrderChildNo()))
&& (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
&& (this.getUserName() == null ? other.getUserName() == null : this.getUserName().equals(other.getUserName()))
&& (this.getUserPhone() == null ? other.getUserPhone() == null : this.getUserPhone().equals(other.getUserPhone()))
&& (this.getRefundOrderNo() == null ? other.getRefundOrderNo() == null : this.getRefundOrderNo().equals(other.getRefundOrderNo()))
&& (this.getAccountMerchantNum() == null ? other.getAccountMerchantNum() == null : this.getAccountMerchantNum().equals(other.getAccountMerchantNum()))
&& (this.getAccountMerchantNo() == null ? other.getAccountMerchantNo() == null : this.getAccountMerchantNo().equals(other.getAccountMerchantNo()))
&& (this.getRefundPayChannel() == null ? other.getRefundPayChannel() == null : this.getRefundPayChannel().equals(other.getRefundPayChannel()))
&& (this.getReufndPayType() == null ? other.getReufndPayType() == null : this.getReufndPayType().equals(other.getReufndPayType()))
&& (this.getRefundSerialNo() == null ? other.getRefundSerialNo() == null : this.getRefundSerialNo().equals(other.getRefundSerialNo()))
@ -421,15 +393,13 @@ public class BsOrderRefund implements Serializable {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + ((getOrderId() == null) ? 0 : getOrderId().hashCode());
result = prime * result + ((getMerId() == null) ? 0 : getMerId().hashCode());
result = prime * result + ((getOrderNo() == null) ? 0 : getOrderNo().hashCode());
result = prime * result + ((getOrderChildId() == null) ? 0 : getOrderChildId().hashCode());
result = prime * result + ((getOrderChildNo() == null) ? 0 : getOrderChildNo().hashCode());
result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
result = prime * result + ((getUserName() == null) ? 0 : getUserName().hashCode());
result = prime * result + ((getUserPhone() == null) ? 0 : getUserPhone().hashCode());
result = prime * result + ((getRefundOrderNo() == null) ? 0 : getRefundOrderNo().hashCode());
result = prime * result + ((getAccountMerchantNum() == null) ? 0 : getAccountMerchantNum().hashCode());
result = prime * result + ((getAccountMerchantNo() == null) ? 0 : getAccountMerchantNo().hashCode());
result = prime * result + ((getRefundPayChannel() == null) ? 0 : getRefundPayChannel().hashCode());
result = prime * result + ((getReufndPayType() == null) ? 0 : getReufndPayType().hashCode());
result = prime * result + ((getRefundSerialNo() == null) ? 0 : getRefundSerialNo().hashCode());
@ -458,15 +428,13 @@ public class BsOrderRefund implements Serializable {
sb.append(" [");
sb.append("Hash = ").append(hashCode());
sb.append(", id=").append(id);
sb.append(", orderId=").append(orderId);
sb.append(", merId=").append(merId);
sb.append(", orderNo=").append(orderNo);
sb.append(", orderChildId=").append(orderChildId);
sb.append(", orderChildNo=").append(orderChildNo);
sb.append(", userId=").append(userId);
sb.append(", userName=").append(userName);
sb.append(", userPhone=").append(userPhone);
sb.append(", refundOrderNo=").append(refundOrderNo);
sb.append(", accountMerchantNum=").append(accountMerchantNum);
sb.append(", accountMerchantNo=").append(accountMerchantNo);
sb.append(", refundPayChannel=").append(refundPayChannel);
sb.append(", reufndPayType=").append(reufndPayType);
sb.append(", refundSerialNo=").append(refundSerialNo);

@ -186,63 +186,63 @@ public class BsOrderRefundExample {
return (Criteria) this;
}
public Criteria andOrderIdIsNull() {
addCriterion("order_id is null");
public Criteria andMerIdIsNull() {
addCriterion("mer_id is null");
return (Criteria) this;
}
public Criteria andOrderIdIsNotNull() {
addCriterion("order_id is not null");
public Criteria andMerIdIsNotNull() {
addCriterion("mer_id is not null");
return (Criteria) this;
}
public Criteria andOrderIdEqualTo(Long value) {
addCriterion("order_id =", value, "orderId");
public Criteria andMerIdEqualTo(Long value) {
addCriterion("mer_id =", value, "merId");
return (Criteria) this;
}
public Criteria andOrderIdNotEqualTo(Long value) {
addCriterion("order_id <>", value, "orderId");
public Criteria andMerIdNotEqualTo(Long value) {
addCriterion("mer_id <>", value, "merId");
return (Criteria) this;
}
public Criteria andOrderIdGreaterThan(Long value) {
addCriterion("order_id >", value, "orderId");
public Criteria andMerIdGreaterThan(Long value) {
addCriterion("mer_id >", value, "merId");
return (Criteria) this;
}
public Criteria andOrderIdGreaterThanOrEqualTo(Long value) {
addCriterion("order_id >=", value, "orderId");
public Criteria andMerIdGreaterThanOrEqualTo(Long value) {
addCriterion("mer_id >=", value, "merId");
return (Criteria) this;
}
public Criteria andOrderIdLessThan(Long value) {
addCriterion("order_id <", value, "orderId");
public Criteria andMerIdLessThan(Long value) {
addCriterion("mer_id <", value, "merId");
return (Criteria) this;
}
public Criteria andOrderIdLessThanOrEqualTo(Long value) {
addCriterion("order_id <=", value, "orderId");
public Criteria andMerIdLessThanOrEqualTo(Long value) {
addCriterion("mer_id <=", value, "merId");
return (Criteria) this;
}
public Criteria andOrderIdIn(List<Long> values) {
addCriterion("order_id in", values, "orderId");
public Criteria andMerIdIn(List<Long> values) {
addCriterion("mer_id in", values, "merId");
return (Criteria) this;
}
public Criteria andOrderIdNotIn(List<Long> values) {
addCriterion("order_id not in", values, "orderId");
public Criteria andMerIdNotIn(List<Long> values) {
addCriterion("mer_id not in", values, "merId");
return (Criteria) this;
}
public Criteria andOrderIdBetween(Long value1, Long value2) {
addCriterion("order_id between", value1, value2, "orderId");
public Criteria andMerIdBetween(Long value1, Long value2) {
addCriterion("mer_id between", value1, value2, "merId");
return (Criteria) this;
}
public Criteria andOrderIdNotBetween(Long value1, Long value2) {
addCriterion("order_id not between", value1, value2, "orderId");
public Criteria andMerIdNotBetween(Long value1, Long value2) {
addCriterion("mer_id not between", value1, value2, "merId");
return (Criteria) this;
}
@ -316,66 +316,6 @@ public class BsOrderRefundExample {
return (Criteria) this;
}
public Criteria andOrderChildIdIsNull() {
addCriterion("order_child_id is null");
return (Criteria) this;
}
public Criteria andOrderChildIdIsNotNull() {
addCriterion("order_child_id is not null");
return (Criteria) this;
}
public Criteria andOrderChildIdEqualTo(Long value) {
addCriterion("order_child_id =", value, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdNotEqualTo(Long value) {
addCriterion("order_child_id <>", value, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdGreaterThan(Long value) {
addCriterion("order_child_id >", value, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdGreaterThanOrEqualTo(Long value) {
addCriterion("order_child_id >=", value, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdLessThan(Long value) {
addCriterion("order_child_id <", value, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdLessThanOrEqualTo(Long value) {
addCriterion("order_child_id <=", value, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdIn(List<Long> values) {
addCriterion("order_child_id in", values, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdNotIn(List<Long> values) {
addCriterion("order_child_id not in", values, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdBetween(Long value1, Long value2) {
addCriterion("order_child_id between", value1, value2, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildIdNotBetween(Long value1, Long value2) {
addCriterion("order_child_id not between", value1, value2, "orderChildId");
return (Criteria) this;
}
public Criteria andOrderChildNoIsNull() {
addCriterion("order_child_no is null");
return (Criteria) this;
@ -456,126 +396,56 @@ public class BsOrderRefundExample {
return (Criteria) this;
}
public Criteria andUserIdEqualTo(Integer value) {
public Criteria andUserIdEqualTo(Long value) {
addCriterion("user_id =", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotEqualTo(Integer value) {
public Criteria andUserIdNotEqualTo(Long value) {
addCriterion("user_id <>", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThan(Integer value) {
public Criteria andUserIdGreaterThan(Long value) {
addCriterion("user_id >", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdGreaterThanOrEqualTo(Integer value) {
public Criteria andUserIdGreaterThanOrEqualTo(Long value) {
addCriterion("user_id >=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThan(Integer value) {
public Criteria andUserIdLessThan(Long value) {
addCriterion("user_id <", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdLessThanOrEqualTo(Integer value) {
public Criteria andUserIdLessThanOrEqualTo(Long value) {
addCriterion("user_id <=", value, "userId");
return (Criteria) this;
}
public Criteria andUserIdIn(List<Integer> values) {
public Criteria andUserIdIn(List<Long> values) {
addCriterion("user_id in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotIn(List<Integer> values) {
public Criteria andUserIdNotIn(List<Long> values) {
addCriterion("user_id not in", values, "userId");
return (Criteria) this;
}
public Criteria andUserIdBetween(Integer value1, Integer value2) {
public Criteria andUserIdBetween(Long value1, Long value2) {
addCriterion("user_id between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserIdNotBetween(Integer value1, Integer value2) {
public Criteria andUserIdNotBetween(Long value1, Long value2) {
addCriterion("user_id not between", value1, value2, "userId");
return (Criteria) this;
}
public Criteria andUserNameIsNull() {
addCriterion("user_name is null");
return (Criteria) this;
}
public Criteria andUserNameIsNotNull() {
addCriterion("user_name is not null");
return (Criteria) this;
}
public Criteria andUserNameEqualTo(String value) {
addCriterion("user_name =", value, "userName");
return (Criteria) this;
}
public Criteria andUserNameNotEqualTo(String value) {
addCriterion("user_name <>", value, "userName");
return (Criteria) this;
}
public Criteria andUserNameGreaterThan(String value) {
addCriterion("user_name >", value, "userName");
return (Criteria) this;
}
public Criteria andUserNameGreaterThanOrEqualTo(String value) {
addCriterion("user_name >=", value, "userName");
return (Criteria) this;
}
public Criteria andUserNameLessThan(String value) {
addCriterion("user_name <", value, "userName");
return (Criteria) this;
}
public Criteria andUserNameLessThanOrEqualTo(String value) {
addCriterion("user_name <=", value, "userName");
return (Criteria) this;
}
public Criteria andUserNameLike(String value) {
addCriterion("user_name like", value, "userName");
return (Criteria) this;
}
public Criteria andUserNameNotLike(String value) {
addCriterion("user_name not like", value, "userName");
return (Criteria) this;
}
public Criteria andUserNameIn(List<String> values) {
addCriterion("user_name in", values, "userName");
return (Criteria) this;
}
public Criteria andUserNameNotIn(List<String> values) {
addCriterion("user_name not in", values, "userName");
return (Criteria) this;
}
public Criteria andUserNameBetween(String value1, String value2) {
addCriterion("user_name between", value1, value2, "userName");
return (Criteria) this;
}
public Criteria andUserNameNotBetween(String value1, String value2) {
addCriterion("user_name not between", value1, value2, "userName");
return (Criteria) this;
}
public Criteria andUserPhoneIsNull() {
addCriterion("user_phone is null");
return (Criteria) this;
@ -716,73 +586,73 @@ public class BsOrderRefundExample {
return (Criteria) this;
}
public Criteria andAccountMerchantNumIsNull() {
addCriterion("account_merchant_num is null");
public Criteria andAccountMerchantNoIsNull() {
addCriterion("account_merchant_no is null");
return (Criteria) this;
}
public Criteria andAccountMerchantNumIsNotNull() {
addCriterion("account_merchant_num is not null");
public Criteria andAccountMerchantNoIsNotNull() {
addCriterion("account_merchant_no is not null");
return (Criteria) this;
}
public Criteria andAccountMerchantNumEqualTo(String value) {
addCriterion("account_merchant_num =", value, "accountMerchantNum");
public Criteria andAccountMerchantNoEqualTo(String value) {
addCriterion("account_merchant_no =", value, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumNotEqualTo(String value) {
addCriterion("account_merchant_num <>", value, "accountMerchantNum");
public Criteria andAccountMerchantNoNotEqualTo(String value) {
addCriterion("account_merchant_no <>", value, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumGreaterThan(String value) {
addCriterion("account_merchant_num >", value, "accountMerchantNum");
public Criteria andAccountMerchantNoGreaterThan(String value) {
addCriterion("account_merchant_no >", value, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumGreaterThanOrEqualTo(String value) {
addCriterion("account_merchant_num >=", value, "accountMerchantNum");
public Criteria andAccountMerchantNoGreaterThanOrEqualTo(String value) {
addCriterion("account_merchant_no >=", value, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumLessThan(String value) {
addCriterion("account_merchant_num <", value, "accountMerchantNum");
public Criteria andAccountMerchantNoLessThan(String value) {
addCriterion("account_merchant_no <", value, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumLessThanOrEqualTo(String value) {
addCriterion("account_merchant_num <=", value, "accountMerchantNum");
public Criteria andAccountMerchantNoLessThanOrEqualTo(String value) {
addCriterion("account_merchant_no <=", value, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumLike(String value) {
addCriterion("account_merchant_num like", value, "accountMerchantNum");
public Criteria andAccountMerchantNoLike(String value) {
addCriterion("account_merchant_no like", value, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumNotLike(String value) {
addCriterion("account_merchant_num not like", value, "accountMerchantNum");
public Criteria andAccountMerchantNoNotLike(String value) {
addCriterion("account_merchant_no not like", value, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumIn(List<String> values) {
addCriterion("account_merchant_num in", values, "accountMerchantNum");
public Criteria andAccountMerchantNoIn(List<String> values) {
addCriterion("account_merchant_no in", values, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumNotIn(List<String> values) {
addCriterion("account_merchant_num not in", values, "accountMerchantNum");
public Criteria andAccountMerchantNoNotIn(List<String> values) {
addCriterion("account_merchant_no not in", values, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumBetween(String value1, String value2) {
addCriterion("account_merchant_num between", value1, value2, "accountMerchantNum");
public Criteria andAccountMerchantNoBetween(String value1, String value2) {
addCriterion("account_merchant_no between", value1, value2, "accountMerchantNo");
return (Criteria) this;
}
public Criteria andAccountMerchantNumNotBetween(String value1, String value2) {
addCriterion("account_merchant_num not between", value1, value2, "accountMerchantNum");
public Criteria andAccountMerchantNoNotBetween(String value1, String value2) {
addCriterion("account_merchant_no not between", value1, value2, "accountMerchantNo");
return (Criteria) this;
}
@ -1116,52 +986,52 @@ public class BsOrderRefundExample {
return (Criteria) this;
}
public Criteria andRefundIntegralEqualTo(Integer value) {
public Criteria andRefundIntegralEqualTo(Long value) {
addCriterion("refund_integral =", value, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralNotEqualTo(Integer value) {
public Criteria andRefundIntegralNotEqualTo(Long value) {
addCriterion("refund_integral <>", value, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralGreaterThan(Integer value) {
public Criteria andRefundIntegralGreaterThan(Long value) {
addCriterion("refund_integral >", value, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralGreaterThanOrEqualTo(Integer value) {
public Criteria andRefundIntegralGreaterThanOrEqualTo(Long value) {
addCriterion("refund_integral >=", value, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralLessThan(Integer value) {
public Criteria andRefundIntegralLessThan(Long value) {
addCriterion("refund_integral <", value, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralLessThanOrEqualTo(Integer value) {
public Criteria andRefundIntegralLessThanOrEqualTo(Long value) {
addCriterion("refund_integral <=", value, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralIn(List<Integer> values) {
public Criteria andRefundIntegralIn(List<Long> values) {
addCriterion("refund_integral in", values, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralNotIn(List<Integer> values) {
public Criteria andRefundIntegralNotIn(List<Long> values) {
addCriterion("refund_integral not in", values, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralBetween(Integer value1, Integer value2) {
public Criteria andRefundIntegralBetween(Long value1, Long value2) {
addCriterion("refund_integral between", value1, value2, "refundIntegral");
return (Criteria) this;
}
public Criteria andRefundIntegralNotBetween(Integer value1, Integer value2) {
public Criteria andRefundIntegralNotBetween(Long value1, Long value2) {
addCriterion("refund_integral not between", value1, value2, "refundIntegral");
return (Criteria) this;
}

@ -0,0 +1,76 @@
package com.hfkj.service.order;
import com.hfkj.entity.BsOrderAfterSalesApply;
import com.hfkj.sysenum.order.OrderAfterSalesApplyTypeEnum;
import java.util.List;
import java.util.Map;
/**
* 订单售后申请
* @className: BsOrderAfterSalesApplyService
* @author: HuRui
* @date: 2024/5/15
**/
public interface BsOrderAfterSalesApplyService {
/**
* 编辑数据
* @param data 数据
*/
void editData(BsOrderAfterSalesApply data);
/**
* 创建售后申请
* @param applyType 申请类型
* @param childOrderNo 子订单号
* @param productCount 产品数量
* @param photo 图片
* @param remarks 备注
*/
void createApply(OrderAfterSalesApplyTypeEnum applyType, String childOrderNo, Integer productCount, String photo, String remarks);
/**
* 审核
* @param applyNo 申请单号
* @param applyStatus 审核状态 true:通过 false驳回
* @param remarks 备注
* @param opUserId 操作人
*/
void audit(String applyNo, Boolean applyStatus, String remarks, Long opUserId);
/**
* 邮寄
* @param applyNo 申请单号
* @param sendExpressNo 快递单号
*/
void sendExpress(String applyNo, String sendExpressNo);
/**
* 完成
* @param applyNo 申请单号
*/
void finish(String applyNo, Long opUserId);
/**
* 查询详情
* @param applyNo
* @return
*/
BsOrderAfterSalesApply getDetailByApplyNo(String applyNo);
/**
* 查询详情
* @param childOrderNo
* @return
*/
BsOrderAfterSalesApply getDetailByChildOrderNo(String childOrderNo);
/**
* 查询列表
* @param param
* @return
*/
List<BsOrderAfterSalesApply> getApplyList(Map<String,Object> param);
}

@ -0,0 +1,27 @@
package com.hfkj.service.order;
import com.hfkj.entity.BsOrderAfterSalesOpRecord;
import java.util.List;
/**
* @className: BsOrderAfterSalesOpRecordService
* @author: HuRui
* @date: 2024/5/15
**/
public interface BsOrderAfterSalesOpRecordService {
/**
* 创建记录
* @param data
*/
void create(BsOrderAfterSalesOpRecord data);
/**
* 查询操作列表
* @param applyNo
* @return
*/
List<BsOrderAfterSalesOpRecord> getRecordList(String applyNo);
}

@ -19,6 +19,12 @@ public interface BsOrderChildService {
*/
void editData(BsOrderChild data);
/**
* 查询详情
* @param childOrderNo 子订单号
* @return
*/
OrderChildModel getDetail(String childOrderNo);
/**
* 查询子订单

@ -0,0 +1,49 @@
package com.hfkj.service.order;
import com.hfkj.entity.BsOrderRefund;
import com.hfkj.model.order.OrderModel;
import java.util.List;
import java.util.Map;
/**
* @className: BsOrderRefundService
* @author: HuRui
* @date: 2024/5/14
**/
public interface BsOrderRefundService {
/**
* 编辑数据
* @param data
*/
void editData(BsOrderRefund data);
/**
* 退款金额
* @return
*/
boolean refundMoney(BsOrderRefund orderRefund);
/**
* 交易订单退款
* @param orderNo
* @return
*/
OrderModel tradeOrderRefund(String orderNo, String remark);
/**
* 交易子订单退款
* @param childOrderNo 子订单号
* @param productCount 退款产品数量
* @return
*/
BsOrderRefund tradeOrderChildRefund(String childOrderNo, Integer productCount, String remark);
/**
* 查询退款列表
* @param param
* @return
*/
List<BsOrderRefund> getRefundList(Map<String,Object> param);
}

@ -20,6 +20,13 @@ public interface BsOrderService {
*/
BsOrder editData(BsOrder order);
/**
* 更新缓存
* @param order
* @return
*/
OrderModel cache(OrderModel order);
/**
* 创建订单
* @param order 订单

@ -0,0 +1,292 @@
package com.hfkj.service.order.impl;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.security.UserCenter;
import com.hfkj.common.utils.RandomUtils;
import com.hfkj.dao.BsOrderAfterSalesApplyMapper;
import com.hfkj.entity.*;
import com.hfkj.model.UserSessionObject;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.service.SecUserService;
import com.hfkj.service.order.*;
import com.hfkj.sysenum.order.OrderAfterSalesApplyStatusEnum;
import com.hfkj.sysenum.order.OrderAfterSalesApplyTypeEnum;
import com.hfkj.sysenum.order.OrderChildStatusEnum;
import com.hfkj.sysenum.order.OrderRefundStatusEnum;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @className: BsOrderAfterSalesApplyServiceImpl
* @author: HuRui
* @date: 2024/5/15
**/
@Service("orderAfterSalesApplyService")
public class BsOrderAfterSalesApplyServiceImpl implements BsOrderAfterSalesApplyService {
@Resource
private BsOrderAfterSalesApplyMapper orderAfterSalesApplyMapper;
@Resource
private BsOrderAfterSalesOpRecordService orderAfterSalesOpRecordService;
@Resource
private BsOrderChildService orderChildService;
@Resource
private BsOrderService orderService;
@Resource
private BsOrderRefundService orderRefundService;
@Resource
private SecUserService secUserService;
@Override
public void editData(BsOrderAfterSalesApply data) {
data.setUpdateTime(new Date());
if (data.getId() == null) {
data.setCreateTime(new Date());
orderAfterSalesApplyMapper.insert(data);
} else {
orderAfterSalesApplyMapper.updateByPrimaryKey(data);
}
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class})
public void createApply(OrderAfterSalesApplyTypeEnum applyType, String childOrderNo, Integer productCount, String photo, String remarks) {
// 查询子订单
OrderChildModel orderChild = orderChildService.getDetail(childOrderNo);
if (orderChild == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, "");
}
if (!orderChild.getStatus().equals(OrderChildStatusEnum.status2.getCode())
&& !orderChild.getStatus().equals(OrderChildStatusEnum.status3.getCode()) ) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "订单状态错误,无法提交");
}
// 查询订单
BsOrder order = orderService.getOrder(orderChild.getOrderNo());
if (order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的订单");
}
// 查询子订单申请记录
BsOrderAfterSalesApply record = getDetailByChildOrderNo(childOrderNo);
if (record != null
&& (!record.getStatus().equals(OrderAfterSalesApplyStatusEnum.type5.getCode()) && !record.getStatus().equals(OrderAfterSalesApplyStatusEnum.type2.getCode()))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "此订单已提交售后,请勿重复提交");
}
BsOrderAfterSalesApply apply = new BsOrderAfterSalesApply();
apply.setType(applyType.getCode());
apply.setUserId(order.getUserId());
apply.setUserPhone(order.getUserPhone());
apply.setMerId(orderChild.getMerId());
// 子订单编号 + 5位随机数
apply.setApplyNo(orderChild.getChildOrderNo() + RandomUtils.number(5,false));
apply.setOrderNo(orderChild.getOrderNo());
apply.setChildOrderNo(orderChild.getChildOrderNo());
apply.setProductType(orderChild.getProductType());
apply.setProductId(orderChild.getProductId());
apply.setProductName(orderChild.getProductName());
apply.setProductImg(orderChild.getProductImg());
apply.setProductSpecId(orderChild.getProductSpecId());
apply.setProductSpecName(orderChild.getProductSpecName());
apply.setProductCount(productCount);
apply.setPhoto(photo);
apply.setRemarks(remarks);
apply.setStatus(OrderAfterSalesApplyStatusEnum.type1.getCode());
editData(apply);
// 操作记录
BsOrderAfterSalesOpRecord opRecord = new BsOrderAfterSalesOpRecord();
opRecord.setApplyNo(apply.getApplyNo());
opRecord.setStatus(OrderAfterSalesApplyStatusEnum.type1.getCode());
opRecord.setPhoto(photo);
opRecord.setRemarks(remarks);
opRecord.setOpUserType(2);
opRecord.setOpUserId(apply.getUserId());
opRecord.setOpUserName(apply.getUserPhone());
orderAfterSalesOpRecordService.create(opRecord);
}
@Override
public void audit(String applyNo, Boolean applyStatus, String remarks, Long opUserId) {
// 查询申请
BsOrderAfterSalesApply apply = getDetailByApplyNo(applyNo);
if (apply == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的申请");
}
if (OrderAfterSalesApplyStatusEnum.type1.getCode() != apply.getStatus()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "审核失败!当前申请不处于审核状态");
}
SecUser secUser = secUserService.getDetail(opUserId);
if (secUser == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的操作人");
}
apply.setAuditTime(new Date());
apply.setAuditRemarks(remarks);
if (applyStatus.equals(true)) {
if (OrderAfterSalesApplyTypeEnum.type1.getCode() == apply.getType()) {
// 退款
BsOrderRefund orderRefund = orderRefundService.tradeOrderChildRefund(apply.getChildOrderNo(), apply.getProductCount(), null);
if (orderRefund.getRefundStatus().equals(OrderRefundStatusEnum.status2.getCode())) {
apply.setRefundOrderNo(orderRefund.getRefundOrderNo());
apply.setRefundPrice(orderRefund.getRefundPrice());
apply.setRefundIntegral(orderRefund.getRefundIntegral());
apply.setStatus(OrderAfterSalesApplyStatusEnum.type5.getCode());
apply.setFinishTime(new Date());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!" + orderRefund.getRefundFailReason());
}
} else if (OrderAfterSalesApplyTypeEnum.type2.getCode() == apply.getType()) {
apply.setStatus(OrderAfterSalesApplyStatusEnum.type3.getCode());
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知申请类型");
}
} else {
apply.setStatus(OrderAfterSalesApplyStatusEnum.type2.getCode());
}
// 操作记录
BsOrderAfterSalesOpRecord opRecord = new BsOrderAfterSalesOpRecord();
opRecord.setApplyNo(apply.getApplyNo());
opRecord.setStatus(apply.getStatus());
opRecord.setRemarks(remarks);
opRecord.setOpUserType(1);
opRecord.setOpUserId(secUser.getId());
opRecord.setOpUserName(secUser.getUserName());
orderAfterSalesOpRecordService.create(opRecord);
editData(apply);
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class})
public void sendExpress(String applyNo, String sendExpressNo) {
// 查询申请
BsOrderAfterSalesApply apply = getDetailByApplyNo(applyNo);
if (apply == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的申请");
}
if (OrderAfterSalesApplyStatusEnum.type3.getCode() != apply.getStatus()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "审核失败!当前申请不处于待邮寄中");
}
apply.setStatus(OrderAfterSalesApplyStatusEnum.type4.getCode());
apply.setSendExpressNo(sendExpressNo);
apply.setSendExpressTime(new Date());
editData(apply);
// 操作记录
BsOrderAfterSalesOpRecord opRecord = new BsOrderAfterSalesOpRecord();
opRecord.setApplyNo(apply.getApplyNo());
opRecord.setStatus(apply.getStatus());
opRecord.setRemarks(sendExpressNo);
opRecord.setOpUserType(1);
opRecord.setOpUserId(apply.getId());
opRecord.setOpUserName(apply.getUserPhone());
orderAfterSalesOpRecordService.create(opRecord);
}
@Override
public void finish(String applyNo, Long opUserId) {
// 查询申请
BsOrderAfterSalesApply apply = getDetailByApplyNo(applyNo);
if (apply == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的申请");
}
// 退款
BsOrderRefund orderRefund = orderRefundService.tradeOrderChildRefund(apply.getChildOrderNo(), apply.getProductCount(), null);
if (orderRefund.getRefundStatus().equals(OrderRefundStatusEnum.status2.getCode())) {
// 查询操作用户
SecUser secUser = secUserService.getDetail(opUserId);
if (secUser == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的操作人");
}
apply.setStatus(OrderAfterSalesApplyStatusEnum.type5.getCode());
apply.setFinishTime(new Date());
editData(apply);
// 操作记录
BsOrderAfterSalesOpRecord opRecord = new BsOrderAfterSalesOpRecord();
opRecord.setApplyNo(apply.getApplyNo());
opRecord.setStatus(apply.getStatus());
opRecord.setOpUserType(1);
opRecord.setOpUserId(secUser.getId());
opRecord.setOpUserName(secUser.getUserName());
orderAfterSalesOpRecordService.create(opRecord);
} else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!" + orderRefund.getRefundFailReason());
}
}
@Override
public BsOrderAfterSalesApply getDetailByApplyNo(String applyNo) {
BsOrderAfterSalesApplyExample example = new BsOrderAfterSalesApplyExample();
example.createCriteria().andApplyNoEqualTo(applyNo);
List<BsOrderAfterSalesApply> list = orderAfterSalesApplyMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public BsOrderAfterSalesApply getDetailByChildOrderNo(String childOrderNo) {
BsOrderAfterSalesApplyExample example = new BsOrderAfterSalesApplyExample();
example.createCriteria().andChildOrderNoEqualTo(childOrderNo);
List<BsOrderAfterSalesApply> list = orderAfterSalesApplyMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public List<BsOrderAfterSalesApply> getApplyList(Map<String, Object> param) {
BsOrderAfterSalesApplyExample example = new BsOrderAfterSalesApplyExample();
BsOrderAfterSalesApplyExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(param, "userId") != null) {
criteria.andUserIdEqualTo(MapUtils.getLong(param, "userId"));
}
if (MapUtils.getInteger(param, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getInteger(param, "type"));
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "userPhone"))) {
criteria.andUserPhoneLike("%"+MapUtils.getString(param, "userPhone")+"%");
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "childOrderNo"))) {
criteria.andChildOrderNoLike("%"+MapUtils.getString(param, "childOrderNo")+"%");
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "applyNo"))) {
criteria.andApplyNoLike("%"+MapUtils.getString(param, "applyNo")+"%");
}
if (MapUtils.getInteger(param, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(param, "status"));
}
if (MapUtils.getLong(param, "createTimeS") != null) {
criteria.andCreateTimeGreaterThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeS")));
}
if (MapUtils.getLong(param, "createTimeE") != null) {
criteria.andCreateTimeLessThanOrEqualTo(new Date(MapUtils.getLong(param, "createTimeE")));
}
example.setOrderByClause("create_time desc");
return orderAfterSalesApplyMapper.selectByExample(example);
}
}

@ -0,0 +1,38 @@
package com.hfkj.service.order.impl;
import com.hfkj.dao.BsOrderAfterSalesOpRecordMapper;
import com.hfkj.entity.BsOrderAfterSalesOpRecord;
import com.hfkj.entity.BsOrderAfterSalesOpRecordExample;
import com.hfkj.service.order.BsOrderAfterSalesOpRecordService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
import java.util.List;
/**
* @className: BsOrderAfterSalesOpRecordServiceImpl
* @author: HuRui
* @date: 2024/5/15
**/
@Service("orderAfterSalesOpRecordService")
public class BsOrderAfterSalesOpRecordServiceImpl implements BsOrderAfterSalesOpRecordService {
@Resource
private BsOrderAfterSalesOpRecordMapper orderAfterSalesOpRecordMapper;
@Override
public void create(BsOrderAfterSalesOpRecord data) {
data.setCreateTime(new Date());
orderAfterSalesOpRecordMapper.insert(data);
}
@Override
public List<BsOrderAfterSalesOpRecord> getRecordList(String applyNo) {
BsOrderAfterSalesOpRecordExample example = new BsOrderAfterSalesOpRecordExample();
example.createCriteria().andApplyNoEqualTo(applyNo);
example.setOrderByClause("create_time desc");
return orderAfterSalesOpRecordMapper.selectByExample(example);
}
}

@ -34,6 +34,20 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
}
}
@Override
public OrderChildModel getDetail(String childOrderNo) {
BsOrderChildExample example = new BsOrderChildExample();
example.createCriteria().andChildOrderNoEqualTo(childOrderNo);
List<BsOrderChild> list = orderChildMapper.selectByExample(example);
if (!list.isEmpty()) {
OrderChildModel childModel = new OrderChildModel();
BeanUtils.copyProperties(list.get(0), childModel);
return childModel;
}
return null;
}
@Override
public List<OrderChildModel> getOrderChildListByOrderNo(String orderNo) {
BsOrderChildExample example = new BsOrderChildExample();

@ -0,0 +1,210 @@
package com.hfkj.service.order.impl;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.exception.BaseException;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.RandomUtils;
import com.hfkj.dao.BsOrderRefundMapper;
import com.hfkj.entity.BsOrder;
import com.hfkj.entity.BsOrderRefund;
import com.hfkj.entity.BsOrderRefundExample;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.model.order.OrderModel;
import com.hfkj.service.order.BsOrderChildService;
import com.hfkj.service.order.BsOrderRefundService;
import com.hfkj.service.order.BsOrderService;
import com.hfkj.service.pay.HuiPayService;
import com.hfkj.sysenum.order.*;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @className: BsOrderRefundServiceImpl
* @author: HuRui
* @date: 2024/5/14
**/
@Service("orderRefundService")
public class BsOrderRefundServiceImpl implements BsOrderRefundService {
@Resource
public BsOrderRefundMapper orderRefundMapper;
@Resource
private BsOrderService orderService;
@Resource
private BsOrderChildService orderChildService;
@Override
public void editData(BsOrderRefund data) {
data.setUpdateTime(new Date());
if (data.getId() == null) {
data.setCreateTime(new Date());
orderRefundMapper.insert(data);
} else {
orderRefundMapper.updateByPrimaryKey(data);
}
}
@Override
public boolean refundMoney(BsOrderRefund orderRefund) {
try {
if (OrderPayChannelEnum.type1.getCode() == orderRefund.getRefundPayChannel()) {
// 渠道退款
JSONObject refund = HuiPayService.refund(orderRefund.getAccountMerchantNo(), orderRefund.getOrderNo(), orderRefund.getRefundOrderNo(), orderRefund.getRefundPrice());
if (refund.getString("").equals("000000")) {
JSONObject data = refund.getJSONObject("return_data");
orderRefund.setRefundPayChannelOrderNo(data.getString("refundTradeNo"));
orderRefund.setRefundSerialNo(data.getString("accTradeNo"));
orderRefund.setRefundStatus(OrderRefundStatusEnum.status2.getCode());
editData(orderRefund);
return true;
} else {
orderRefund.setRefundStatus(OrderRefundStatusEnum.status3.getCode());
orderRefund.setRefundFailReason(refund.getString("return_msg"));
editData(orderRefund);
}
}/* else if (OrderPayChannelEnum.type2.getCode() == orderRefund.getRefundPayChannel()) {
// TODO 暂无该支付方式
} else if (OrderPayChannelEnum.type3.getCode() ==orderRefund.getRefundPayChannel()) {
// TODO 暂无该支付方式
}*/ else {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!未知的支付方式");
}
} catch (BaseException e) {
orderRefund.setRefundStatus(OrderRefundStatusEnum.status3.getCode());
orderRefund.setRefundFailReason(e.getErrorMsg());
editData(orderRefund);
} catch (Exception e) {
orderRefund.setRefundStatus(OrderRefundStatusEnum.status3.getCode());
orderRefund.setRefundFailReason("未知问题");
editData(orderRefund);
}
return false;
}
@Override
@Transactional(propagation= Propagation.REQUIRES_NEW,rollbackFor= {RuntimeException.class})
public OrderModel tradeOrderRefund(String orderNo, String remark) {
// 查询交易订单
OrderModel order = orderService.getDetail(orderNo);
if (order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "该账户已被禁用,无法进行交易");
}
if (!order.getOrderStatus().equals(OrderStatusEnum.status2.getCode())) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "该账户已被禁用,无法进行交易");
}
boolean refundSuccess = true;
for (OrderChildModel orderChild : order.getOrderChildList()) {
try {
tradeOrderChildRefund(orderChild.getChildOrderNo(), orderChild.getProductCount(), remark);
} catch (Exception e) {
refundSuccess = false;
}
}
order.setOrderStatus(refundSuccess ? OrderStatusEnum.status4.getCode() : order.getOrderStatus());
order.setRefundTime(refundSuccess ? new Date() : null);
orderService.editData(order);
// 更新缓存
orderService.cache(order);
return order;
}
@Override
public BsOrderRefund tradeOrderChildRefund(String childOrderNo, Integer productCount, String remark) {
// 查询子订单
OrderChildModel orderChild = orderChildService.getDetail(childOrderNo);
if (orderChild == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的子订单");
}
if (productCount > orderChild.getProductCount()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "退款失败!退货数量超过子订单可退数量");
}
// 查询交易订单
BsOrder order = orderService.getOrder(orderChild.getOrderNo());
if (order == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的交易订单");
}
// 创建退款订单
BsOrderRefund orderRefund = new BsOrderRefund();
orderRefund.setMerId(orderChild.getMerId());
orderRefund.setOrderNo(orderChild.getOrderNo());
orderRefund.setOrderChildNo(orderChild.getChildOrderNo());
orderRefund.setUserId(order.getUserId());
orderRefund.setUserPhone(order.getUserPhone());
// 退款订单号 退款标识:R + 时间 + 随机3位数字
orderRefund.setRefundOrderNo("R"+DateUtil.date2String(new Date(), "yyMMddHHmmss") + RandomUtils.number(3, false));
orderRefund.setRefundPayChannel(order.getPayChannel());
orderRefund.setReufndPayType(order.getPayType());
if (orderChild.getSurplusRefundCount().equals(productCount)) {
// 全部退款
orderRefund.setRefundPrice(orderChild.getSurplusRefundPrice());
orderRefund.setRefundIntegral(orderChild.getSurplusRefundIntegral());
} else {
// 部分退款
// 计算单价
BigDecimal unitPrice = orderChild.getSurplusRefundPrice().divide(new BigDecimal(productCount.toString()), 2, BigDecimal.ROUND_DOWN).setScale(2);
BigDecimal unitPriceIntegral = new BigDecimal(orderChild.getSurplusRefundIntegral().toString()).divide(new BigDecimal("100"))
.divide(new BigDecimal(productCount.toString()), 2, BigDecimal.ROUND_DOWN).setScale(2);
orderRefund.setRefundPrice(unitPrice.multiply(new BigDecimal(productCount.toString())));
orderRefund.setRefundIntegral(unitPriceIntegral.multiply(new BigDecimal("100")).longValue());
}
orderRefund.setRefundRemark(remark);
orderRefund.setRefundStatus(OrderRefundStatusEnum.status1.getCode());
editData(orderRefund);
// 资金退款
orderRefund.setRefundStatus(refundMoney(orderRefund)?OrderRefundStatusEnum.status2.getCode():OrderRefundStatusEnum.status3.getCode());
editData(orderRefund);
// 退款成功
if (orderRefund.getRefundStatus().equals(OrderRefundStatusEnum.status2.getCode())) {
// 修改子订单可退数量、金额、积分
orderChild.setSurplusRefundCount(orderChild.getSurplusRefundCount() - productCount);
orderChild.setSurplusRefundPrice(orderChild.getSurplusRefundPrice().subtract(orderRefund.getRefundPrice()));
orderChild.setSurplusRefundIntegral(orderChild.getSurplusRefundIntegral() - orderRefund.getRefundIntegral());
orderChild.setStatus(orderChild.getProductCount()==0?OrderChildStatusEnum.status4.getCode():orderChild.getStatus());
orderChildService.editData(orderChild);
}
return orderRefund;
}
@Override
public List<BsOrderRefund> getRefundList(Map<String, Object> param) {
BsOrderRefundExample example = new BsOrderRefundExample();
BsOrderRefundExample.Criteria criteria = example.createCriteria();
if (StringUtils.isNotBlank(MapUtils.getString(param, "orderNo"))) {
criteria.andOrderNoEqualTo(MapUtils.getString(param, "orderNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "orderChildNo"))) {
criteria.andOrderNoEqualTo(MapUtils.getString(param, "orderChildNo"));
}
if (StringUtils.isNotBlank(MapUtils.getString(param, "refundOrderNo"))) {
criteria.andOrderNoEqualTo(MapUtils.getString(param, "refundOrderNo"));
}
example.setOrderByClause("create_time desc");
return orderRefundMapper.selectByExample(example);
}
}

@ -81,6 +81,13 @@ public class BsOrderServiceImpl implements BsOrderService {
return order;
}
@Override
public OrderModel cache(OrderModel order) {
// 缓存
redisUtil.set(CACHE_KEY + order.getOrderNo(), order, CACHE_TIME);
return order;
}
@Override
@Transactional(
propagation= Propagation.REQUIRES_NEW,
@ -174,7 +181,7 @@ public class BsOrderServiceImpl implements BsOrderService {
}
// 缓存
redisUtil.set(CACHE_KEY + order.getOrderNo(), order, CACHE_TIME);
cache(order);
return order;
}
@ -212,8 +219,8 @@ public class BsOrderServiceImpl implements BsOrderService {
childOrder.setStatus(OrderChildStatusEnum.status2.getCode());
orderChildService.editData(childOrder);
}
// 更新缓存
redisUtil.set(CACHE_KEY + order.getOrderNo(), order, CACHE_TIME);
// 缓存
cache(order);
// 处理业务
orderPaySuccessService.orderBusHandle(order);
@ -245,7 +252,7 @@ public class BsOrderServiceImpl implements BsOrderService {
orderModel.setOrderChildList(orderChildService.getOrderChildListByOrderNo(orderNo));
// 更新缓存
redisUtil.set(CACHE_KEY + orderNo, orderModel, CACHE_TIME);
cache(orderModel);
return orderModel;
}

@ -80,7 +80,7 @@ public class HuiPayService {
}
public static JSONObject refund() throws Exception {
public static JSONObject refund(String merchantNo,String outTradeNo,String refundTradeNo, BigDecimal refundAmount) throws Exception {
Map<String,Object> param = new HashMap<>();
param.put("merchantNo", "");
param.put("outTradeNo", "");

@ -0,0 +1,44 @@
package com.hfkj.sysenum.order;
import lombok.Getter;
/**
* 售后状态
* @className: OrderAfterSalesApplyStatusEnum
* @author: HuRui
* @date: 2024/4/15
**/
@Getter
public enum OrderAfterSalesApplyStatusEnum {
/**
* 审核中
*/
type1(1, "审核中"),
/**
* 审核驳回
*/
type2(2, "审核驳回"),
/**
* 待邮寄
*/
type3(3, "待邮寄"),
/**
* 邮寄中
*/
type4(4, "邮寄中"),
/**
* 完成
*/
type5(5, "完成"),
;
private int code;
private String name;
OrderAfterSalesApplyStatusEnum(int code, String name) {
this.code = code;
this.name = name;
}
}

@ -0,0 +1,42 @@
package com.hfkj.sysenum.order;
import lombok.Getter;
import java.util.Objects;
/**
* 售后类型
* @className: OrderAfterSalesApplyTypeEnum
* @author: HuRui
* @date: 2024/4/15
**/
@Getter
public enum OrderAfterSalesApplyTypeEnum {
/**
* 退款申请
*/
type1(1, "退款申请"),
/**
* 退货申请
*/
type2(2, "退货申请"),
;
private int code;
private String name;
OrderAfterSalesApplyTypeEnum(int code, String name) {
this.code = code;
this.name = name;
}
public static OrderAfterSalesApplyTypeEnum getData(Integer type) {
for (OrderAfterSalesApplyTypeEnum ele : values()) {
if(Objects.equals(type,ele.getCode())) return ele;
}
return null;
}
}

@ -11,15 +11,15 @@ import lombok.Getter;
@Getter
public enum OrderPayChannelEnum {
/**
* 微信
* 惠支付
*/
type1(1, "惠支付"),
/**
* 支付宝
* 微信合作商
*/
type2(2, "微信合作商"),
/**
* 快捷支付
* 贵州银行
*/
type3(3, "贵州银行"),
;

@ -0,0 +1,34 @@
package com.hfkj.sysenum.order;
import lombok.Getter;
/**
* @className: OrderRefundStatusEnum
* @author: HuRui
* @date: 2024/5/14
**/
@Getter
public enum OrderRefundStatusEnum {
/**
* 退款中
*/
status1(1, "退款中"),
/**
* 退款成功
*/
status2(2, "退款成功"),
/**
* 退款失败
*/
status3(3, "退款失败"),
;
private final int code;
private final String name;
OrderRefundStatusEnum(int code, String name) {
this.code = code;
this.name = name;
}
}
Loading…
Cancel
Save