19个文件已修改
30个文件已删除
4个文件已添加
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BaseModel; |
| | |
| | | /** |
| | | * 答案 |
| | | */ |
| | | @ApiModelProperty(value = "答案--查看详情使用该字段") |
| | | @ApiModelProperty(value = "富文本--查看详情使用该字段") |
| | | private String answer; |
| | | /** |
| | | * 答案 |
| | | */ |
| | | @ApiModelProperty(value = "去除标签后的内容--查看详情使用该字段") |
| | | @TableField(exist = false) |
| | | private String count; |
| | | /** |
| | | * 插入时间 |
| | | */ |
| | | @ApiModelProperty(value = "插入时间") |
| | |
| | | * 学习端 验证码登录key |
| | | */ |
| | | public final static String PHONE_CODE = "phone_code:"; |
| | | public final static String PHONE_CODE_PARENT = "parent_phone_code:"; |
| | | |
| | | /** |
| | | * 省市区三级树 |
| | |
| | | public void updateFill(MetaObject metaObject) { |
| | | // 获取登录信息 |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | String userName = loginUser.getUsername(); |
| | | if (StringUtils.hasLength(userName)) { |
| | | this.setFieldValByName("createBy", userName, metaObject); |
| | | this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateBy", userName, metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | } else { |
| | | this.setFieldValByName("createBy", "", metaObject); |
| | | this.setFieldValByName("updateBy", "", metaObject); |
| | | this.setFieldValByName("createTime", "", metaObject); |
| | | this.setFieldValByName("updateTime", "", metaObject); |
| | | if (loginUser!=null){ |
| | | String userName = loginUser.getUsername(); |
| | | if (StringUtils.hasLength(userName)) { |
| | | this.setFieldValByName("createBy", userName, metaObject); |
| | | this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateBy", userName, metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | } else { |
| | | this.setFieldValByName("createBy", "", metaObject); |
| | | this.setFieldValByName("updateBy", "", metaObject); |
| | | this.setFieldValByName("createTime", "", metaObject); |
| | | this.setFieldValByName("updateTime", "", metaObject); |
| | | } |
| | | return; |
| | | } |
| | | LoginUserParent loginUser1 = tokenService.getLoginUser1(); |
| | | if (loginUser1!=null){ |
| | | String userName = loginUser1.getName(); |
| | | if (StringUtils.hasLength(userName)) { |
| | | this.setFieldValByName("updateBy", userName, metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | } else { |
| | | this.setFieldValByName("createTime", "", metaObject); |
| | | this.setFieldValByName("updateTime", "", metaObject); |
| | | } |
| | | return; |
| | | } |
| | | LoginUserParent loginUser2 = tokenService.getLoginUserStudy(); |
| | | if (loginUser2!=null){ |
| | | String userName = loginUser2.getName(); |
| | | if (StringUtils.hasLength(userName)) { |
| | | this.setFieldValByName("updateBy", userName, metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | } else { |
| | | this.setFieldValByName("createTime", "", metaObject); |
| | | this.setFieldValByName("updateTime", "", metaObject); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson2.util.UUIDUtils; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | |
| | | @PostMapping("/addGoods") |
| | | @ApiOperation(value = "添加", tags = {"后台-商品管理"}) |
| | | public R addGoods(@RequestBody TGoods dto) { |
| | | dto.setSurplus(dto.getTotal()); |
| | | goodsService.save(dto); |
| | | return R.ok("添加成功"); |
| | | } |
| | |
| | | } |
| | | @GetMapping("/exchangeRecordParent") |
| | | @ApiOperation(value = "家长端-兑换记录", tags = {"家长端-兑换记录"}) |
| | | public R<List<TOrder>> exchangeRecordParent() { |
| | | public R<Page<TOrder>> exchangeRecordParent(Integer pageNumber,Integer pageSize) { |
| | | if (tokenService.getLoginUser1() == null){ |
| | | return R.tokenError("登录失效"); |
| | | } |
| | | return R.ok(orderService.lambdaQuery().eq(TOrder::getUserId, tokenService.getLoginUser1().getUserid()) |
| | | .orderByDesc(TOrder::getCreateTime).list()); |
| | | Page<TOrder> page = orderService.page(new Page<>(pageNumber, pageSize), new QueryWrapper<TOrder>().eq("userId", tokenService.getLoginUser1().getUserid()) |
| | | .orderByDesc("createTime")); |
| | | List<TOrder> records = page.getRecords(); |
| | | for (TOrder tOrder : records) { |
| | | TGoods byId = goodsService.getById(tOrder.getGoodsId()); |
| | | tOrder.setName(byId.getName()); |
| | | tOrder.setImg(byId.getCoverImg()); |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | if (StringUtils.hasLength(byId.getTypeIds())){ |
| | | String[] split = byId.getTypeIds().split(","); |
| | | for (String s : split) { |
| | | TGoodsType byId1 = goodsTypeService.getById(s); |
| | | stringBuilder.append(byId1.getName()).append("|"); |
| | | } |
| | | // 去除最后一个字符 |
| | | stringBuilder.deleteCharAt(stringBuilder.length() - 1); |
| | | tOrder.setType(stringBuilder.toString()); |
| | | } |
| | | } |
| | | |
| | | return R.ok(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | Recipient byId = recipientService.getById(id); |
| | | byId.setIsDefault(1); |
| | | recipientService.updateById(byId); |
| | | // 如果设置为默认地址 那么要将之前的默认地址取消掉 |
| | | List<Recipient> userId = recipientService.list(new QueryWrapper<Recipient>() |
| | | .eq("userId", tokenService.getLoginUser1().getUserid()) |
| | | .ne("id",byId.getId())); |
| | | for (Recipient recipient1 : userId) { |
| | | recipient1.setIsDefault(0); |
| | | recipientService.updateById(recipient1); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | /** |
| | |
| | | Recipient byId = recipientService.getById(id); |
| | | byId.setIsDefault(1); |
| | | recipientService.updateById(byId); |
| | | // 如果设置为默认地址 那么要将之前的默认地址取消掉 |
| | | List<Recipient> userId = recipientService.list(new QueryWrapper<Recipient>() |
| | | .eq("userId", tokenService.getLoginUser1().getUserid()) |
| | | .ne("id",byId.getId())); |
| | | for (Recipient recipient1 : userId) { |
| | | recipient1.setIsDefault(0); |
| | | recipientService.updateById(recipient1); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "学习端-新增收货地址/修改收货地址", tags = {"学习端-新增收货地址/修改收货地址"}) |
| | | public R<String> addressSave(@RequestBody Recipient recipient) { |
| | | recipient.setUserId(tokenService.getLoginUserStudy().getUserid()); |
| | | if (recipient.getIsDefault() == 1){ |
| | | // 如果设置为默认地址 那么要将之前的默认地址取消掉 |
| | | List<Recipient> userId = recipientService.list(new QueryWrapper<Recipient>() |
| | | .eq("userId", tokenService.getLoginUser1().getUserid())); |
| | | for (Recipient recipient1 : userId) { |
| | | recipient1.setIsDefault(0); |
| | | recipientService.updateById(recipient1); |
| | | } |
| | | } |
| | | recipientService.addressSaveOrUpdate(recipient); |
| | | return R.ok(); |
| | | } |
| | |
| | | @PostMapping("/addressSaveOrUpdateParent") |
| | | @ApiOperation(value = "家长端-新增收货地址/修改收货地址", tags = {"家长端-新增收货地址/修改收货地址"}) |
| | | public R<String> addressSaveOrUpdateParent(@RequestBody Recipient recipient) { |
| | | if (tokenService.getLoginUser1() == null){ |
| | | return R.tokenError("登录失效!"); |
| | | } |
| | | recipient.setUserId(tokenService.getLoginUser1().getUserid()); |
| | | if (recipient.getId() == null){ |
| | | if (recipient.getId() != null){ |
| | | if (recipient.getIsDefault() == 1){ |
| | | // 如果设置为默认地址 那么要将之前的默认地址取消掉 |
| | | List<Recipient> userId = recipientService.list(new QueryWrapper<Recipient>() |
| | | .eq("userId", tokenService.getLoginUser1().getUserid())); |
| | | for (Recipient recipient1 : userId) { |
| | | recipient1.setIsDefault(0); |
| | | recipientService.updateById(recipient1); |
| | | } |
| | | } |
| | | recipientService.updateById(recipient); |
| | | }else{ |
| | | if (recipient.getIsDefault() == 1){ |
| | | // 如果设置为默认地址 那么要将之前的默认地址取消掉 |
| | | List<Recipient> userId = recipientService.list(new QueryWrapper<Recipient>() |
| | | .eq("userId", tokenService.getLoginUser1().getUserid())); |
| | | for (Recipient recipient1 : userId) { |
| | | recipient1.setIsDefault(0); |
| | | recipientService.updateById(recipient1); |
| | | } |
| | | } |
| | | recipientService.save(recipient); |
| | | |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "地址信息id", name = "id", dataType = "String", required = true) |
| | | }) |
| | | public R<String> addressDeleteParent(@RequestParam String id) { |
| | | public R<String> addressDeleteParent(@RequestParam Integer id) { |
| | | return R.ok(recipientService.removeById(id) ? "删除成功!" : "删除失败!"); |
| | | } |
| | | |
| | |
| | | } |
| | | Recipient userId = recipientService.getById(recipientId); |
| | | TOrder byId = orderService.getById(orderId); |
| | | byId.setConsigneeName(userId.getAddress()); |
| | | byId.setConsigneeName(userId.getRecipient()); |
| | | byId.setConsigneePhone(userId.getRecipientPhone()); |
| | | byId.setConsigneeAddress(userId.getAddress()); |
| | | orderService.updateById(byId); |
| | |
| | | Recipient recipient = recipientService.lambdaQuery() |
| | | .eq(Recipient::getUserId, tokenService.getLoginUser1().getUserid()) |
| | | .eq(Recipient::getIsDefault, 1).one(); |
| | | if (recipient == null){ |
| | | // 随便取一条地址数据 |
| | | List<Recipient> list = recipientService.lambdaQuery() |
| | | .eq(Recipient::getUserId, tokenService.getLoginUser1().getUserid()) |
| | | .eq(Recipient::getIsDefault, 1).list(); |
| | | if (!list.isEmpty()){ |
| | | recipient = list.get(0); |
| | | } |
| | | } |
| | | GoodDetailVO goodDetailVO = goodsService.redeemNow(goodId, recipient); |
| | | LocalDateTime currentDateTime = LocalDateTime.now(); |
| | | // 格式化日期和时间信息 |
| | |
| | | * @param goodExchange 商品信息 |
| | | */ |
| | | @PostMapping("/goodExchange") |
| | | @ApiOperation(value = "学习端-商品兑换确认", tags = {"家长端-商品兑换确认"}) |
| | | @ApiOperation(value = "家长端-商品兑换确认", tags = {"家长端-商品兑换确认"}) |
| | | public R goodExchange(@RequestBody GoodExchangeDTO goodExchange) { |
| | | Recipient recipient = recipientService.getById(goodExchange.getRecipientId()); |
| | | Recipient recipient = recipientService.getById(Integer.valueOf(goodExchange.getRecipientId())); |
| | | return goodsService.goodExchange1(goodExchange, recipient); |
| | | } |
| | | @PostMapping("/goodExchangeStudy") |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BaseModel; |
| | |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @ApiModelProperty("订单编号") |
| | | private String orderNumber; |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty("用户id") |
| | | private Integer userId; |
| | | /** |
| | | * 下单时间 |
| | | */ |
| | | @ApiModelProperty(value = "下单时间") |
| | | private Date insertTime; |
| | | @ApiModelProperty(value = "完成时间") |
| | | private Date completeTime; |
| | | /** |
| | | * 商品id |
| | | */ |
| | | @ApiModelProperty(value = "商品id") |
| | | private Integer goodsId; |
| | | /** |
| | | * 购买数量 |
| | | */ |
| | | @ApiModelProperty(value = "购买数量") |
| | | private Integer count; |
| | | /** |
| | | * 订单状态1待发货2已发货3已完成 |
| | | */ |
| | | @ApiModelProperty(value = "订单状态1待发货2已发货3已完成") |
| | | private Integer state; |
| | | /** |
| | | * 快递名称 |
| | | */ |
| | | @ApiModelProperty(value = "快递名称") |
| | | private String express; |
| | | /** |
| | | * 快递编号 |
| | | */ |
| | | @ApiModelProperty(value = "快递编号") |
| | | private String expressNumber; |
| | | /** |
| | | * 发货时间 |
| | | */ |
| | | @ApiModelProperty(value = "发货时间") |
| | | private Date expressTime; |
| | | /** |
| | | * 消耗积分 |
| | |
| | | private Integer integral; |
| | | @ApiModelProperty(value = "收货人姓名") |
| | | private String consigneeName; |
| | | |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String img; |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String name; |
| | | @TableField(exist = false) |
| | | @ApiModelProperty(value = "商品类型") |
| | | private String type; |
| | | |
| | | /** |
| | | * 消耗积分 |
| | | */ |
| | |
| | | @ApiModelProperty(value = "收货人地址") |
| | | private String consigneeAddress; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | |
| | | import java.io.FileOutputStream; |
| | | import java.io.IOException; |
| | | |
| | | @CrossOrigin |
| | | @RestController |
| | | @RequestMapping("/base/oss") |
| | | public class OssController { |
| | |
| | | @PostMapping("/useGuide1") |
| | | @ApiOperation(value = "列表查询", tags = {"家长端-使用指南"}) |
| | | public R<PageInfo<TUseGuide>> useGuide1(@RequestBody UseGuideQuery query) { |
| | | query.setPageNumber((query.getPageNumber() - 1) * query.getPageSize()); |
| | | QueryWrapper<TUseGuide> wrapper = new QueryWrapper<>(); |
| | | if (StringUtils.hasLength(query.getTitle())){ |
| | | wrapper.like("title",query.getTitle()); |
| | |
| | | wrapper.orderByDesc(strings); |
| | | PageInfo<TUseGuide> res = new PageInfo<>(query.getPageNumber(), query.getPageSize()); |
| | | List<TUseGuide> useGuides = useGuideService.list(wrapper); |
| | | res.setRecords(useGuides); |
| | | List<TUseGuide> useGuides2 = useGuideService.listAll(query); |
| | | PageInfo<TUseGuide> page = useGuideService.page(new PageInfo<>(query.getPageNumber(), query.getPageSize()), wrapper); |
| | | |
| | | res.setRecords(useGuides2); |
| | | res.setTotal(useGuides.size()); |
| | | |
| | | return R.ok(res); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BaseModel; |
| | |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "去除标签后的内容--查看详情使用该字段") |
| | | @TableField(exist = false) |
| | | private String count; |
| | | /** |
| | | * 标题 |
| | | */ |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.management.domain.TUseGuide; |
| | | import com.ruoyi.management.query.UseGuideQuery; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TUseGuideMapper extends BaseMapper<TUseGuide> { |
| | | |
| | | List<TUseGuide> listAll(@Param("req") UseGuideQuery query); |
| | | List<TUseGuide> listAllCount(@Param("req") UseGuideQuery query); |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.management.domain.TUseGuide; |
| | | import com.ruoyi.management.query.UseGuideQuery; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface ITUseGuideService extends IService<TUseGuide> { |
| | | |
| | | List<TUseGuide> listAll(UseGuideQuery query); |
| | | List<TUseGuide> listAllCount(UseGuideQuery query); |
| | | |
| | | } |
| | |
| | | |
| | | import com.ruoyi.management.domain.TUseGuide; |
| | | import com.ruoyi.management.mapper.TUseGuideMapper; |
| | | import com.ruoyi.management.query.UseGuideQuery; |
| | | import com.ruoyi.management.service.ITUseGuideService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TUseGuideServiceImpl extends ServiceImpl<TUseGuideMapper, TUseGuide> implements ITUseGuideService { |
| | | |
| | | @Override |
| | | public List<TUseGuide> listAll(UseGuideQuery query) { |
| | | return this.baseMapper.listAll(query); |
| | | } |
| | | @Override |
| | | public List<TUseGuide> listAllCount(UseGuideQuery query) { |
| | | return this.baseMapper.listAllCount(query); |
| | | } |
| | | } |
| | |
| | | |
| | | public class ObsUploadUtil { |
| | | |
| | | public static String endPoint = "obs.cn-north-4.myhuaweicloud.com"; |
| | | public static String accessKeyId = "X3V6GPYUK1VQ03K0JG4G"; |
| | | public static String accessKeySecret = "CustHR4B9XKdT7hGcEYEpV9UVUoc4pmUhnHckU9h"; |
| | | public static String bucketName = "jkjianshen"; |
| | | public static String oss_domain = "https://jkjianshen.obs.cn-north-4.myhuaweicloud.com/"; |
| | | public static String endPoint = "obs.cn-southwest-2.myhuaweicloud.com"; |
| | | public static String accessKeyId = "LP9N1TLAYN8ERS1PVIYK"; |
| | | public static String accessKeySecret = "bV55lFHi1cG0SYBvnab8yIgDX6etKRSLh5j1gkPR"; |
| | | public static String bucketName = "haitunyingyu"; |
| | | public static String oss_domain = "https://haitunyingyu.obs.cn-southwest-2.myhuaweicloud.com/"; |
| | | // 创建ObsClient实例 |
| | | public static ObsClient obsClient = new ObsClient(accessKeyId, accessKeySecret, endPoint); |
| | | |
| | |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.huawei.apigateway</groupId> |
| | | <artifactId>java-sdk-core</artifactId> |
| | | <version>3.2.5</version> |
| | | <scope>system</scope> |
| | | <systemPath>${project.basedir}/lib/java-sdk-core-3.2.5.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>redis.clients</groupId> |
| | | <artifactId>jedis</artifactId> |
| | | <version>2.9.0</version> |
| | |
| | | @ApiOperation(value = "个人中心-积分明细", tags = {"家长端"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(value = "查询时间 格式yyyy-MM", name = "time", dataType = "Integer"), |
| | | @ApiImplicitParam(value = "页码", name = "pageNum", dataType = "Integer", required = true), |
| | | @ApiImplicitParam(value = "页码", name = "pageNumber", dataType = "Integer", required = true), |
| | | @ApiImplicitParam(value = "每页显示条数", name = "pageSize", dataType = "Integer", required = true) |
| | | }) |
| | | public R<IPage<TIntegralRecord>> integralDetailParent(String time, |
| | | @RequestParam("pageNum") Integer pageNum, |
| | | @RequestParam("pageNumber") Integer pageNumber, |
| | | @RequestParam("pageSize") Integer pageSize) { |
| | | if(tokenService.getLoginUser1() == null){ |
| | | return R.tokenError("登录失效"); |
| | | } |
| | | |
| | | return R.ok(integralRecordService.integralDetail(new Page<>(pageNum, pageSize), tokenService.getLoginUser1().getUserid(), time)); |
| | | return R.ok(integralRecordService.integralDetail(new Page<>(pageNumber, pageSize), tokenService.getLoginUser1().getUserid(), time)); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "购买会员支付操作", tags = {"家长端-个人中心"}) |
| | | @ApiImplicitParams({ |
| | | @ApiImplicitParam(name = "Authorization", value = "Bearer eyJhbGciOiJIUzUxMiJ....", required = true, paramType = "header"), |
| | | @ApiImplicitParam(name = "payType", value = "支付类型 1=微信 2=支付宝", required = true), |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true), |
| | | @ApiImplicitParam(name = "id", value = "会员规格id", required = true), |
| | | |
| | | }) |
| | | public AjaxResult pay(Integer payType, Integer orderId, Integer id) throws Exception { |
| | | TVipOrder tVipOrder = vipOrderService.getById(orderId); |
| | | switch (payType) { |
| | | public AjaxResult pay(@RequestBody PayDTO dto) throws Exception { |
| | | TVipOrder tVipOrder = vipOrderService.getById(dto.getOrderId()); |
| | | switch (dto.getPayType()) { |
| | | case 1: |
| | | return payMoneyUtil.weixinpay |
| | | ("购买会员", "", |
| | | id + "_" + tVipOrder.getId() + "_" + |
| | | dto.getId() + "_" + tVipOrder.getId() + "_" + |
| | | UUIDUtil.getRandomCode(8), |
| | | tVipOrder.getMoney().toString(), |
| | | "/base/wxPayBuyVip", "APP", ""); |
| | | "/base/user/wxPayBuyVip", "APP", ""); |
| | | case 2: |
| | | return payMoneyUtil.alipay |
| | | ("购买会员", |
| | | "购买会员下单支付", |
| | | "", |
| | | id + "_" + tVipOrder.getId() + "_" + |
| | | dto.getId() + "_" + tVipOrder.getId() + "_" + |
| | | UUIDUtil.getRandomCode(8), |
| | | tVipOrder.getMoney().toString(), |
| | | "/base/aliPayBuyVip"); |
| | | "/base/user/aliPayBuyVip"); |
| | | } |
| | | return AjaxResult.success(); |
| | | } |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/aliPayBuyVip") |
| | | @PostMapping("/aliPayBuyVip") |
| | | public void addVipPaymentAliCallback(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | Map<String, String> map = payMoneyUtil.alipayCallback(request); |
| | |
| | | } |
| | | |
| | | @ResponseBody |
| | | @PostMapping("/base/wxPayBuyVip") |
| | | @PostMapping("/wxPayBuyVip") |
| | | public void wxPayBuyPackage(HttpServletRequest request, HttpServletResponse response) { |
| | | try { |
| | | Map<String, String> map = payMoneyUtil.weixinpayCallback(request); |
| | |
| | | @ApiOperation(value = "使用指南", tags = {"家长端-使用指南"}) |
| | | public R<PageInfo<TUseGuide>> useGuide(@RequestBody UseGuideQuery query) { |
| | | PageInfo<TUseGuide> data = managementClient.useGuide1(query).getData(); |
| | | for (TUseGuide record : data.getRecords()) { |
| | | String plainTextContent = record.getAnswer().replaceAll("\\<.*?\\>", ""); |
| | | record.setCount(plainTextContent); |
| | | } |
| | | return R.ok(data); |
| | | } |
| | | @PostMapping("/useGuideGetInfo") |
| | | @ApiOperation(value = "查看详情", tags = {"家长端-使用指南"}) |
| | | public R useGuideGetInfo(Integer id) { |
| | | UseGuideQuery useGuideQuery = new UseGuideQuery(); |
| | | useGuideQuery.setPageNumber(1); |
| | | useGuideQuery.setPageSize(300); |
| | | PageInfo<TUseGuide> data = managementClient.useGuide1(useGuideQuery).getData(); |
| | | for (TUseGuide record : data.getRecords()) { |
| | | if (record.getId() == id){ |
| | | return R.ok(record.getAnswer()); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping("/feedBack") |
| | | @ApiOperation(value = "反馈", tags = {"家长端-意见反馈"}) |
| | |
| | | * @param phone 手机号信息 |
| | | * @return 验证码发送结果 |
| | | */ |
| | | Boolean phoneCode(String phone); |
| | | Boolean phoneCode(String phone) throws Exception; |
| | | |
| | | /** |
| | | * 判断当前登录用户是否为vip |
| | |
| | | import com.ruoyi.study.dto.AppUserQuery; |
| | | import com.ruoyi.study.mapper.TUserMapper; |
| | | import com.ruoyi.study.service.ITUserService; |
| | | import com.ruoyi.study.utils.HWSendSms; |
| | | import com.ruoyi.study.vo.AppUserVO; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.RedisTemplate; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | return this.baseMapper.listAll(query); |
| | | } |
| | | |
| | | @Autowired |
| | | private HWSendSms hwSendSms; |
| | | @Override |
| | | public Boolean phoneCode(String phone) { |
| | | public Boolean phoneCode(String phone) throws Exception { |
| | | // 生成随机 6位数字 验证码 |
| | | String phoneCode = RandomUtil.randomNumbers(6); |
| | | // todo 手机验证码暂时 123456 |
| | | phoneCode = "123456"; |
| | | // phoneCode = "123456"; |
| | | hwSendSms.sendSms(phoneCode, phone); |
| | | // 判断redis中是否存在手机验证码 |
| | | Object phoneCodeRedis = redisTemplate.opsForValue().get(RedisConstants.PHONE_CODE + phone); |
| | | if (phoneCodeRedis == null) { |
New file |
| | |
| | | /* |
| | | * Copyright (c) Huawei Technologies Co., Ltd. 2022-2023. All rights reserved. |
| | | */ |
| | | |
| | | package com.ruoyi.study.utils; |
| | | |
| | | public final class Constant { |
| | | // verify ssl certificate (true) or do not verify (false) |
| | | public static final boolean DO_VERIFY = false; |
| | | |
| | | public static final String HTTPS = "HTTPS"; |
| | | public static final String TRUST_MANAGER_FACTORY = "SunX509"; |
| | | public static final String GM_PROTOCOL = "GMTLS"; |
| | | public static final String INTERNATIONAL_PROTOCOL = "TLSv1.2"; |
| | | public static final String SIGNATURE_ALGORITHM_SDK_HMAC_SHA256 = "SDK-HMAC-SHA256"; |
| | | public static final String SIGNATURE_ALGORITHM_SDK_HMAC_SM3 = "SDK-HMAC-SM3"; |
| | | public static final String[] SUPPORTED_CIPHER_SUITES = {"TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384", |
| | | "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256", "TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256", |
| | | "TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384"}; |
| | | public static final String SECURE_RANDOM_ALGORITHM_NATIVE_PRNG_NON_BLOCKING = "NativePRNGNonBlocking"; |
| | | |
| | | private Constant() { |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.study.utils; |
| | | |
| | | import com.cloud.apigateway.sdk.utils.Client; |
| | | import com.cloud.apigateway.sdk.utils.Request; |
| | | import org.apache.http.Header; |
| | | import org.apache.http.HttpEntity; |
| | | import org.apache.http.HttpResponse; |
| | | import org.apache.http.client.methods.HttpRequestBase; |
| | | import org.apache.http.conn.ssl.NoopHostnameVerifier; |
| | | import org.apache.http.conn.ssl.SSLConnectionSocketFactory; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClients; |
| | | import org.apache.http.ssl.SSLContextBuilder; |
| | | import org.apache.http.util.EntityUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.net.ssl.SSLContext; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLEncoder; |
| | | import java.util.Arrays; |
| | | |
| | | @Component |
| | | public class HWSendSms { |
| | | |
| | | @Value("${huawei.url}") |
| | | private String url; |
| | | @Value("${huawei.appKey}") |
| | | private String appKey; |
| | | @Value("${huawei.appSecret}") |
| | | private String appSecret; |
| | | @Value("${huawei.sender}") |
| | | private String sender; |
| | | @Value("${huawei.templateId}") |
| | | private String templateId; |
| | | @Value("${huawei.signature}") |
| | | private String signature; |
| | | |
| | | private static final Logger LOGGER = LoggerFactory.getLogger(HWSendSms.class); |
| | | |
| | | public static final String UTF_8 = "UTF-8"; |
| | | |
| | | private static CloseableHttpClient client = null; |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | // 为防止因HTTPS证书认证失败造成API调用失败,需要先忽略证书信任问题 |
| | | // client = createIgnoreSSLHttpClient(); |
| | | // sendSms(); |
| | | } |
| | | |
| | | public void sendSms(String code,String receiver) throws Exception { |
| | | client = createIgnoreSSLHttpClient(); |
| | | //必填,请参考"开发准备"获取如下数据,替换为实际值 |
| | | // String url = "https://smsapi.ap-southeast-1.myhuaweicloud.com:443/sms/batchSendSms/v1"; //APP接入地址+接口访问URI |
| | | // // 认证用的appKey和appSecret硬编码到代码中或者明文存储都有很大的安全风险,建议在配置文件或者环境变量中密文存放,使用时解密,确保安全; |
| | | // String appKey = "c8RWg3gg************3Y7x1Ile"; //Application Key |
| | | // String appSecret = "q4Ii87Bh************80SfD7Al"; //Application Secret |
| | | // String sender = "csms12345678"; //中国大陆短信签名通道号或全球短信通道号 |
| | | // String templateId = "8ff55eac1d0b478ab3c06c3c6a492300"; //模板ID |
| | | // |
| | | // //条件必填,中国大陆短信关注,当templateId指定的模板类型为通用模板时生效且必填,必须是已审核通过的,与模板类型一致的签名名称 |
| | | // //全球短信不用关注该参数 |
| | | // String signature = "华为云短信测试"; //签名名称 |
| | | // |
| | | // //必填,全局号码格式(包含国家码),示例:+86151****6789,多个号码之间用英文逗号分隔 |
| | | // String receiver = "+86151****6789,+86152****7890"; //短信接收人号码 |
| | | // |
| | | // //选填,短信状态报告接收地址,推荐使用域名,为空或者不填表示不接收状态报告 |
| | | String statusCallBack = ""; |
| | | |
| | | /** |
| | | * 选填,使用无变量模板时请赋空值 String templateParas = ""; |
| | | * 单变量模板示例:模板内容为"您的验证码是${NUM_6}"时,templateParas可填写为"[\"111111\"]" |
| | | * 双变量模板示例:模板内容为"您有${NUM_2}件快递请到${TXT_20}领取"时,templateParas可填写为"[\"3\",\"人民公园正门\"]" |
| | | * 查看更多模板规范和变量规范:产品介绍>短信模板须知和短信变量须知 |
| | | */ |
| | | String templateParas = "[\""+code+"\"]"; //模板变量,此处以单变量验证码短信为例,请客户自行生成6位验证码,并定义为字符串类型,以杜绝首位0丢失的问题(例如:002569变成了2569)。 |
| | | |
| | | //请求Body,不携带签名名称时,signature请填null |
| | | String body = buildRequestBody(sender, receiver, templateId, templateParas, statusCallBack, signature); |
| | | if (null == body || body.isEmpty()) { |
| | | LOGGER.warn("body is null."); |
| | | return; |
| | | } |
| | | |
| | | Request request = new Request(); |
| | | request.setKey(appKey); |
| | | request.setSecret(appSecret); |
| | | request.setMethod("POST"); |
| | | request.setUrl(url); |
| | | request.addHeader("Content-Type", "application/x-www-form-urlencoded"); |
| | | request.setBody(body); |
| | | LOGGER.info("Print the body: {}", body); |
| | | try { |
| | | HttpRequestBase signedRequest = Client.sign(request, Constant.SIGNATURE_ALGORITHM_SDK_HMAC_SHA256); |
| | | LOGGER.info("Print the authorization: {}", Arrays.toString(signedRequest.getHeaders("Authorization"))); |
| | | Header[] requestAllHeaders = signedRequest.getAllHeaders(); |
| | | for (Header h : requestAllHeaders) { |
| | | LOGGER.info("req Header with name: {} and value: {}", h.getName(), h.getValue()); |
| | | } |
| | | |
| | | HttpResponse response = client.execute(signedRequest); |
| | | |
| | | LOGGER.info("Print the status line of the response: {}", response.getStatusLine().toString()); |
| | | Header[] resHeaders = response.getAllHeaders(); |
| | | for (Header h : resHeaders) { |
| | | LOGGER.info("Processing Header with name: {} and value: {}", h.getName(), h.getValue()); |
| | | } |
| | | HttpEntity resEntity = response.getEntity(); |
| | | if (resEntity != null) { |
| | | LOGGER.info("Processing Body with name: {} and value: {}", |
| | | System.getProperty("line.separator"), |
| | | EntityUtils.toString(resEntity, "UTF-8")); |
| | | } |
| | | } catch (Exception e) { |
| | | LOGGER.info(e.getMessage(), e); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | public CloseableHttpClient createIgnoreSSLHttpClient() throws Exception { |
| | | SSLContext sslContext = new SSLContextBuilder().loadTrustMaterial(null, (x509CertChain, authType) -> true).build(); |
| | | return HttpClients.custom().setSSLSocketFactory(new SSLConnectionSocketFactory(sslContext, NoopHostnameVerifier.INSTANCE)).build(); |
| | | } |
| | | |
| | | static String buildRequestBody(String sender, String receiver, String templateId, String templateParas, |
| | | String statusCallBack, String signature) throws UnsupportedEncodingException { |
| | | if (null == sender || null == receiver || null == templateId || sender.isEmpty() || receiver.isEmpty() |
| | | || templateId.isEmpty()) { |
| | | System.out.println("buildRequestBody(): sender, receiver or templateId is null."); |
| | | return null; |
| | | } |
| | | |
| | | StringBuilder body = new StringBuilder(); |
| | | appendToBody(body, "from=", sender); |
| | | appendToBody(body, "&to=", receiver); |
| | | appendToBody(body, "&templateId=", templateId); |
| | | appendToBody(body, "&templateParas=", templateParas); |
| | | appendToBody(body, "&statusCallback=", statusCallBack); |
| | | appendToBody(body, "&signature=", signature); |
| | | return body.toString(); |
| | | } |
| | | |
| | | private static void appendToBody(StringBuilder body, String key, String val) throws UnsupportedEncodingException { |
| | | if (null != val && !val.isEmpty()) { |
| | | LOGGER.info("Print appendToBody: {}:{}", key, val); |
| | | body.append(key).append(URLEncoder.encode(val, UTF_8)); |
| | | } |
| | | } |
| | | } |
| | |
| | | */ |
| | | @Component |
| | | public class PayMoneyUtil { |
| | | private String aliAppid = "2021004137643228";//支付宝appid |
| | | private String aliAppid = "2021004148611238";//支付宝appid |
| | | |
| | | private String appPrivateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCBMKFpKKMTSL9XAotOLeWsFMwzj6UEnukKX6pkZ4Nn1/0VayNc1N+BJqVA8aCr09dDsrBKJ67bJYNwwgr4rfVRz6DxJmctapfyf41/fwMGLwkG96Mcis1+XI8fRqMctf7RoWwVbuvkX0x93kpuNlHJCSuKzc+iT9qPWNp0DwPQa/T354fzztAmGWREY6v67OeTI/kFO5pnOvRqvPPgGCkvqQmGoSk6BQavQSy0jqyOf98FfvCT3GZPhohHqxUAIy1NjUs98KgLUTgv9Uo7OoLrzGOkQBIkL53bgh7rkLukgbo9D/qYxo3rK55LgJtDgP+qZrsVPDwa65Ntyi/r0WJLAgMBAAECggEAI11AkhzBp0G+vv6/S4Nc36JB08t6jK1DdceCSUHcwsxpRzew0nSjSiNeEU0TgnXW830yrNn4D51RQcicYD6ebOq9T8YHcHNBbOxlu4T1OvgdLH8Vc3a7kd+cfh9D/1QCkTfy8lsOz9EWi04SaeEMuk98T97O+8uINL1J74M8tAyzzNZqcsGjCvCSoVqdUGVVJX/5tkTq1HI4y+jAyJYg+JhhKzxI0grHb6ktzdJ+iIClHJ7hV3CFV6S4FKcAhOjcsB+r7W6pc98mlHqK+EuN3i7SUv81XWVfHrp12hiFn6J4x+NturK3i2MfQA9aH7BRJTTo+DH7tYseID5s8q3GgQKBgQDeLWfuzSbS2RoBHdO89tsUPaSgif5RbJvp/Cl5zBnfyWxk/knUWMzTyqYiuOVU9/qWF4i5uvFCnpaS8oPKvCiG2YEG+k0bT63r129K8gRqqx62PisNqEeLmOjj+HuI9flV8pOzJBkLNNbdundkh3Li6eiv1Di47+H3dPdha3K60QKBgQCU21y7qssRRS7pbi3GygoZC1Xq236RZJor2ZPPOJi4flyyLhQI0S+dpzyb8t32y8mHTIrDZnK/km16tQChe9cCkKOyaUYvJOIbfce0A+GWM5jzS3Yan0GtoNBNqd+ayrqAVxjS++RU55wBpgEFNB1lyp+Es982HjYivrWCDoPaWwKBgDcMbQoADrSDUiwgpcvWJiX3uAiG6FpoXKE291fUODz4fUDwuH5Cmk2Hkm5b/YZ2AsKZhijupsRo4sn6CKl8wVXYIl4GOoCf12nt8QdSu8FqMKva73Ps0/1En7+MW59twp+HAQ2LziC2sN4zS02/Obn7Vsnp/TvlQ8m6U2jx5HVhAoGAY4Q7/OL0G7mq4ThdtjbAhXnEmNzhQwaE46f0X2cxArbH9f9EOZjQQo/Zv1ChACvBsYiEhJnrQRP9yTlVEKCgYACez9n9p+r6lvKCHmEx4Z7hNFZQwP+Tgyat3B4jdXLvOHoCCJuKTREChT+cEwSCWtkZyDgQlDeibZwd8LMPh10CgYBnZtYU6bo7l5CtXWQbpZB/cl7bznHxtfNYhiqKNcUx1+zh6tLDcwmk+CkFjHWYgWCiXOu+EeSQys7v/ps/C1nKUVEy1bytLNU3pdy63aZ/6WzD8MIwOwkZZch9sm9LK//Ar+E7CtC2NsxSN1elqjoEVeQMqKSj5MNt8XlDlCzwVQ==";//支付宝开发者应用私钥 |
| | | private String appPrivateKey = "MIIEvAIBADANBgkqhkiG9w0BAQEFAASCBKYwggSiAgEAAoIBAQCf97KhWZkjei2hz/0hYSClbGF35gOKOHRWaod9JSBk2dZuss/E7Lfc/836GYknQmYYvUmcye0KGF1ahEx+p0ekgDeJ/4PKxMaQWa0nfobI4EP5d8pssFG5wf6u3aVXt/bHdMW2RcwOtGXpcf3zWBu9ZYw6f8EmH/ne9Rvo9qbPS7deTfI/4xY7HRHM4aR3i9Kt5RZwYhwC4XYrcBbjIf3Cc7fwC2dLg1yfOm2FROm7D+wQl1wIR88Jupo3Flo43sHIByOQjijZIf4gGakN7jHMIeC1sZZUNrBFO5sKGHYzmFPYb+kLA5CCvFC2GBsw96oYSkRO9iuROrw7tjS9RzZJAgMBAAECggEARBIzgVWPRPmI0YKgRMQAEGS+VTcb6oV7fAp4/Vf/IOtRxGly4GmbFAAGtpaHNp2atIxX9tA2fkU/9HS32G12nxmwiJiijHaPyH1goZ3F3VURl+bRzM56+IEEz4SiB2HRMa8PMzEgVGGPvHc1iYfExiOgOISEvKR+v9GtvsS21x7DaME9CfLysSc7uyker1i/Z1vzmyHM/M8vAt9bWVCROs/j7rq4EQ+rLTi1KIGvfZlxbeI+zY5vip8cJ/85o7/xIaPHxURSQglv4WOQcJVh9cctsmzNQOyFml6n0gwuHBfWcsXJMBHYpEcQT11h/Os4UvQqpQSC013B0SDmJA24AQKBgQDnv5tBET3JOKwWGSvmBxYaRYzjUPqDXYFMYVRWSGYdX/0xKYZlHBwJwaQVdydyESoTmh1TKbl130JWYBRM/HCM9QsszRsByQIi65RhF2ZezfeW8ggSHe/zkcruEy3iLN0+n+TZ2zFKFn1ADB+YLVcdMprNozFDQA9o0zAw3McGMQKBgQCwtSCABhvbu46uIYbNDISQ5dEfYGt8wLqs7aqtIzdya0Pd4kp9mO83SC57llnCSCUoJc9AY6YFgwv1DPPv1YgC32xh5dqhDmbHRyRT9/IjFUmKTORqYhoHGjZYzLobzt1H8QzurI/0juk/wFEQW8bWDoxiBkA1gAQ1wAj1lbTzmQKBgAcmbD3XsFZS/0w3Ppl8QnxRBQXGa9Q9wE2A+z8mQLBLU95+b30THvJWHR/kaz0jtm6gZKM6OFSgrMVJdZbiev5+WPfq5BhsATrelddhB3GJXUg083bLoamcJ+ysfs/pnnHeMQtfreehRgAB37+sNnHaK9iIXm66vT74tRXs2d8hAoGAV4ew7JmaDRLvzyN+UW2k8N1V5DPvqmERVv13MMIkAgJOIMep3GL4A6s2kzNbjNgNx8BK0/tITqymLKFY5/EeqUWguzGPRX4LvSRpQ0qrX2N5BQ+niWbEu8XpK71lZsbmZ29o14UU3bA4q8KIpRDBAmE8eoXcImQiMbnI9lVMx+kCgYBZ4xHtnJhX57pY6b8PWDBOHPJC6tNqQ4Ovf43pRWvTJFYE4KxZkE1TFa4LqfzmtnDMxfbRg+8iKYKS3LWmF1mwlQwVF4tA+7Dtem5TTft/hxeBh1mINsxYJm+meB79T/huLEnUPoGUXHevtCr8aWTnvJu6GES4LcrgMLfWPtXJHw==";//支付宝开发者应用私钥 |
| | | |
| | | private String alipayPublicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAouYvZ1v4RiydwNOnGcU0Hb4hQu0x6XUooaE2Bi6/atNOobtFdunnATGP6OMOW7yF9DpP8qH5mbFXAiaQD721y/7qlayI50UcV4mngRU4ZcaAVE3bp721Eg2H85RISa+Tb1CiOh+pc9p4l5UBseKsvB2ruHHForfZDPI8FL7AVUKBYCQPsa4zL6KAO2C6KULaTg/lCa+bYQKU0n9ca569VtdsqJUyxB9eSZjVd+9nKl62FLqp2NELGj7cXqiVBgDnBnVS5ZUO3mrBM5z/AxQbw3RwE3JqdkhzUA1BFjejAlT2zIGNOjUFagF8ao0wGElYfuk0bum6Hz5qWAt02QdNNwIDAQAB";//支付宝应用公钥 |
| | | |
| | | private String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAw4KgQIQq9Pl91tG9NS8N9bs7xF89/L2jHgLWuG5kStoorvm5j3W5Bc0jSW01HgEXSks99xKeOhfebHurTehuamIs/2G8atT4haejl4Qip2ZvkhsQm+So3oFj2E8Q1QGrpISc9TwHxfpErEJInc8xd5TjYkPxVFQY25oQ3O2yOvvWxdxGZttdEDm6mE+udNjY72YqUvh1U9cMCIpj+4AugHh/5L3eo5VHQNA6rIvX1WSFqJ/vcXrT3RSPSg33lD0MEMR9+ICR88mPi6zbt5dTbCR8us/qK7+hJ3yb3LyQxNH+2DmyVYX5pSEkXMK+2mTwaUWd1z5Oeg1iXW6ev3f+9wIDAQAB";//支付宝支付公钥 |
| | | private String alipay_public_key = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuSr1mgTOM33N+io1TlkeRu3JeUVCXzBJvxMZZLSEgFW0cT2oDXFnJxDio68B3QKrMjznY2MJVgTkmHJiThr8InHLkuSSTIovf1PWiAoe9ZvwPNS9ijipb5GCri+JFZv+l5P1XHoCuQSrJ03Ubbbi4kVPEYcRRou2iKgtBYzbqwYabcUfems1pthW9vxa3s9QIcSSzI3/LzAJVQOB16GwB9+flkbHI6HikoKBVWImGrj6PRzDp2xY8Q6ceGV6MaVYitnLzIcGKWJ6gPhQMHu9JvgSBLSjGqioxMaQhzifVzIQTds9Y2uNF3/bzCEl/M8k1qknJ+0cuwdA+hJmvBJJZwIDAQAB";//支付宝支付公钥 |
| | | |
| | | private String smid = "2088330203191220";//平台支付宝商户号... |
| | | |
| | | private String appid = "wx41d32f362ba0f911";//微信appid |
| | | private String appid = "wx723c6b080f204773";//微信appid |
| | | |
| | | private String appSecret = "cf0ebf950f5926a69041a0e2bbe20f3e"; |
| | | |
| | |
| | | |
| | | private String key = "6f5e0c2dcabfa9c27b5da5836a362fef";//微信商户号 |
| | | |
| | | private String callbackPath = "https://jkcyl.cn/app";//支付回调网关地址 |
| | | private String callbackPath = "https://v7ro848ar5jx.ngrok.xiaomiqiu123.top/study";//支付回调网关地址 |
| | | // private String callbackPath = "https://jkcyl.cn/app";//支付回调网关地址 |
| | | |
| | | private String app_cert_path = "C:/cert/alipay/user/app_cert_path.crt";//应用公钥证书路径 |
| | | |
New file |
| | |
| | | package com.ruoyi.study.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.study.domain.TStudyAnswer; |
| | | import com.ruoyi.study.domain.TSubject; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author HJL |
| | | * @version 1.0 |
| | | * @since 2024-05-22 14:48 |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "有问有答VO信息类") |
| | | public class PayDTO{ |
| | | |
| | | @ApiModelProperty(value = "支付类型 1=微信 2=支付宝",required = true) |
| | | private Integer payType; |
| | | @ApiModelProperty(value = "订单id",required = true) |
| | | private Integer orderId; |
| | | @ApiModelProperty(value = "会员规格id",required = true) |
| | | private Integer id; |
| | | |
| | | |
| | | } |
| | |
| | | # 共享配置 |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | |
| | | huawei: |
| | | url: https://smsapi.cn-southwest-2.myhuaweicloud.com:443/sms/batchSendSms/v1 #应用程序唯一标识 |
| | | appKey: WlLCBjQ3hg9esHFLk1mUM8eqqK36 |
| | | appSecret: TRK3BaNAxs3eW1rQdG46oh7yvw6Q |
| | | sender: 8824060605338 |
| | | templateId: e5ddbbbac6e0460f87ae893566f71c0d |
| | | signature: 众慧智能教育 |