课卡拓展参数
This commit is contained in:
parent
394fa8d8be
commit
75ae708242
@ -51,8 +51,6 @@ public class LearnNowPayLaterServiceOrderBo {
|
|||||||
@ApiModelProperty(value = "卡号",required = true)
|
@ApiModelProperty(value = "卡号",required = true)
|
||||||
private String cardNo;
|
private String cardNo;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 课程信息
|
* 课程信息
|
||||||
*/
|
*/
|
||||||
@ -67,11 +65,4 @@ public class LearnNowPayLaterServiceOrderBo {
|
|||||||
@ApiModelProperty(value = "核销金额",required = true)
|
@ApiModelProperty(value = "核销金额",required = true)
|
||||||
private Integer price;
|
private Integer price;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否是旧卡
|
|
||||||
*/
|
|
||||||
@ApiModelProperty(value = "是否是旧卡")
|
|
||||||
private Boolean isOldCard;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,8 @@ import io.swagger.annotations.ApiModel;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author DB
|
* @author DB
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
@ -16,11 +18,14 @@ public class LearnNowPayLaterStopUserSignPlansBo {
|
|||||||
/**
|
/**
|
||||||
* 签约计划id
|
* 签约计划id
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "签约计划id")
|
@NotBlank(message = "签约计划id不能为空")
|
||||||
|
@ApiModelProperty(value = "签约计划id",required = true)
|
||||||
private String signPlanId;
|
private String signPlanId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 取消理由
|
* 取消理由
|
||||||
*/
|
*/
|
||||||
|
@NotBlank(message = "取消理由不能为空")
|
||||||
|
@ApiModelProperty(value = "取消理由",required = true)
|
||||||
private String stopReason;
|
private String stopReason;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -84,7 +84,7 @@ public class MiniEasyLearnController {
|
|||||||
* @return R<Void>
|
* @return R<Void>
|
||||||
*/
|
*/
|
||||||
@ApiOperation("取消用户签约计划")
|
@ApiOperation("取消用户签约计划")
|
||||||
@PostMapping("/stopUserSignPlans/{signPlanId}")
|
@PostMapping("/stopUserSignPlans")
|
||||||
public R<Void> stopUserSignPlans(@RequestBody @Validated LearnNowPayLaterStopUserSignPlansBo bo){
|
public R<Void> stopUserSignPlans(@RequestBody @Validated LearnNowPayLaterStopUserSignPlansBo bo){
|
||||||
easyLearnOrderService.stopUserSignPlans(bo);
|
easyLearnOrderService.stopUserSignPlans(bo);
|
||||||
return R.ok();
|
return R.ok();
|
||||||
|
|||||||
@ -17,15 +17,9 @@ import com.cpop.core.utils.SpringUtils;
|
|||||||
import com.cpop.core.utils.sql.SqlUtils;
|
import com.cpop.core.utils.sql.SqlUtils;
|
||||||
import com.cpop.jambox.business.bo.*;
|
import com.cpop.jambox.business.bo.*;
|
||||||
import com.cpop.jambox.business.dto.EasyLearnPageDto;
|
import com.cpop.jambox.business.dto.EasyLearnPageDto;
|
||||||
import com.cpop.jambox.business.entity.BrandExtend;
|
import com.cpop.jambox.business.entity.*;
|
||||||
import com.cpop.jambox.business.entity.EasyLearnOrder;
|
|
||||||
import com.cpop.jambox.business.entity.EasyLearnOrderDetail;
|
|
||||||
import com.cpop.jambox.business.entity.StoreExtend;
|
|
||||||
import com.cpop.jambox.business.mapper.EasyLearnOrderMapper;
|
import com.cpop.jambox.business.mapper.EasyLearnOrderMapper;
|
||||||
import com.cpop.jambox.business.service.BrandExtendService;
|
import com.cpop.jambox.business.service.*;
|
||||||
import com.cpop.jambox.business.service.EasyLearnOrderDetailService;
|
|
||||||
import com.cpop.jambox.business.service.EasyLearnOrderService;
|
|
||||||
import com.cpop.jambox.business.service.StoreExtendService;
|
|
||||||
import com.cpop.jambox.business.vo.EasyLearnPageVo;
|
import com.cpop.jambox.business.vo.EasyLearnPageVo;
|
||||||
import com.cpop.jambox.framework.constant.JamboxCloudUrl;
|
import com.cpop.jambox.framework.constant.JamboxCloudUrl;
|
||||||
import com.cpop.jambox.framework.constant.JamboxRedisConstant;
|
import com.cpop.jambox.framework.constant.JamboxRedisConstant;
|
||||||
@ -73,6 +67,7 @@ import java.util.concurrent.locks.Lock;
|
|||||||
|
|
||||||
import static com.cpop.jambox.business.entity.table.BrandExtendTableDef.BRAND_EXTEND;
|
import static com.cpop.jambox.business.entity.table.BrandExtendTableDef.BRAND_EXTEND;
|
||||||
import static com.cpop.jambox.business.entity.table.EasyLearnOrderDetailTableDef.EASY_LEARN_ORDER_DETAIL;
|
import static com.cpop.jambox.business.entity.table.EasyLearnOrderDetailTableDef.EASY_LEARN_ORDER_DETAIL;
|
||||||
|
import static com.cpop.jambox.business.entity.table.EasyLearnOrderExtendTableDef.EASY_LEARN_ORDER_EXTEND;
|
||||||
import static com.cpop.jambox.business.entity.table.EasyLearnOrderTableDef.EASY_LEARN_ORDER;
|
import static com.cpop.jambox.business.entity.table.EasyLearnOrderTableDef.EASY_LEARN_ORDER;
|
||||||
import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND;
|
import static com.cpop.jambox.business.entity.table.StoreExtendTableDef.STORE_EXTEND;
|
||||||
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
|
import static com.cpop.system.business.entity.table.StoreTableDef.STORE;
|
||||||
@ -774,6 +769,15 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl<EasyLearnOrderMapper,
|
|||||||
easyLearnOrderDetails.add(easyLearnOrderDetail);
|
easyLearnOrderDetails.add(easyLearnOrderDetail);
|
||||||
});
|
});
|
||||||
SpringUtils.getBean(EasyLearnOrderDetailService.class).saveBatch(easyLearnOrderDetails);
|
SpringUtils.getBean(EasyLearnOrderDetailService.class).saveBatch(easyLearnOrderDetails);
|
||||||
|
//支付分拓展
|
||||||
|
EasyLearnOrderExtend orderExtend = new EasyLearnOrderExtend();
|
||||||
|
orderExtend.setOrderId(orderId)
|
||||||
|
.setPlanId(result.getPlanId())
|
||||||
|
.setSignPlanId(result.getSignPlanId())
|
||||||
|
.setSubMchId(result.getSubMchid())
|
||||||
|
.setExtendStatus(0)
|
||||||
|
.setGoingDetailNo(0);
|
||||||
|
SpringUtils.getBean(EasyLearnOrderExtendService.class).save(orderExtend);
|
||||||
//云办卡
|
//云办卡
|
||||||
CloudClassCardDto dto = new CloudClassCardDto();
|
CloudClassCardDto dto = new CloudClassCardDto();
|
||||||
//TODO: 模板路径的用途
|
//TODO: 模板路径的用途
|
||||||
@ -832,13 +836,16 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl<EasyLearnOrderMapper,
|
|||||||
.where(EASY_LEARN_ORDER_DETAIL.ORDER_ID.eq(easyLearnOrder.getId()))
|
.where(EASY_LEARN_ORDER_DETAIL.ORDER_ID.eq(easyLearnOrder.getId()))
|
||||||
.and(EASY_LEARN_ORDER_DETAIL.PERIOD_NO.eq(bo.getPlanDetailNo()))
|
.and(EASY_LEARN_ORDER_DETAIL.PERIOD_NO.eq(bo.getPlanDetailNo()))
|
||||||
.one();
|
.one();
|
||||||
String subMchId = wxPayHandler.getSubMchId(easyLearnOrder.getBrandId(), easyLearnOrder.getStoreId());
|
//获取计划拓展
|
||||||
WxPayService wxPayService = wxPayHandler.getWxPayService(null, subMchId);
|
EasyLearnOrderExtend orderExtend = SpringUtils.getBean(EasyLearnOrderExtendService.class).queryChain()
|
||||||
|
.where(EASY_LEARN_ORDER_EXTEND.ORDER_ID.eq(easyLearnOrder.getId()))
|
||||||
|
.one();
|
||||||
|
WxPayService wxPayService = wxPayHandler.getWxPayService(null, orderExtend.getSubMchId());
|
||||||
PartnerPayScoreSignPlanService partnerPayScoreSignPlanService = wxPayService.getPartnerPayScoreSignPlanService();
|
PartnerPayScoreSignPlanService partnerPayScoreSignPlanService = wxPayService.getPartnerPayScoreSignPlanService();
|
||||||
WxPartnerPayScoreSignPlanRequest signPlanRequest = new WxPartnerPayScoreSignPlanRequest();
|
WxPartnerPayScoreSignPlanRequest signPlanRequest = new WxPartnerPayScoreSignPlanRequest();
|
||||||
signPlanRequest.setSignPlanId(easyLearnOrder.getOutOrderNo())
|
signPlanRequest.setSignPlanId(easyLearnOrder.getOutOrderNo())
|
||||||
.setPlanDetailNo(easyLearnOrderDetail.getPeriodNo())
|
.setPlanDetailNo(easyLearnOrderDetail.getPeriodNo())
|
||||||
.setSubMchid(subMchId)
|
.setSubMchid(orderExtend.getSubMchId())
|
||||||
.setSubOpenid(bo.getOpenid())
|
.setSubOpenid(bo.getOpenid())
|
||||||
.setNotifyUrl(wxPayConfiguration.getProperties().getLearnNowPayLaterServiceOrderNotifyUrl())
|
.setNotifyUrl(wxPayConfiguration.getProperties().getLearnNowPayLaterServiceOrderNotifyUrl())
|
||||||
.setServiceIntroduction(easyLearnOrderDetail.getDetailDesc());
|
.setServiceIntroduction(easyLearnOrderDetail.getDetailDesc());
|
||||||
@ -878,7 +885,7 @@ public class EasyLearnOrderServiceImpl extends ServiceImpl<EasyLearnOrderMapper,
|
|||||||
.one();
|
.one();
|
||||||
EasyLearnOrder easyLearnOrder = this.getById(easyLearnOrderDetail.getOrderId());
|
EasyLearnOrder easyLearnOrder = this.getById(easyLearnOrderDetail.getOrderId());
|
||||||
//需要分账
|
//需要分账
|
||||||
String subMchId = wxPayHandler.getSubMchId(easyLearnOrder.getBrandId(), easyLearnOrder.getStoreId());
|
String subMchId = notifyResult.getSubMchId();
|
||||||
if (notifyResult.getTotalFee() >= Math.ceil(1 / OrderSource.EASY_LEARN.getRate())) {
|
if (notifyResult.getTotalFee() >= Math.ceil(1 / OrderSource.EASY_LEARN.getRate())) {
|
||||||
//设置子商户
|
//设置子商户
|
||||||
WxPayService wxPayService = wxPayHandler.getWxPayService(null, subMchId);
|
WxPayService wxPayService = wxPayHandler.getWxPayService(null, subMchId);
|
||||||
|
|||||||
@ -56,7 +56,7 @@ mybatis-flex:
|
|||||||
configuration:
|
configuration:
|
||||||
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
log-impl: org.apache.ibatis.logging.nologging.NoLoggingImpl
|
||||||
datasource:
|
datasource:
|
||||||
mall:
|
oam:
|
||||||
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/cpop_union?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/cpop_union?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: Customer0401
|
password: Customer0401
|
||||||
|
|||||||
@ -56,7 +56,7 @@ mybatis-flex:
|
|||||||
configuration:
|
configuration:
|
||||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||||
datasource:
|
datasource:
|
||||||
mall:
|
oam:
|
||||||
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/cpop_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/cpop_test?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
username: root
|
||||||
password: Customer0401
|
password: Customer0401
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user