联合支付;校区插件模块;数据导入调整;事务分发修复
This commit is contained in:
parent
d0e5811442
commit
73ff8b82b8
@ -3,6 +3,8 @@ package com.cpop.core.base.entity;
|
||||
import com.cpop.core.utils.SecurityUtils;
|
||||
import com.mybatisflex.annotation.InsertListener;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* @author: DB
|
||||
* @Date: 2023/08/04/15:12
|
||||
@ -15,9 +17,9 @@ public class BaseInsertListener implements InsertListener {
|
||||
BaseEntity baseEntity = (BaseEntity) entity;
|
||||
LoginUser loginUser = SecurityUtils.getInstance().getLoginUser();
|
||||
//设置 account 被新增时的一些默认数据
|
||||
//baseEntity.setCreateTime(LocalDateTime.now());
|
||||
//baseEntity.setCreateUserId(null == loginUser ? "1" : loginUser.getUserId());
|
||||
//baseEntity.setUpdateTime(LocalDateTime.now());
|
||||
//baseEntity.setUpdateUserId(null == loginUser ? "1" : loginUser.getUserId());
|
||||
baseEntity.setCreateTime(LocalDateTime.now());
|
||||
baseEntity.setCreateUserId(null == loginUser ? "1" : loginUser.getUserId());
|
||||
baseEntity.setUpdateTime(LocalDateTime.now());
|
||||
baseEntity.setUpdateUserId(null == loginUser ? "1" : loginUser.getUserId());
|
||||
}
|
||||
}
|
||||
|
||||
@ -34,7 +34,7 @@ public class CpopGenerator {
|
||||
/**
|
||||
* 数据库密码
|
||||
*/
|
||||
private static final String PASSWORD = "root";
|
||||
private static final String PASSWORD = "Admin@123";
|
||||
//private static final String PASSWORD = "Customer0401";
|
||||
|
||||
/**
|
||||
|
||||
@ -0,0 +1,67 @@
|
||||
package com.cpop.jambox.business.bo;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author DB
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-05 12:47
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "PlugBo对象", description = "插件请求参数")
|
||||
public class PlugBo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 插件名
|
||||
*/
|
||||
@NotBlank(message = "插件名不能为空")
|
||||
@ApiModelProperty(value = "插件名",required = true)
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 插件标签
|
||||
*/
|
||||
@NotBlank(message = "插件标签不能为空")
|
||||
@ApiModelProperty(value = "插件标签",required = true)
|
||||
private String plugTag;
|
||||
|
||||
/**
|
||||
* 插件图标地址
|
||||
*/
|
||||
@ApiModelProperty("插件图标地址")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@NotNull(message = "排序不能为空")
|
||||
@ApiModelProperty(value = "排序",required = true)
|
||||
private Integer orderNo;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态(0:禁用;1:使用)
|
||||
*/
|
||||
@NotNull(message = "状态不能为空")
|
||||
@ApiModelProperty(value = "状态",required = true)
|
||||
private Integer status;
|
||||
}
|
||||
@ -0,0 +1,77 @@
|
||||
package com.cpop.jambox.business.entity;
|
||||
|
||||
import com.cpop.core.base.entity.BaseEntity;
|
||||
import com.cpop.core.base.entity.BaseInsertListener;
|
||||
import com.cpop.core.base.entity.BaseUpdateListener;
|
||||
import com.mybatisflex.annotation.Column;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import com.mybatisflex.annotation.Table;
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.*;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 果酱-插件 实体类。
|
||||
*
|
||||
* @author DB
|
||||
* @since 2024-01-05
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper=false)
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
@Table(value = "cp_j_plug", onInsert = BaseInsertListener.class, onUpdate = BaseUpdateListener.class, mapperGenerateEnable = false)
|
||||
public class Plug extends BaseEntity implements Serializable {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@Id
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 插件名
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 插件标签
|
||||
*/
|
||||
private String plugTag;
|
||||
|
||||
/**
|
||||
* 插件图标地址
|
||||
*/
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer orderNo;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态(0:禁用;1:使用)
|
||||
*/
|
||||
private Integer status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 逻辑删除(0否1是)
|
||||
*/
|
||||
@Column(isLogicDelete = true)
|
||||
private Boolean isDelete;
|
||||
|
||||
}
|
||||
@ -42,20 +42,4 @@ public class StorePlug extends BaseEntity implements Serializable {
|
||||
*/
|
||||
private String plugTag;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remarks;
|
||||
|
||||
/**
|
||||
* 是否开启
|
||||
*/
|
||||
private Boolean isOpen;
|
||||
|
||||
/**
|
||||
* 逻辑删除(0否1是)
|
||||
*/
|
||||
@Column(isLogicDelete = true)
|
||||
private Boolean isDelete;
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,14 @@
|
||||
package com.cpop.jambox.business.mapper;
|
||||
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.cpop.jambox.business.entity.Plug;
|
||||
|
||||
/**
|
||||
* 果酱-插件 映射层。
|
||||
*
|
||||
* @author DB
|
||||
* @since 2024-01-05
|
||||
*/
|
||||
public interface PlugMapper extends BaseMapper<Plug> {
|
||||
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
package com.cpop.jambox.business.service;
|
||||
|
||||
import com.cpop.jambox.business.bo.PlugBo;
|
||||
import com.cpop.jambox.business.vo.PlugPageVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.service.IService;
|
||||
import com.cpop.jambox.business.entity.Plug;
|
||||
|
||||
/**
|
||||
* 果酱-插件 服务层。
|
||||
*
|
||||
* @author DB
|
||||
* @since 2024-01-05
|
||||
*/
|
||||
public interface PlugService extends IService<Plug> {
|
||||
|
||||
/**
|
||||
* 查询插件分页
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @return R<Page<PlugPageVo>>
|
||||
*/
|
||||
Page<PlugPageVo> getPlugPage();
|
||||
|
||||
/**
|
||||
* 新增插件
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @param bo 请求参数
|
||||
*/
|
||||
void insertPlug(PlugBo bo);
|
||||
|
||||
/**
|
||||
* 修改插件
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @param bo 请求参数
|
||||
*/
|
||||
void updatePlug(PlugBo bo);
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package com.cpop.jambox.business.service.impl;
|
||||
|
||||
import com.cpop.common.utils.bean.BeanUtils;
|
||||
import com.cpop.core.base.entity.PageDomain;
|
||||
import com.cpop.core.utils.sql.SqlUtils;
|
||||
import com.cpop.jambox.business.bo.PlugBo;
|
||||
import com.cpop.jambox.business.vo.PlugPageVo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import com.cpop.jambox.business.entity.Plug;
|
||||
import com.cpop.jambox.business.mapper.PlugMapper;
|
||||
import com.cpop.jambox.business.service.PlugService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import static com.cpop.jambox.business.entity.table.PlugTableDef.PLUG;
|
||||
|
||||
/**
|
||||
* 果酱-插件 服务层实现。
|
||||
*
|
||||
* @author DB
|
||||
* @since 2024-01-05
|
||||
*/
|
||||
@Service("plugService")
|
||||
public class PlugServiceImpl extends ServiceImpl<PlugMapper, Plug> implements PlugService {
|
||||
|
||||
/**
|
||||
* 查询插件分页
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @return R<Page<PlugPageVo>>
|
||||
*/
|
||||
@Override
|
||||
public Page<PlugPageVo> getPlugPage() {
|
||||
PageDomain pageDomain = SqlUtils.getInstance().getPageDomain();
|
||||
return this.pageAs(Page.of(pageDomain.getPageNum(), pageDomain.getPageSize()),
|
||||
QueryWrapper.create()
|
||||
.select(PLUG.ID, PLUG.NAME, PLUG.ORDER_NO, PLUG.STATUS, PLUG.PLUG_TAG, PLUG.REMARK)
|
||||
.orderBy(PLUG.ORDER_NO.desc()),
|
||||
PlugPageVo.class);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增插件
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @param bo 请求参数
|
||||
*/
|
||||
@Override
|
||||
public void insertPlug(PlugBo bo) {
|
||||
Plug plug = BeanUtils.mapToClass(bo, Plug.class);
|
||||
this.save(plug);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updatePlug(PlugBo bo) {
|
||||
Plug plug = BeanUtils.mapToClass(bo, Plug.class);
|
||||
this.updateById(plug);
|
||||
}
|
||||
}
|
||||
@ -1,8 +1,12 @@
|
||||
package com.cpop.jambox.business.service.impl;
|
||||
|
||||
import com.cpop.common.utils.StringUtils;
|
||||
import com.cpop.core.base.entity.BaseEntity;
|
||||
import com.cpop.core.utils.SpringUtils;
|
||||
import com.cpop.jambox.business.entity.Plug;
|
||||
import com.cpop.jambox.business.entity.StorePlug;
|
||||
import com.cpop.jambox.business.mapper.StorePlugMapper;
|
||||
import com.cpop.jambox.business.service.PlugService;
|
||||
import com.cpop.jambox.business.service.StorePlugService;
|
||||
import com.cpop.jambox.business.vo.StorePlugListVo;
|
||||
import com.mybatisflex.core.datasource.DataSourceKey;
|
||||
@ -12,11 +16,13 @@ import com.mybatisflex.core.row.Row;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cpop.jambox.business.entity.table.PlugTableDef.PLUG;
|
||||
import static com.cpop.jambox.business.entity.table.StorePlugTableDef.STORE_PLUG;
|
||||
|
||||
/**
|
||||
@ -42,37 +48,23 @@ public class StorePlugServiceImpl extends ServiceImpl<StorePlugMapper, StorePlug
|
||||
if (StringUtils.isBlank(brandId) || StringUtils.isBlank(storeId)) {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
List<Row> rows;
|
||||
try {
|
||||
DataSourceKey.use("jambox");
|
||||
rows = Db.selectListByQuery("t_application_info", QueryWrapper.create()
|
||||
.select("application", "char_tag as plugTag", "pic", "tag", "status", "creation_time as listingTime")
|
||||
.from("t_application_info")
|
||||
.where("deleted = 1")
|
||||
.and("char_tag IS NOT NULL"));
|
||||
} finally {
|
||||
DataSourceKey.clear();
|
||||
}
|
||||
if (!rows.isEmpty()) {
|
||||
Map<String, Row> rowsMap = rows.stream().collect(Collectors.toMap(item -> item.getString("plugTag"), item -> item));
|
||||
List<StorePlugListVo> storePlugListVos = this.listAs(QueryWrapper.create()
|
||||
.select(STORE_PLUG.PLUG_TAG, STORE_PLUG.ID, STORE_PLUG.CREATE_TIME,STORE_PLUG.IS_OPEN)
|
||||
.where(STORE_PLUG.STORE_ID.eq(storeId)),
|
||||
StorePlugListVo.class);
|
||||
storePlugListVos.forEach(item -> {
|
||||
if (rowsMap.get(item.getPlugTag()) != null) {
|
||||
Row row = rowsMap.get(item.getPlugTag());
|
||||
item.setListingTime(row.getLocalDateTime("listingTime"));
|
||||
item.setPlugName(row.getString("application"));
|
||||
item.setPlugType("tag");
|
||||
//获取所有插件
|
||||
List<StorePlugListVo> plugList = SpringUtils.getBean(PlugService.class).listAs(QueryWrapper.create(), StorePlugListVo.class);
|
||||
if (!plugList.isEmpty()) {
|
||||
Map<String, LocalDateTime> plugTagMap = this.list(QueryWrapper.create()
|
||||
.where(STORE_PLUG.STORE_ID.eq(storeId))).stream().collect(Collectors.toMap(StorePlug::getPlugTag, BaseEntity::getCreateTime));
|
||||
plugList.forEach(item -> {
|
||||
if (plugTagMap.get(item.getPlugTag()) != null) {
|
||||
item.setIsOpen(true);
|
||||
item.setOpenTime(plugTagMap.get(item.getPlugTag()));
|
||||
} else {
|
||||
item.setIsOpen(false);
|
||||
}
|
||||
item.setStoreId(storeId);
|
||||
});
|
||||
return storePlugListVos;
|
||||
return plugList;
|
||||
} else {
|
||||
return new ArrayList<>();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@ -0,0 +1,59 @@
|
||||
package com.cpop.jambox.business.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* 果酱插件
|
||||
* @author DB
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-05 10:33
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "PlugPageVo对象")
|
||||
public class PlugPageVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 插件名
|
||||
*/
|
||||
@ApiModelProperty("插件名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 插件标签
|
||||
*/
|
||||
@ApiModelProperty("插件标签")
|
||||
private String plugTag;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty("排序")
|
||||
private Integer orderNo;
|
||||
|
||||
/**
|
||||
* 状态(0:禁用;1:使用)
|
||||
*/
|
||||
@ApiModelProperty("状态(0:禁用;1:使用)")
|
||||
private Integer status;
|
||||
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
package com.cpop.jambox.business.vo;
|
||||
|
||||
import com.mybatisflex.annotation.Id;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* @author DB
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-05 13:48
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "PlugPageVo对象")
|
||||
public class PlugVo {
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 插件名
|
||||
*/
|
||||
@ApiModelProperty("插件名")
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 插件标签
|
||||
*/
|
||||
@ApiModelProperty("插件标签")
|
||||
private String plugTag;
|
||||
|
||||
/**
|
||||
* 插件图标地址
|
||||
*/
|
||||
@ApiModelProperty("插件图标地址")
|
||||
private String picUrl;
|
||||
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
@ApiModelProperty("排序")
|
||||
private Integer orderNo;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 状态(0:禁用;1:使用)
|
||||
*/
|
||||
@ApiModelProperty("状态(0:禁用;1:使用)")
|
||||
private Integer status;
|
||||
}
|
||||
@ -24,47 +24,54 @@ public class StorePlugListVo {
|
||||
@ApiModelProperty("主键")
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 插件标记
|
||||
*/
|
||||
@ApiModelProperty("插件标记")
|
||||
private String plugTag;
|
||||
|
||||
/**
|
||||
* 插件名
|
||||
*/
|
||||
@ApiModelProperty("插件名")
|
||||
private String plugName;
|
||||
|
||||
/**
|
||||
* 插件类型
|
||||
*/
|
||||
@ApiModelProperty("插件类型")
|
||||
private String plugType;
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remarks;
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 最后修改时间
|
||||
* 插件标签
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
@ApiModelProperty("上架时间")
|
||||
private LocalDateTime listingTime;
|
||||
@ApiModelProperty("插件标签")
|
||||
private String plugTag;
|
||||
|
||||
/**
|
||||
* 最后修改时间
|
||||
* 排序
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" , timezone = "GMT+8")
|
||||
@ApiModelProperty("开启时间")
|
||||
private LocalDateTime createTime;
|
||||
@ApiModelProperty("排序")
|
||||
private Integer orderNo;
|
||||
|
||||
/**
|
||||
* 是否开启
|
||||
*/
|
||||
@ApiModelProperty("是否开启")
|
||||
private Boolean isOpen;
|
||||
|
||||
|
||||
/**
|
||||
* 上架时间
|
||||
*/
|
||||
@ApiModelProperty("上架时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
/**
|
||||
* 开启时间
|
||||
*/
|
||||
@ApiModelProperty("开启时间")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
|
||||
private LocalDateTime openTime;
|
||||
|
||||
/**
|
||||
* 校区id
|
||||
*/
|
||||
@ApiModelProperty("校区id")
|
||||
private String storeId;
|
||||
}
|
||||
|
||||
7
Cpop-Jambox/src/main/resources/mapper/PlugMapper.xml
Normal file
7
Cpop-Jambox/src/main/resources/mapper/PlugMapper.xml
Normal file
@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.cpop.jambox.business.mapper.PlugMapper">
|
||||
|
||||
</mapper>
|
||||
@ -3,12 +3,12 @@ package com.cpop.mall.web;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.cpop.core.utils.uuid.IdUtils;
|
||||
import com.cpop.pay.framewok.config.wxPay.WxPayProperties;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingFinishRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingQueryRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingQueryResult;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingReceiverRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingResult;
|
||||
import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingReturnRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingQueryRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingReceiverRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingReturnRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingUnfreezeRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingQueryResult;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingV3Result;
|
||||
import com.github.binarywang.wxpay.bean.request.WxPayOrderReverseRequest;
|
||||
import com.github.binarywang.wxpay.bean.request.WxPayRefundV3Request;
|
||||
import com.github.binarywang.wxpay.bean.result.WxPayOrderQueryResult;
|
||||
@ -85,10 +85,10 @@ public class CpopWxPayTests {
|
||||
profitSharingReturnRequest.setOutReturnNo("97948799695069184");
|
||||
profitSharingReturnRequest.setDescription("分账退款");
|
||||
profitSharingReturnRequest.setSubMchId("1661323640");
|
||||
profitSharingReturnRequest.setReturnMchid("1618884922");
|
||||
profitSharingReturnRequest.setReturnAccount("1618884922");
|
||||
//profitSharingReturnRequest.setAmount(profitSharing.getAmount());
|
||||
profitSharingReturnRequest.setAmount(6L);
|
||||
wxPayService.getProfitSharingV3Service().profitSharingReturn(profitSharingReturnRequest);
|
||||
profitSharingReturnRequest.setReturnAmount(6);
|
||||
wxPayService.getProfitSharingService().profitSharingReturn(profitSharingReturnRequest);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -162,8 +162,8 @@ public class CpopWxPayTests {
|
||||
*/
|
||||
@Test
|
||||
public void getProfitSharingResult() throws WxPayException {
|
||||
ProfitSharingResult profitSharingResult = wxPayService.getProfitSharingV3Service().getProfitSharingResult("97976952480079872", "4200002127202312282719627535", "1661323640");
|
||||
System.out.println(profitSharingResult);
|
||||
ProfitSharingV3Result profitSharingV3Result = wxPayService.getProfitSharingService().profitSharingQueryV3("97976952480079872", "4200002127202312282719627535", "1661323640");
|
||||
System.out.println(profitSharingV3Result);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -172,7 +172,7 @@ public class CpopWxPayTests {
|
||||
*/
|
||||
@Test
|
||||
public void profitSharingFinish() throws WxPayException {
|
||||
ProfitSharingFinishRequest profitSharingFinishRequest = new ProfitSharingFinishRequest();
|
||||
ProfitSharingUnfreezeRequest profitSharingFinishRequest = new ProfitSharingUnfreezeRequest();
|
||||
profitSharingFinishRequest.setTransactionId("4200002093202312282215936862");
|
||||
profitSharingFinishRequest.setOutOrderNo("97973671418667008");
|
||||
profitSharingFinishRequest.setDescription("结束分账");
|
||||
|
||||
@ -21,7 +21,7 @@ import com.cpop.pay.framewok.handler.wxPay.WxPayHandler;
|
||||
import com.cpop.system.business.entity.ProfitSharing;
|
||||
import com.cpop.system.business.service.ProfitSharingService;
|
||||
import com.github.binarywang.wxpay.bean.notify.WxPayRefundNotifyV3Result;
|
||||
import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingReturnRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingReturnRequest;
|
||||
import com.github.binarywang.wxpay.bean.request.WxPayRefundV3Request;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
@ -86,9 +86,9 @@ public class OrderRefundServiceImpl extends ServiceImpl<OrderRefundMapper, Order
|
||||
profitSharingReturnRequest.setOutReturnNo(profitSharing.getId());
|
||||
profitSharingReturnRequest.setDescription("分账退款");
|
||||
profitSharingReturnRequest.setSubMchId(profitSharing.getPayAccount());
|
||||
profitSharingReturnRequest.setReturnMchid(wxPayProperties.getSharingAccount());
|
||||
profitSharingReturnRequest.setAmount(profitSharing.getAmount());
|
||||
wxPayService.getProfitSharingV3Service().profitSharingReturn(profitSharingReturnRequest);
|
||||
profitSharingReturnRequest.setReturnAccount(wxPayProperties.getSharingAccount());
|
||||
profitSharingReturnRequest.setReturnAmount(profitSharing.getAmount().intValue());
|
||||
wxPayService.getProfitSharingService().profitSharingReturn(profitSharingReturnRequest);
|
||||
//分账退款记录设置退款
|
||||
profitSharingService.updateChain()
|
||||
.set(PROFIT_SHARING.PROFIT_SHARING_STATUS, 2)
|
||||
|
||||
@ -58,7 +58,7 @@ mybatis-flex:
|
||||
oam:
|
||||
url: jdbc:mysql://localhost:3306/cpop_dev?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||
username: root
|
||||
password: root
|
||||
password: Admin@123
|
||||
jambox:
|
||||
url: jdbc:mysql://sh-cynosdbmysql-grp-fggo83js.sql.tencentcdb.com:20965/jambox_test?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true
|
||||
username: root
|
||||
|
||||
@ -4,7 +4,9 @@ import com.cpop.core.base.entity.LoginUser;
|
||||
import com.cpop.core.base.enums.OperationLogEnum;
|
||||
import com.cpop.core.base.enums.UserType;
|
||||
import com.cpop.core.service.CoreService;
|
||||
import com.cpop.core.utils.PasswordEncoder;
|
||||
import com.cpop.core.utils.RsaUtils;
|
||||
import com.cpop.core.utils.SpringUtils;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
@ -16,7 +18,7 @@ import java.util.Map;
|
||||
* @Description: RockBlade核心功能测试
|
||||
* @create 2023-08-27 11:11
|
||||
*/
|
||||
@SpringBootTest
|
||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||
public class CpopCoreTests {
|
||||
|
||||
@Autowired
|
||||
@ -77,5 +79,8 @@ public class CpopCoreTests {
|
||||
String strDecrypt = rsaUtils.decrypt(strEncrypt);
|
||||
System.out.println("解密后的字符串:");
|
||||
System.out.println(strDecrypt);
|
||||
//加密
|
||||
String encode = SpringUtils.getBean(PasswordEncoder.class).encode("Admin@123");
|
||||
System.out.println("encode加密:"+encode);
|
||||
}
|
||||
}
|
||||
|
||||
@ -12,8 +12,8 @@ import com.cpop.jambox.business.service.StoreExtendService;
|
||||
import com.cpop.jambox.framework.constant.JamboxCloudUrl;
|
||||
import com.cpop.pay.framewok.config.wxPay.WxPayProperties;
|
||||
import com.cpop.pay.framewok.handler.wxPay.WxPayHandler;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingResult;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingResult;
|
||||
import com.github.binarywang.wxpay.config.WxPayConfig;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
@ -130,7 +130,7 @@ public class CpopEasyLearnTest {
|
||||
* @param orderSource 订单来源
|
||||
* @return ProfitSharingRequest
|
||||
*/
|
||||
private ProfitSharingRequest buildProfitSharingRequest(String orderId, OrderSource orderSource,Integer totalFee,String subMchId,String transactionId) {
|
||||
private ProfitSharingRequest buildProfitSharingRequest(String orderId, OrderSource orderSource, Integer totalFee, String subMchId, String transactionId) {
|
||||
LocalDateTime now = LocalDateTime.now();
|
||||
Double ceil = Math.ceil(totalFee * orderSource.getRate());
|
||||
Row row = Row.ofKey(RowKey.SNOW_FLAKE_ID)
|
||||
|
||||
@ -8,16 +8,13 @@ import com.cpop.common.utils.bean.BeanUtils;
|
||||
import com.cpop.core.base.entity.BaseEntity;
|
||||
import com.cpop.core.base.enums.InitRoleEnum;
|
||||
import com.cpop.core.base.enums.SourceType;
|
||||
import com.cpop.core.base.table.SysUser;
|
||||
import com.cpop.core.mapper.CoreMapper;
|
||||
import com.cpop.core.utils.PasswordEncoder;
|
||||
import com.cpop.core.utils.RsaUtils;
|
||||
import com.cpop.core.utils.SpringUtils;
|
||||
import com.cpop.jambox.business.entity.BrandExtend;
|
||||
import com.cpop.jambox.business.entity.EasyLearnOrder;
|
||||
import com.cpop.jambox.business.entity.StoreExtend;
|
||||
import com.cpop.jambox.business.entity.StorePlug;
|
||||
import com.cpop.jambox.business.service.BrandExtendService;
|
||||
import com.cpop.jambox.business.service.EasyLearnOrderService;
|
||||
import com.cpop.jambox.business.service.StoreExtendService;
|
||||
import com.cpop.jambox.business.service.StorePlugService;
|
||||
import com.cpop.jambox.business.entity.*;
|
||||
import com.cpop.jambox.business.service.*;
|
||||
import com.cpop.oam.business.bo.StaffBo;
|
||||
import com.cpop.oam.business.entity.*;
|
||||
import com.cpop.oam.business.service.*;
|
||||
@ -1458,4 +1455,43 @@ public class CpopImportTests {
|
||||
});
|
||||
SpringUtils.getBean(TaskWorkOrderRecordService.class).saveBatch(RowUtil.toEntityList(rowList,TaskWorkOrderRecord.class));
|
||||
}
|
||||
|
||||
/**
|
||||
* 导入插件数据
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
*/
|
||||
@Test
|
||||
public void importPlugData(){
|
||||
List<Row> rowList;
|
||||
try {
|
||||
DataSourceKey.use("jambox");
|
||||
rowList = DbChain.table("t_application_info")
|
||||
.select("application as name", "char_tag as plugTag", "pic as picUrl")
|
||||
.select("top as orderNo", "tag as remark", "if(status = '即将上线',0,1) as status")
|
||||
.from("t_application_info")
|
||||
.where("deleted = 1")
|
||||
.list();
|
||||
} finally {
|
||||
DataSourceKey.clear();
|
||||
}
|
||||
List<Plug> entityList = RowUtil.toEntityList(rowList, Plug.class);
|
||||
SpringUtils.getBean(PlugService.class).saveBatch(entityList);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void batchUpdateStaffPassword(){
|
||||
List<Row> cpSysUser = DbChain.table("cp_sys_user")
|
||||
.select("id","phone_number","password")
|
||||
.where("user_type = 'OAM_USER'")
|
||||
.and("is_delete = 0")
|
||||
.list();
|
||||
List<SysUser> entityList = RowUtil.toEntityList(cpSysUser, SysUser.class);
|
||||
//加密
|
||||
PasswordEncoder passwordEncoder = SpringUtils.getBean(PasswordEncoder.class);
|
||||
entityList.forEach(item->{
|
||||
item.setPassword(passwordEncoder.encode(item.getPhoneNumber()));
|
||||
});
|
||||
Db.executeBatch(entityList, CoreMapper.class, CoreMapper::updateSysUser);
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,41 @@
|
||||
package com.cpop.oam.business.bo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
/**
|
||||
* @author DB
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-05 14:31
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
@ApiModel(value = "ChangePlugOpenBo对象")
|
||||
public class ChangePlugOpenBo {
|
||||
|
||||
/**
|
||||
* 校区
|
||||
*/
|
||||
@NotBlank(message = "校区不能为空")
|
||||
@ApiModelProperty(value = "校区",required = true)
|
||||
private String storeId;
|
||||
|
||||
/**
|
||||
* 插件
|
||||
*/
|
||||
@NotBlank(message = "插件不能为空")
|
||||
@ApiModelProperty(value = "插件",required = true)
|
||||
private String plugTag;
|
||||
|
||||
/**
|
||||
* 开启与关闭
|
||||
*/
|
||||
@NotNull(message = "开启与关闭不能为空")
|
||||
@ApiModelProperty(value = "开启与关闭",required = true)
|
||||
private Boolean isOpen;
|
||||
}
|
||||
@ -1,16 +1,27 @@
|
||||
package com.cpop.oam.business.controller.backstage;
|
||||
|
||||
import com.cpop.common.utils.bean.BeanUtils;
|
||||
import com.cpop.core.base.R;
|
||||
import com.cpop.jambox.business.bo.PlugBo;
|
||||
import com.cpop.jambox.business.entity.StorePlug;
|
||||
import com.cpop.jambox.business.service.PlugService;
|
||||
import com.cpop.jambox.business.service.StorePlugService;
|
||||
import com.cpop.jambox.business.vo.PlugPageVo;
|
||||
import com.cpop.jambox.business.vo.PlugVo;
|
||||
import com.cpop.jambox.business.vo.StorePlugListVo;
|
||||
import com.cpop.oam.business.bo.ChangePlugOpenBo;
|
||||
import com.mybatisflex.core.paginate.Page;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import static com.cpop.jambox.business.entity.table.PlugTableDef.PLUG;
|
||||
import static com.cpop.jambox.business.entity.table.StorePlugTableDef.STORE_PLUG;
|
||||
|
||||
/**
|
||||
@ -27,6 +38,78 @@ public class StorePlugController {
|
||||
@Autowired
|
||||
private StorePlugService storePlugService;
|
||||
|
||||
@Autowired
|
||||
private PlugService plugService;
|
||||
|
||||
/**
|
||||
* 查询插件分页
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @return R<Page<PlugPageVo>>
|
||||
*/
|
||||
@GetMapping("/getPlugPage")
|
||||
@ApiOperation("查询插件分页")
|
||||
public R<Page<PlugPageVo>> getPlugPage() {
|
||||
Page<PlugPageVo> page = plugService.getPlugPage();
|
||||
return R.ok(page);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询插件详情
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @param id 主键
|
||||
* @return R<PlugVo>
|
||||
*/
|
||||
@GetMapping("/getPlugById/{id}")
|
||||
@ApiOperation("查询插件详情")
|
||||
public R<PlugVo> getPlugById(@PathVariable String id) {
|
||||
PlugVo vo = plugService.getOneAs(QueryWrapper.create().where(PLUG.ID.eq(id)), PlugVo.class);
|
||||
return R.ok(vo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增插件
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @param bo 请求参数
|
||||
* @return R<Void>
|
||||
*/
|
||||
@ApiOperation("新增插件")
|
||||
@PostMapping("/insertPlug")
|
||||
public R<Void> insertPlug(@RequestBody @Validated PlugBo bo) {
|
||||
plugService.insertPlug(bo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改插件
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @param bo 请求参数
|
||||
* @return R<Void>
|
||||
*/
|
||||
@ApiOperation("修改插件")
|
||||
@PutMapping("/updatePlug")
|
||||
public R<Void> updateStaff(@RequestBody @Validated PlugBo bo) {
|
||||
plugService.updatePlug(bo);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除插件
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @param id 主键
|
||||
* @return R<Void>
|
||||
*/
|
||||
@ApiOperation("删除插件")
|
||||
@DeleteMapping("/removePlugById/{id}")
|
||||
public R<Void> removeStaffById(@PathVariable String id) {
|
||||
plugService.removeById(id);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询校区插件列表
|
||||
*
|
||||
@ -36,19 +119,22 @@ public class StorePlugController {
|
||||
@GetMapping("/getStorePlugList")
|
||||
@ApiOperation("查询校区插件列表")
|
||||
public R<List<StorePlugListVo>> getStorePlugList(@ApiParam("品牌id") String brandId, @ApiParam("校区id") String storeId) {
|
||||
List<StorePlugListVo> list = storePlugService.getStorePlugList(brandId,storeId);
|
||||
List<StorePlugListVo> list = storePlugService.getStorePlugList(brandId, storeId);
|
||||
return R.ok(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 插件开启与关闭
|
||||
*/
|
||||
@PutMapping("/changePlugOpen/{id}")
|
||||
@PutMapping("/changePlugOpen")
|
||||
@ApiOperation("插件开启与关闭")
|
||||
public R<Void> changePlugOpen(@PathVariable String id) {
|
||||
storePlugService.updateChain().setRaw(STORE_PLUG.IS_OPEN, "if(is_open = 0, 1, 0)")
|
||||
.where(STORE_PLUG.ID.eq(id))
|
||||
.update();
|
||||
public R<Void> changePlugOpen(@RequestBody @Validated ChangePlugOpenBo bo) {
|
||||
StorePlug storePlug = BeanUtils.mapToClass(bo, StorePlug.class);
|
||||
if (bo.getIsOpen()){
|
||||
storePlugService.save(storePlug);
|
||||
} else {
|
||||
storePlugService.updateChain().where(STORE_PLUG.STORE_ID.eq(bo.getStoreId())).and(STORE_PLUG.PLUG_TAG.eq(bo.getPlugTag())).remove();
|
||||
}
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@ import com.cpop.pay.framewok.config.wxPay.WxPayConfiguration;
|
||||
import com.cpop.system.business.bo.ChangeWechatSharingBo;
|
||||
import com.cpop.system.business.entity.Brand;
|
||||
import com.cpop.system.business.service.BrandService;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingReceiverRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingReceiverRequest;
|
||||
import com.github.binarywang.wxpay.config.WxPayConfig;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
|
||||
@ -12,6 +12,11 @@ import lombok.experimental.Accessors;
|
||||
@Accessors(chain = true)
|
||||
public class DataImportParamsDto {
|
||||
|
||||
/**
|
||||
* 上传id
|
||||
*/
|
||||
private String uploadId;
|
||||
|
||||
/**
|
||||
* 文件地址
|
||||
*/
|
||||
|
||||
@ -187,14 +187,14 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business> i
|
||||
if (businessDistributeDataList.isEmpty()) {
|
||||
throw new ServiceException("导入的excel存在空文件,请检查后重新操作");
|
||||
}
|
||||
List<Store> storeList = SpringUtils.getBean(StoreService.class).queryChain()
|
||||
List<BusinessDetail> businessDetails = SpringUtils.getBean(StoreService.class).queryChain()
|
||||
.select(STORE.BRAND_ID, STORE.ID.as(BusinessDetail::getStoreId))
|
||||
.where(STORE.ID.in(businessDistributeDataList.stream().map(BusinessDistributeDto::getStoreId).collect(Collectors.toSet())))
|
||||
.list();
|
||||
if (storeList.size() != businessDistributeDataList.size()) {
|
||||
.listAs(BusinessDetail.class);
|
||||
if (businessDetails.size() != businessDistributeDataList.size()) {
|
||||
throw new ServiceException("校区查询匹配失败,请核实数据后重新提交");
|
||||
}
|
||||
List<BusinessDetail> businessDetails = BeanUtils.mapToList(storeList, BusinessDetail.class);
|
||||
businessDetails.forEach(inner->{
|
||||
businessDetails.forEach(inner -> {
|
||||
inner.setBusinessId(businessId);
|
||||
});
|
||||
//保存详情
|
||||
|
||||
@ -107,7 +107,7 @@ public class DataImportServiceImpl extends ServiceImpl<DataImportMapper, DataImp
|
||||
public void importNow(DataImport dataImport) {
|
||||
//读取数据
|
||||
DataImportParamsDto dataImportParamsDto = new DataImportParamsDto();
|
||||
dataImportParamsDto.setFileUrl(dataImport.getFileUrl()).setEmptyTag(dataImport.getIsClear() ? 1 : 0);
|
||||
dataImportParamsDto.setFileUrl(dataImport.getFileUrl()).setEmptyTag(dataImport.getIsClear() ? 1 : 0).setUploadId(dataImport.getId());
|
||||
if (SourceType.valueOf(dataImport.getSourceType()) == SourceType.JAMBOX) {
|
||||
StoreExtend storeExtend = SpringUtils.getBean(StoreExtendService.class).queryChain().where(STORE_EXTEND.STORE_ID.eq(dataImport.getStoreId())).one();
|
||||
dataImportParamsDto.setStoreId(storeExtend.getStoreCloudId());
|
||||
|
||||
@ -91,8 +91,7 @@ public class TaskServiceImpl extends ServiceImpl<TaskMapper, Task> implements Ta
|
||||
TaskArchivingPagVo.class,
|
||||
// 负责人
|
||||
item -> item.field(TaskArchivingPagVo::getResponsibleStaffName)
|
||||
.queryWrapper(
|
||||
recordStaff -> queryChain().select(STAFF.NAME.as(TaskArchivingPagVo::getResponsibleStaffName))
|
||||
.queryWrapper(recordStaff -> queryChain().select(STAFF.NAME.as(TaskArchivingPagVo::getResponsibleStaffName))
|
||||
.from(STAFF)
|
||||
.where(STAFF.ID.eq(recordStaff.getResponsibleStaffId()))),
|
||||
// 小组成员
|
||||
|
||||
@ -0,0 +1,12 @@
|
||||
package com.cpop.pay.framewok.core.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author DB
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-05 16:13
|
||||
*/
|
||||
@Data
|
||||
public class LearnNowPayLaterPlanDto {
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.cpop.pay.framewok.handler;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 联合支付处理器
|
||||
* @author DB
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-05 15:24
|
||||
*/
|
||||
@Component
|
||||
public class UnionPayHandler {
|
||||
|
||||
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package com.cpop.pay.framewok.strategy;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* 联合支付策略
|
||||
* @author DB
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-05 15:26
|
||||
*/
|
||||
public interface UnionPayStrategy {
|
||||
|
||||
Object unionPay(String unionPayNo);
|
||||
|
||||
}
|
||||
@ -0,0 +1,38 @@
|
||||
package com.cpop.pay.framewok.strategy.wxPay;
|
||||
|
||||
import com.cpop.pay.framewok.strategy.UnionPayStrategy;
|
||||
import com.github.binarywang.wxpay.bean.payscore.WxPartnerPayScoreSignPlanRequest;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.PartnerPayScoreSignPlanService;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @author DB
|
||||
* @version 1.0.0
|
||||
* @since 2024-01-05 15:27
|
||||
*/
|
||||
@Component
|
||||
public class LearnNowPayLaterOnePayStrategy implements UnionPayStrategy {
|
||||
|
||||
/**
|
||||
* 联合支付
|
||||
* @author DB
|
||||
* @since 2024/1/5
|
||||
* @param unionPayNo
|
||||
* @return Object
|
||||
*/
|
||||
@Override
|
||||
public Object unionPay(String unionPayNo) {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public void createPayScorePlan(WxPayService wxPayService) throws WxPayException {
|
||||
PartnerPayScoreSignPlanService partnerPayScoreSignPlanService = wxPayService.getPartnerPayScoreSignPlanService();
|
||||
WxPartnerPayScoreSignPlanRequest planRequest = new WxPartnerPayScoreSignPlanRequest();
|
||||
//planRequest.setPlanId()
|
||||
partnerPayScoreSignPlanService.createPlans(planRequest);
|
||||
|
||||
}
|
||||
}
|
||||
@ -6,8 +6,8 @@ import com.cpop.core.base.enums.OrderSource;
|
||||
import com.cpop.core.base.exception.ServiceException;
|
||||
import com.cpop.pay.framewok.config.wxPay.WxPayProperties;
|
||||
import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.ProfitSharingResult;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.request.ProfitSharingRequest;
|
||||
import com.github.binarywang.wxpay.bean.profitsharing.result.ProfitSharingResult;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.WxPayService;
|
||||
import com.mybatisflex.core.row.Db;
|
||||
|
||||
2
pom.xml
2
pom.xml
@ -45,7 +45,7 @@
|
||||
<jjwt.version>0.9.1</jjwt.version>
|
||||
<HikariCP.version>4.0.3</HikariCP.version>
|
||||
<knife4j.version>4.2.0</knife4j.version>
|
||||
<wechat-java.version>4.5.0</wechat-java.version>
|
||||
<wechat-java.version>4.6.0</wechat-java.version>
|
||||
<bcprov-jdk15on.version>1.70</bcprov-jdk15on.version>
|
||||
<cos_api.version>5.6.155</cos_api.version>
|
||||
<spring-test.version>5.3.31</spring-test.version>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user