| @@ -44,6 +44,10 @@ public class WxRefundOrder extends TenantEntity { | |||||
| private Integer refundOrderStatus; | private Integer refundOrderStatus; | ||||
| @io.swagger.annotations.ApiModelProperty(value="微信退款单号",name="refundId") | @io.swagger.annotations.ApiModelProperty(value="微信退款单号",name="refundId") | ||||
| private String refundId; | private String refundId; | ||||
| @io.swagger.annotations.ApiModelProperty(value="退款原因",name="refundReason") | |||||
| private String refundReason; | |||||
| @io.swagger.annotations.ApiModelProperty(value="退款补充说明",name="refundDescription") | |||||
| private String refundDescription; | |||||
| @io.swagger.annotations.ApiModelProperty(value="支付失败原因",name="failReason") | @io.swagger.annotations.ApiModelProperty(value="支付失败原因",name="failReason") | ||||
| private String failReason; | private String failReason; | ||||
| @@ -54,7 +54,7 @@ public class TtGoodsCategoryServiceImpl implements TtGoodsCategoryService { | |||||
| private List<String> getProductAdminIsNotShowKey(){ | private List<String> getProductAdminIsNotShowKey(){ | ||||
| List<String> keyList = new ArrayList<>(); | List<String> keyList = new ArrayList<>(); | ||||
| keyList.add("appointment"); //预约信息 默认不可预约 | |||||
| // keyList.add("appointment"); //预约信息 默认不可预约 | |||||
| keyList.add("auto_renew"); //是否开启自动延期 默认不开启 | keyList.add("auto_renew"); //是否开启自动延期 默认不开启 | ||||
| // keyList.add("bring_out_meal"); //是否可以外带餐食 默认否 | // keyList.add("bring_out_meal"); //是否可以外带餐食 默认否 | ||||
| // keyList.add("can_no_use_date");//不可使用日期 默认无 | // keyList.add("can_no_use_date");//不可使用日期 默认无 | ||||
| @@ -147,10 +147,12 @@ public class TtGoodsCategoryServiceImpl implements TtGoodsCategoryService { | |||||
| for (GoodsTemplateGet.ProductAttrs attr: productAttrs) { | for (GoodsTemplateGet.ProductAttrs attr: productAttrs) { | ||||
| //预约信息 默认不可预约 | //预约信息 默认不可预约 | ||||
| if("appointment".equals(attr.getKey())){ | if("appointment".equals(attr.getKey())){ | ||||
| JSONObject jsonObject = new JSONObject(); | |||||
| jsonObject.put("need_appointment",false); | |||||
| jsonObject.put("ahead_day_num",0); | |||||
| attr.setData(jsonObject.toJSONString()); | |||||
| if(StringUtils.isBlank(attr.getData())){ | |||||
| JSONObject jsonObject = new JSONObject(); | |||||
| jsonObject.put("need_appointment",false); | |||||
| jsonObject.put("ahead_day_num",0); | |||||
| attr.setData(jsonObject.toJSONString()); | |||||
| } | |||||
| } | } | ||||
| //是否开启自动延期 默认不开启 | //是否开启自动延期 默认不开启 | ||||
| else if("auto_renew".equals(attr.getKey())){ | else if("auto_renew".equals(attr.getKey())){ | ||||
| @@ -1,6 +1,7 @@ | |||||
| package com.iformall.service.impl; | package com.iformall.service.impl; | ||||
| import com.alibaba.fastjson.JSON; | |||||
| import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | ||||
| import com.github.pagehelper.PageHelper; | import com.github.pagehelper.PageHelper; | ||||
| import com.github.pagehelper.PageInfo; | import com.github.pagehelper.PageInfo; | ||||
| @@ -24,6 +25,7 @@ import com.iformall.service.pay.PayServiceFactory; | |||||
| import com.iformall.service.pay.service.pay.entity.PayQueryAdapterResult; | import com.iformall.service.pay.service.pay.entity.PayQueryAdapterResult; | ||||
| import com.iformall.service.pay.service.refund.entity.RefundAdapterResult; | import com.iformall.service.pay.service.refund.entity.RefundAdapterResult; | ||||
| import com.iformall.service.pay.service.refund.entity.RefundNotifyAdapterResult; | import com.iformall.service.pay.service.refund.entity.RefundNotifyAdapterResult; | ||||
| import com.iformall.utils.DateUtils; | |||||
| import org.slf4j.Logger; | import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | import org.slf4j.LoggerFactory; | ||||
| import org.springframework.beans.factory.annotation.Autowired; | import org.springframework.beans.factory.annotation.Autowired; | ||||
| @@ -981,10 +983,12 @@ public class WxRefundOrderServiceImpl implements WxRefundOrderService { | |||||
| record.setCUserId(memberId); | record.setCUserId(memberId); | ||||
| record.setTotalFee(wxOrder.getPayment()); | record.setTotalFee(wxOrder.getPayment()); | ||||
| record.setRefundFee(refundOrderCallback.getRefundTotalAmount()); | record.setRefundFee(refundOrderCallback.getRefundTotalAmount()); | ||||
| record.setRefundTimeStart(currentDate); | |||||
| record.setRefundTimeStart(new Date(refundOrderCallback.getCreateRefundTime())); | |||||
| record.setRefundOrderStatus(EnumRefundStatus.REFUND_REQ_SUCCESS.getCode()); | record.setRefundOrderStatus(EnumRefundStatus.REFUND_REQ_SUCCESS.getCode()); | ||||
| record.setRefundVendor(wxOrder.getPayVendor()); | record.setRefundVendor(wxOrder.getPayVendor()); | ||||
| record.setRefundId(refundOrderCallback.getRefundId()); | record.setRefundId(refundOrderCallback.getRefundId()); | ||||
| record.setRefundReason(JSON.toJSONString(refundOrderCallback.getRefundReason())); | |||||
| record.setRefundDescription(refundOrderCallback.getRefundDescription()); | |||||
| // 退款订单 | // 退款订单 | ||||
| try { | try { | ||||
| int sqlRow = wxRefundOrderMapper.insert(record); | int sqlRow = wxRefundOrderMapper.insert(record); | ||||
| @@ -126,10 +126,5 @@ | |||||
| from wx_refund_order | from wx_refund_order | ||||
| <include refid="dynamicWhereConditions" /> | <include refid="dynamicWhereConditions" /> | ||||
| </select> | </select> | ||||
| </mapper> | </mapper> | ||||