修改金豆为金币
This commit is contained in:
parent
b763d69419
commit
6d96ea7dbd
|
|
@ -249,7 +249,7 @@ INSERT INTO `common_info` VALUES (420, '2023-08-28 11:23:02', NULL, '一级佣
|
|||
INSERT INTO `common_info` VALUES (421, '2024-03-05 16:55:37', NULL, '二级佣金比例', 421, '0.04', 'fuwufei');
|
||||
INSERT INTO `common_info` VALUES (450, '2024-02-02 18:12:27', NULL, '剧导入模板', 450, 'https://duanju.xianmxkj.com/剧导入模板.xlsx', 'xitong');
|
||||
INSERT INTO `common_info` VALUES (451, '2024-02-02 18:12:49', NULL, '集导入模板', 451, 'https://duanju.xianmxkj.com/集导入模板.xlsx', 'xitong');
|
||||
INSERT INTO `common_info` VALUES (500, '2020-02-25 20:44:15', NULL, '付费须知说明', 500, '金豆一经购买不予退款,未满18岁需在监护人的指导、同意下进行付费操作', 'xieyi');
|
||||
INSERT INTO `common_info` VALUES (500, '2020-02-25 20:44:15', NULL, '付费须知说明', 500, '金币一经购买不予退款,未满18岁需在监护人的指导、同意下进行付费操作', 'xieyi');
|
||||
INSERT INTO `common_info` VALUES (800, '2024-05-30 18:08:11', NULL, '腾讯云oss AccessKey', 800, '', 'oss');
|
||||
INSERT INTO `common_info` VALUES (801, '2024-05-30 18:08:06', NULL, '腾讯云oss SecretKey', 801, '', 'oss');
|
||||
INSERT INTO `common_info` VALUES (802, '2024-05-30 18:08:17', NULL, '腾讯云oss bucket地域', 802, 'ap-shanghai', 'oss');
|
||||
|
|
@ -274,7 +274,7 @@ INSERT INTO `common_info` VALUES (821, '2024-01-06 11:40:25', NULL, '抖音原
|
|||
INSERT INTO `common_info` VALUES (822, '2024-06-26 16:07:33', NULL, '小程序AppKey', 822, '', 'xitong');
|
||||
INSERT INTO `common_info` VALUES (823, '2024-06-26 16:07:18', NULL, '微信虚拟支付OfferID', 823, '', 'xitong');
|
||||
INSERT INTO `common_info` VALUES (824, '2024-07-08 02:19:39', NULL, '微信虚拟支付环境 0正式环境 1沙盒环境', 824, '0', 'xitong');
|
||||
INSERT INTO `common_info` VALUES (825, '2024-01-06 11:40:25', NULL, '充值提示', 825, '金豆一经购买不予退款,未满18岁需在监护人的指导、同意下进行付费操作', 'xitong');
|
||||
INSERT INTO `common_info` VALUES (825, '2024-01-06 11:40:25', NULL, '充值提示', 825, '金币一经购买不予退款,未满18岁需在监护人的指导、同意下进行付费操作', 'xitong');
|
||||
INSERT INTO `common_info` VALUES (826, '2024-06-26 16:07:54', NULL, '小程序Token', 826, '', 'weixin');
|
||||
INSERT INTO `common_info` VALUES (827, '2024-06-26 16:07:44', NULL, '小程序EncodingAESKey ', 827, '', 'weixin');
|
||||
INSERT INTO `common_info` VALUES (828, '2020-02-25 20:43:59', NULL, '快手AppId', 828, '', 'xitong');
|
||||
|
|
|
|||
|
|
@ -297,15 +297,15 @@ public class UserController {
|
|||
|
||||
|
||||
@PostMapping("addCannotMoney/{userId}/{money}")
|
||||
@ApiOperation("添加金豆")
|
||||
@ApiOperation("添加金币")
|
||||
public Result addCannotMoney(@PathVariable("userId") Long userId, @PathVariable("money") Double money) {
|
||||
userMoneyService.updateMoney(1, userId, money);
|
||||
//inviteMoneyDao.updateInviteMoneySum(money,userId);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(userId);
|
||||
userMoneyDetails.setTitle("[增加金豆]平台增加金豆:" + money);
|
||||
userMoneyDetails.setContent("[增加金豆]平台增加金豆:" + money);
|
||||
userMoneyDetails.setTitle("[增加金币]平台增加金币:" + money);
|
||||
userMoneyDetails.setContent("[增加金币]平台增加金币:" + money);
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(new BigDecimal(money));
|
||||
|
|
@ -325,15 +325,15 @@ public class UserController {
|
|||
}
|
||||
|
||||
@PostMapping("subCannotMoney/{userId}/{money}")
|
||||
@ApiOperation("减少金豆")
|
||||
@ApiOperation("减少金币")
|
||||
public Result subCannotMoney(@PathVariable("userId") Long userId, @PathVariable("money") Double money) {
|
||||
userMoneyService.updateMoney(2, userId, money);
|
||||
//inviteMoneyDao.updateInviteMoneySumSub(money,userId);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(userId);
|
||||
userMoneyDetails.setTitle("[减少金豆]平台减少金豆:" + money);
|
||||
userMoneyDetails.setContent("平台减少金豆:" + money);
|
||||
userMoneyDetails.setTitle("[减少金币]平台减少金币:" + money);
|
||||
userMoneyDetails.setContent("平台减少金币:" + money);
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(new BigDecimal(money));
|
||||
|
|
@ -344,18 +344,18 @@ public class UserController {
|
|||
}
|
||||
|
||||
@PostMapping("/updateSysUserMoney")
|
||||
@ApiOperation("修改金豆")
|
||||
@ApiOperation("修改金币")
|
||||
public Result updateSysUserMoney(Long userId, Double money,Integer type) {
|
||||
userMoneyService.updateSysMoney(type, userId, money);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setSysUserId(userId);
|
||||
if(type==1){
|
||||
userMoneyDetails.setTitle("[增加金豆]平台增加金豆:" + money);
|
||||
userMoneyDetails.setContent("[增加金豆]平台增加金豆:" + money);
|
||||
userMoneyDetails.setTitle("[增加金币]平台增加金币:" + money);
|
||||
userMoneyDetails.setContent("[增加金币]平台增加金币:" + money);
|
||||
}else{
|
||||
userMoneyDetails.setTitle("[减少金豆]平台减少金豆:" + money);
|
||||
userMoneyDetails.setContent("[减少金豆]平台减少金豆:" + money);
|
||||
userMoneyDetails.setTitle("[减少金币]平台减少金币:" + money);
|
||||
userMoneyDetails.setContent("[减少金币]平台减少金币:" + money);
|
||||
}
|
||||
userMoneyDetails.setMoneyType(2);
|
||||
userMoneyDetails.setType(type);
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ public class UserDetails {
|
|||
*/
|
||||
private int monthlyOrderNum;
|
||||
/**
|
||||
* 本月充值金豆
|
||||
* 本月充值金币
|
||||
*/
|
||||
private BigDecimal monthlyRechargeMoney;
|
||||
/**
|
||||
|
|
@ -19,7 +19,7 @@ public class UserDetails {
|
|||
*/
|
||||
private int monthWithdrawalNum;
|
||||
/**
|
||||
* 本月提现金豆
|
||||
* 本月提现金币
|
||||
*/
|
||||
private BigDecimal monthlyWithdrawalMoney;
|
||||
|
||||
|
|
|
|||
|
|
@ -27,13 +27,13 @@ public class UserMoney implements Serializable {
|
|||
private Long id;
|
||||
|
||||
/**
|
||||
* 钱包金豆
|
||||
* 钱包金币
|
||||
*/
|
||||
@ApiModelProperty("钱包金豆")
|
||||
@ApiModelProperty("钱包金币")
|
||||
private BigDecimal money;
|
||||
|
||||
/**
|
||||
* 钱包金豆
|
||||
* 钱包金币
|
||||
*/
|
||||
@ApiModelProperty("钱包余额 钱")
|
||||
private BigDecimal amount;
|
||||
|
|
|
|||
|
|
@ -66,9 +66,9 @@ public class UserMoneyDetails implements Serializable {
|
|||
@ApiModelProperty("状态 1待支付 2已到账 3取消")
|
||||
private Integer state;
|
||||
/**
|
||||
* 金豆
|
||||
* 金币
|
||||
*/
|
||||
@ApiModelProperty("金豆")
|
||||
@ApiModelProperty("金币")
|
||||
private BigDecimal money;
|
||||
/**
|
||||
* 内容
|
||||
|
|
@ -76,7 +76,7 @@ public class UserMoneyDetails implements Serializable {
|
|||
@ApiModelProperty("内容")
|
||||
private String content;
|
||||
|
||||
@ApiModelProperty("金额类型: 1 红包,2金豆")
|
||||
@ApiModelProperty("金额类型: 1 红包,2金币")
|
||||
private Integer moneyType;
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ public class CourseOrderResponse implements Serializable {
|
|||
*/
|
||||
private int coursenum;
|
||||
/**
|
||||
* 售卖金豆
|
||||
* 售卖金币
|
||||
*/
|
||||
private Double coursemoney;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -154,8 +154,8 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(userEntity.getUserId());
|
||||
userMoneyDetails.setTitle("[增加金豆]赠送金豆:" + money);
|
||||
userMoneyDetails.setContent("[增加金豆]赠送金豆:" + money);
|
||||
userMoneyDetails.setTitle("[增加金币]赠送金币:" + money);
|
||||
userMoneyDetails.setContent("[增加金币]赠送金币:" + money);
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(new BigDecimal(money));
|
||||
|
|
@ -183,8 +183,8 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(userEntity.getUserId());
|
||||
userMoneyDetails.setTitle("[增加金豆]赠送金豆:" + money);
|
||||
userMoneyDetails.setContent("[增加金豆]赠送金豆:" + money);
|
||||
userMoneyDetails.setTitle("[增加金币]赠送金币:" + money);
|
||||
userMoneyDetails.setContent("[增加金币]赠送金币:" + money);
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(new BigDecimal(money));
|
||||
|
|
@ -229,7 +229,7 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
|
|||
UserMoneyDetails userMoneyDetails=new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(userId);
|
||||
userMoneyDetails.setTitle("[新用户红包]");
|
||||
userMoneyDetails.setContent("增加金豆:" + money);
|
||||
userMoneyDetails.setContent("增加金币:" + money);
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(money);
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public class CompletAward extends Model<CompletAward> {
|
|||
private Long id;
|
||||
@ApiModelProperty("人数")
|
||||
private Integer inviteCount;
|
||||
@ApiModelProperty("1 金豆 2 红包")
|
||||
@ApiModelProperty("1 金币 2 红包")
|
||||
private Integer type;
|
||||
@ApiModelProperty("奖励数量")
|
||||
private BigDecimal awardNumber;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class Coupon implements Serializable {
|
|||
*/
|
||||
private String couponName;
|
||||
/**
|
||||
* 可抵扣金豆
|
||||
* 可抵扣金币
|
||||
*/
|
||||
private BigDecimal money;
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class CouponUser implements Serializable {
|
|||
*/
|
||||
private Long userId;
|
||||
/**
|
||||
* 优惠券金豆
|
||||
* 优惠券金币
|
||||
*/
|
||||
private BigDecimal couponMoney;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class UserIntegralDetailsServiceImpl extends ServiceImpl<UserIntegralDeta
|
|||
userIntegralService.updateIntegral(2,userId,integral);
|
||||
UserIntegralDetails userIntegralDetails=new UserIntegralDetails();
|
||||
userIntegralDetails.setClassify(0);
|
||||
userIntegralDetails.setContent("积分兑换金豆,消耗积分:"+integral+",兑换金豆:"+money);
|
||||
userIntegralDetails.setContent("积分兑换金币,消耗积分:"+integral+",兑换金币:"+money);
|
||||
userIntegralDetails.setCreateTime(sdf.format(new Date()));
|
||||
userIntegralDetails.setNum(integral);
|
||||
userIntegralDetails.setType(2);
|
||||
|
|
@ -124,7 +124,7 @@ public class UserIntegralDetailsServiceImpl extends ServiceImpl<UserIntegralDeta
|
|||
UserMoneyDetails userMoneyDetails=new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(userId);
|
||||
userMoneyDetails.setTitle("[积分]积分兑换");
|
||||
userMoneyDetails.setContent("增加金豆:"+money);
|
||||
userMoneyDetails.setContent("增加金币:"+money);
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(BigDecimal.valueOf(v));
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class InviteMoney implements Serializable {
|
|||
private Double moneySum;
|
||||
|
||||
/**
|
||||
* 当前金豆
|
||||
* 当前金币
|
||||
*/
|
||||
private Double money;
|
||||
|
||||
|
|
|
|||
|
|
@ -150,7 +150,7 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
|
|||
user.setInviterCode(userEntity.getInvitationCode());
|
||||
userService.updateById(user);
|
||||
|
||||
//金豆
|
||||
// 金币
|
||||
int money = Integer.parseInt(commonInfoService.findOne(911).getValue());
|
||||
if (money > 0) {
|
||||
UpdateWrapper<UserMoney> updateWrapper = new UpdateWrapper<>();
|
||||
|
|
@ -164,8 +164,8 @@ public class InviteServiceImpl extends ServiceImpl<InviteDao, Invite> implements
|
|||
userMoneyDetails.setClassify(6);
|
||||
userMoneyDetails.setMoney(new BigDecimal(money));
|
||||
userMoneyDetails.setCreateTime(format);
|
||||
userMoneyDetails.setTitle("[分享奖励金豆]");
|
||||
userMoneyDetails.setContent("获取金豆:" + money);
|
||||
userMoneyDetails.setTitle("[分享奖励金币]");
|
||||
userMoneyDetails.setContent("获取金币:" + money);
|
||||
userMoneyDetails.setMoneyType(2);
|
||||
userMoneyDetailsService.save(userMoneyDetails);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ public class OrdersController extends AbstractController {
|
|||
}
|
||||
|
||||
@GetMapping("/selectFenXiaoMoney")
|
||||
@ApiOperation("统计分销金豆")
|
||||
@ApiOperation("统计分销金币")
|
||||
public Result selectFenXiaoMoney(Long sysUserId,Integer flag,String time){
|
||||
//一级
|
||||
Double oneMoney = ordersService.selectFenXiaoMoney(1, sysUserId, flag, time);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ public class Orders implements Serializable {
|
|||
*/
|
||||
private Course course;
|
||||
/**
|
||||
* 支付金豆
|
||||
* 支付金币
|
||||
*/
|
||||
private BigDecimal payMoney;
|
||||
|
||||
|
|
@ -70,7 +70,7 @@ public class Orders implements Serializable {
|
|||
private Integer diamond;
|
||||
|
||||
/**
|
||||
* 支付方式 1微信app 2微信公众号 3微信小程序 4支付宝 5会员免费 6金豆 7抖音 8快手 9无忧付(支付宝)
|
||||
* 支付方式 1微信app 2微信公众号 3微信小程序 4支付宝 5会员免费 6金币 7抖音 8快手 9无忧付(支付宝)
|
||||
*/
|
||||
private Integer payWay;
|
||||
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
orders.setCourseId(courseId);
|
||||
orders.setCourseDetailsId(courseDetailsId);
|
||||
|
||||
// 金豆和金额的比例
|
||||
// 金币和金额的比例
|
||||
String value = commonInfoService.findOne(914).getValue();
|
||||
BigDecimal v = new BigDecimal(value);
|
||||
if (courseDetailsId != null) {
|
||||
|
|
@ -294,7 +294,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
Orders orders = new Orders();
|
||||
//设置订单编号
|
||||
orders.setOrdersNo(AliPayOrderUtil.createOrderId());
|
||||
//设置支付金豆
|
||||
//设置支付金币
|
||||
orders.setPayMoney(vipDetails.getMoney());
|
||||
orders.setPayDiamond(vipDetails.getPayDiamond());
|
||||
//设置订单类型
|
||||
|
|
@ -349,7 +349,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setMoney(orders.getPayDiamond());
|
||||
userMoneyDetails.setUserId(orders.getUserId());
|
||||
userMoneyDetails.setContent("金豆支付订单");
|
||||
userMoneyDetails.setContent("金币支付订单");
|
||||
userMoneyDetails.setTitle("下单成功,订单号:" + orders.getOrdersNo());
|
||||
userMoneyDetails.setType(2);
|
||||
userMoneyDetails.setClassify(1);
|
||||
|
|
@ -363,7 +363,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
orders.setPayTime(DateUtils.format(new Date()));
|
||||
|
||||
|
||||
// 金豆支付不给佣金
|
||||
// 金币支付不给佣金
|
||||
// UserEntity byUser = userService.queryByInvitationCode(userEntity.getInviterCode());
|
||||
// Map map = inviteService.updateInvite(byUser, DateUtils.format(new Date()), userEntity.getUserId(), orders.getPayMoney());
|
||||
// Object oneUserId = map.get("oneUserId");
|
||||
|
|
@ -386,7 +386,7 @@ public class OrdersServiceImpl extends ServiceImpl<OrdersDao, Orders> implements
|
|||
return Result.success();
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.error("金豆支付订单异常:" + e.getMessage(), e);
|
||||
log.error("金币支付订单异常:" + e.getMessage(), e);
|
||||
} finally {
|
||||
reentrantReadWriteLock.writeLock().unlock();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -161,7 +161,7 @@ public class CashController {
|
|||
}
|
||||
|
||||
@RequestMapping(value = "/selectSumPay", method = RequestMethod.GET)
|
||||
@ApiOperation("查询用户充值金豆")
|
||||
@ApiOperation("查询用户充值金币")
|
||||
@ResponseBody
|
||||
public Result selectSumPay(String createTime, String endTime, Long userId) {
|
||||
return Result.success().put("data", payDetailsService.selectSumPay(createTime, endTime, userId));
|
||||
|
|
@ -308,7 +308,7 @@ public class CashController {
|
|||
AlipayFundTransUniTransferRequest request = new AlipayFundTransUniTransferRequest();
|
||||
request.setBizContent("{" +
|
||||
"\"out_biz_no\":\"" + one.getOrderNumber() + "\"," + //订单编号
|
||||
"\"trans_amount\":" + new BigDecimal(one.getMoney()) + "," + //转账金豆
|
||||
"\"trans_amount\":" + new BigDecimal(one.getMoney()) + "," + //转账金币
|
||||
"\"product_code\":\"TRANS_ACCOUNT_NO_PWD\"," +
|
||||
"\"biz_scene\":\"DIRECT_TRANSFER\"," +
|
||||
"\"order_title\":\"" + name.getValue() + "佣金结算" + "\"," +
|
||||
|
|
@ -343,7 +343,7 @@ public class CashController {
|
|||
return Result.error(9999, one.getZhifubaoName() + "转账失败!" + response.getSubMsg());
|
||||
}
|
||||
} catch (AlipayApiException e) {
|
||||
log.error("金豆提现异常原因:" + e.getMessage());
|
||||
log.error("金币提现异常原因:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
return Result.error(9999, one.getZhifubaoName() + "转账失败!" + e.getMessage());
|
||||
|
||||
|
|
@ -385,7 +385,7 @@ public class CashController {
|
|||
return Result.error(9999, one.getZhifubaoName() + "转账失败!" + response.getSubMsg());
|
||||
}
|
||||
} catch (AlipayApiException e) {
|
||||
log.error("金豆提现异常原因:" + e.getMessage());
|
||||
log.error("金币提现异常原因:" + e.getMessage());
|
||||
e.printStackTrace();
|
||||
return Result.error(9999, one.getZhifubaoName() + "转账失败!" + e.getMessage());
|
||||
|
||||
|
|
@ -439,7 +439,7 @@ public class CashController {
|
|||
if (one.getRate() != null && one.getRate() > 0.00) {
|
||||
v = AmountCalUtils.add(new BigDecimal(v), BigDecimal.valueOf(one.getRate())).doubleValue();
|
||||
}
|
||||
//将金豆退还
|
||||
//将金币退还
|
||||
if (one.getSysUserId() != null) {
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setSysUserId(one.getSysUserId());
|
||||
|
|
|
|||
|
|
@ -153,8 +153,8 @@ public class AliPayController {
|
|||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(add);
|
||||
userMoneyDetails.setUserId(payDetails.getUserId());
|
||||
userMoneyDetails.setContent("支付宝充值金豆");
|
||||
userMoneyDetails.setTitle("支付宝充值金豆:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setContent("支付宝充值金币");
|
||||
userMoneyDetails.setTitle("支付宝充值金币:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setType(1);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
userMoneyDetails.setCreateTime(simpleDateFormat.format(new Date()));
|
||||
|
|
@ -239,8 +239,8 @@ public class AliPayController {
|
|||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(add);
|
||||
userMoneyDetails.setUserId(payDetails.getUserId());
|
||||
userMoneyDetails.setContent("支付宝充值金豆");
|
||||
userMoneyDetails.setTitle("支付宝充值金豆:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setContent("支付宝充值金币");
|
||||
userMoneyDetails.setTitle("支付宝充值金币:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setType(1);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
userMoneyDetails.setCreateTime(simpleDateFormat.format(new Date()));
|
||||
|
|
@ -350,7 +350,7 @@ public class AliPayController {
|
|||
AlipayTradeRefundModel model = new AlipayTradeRefundModel();
|
||||
model.setOutTradeNo(orders.getOrdersNo());//订单编号
|
||||
model.setTradeNo(orders.getTradeNo());//支付宝订单交易号
|
||||
model.setRefundAmount(orders.getPayMoney().toString());//退款金豆 不得大于订单金豆
|
||||
model.setRefundAmount(orders.getPayMoney().toString());//退款金币 不得大于订单金币
|
||||
model.setRefundReason(orders.getRefundContent());//退款说明
|
||||
model.setOutRequestNo(orders.getOrdersNo());//标识一次退款请求,同一笔交易多次退款需要保证唯一,如需部分退款,则此参数必传。
|
||||
alipay_request.setBizModel(model);
|
||||
|
|
@ -483,7 +483,7 @@ public class AliPayController {
|
|||
order.put("subject", name); //商品标题
|
||||
order.put("product_code", "QUICK_WAP_WAY");
|
||||
order.put("body", name);//商品名称
|
||||
order.put("total_amount", money + ""); //金豆
|
||||
order.put("total_amount", money + ""); //金币
|
||||
alipayRequest.setBizContent(order.toString());
|
||||
alipayRequest.setNotifyUrl(url); //在公共参数中设置回跳和通知地址
|
||||
alipayRequest.setReturnUrl(returnUrl); //线上通知页面地址
|
||||
|
|
@ -497,7 +497,7 @@ public class AliPayController {
|
|||
order.put("subject", name); //商品标题
|
||||
order.put("product_code", "QUICK_WAP_WAY");
|
||||
order.put("body", name);//商品名称
|
||||
order.put("total_amount", money); //金豆
|
||||
order.put("total_amount", money); //金币
|
||||
alipayRequest.setBizContent(order.toString());
|
||||
//在公共参数中设置回跳和通知地址
|
||||
alipayRequest.setNotifyUrl(url);
|
||||
|
|
|
|||
|
|
@ -77,14 +77,14 @@ public class ApiWeiXinPayController {
|
|||
}
|
||||
|
||||
@Login
|
||||
@ApiOperation("充值金豆")
|
||||
@ApiOperation("充值金币")
|
||||
@PostMapping("/payMoney")
|
||||
public Result payMoney(Long payClassifyId, Integer classify,@RequestAttribute Long userId) throws Exception {
|
||||
return wxService.payMoney(payClassifyId,userId,classify);
|
||||
}
|
||||
|
||||
@Login
|
||||
@ApiOperation("充值金豆(只生成订单号)")
|
||||
@ApiOperation("充值金币(只生成订单号)")
|
||||
@PostMapping("/payMoneyOrders")
|
||||
public Result payMoneyOrders(Long payClassifyId, Integer classify,@RequestAttribute Long userId) throws Exception {
|
||||
return wxService.payMoneyOrders(payClassifyId,userId,classify);
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ public class AppCashController {
|
|||
|
||||
@Login
|
||||
@GetMapping(value = "/cashMoney")
|
||||
@ApiOperation("发起提现 余额 金豆")
|
||||
@ApiOperation("发起提现 余额 金币")
|
||||
public Result cashMoney(@RequestAttribute("userId") Long userId, Double money) {
|
||||
return cashOutService.cashMoney(userId, money);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ public class DyPayController {
|
|||
}
|
||||
|
||||
@Login
|
||||
@ApiOperation("充值金豆")
|
||||
@ApiOperation("充值金币")
|
||||
@PostMapping("/payMoney")
|
||||
public Result payMoney(Long payClassifyId,@RequestAttribute Long userId) throws Exception {
|
||||
return dyService.payMoney(payClassifyId,userId);
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ public class IosPayController {
|
|||
UserMoneyDetails userMoneyDetails=new UserMoneyDetails();
|
||||
userMoneyDetails.setMoney(payClassify.getMoney());
|
||||
userMoneyDetails.setUserId(payDetails.getUserId());
|
||||
userMoneyDetails.setContent("苹果充值金豆");
|
||||
userMoneyDetails.setContent("苹果充值金币");
|
||||
userMoneyDetails.setTitle("苹果充值:"+payClassify.getMoney());
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class KsPayController {
|
|||
}
|
||||
|
||||
@Login
|
||||
@ApiOperation("充值金豆")
|
||||
@ApiOperation("充值金币")
|
||||
@PostMapping("/payMoney")
|
||||
public Result payMoney(Long payClassifyId, @RequestAttribute Long userId) throws Exception {
|
||||
return ksService.payMoney(payClassifyId,userId);
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ public class WuyouController {
|
|||
case 1:
|
||||
UserMoneyDetails userMoneyDetails1 = new UserMoneyDetails(
|
||||
sourceUser.getUserId(), null, null, "[分享达标额外奖励]", 8, 1, 2,
|
||||
completAward.getAwardNumber(), "邀请人员已有"+completAward.getInviteCount()+"人完成达标任务,额外奖励金豆" + completAward.getAwardNumber(), 2);
|
||||
completAward.getAwardNumber(), "邀请人员已有"+completAward.getInviteCount()+"人完成达标任务,额外奖励金币" + completAward.getAwardNumber(), 2);
|
||||
|
||||
userMoneyService.updateMoney(1, sourceUser.getUserId(), completAward.getAwardNumber().doubleValue());
|
||||
userMoneyDetailsService.save(userMoneyDetails1);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ public class AliPayParamModel {
|
|||
private String out_trade_no;
|
||||
|
||||
/**
|
||||
* 订单金豆
|
||||
* 订单金币
|
||||
*/
|
||||
private String total_amount;
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ public class AliPayWithdrawModel {
|
|||
private String payee_type = "ALIPAY_LOGONID";
|
||||
|
||||
/**
|
||||
* 提现金豆
|
||||
* 提现金币
|
||||
*/
|
||||
private BigDecimal amount;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ public class CashOut implements Serializable {
|
|||
private String outAt;
|
||||
|
||||
/**
|
||||
* 提现金豆
|
||||
* 提现金币
|
||||
*/
|
||||
private String money;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ public class PayDetails implements Serializable {
|
|||
private String tradeNo;
|
||||
|
||||
/**
|
||||
* 充值金豆
|
||||
* 充值金币
|
||||
*/
|
||||
private Double money;
|
||||
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
titles.add("用户名称");
|
||||
titles.add("支付宝账号");
|
||||
titles.add("支付宝名称");
|
||||
titles.add("提现金豆");
|
||||
titles.add("提现金币");
|
||||
titles.add("状态");
|
||||
titles.add("拒绝原因");
|
||||
titles.add("申请时间");
|
||||
|
|
@ -158,7 +158,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
MessageInfo messageInfo = new MessageInfo();
|
||||
messageInfo.setState(String.valueOf(5));
|
||||
messageInfo.setIsSee("0");
|
||||
messageInfo.setContent("您好,您的提现转账成功,请注意查收!提现金豆【" + money + "元】!支付宝收款账号 " + payWay + "感谢您的使用!如有疑问请在公众号中发送您的问题联系客服");
|
||||
messageInfo.setContent("您好,您的提现转账成功,请注意查收!提现金币【" + money + "元】!支付宝收款账号 " + payWay + "感谢您的使用!如有疑问请在公众号中发送您的问题联系客服");
|
||||
messageInfo.setTitle("提现成功通知");
|
||||
messageInfo.setUserName(userByWxId.getUserName());
|
||||
messageInfo.setUserId(String.valueOf(userByWxId.getUserId()));
|
||||
|
|
@ -167,7 +167,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
messageInfo.setCreateAt(sdf.format(now));
|
||||
messageInfoDao.insert(messageInfo);
|
||||
if (userByWxId.getClientid() != null) {
|
||||
userService.pushToSingle("提现成功通知", "您好,您的提现转账成功,请注意查收!提现金豆【" + money + "元】!支付宝收款账号 " + payWay + "感谢您的使用!如有疑问请在公众号中发送您的问题联系客服", userByWxId.getClientid());
|
||||
userService.pushToSingle("提现成功通知", "您好,您的提现转账成功,请注意查收!提现金币【" + money + "元】!支付宝收款账号 " + payWay + "感谢您的使用!如有疑问请在公众号中发送您的问题联系客服", userByWxId.getClientid());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -278,17 +278,17 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
@Transactional
|
||||
public Result cashMoney(Long userId, Double money) {
|
||||
if (money == null || money <= 0.00) {
|
||||
return Result.error("请不要输入小于0的数字,请输入正确的提现金豆!");
|
||||
return Result.error("请不要输入小于0的数字,请输入正确的提现金币!");
|
||||
}
|
||||
//最低提现金豆
|
||||
//最低提现金币
|
||||
CommonInfo one = commonInfoService.findOne(112);
|
||||
if (one != null && money < Double.parseDouble(one.getValue())) {
|
||||
return Result.error("输入金豆不满足最低提现金豆,请重新输入!");
|
||||
return Result.error("输入金币不满足最低提现金币,请重新输入!");
|
||||
}
|
||||
//最高提现金豆
|
||||
//最高提现金币
|
||||
CommonInfo one2 = commonInfoService.findOne(153);
|
||||
if (one2 != null && money >= Double.parseDouble(one2.getValue())) {
|
||||
return Result.error(-100, "输入金豆过大,不能大于" + one2.getValue() + ",请重新输入!");
|
||||
return Result.error(-100, "输入金币过大,不能大于" + one2.getValue() + ",请重新输入!");
|
||||
}
|
||||
//手续费
|
||||
CommonInfo one1 = commonInfoService.findOne(152);
|
||||
|
|
@ -299,13 +299,13 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
// UserMoney userMoney=userMoneyService.selectUserMoneyByUserId(userId);
|
||||
InviteMoney inviteMoney = inviteMoneyService.selectInviteMoneyByUserId(userId);
|
||||
UserEntity userEntity = userService.selectUserById(userId);
|
||||
// 提现判断金豆是否足够 金豆=提现金豆+手续费
|
||||
// 提现判断金币是否足够 金币=提现金币+手续费
|
||||
Double moneySum = AmountCalUtils.add(new BigDecimal(money), new BigDecimal(mul)).doubleValue();
|
||||
// 用户金豆足够
|
||||
// 用户金币足够
|
||||
if (inviteMoney.getMoney() >= moneySum) {
|
||||
//扣除可提现金豆
|
||||
//扣除可提现金币
|
||||
inviteMoneyService.updateInviteMoneyCashOut(2, moneySum, userId);
|
||||
//增加金豆操作记录
|
||||
//增加金币操作记录
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(userId);
|
||||
userMoneyDetails.setTitle("提现:" + money);
|
||||
|
|
@ -331,7 +331,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
// inviteMoneyDao.updateInviteMoneyCashOut(1,money,userId);
|
||||
return Result.success("提现成功,将在三个工作日内到账,请耐心等待!");
|
||||
} else {
|
||||
return Result.error("金豆不足,请输入正确的提现金豆!");
|
||||
return Result.error("金币不足,请输入正确的提现金币!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -339,17 +339,17 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
@Transactional
|
||||
public Result sysCashMoney(Long userId, Double money) {
|
||||
if (money == null || money <= 0.00) {
|
||||
return Result.error("请不要输入小于0的数字,请输入正确的提现金豆!");
|
||||
return Result.error("请不要输入小于0的数字,请输入正确的提现金币!");
|
||||
}
|
||||
//最低提现金豆
|
||||
//最低提现金币
|
||||
CommonInfo one = commonInfoService.findOne(112);
|
||||
if (one != null && money < Double.parseDouble(one.getValue())) {
|
||||
return Result.error("输入金豆不满足最低提现金豆,请重新输入!");
|
||||
return Result.error("输入金币不满足最低提现金币,请重新输入!");
|
||||
}
|
||||
//最高提现金豆
|
||||
//最高提现金币
|
||||
CommonInfo one2 = commonInfoService.findOne(153);
|
||||
if (one2 != null && money >= Double.parseDouble(one2.getValue())) {
|
||||
return Result.error(-100, "输入金豆过大,不能大于" + one2.getValue() + ",请重新输入!");
|
||||
return Result.error(-100, "输入金币过大,不能大于" + one2.getValue() + ",请重新输入!");
|
||||
}
|
||||
//手续费
|
||||
CommonInfo one1 = commonInfoService.findOne(152);
|
||||
|
|
@ -360,13 +360,13 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
UserMoney userMoney = userMoneyService.selectSysUserMoneyByUserId(userId);
|
||||
|
||||
SysUserEntity sysUserEntity = sysUserService.getById(userId);
|
||||
//提现判断金豆是否足够 金豆=提现金豆+手续费
|
||||
//提现判断金币是否足够 金币=提现金币+手续费
|
||||
double moneySum = AmountCalUtils.add(new BigDecimal(money), new BigDecimal(mul)).doubleValue();
|
||||
// 用户金豆足够
|
||||
// 用户金币足够
|
||||
if (userMoney.getMoney().doubleValue() >= moneySum) {
|
||||
//扣除可提现金豆
|
||||
//扣除可提现金币
|
||||
userMoneyService.updateSysMoney(2, userId, moneySum);
|
||||
//增加金豆操作记录
|
||||
//增加金币操作记录
|
||||
UserMoneyDetails userMoneyDetails = new UserMoneyDetails();
|
||||
userMoneyDetails.setSysUserId(userId);
|
||||
userMoneyDetails.setTitle("提现:" + money);
|
||||
|
|
@ -393,7 +393,7 @@ public class CashOutServiceImpl extends ServiceImpl<CashOutDao, CashOut> impleme
|
|||
// inviteMoneyDao.updateInviteMoneyCashOut(1,money,userId);
|
||||
return Result.success("提现成功,将在三个工作日内到账,请耐心等待!");
|
||||
} else {
|
||||
return Result.error("金豆不足,请输入正确的提现金豆!");
|
||||
return Result.error("金币不足,请输入正确的提现金币!");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -310,7 +310,7 @@ public class DyServiceImpl implements DyService {
|
|||
|
||||
/**
|
||||
* 抖音支付订单生成
|
||||
* @param moneys 支付金豆 带小数点
|
||||
* @param moneys 支付金币 带小数点
|
||||
* @param outTradeNo 单号
|
||||
* @return
|
||||
* @throws Exception
|
||||
|
|
@ -329,7 +329,7 @@ public class DyServiceImpl implements DyService {
|
|||
Map<String, Object> params = new HashMap<>();
|
||||
params.put("app_id",appId);
|
||||
params.put("out_order_no", outTradeNo); //商户订单号
|
||||
params.put("total_amount", money); //金豆。分
|
||||
params.put("total_amount", money); //金币。分
|
||||
params.put("notify_url", url); //回调接口
|
||||
params.put("subject", one.getValue()); //主题
|
||||
params.put("body", one.getValue()); //商品详情
|
||||
|
|
@ -399,7 +399,7 @@ public class DyServiceImpl implements DyService {
|
|||
}
|
||||
String orderNo = msgJson.getString("cp_orderno"); //商户订单号
|
||||
String order_id = msgJson.getString("order_id"); //抖音订单id
|
||||
Integer orderAmount = msgJson.getInteger("total_amount"); //支付金豆
|
||||
Integer orderAmount = msgJson.getInteger("total_amount"); //支付金币
|
||||
|
||||
//todo 处理支付成功后的订单业务
|
||||
log.error("订单号!!"+orderNo);
|
||||
|
|
@ -440,7 +440,7 @@ public class DyServiceImpl implements DyService {
|
|||
UserMoneyDetails userMoneyDetails=new UserMoneyDetails();
|
||||
userMoneyDetails.setMoney(BigDecimal.valueOf(payDetails.getMoney()));
|
||||
userMoneyDetails.setUserId(payDetails.getUserId());
|
||||
userMoneyDetails.setContent("抖音充值金豆");
|
||||
userMoneyDetails.setContent("抖音充值金币");
|
||||
userMoneyDetails.setTitle("抖音充值:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
|
|
@ -534,11 +534,11 @@ public class DyServiceImpl implements DyService {
|
|||
UserMoneyDetails userMoneyDetails=new UserMoneyDetails();
|
||||
userMoneyDetails.setUserId(payDetails.getUserId());
|
||||
if(StringUtils.isNotEmpty(currency) && "DIAMOND".equals(currency)){
|
||||
userMoneyDetails.setContent("抖音钻石充值金豆");
|
||||
userMoneyDetails.setContent("抖音钻石充值金币");
|
||||
userMoneyDetails.setTitle("抖音充值:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setMoney(payDetails.getPayDiamond());
|
||||
}else{
|
||||
userMoneyDetails.setContent("抖音充值金豆");
|
||||
userMoneyDetails.setContent("抖音充值金币");
|
||||
userMoneyDetails.setTitle("抖音充值:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setMoney(BigDecimal.valueOf(payDetails.getMoney()));
|
||||
}
|
||||
|
|
@ -596,7 +596,7 @@ public class DyServiceImpl implements DyService {
|
|||
params.put("out_order_no", orders.getOrdersNo()); //商户订单号
|
||||
params.put("out_refund_no", orders.getOrdersNo());
|
||||
params.put("reason", "系统退款");
|
||||
params.put("total_amount", new Double(orders.getPayMoney().doubleValue()*100).intValue()+""); //金豆。分
|
||||
params.put("total_amount", new Double(orders.getPayMoney().doubleValue()*100).intValue()+""); //金币。分
|
||||
String SALT = commonInfoService.findOne(815).getValue();
|
||||
String sign = DouYinSign.requestSign(params,SALT); //签名
|
||||
params.put("sign",sign);
|
||||
|
|
|
|||
|
|
@ -111,7 +111,7 @@ public class KsServiceImpl implements KsService {
|
|||
|
||||
/**
|
||||
* 快手支付订单生成
|
||||
* @param moneys 支付金豆 带小数点
|
||||
* @param moneys 支付金币 带小数点
|
||||
* @param outTradeNo 单号
|
||||
* @return
|
||||
* @throws Exception
|
||||
|
|
@ -130,7 +130,7 @@ public class KsServiceImpl implements KsService {
|
|||
params.put("app_id",appId);
|
||||
params.put("out_order_no", outTradeNo); //商户订单号
|
||||
params.put("open_id", openId);
|
||||
params.put("total_amount", money); //金豆。分
|
||||
params.put("total_amount", money); //金币。分
|
||||
params.put("notify_url", url); //回调接口
|
||||
params.put("subject", one.getValue()); //主题
|
||||
params.put("detail", one.getValue()); //商品详情
|
||||
|
|
@ -212,7 +212,7 @@ public class KsServiceImpl implements KsService {
|
|||
UserMoneyDetails userMoneyDetails=new UserMoneyDetails();
|
||||
userMoneyDetails.setMoney(BigDecimal.valueOf(payDetails.getMoney()));
|
||||
userMoneyDetails.setUserId(payDetails.getUserId());
|
||||
userMoneyDetails.setContent("快手充值金豆");
|
||||
userMoneyDetails.setContent("快手充值金币");
|
||||
userMoneyDetails.setTitle("快手充值:"+payDetails.getMoney());
|
||||
userMoneyDetails.setType(1);
|
||||
userMoneyDetails.setClassify(1);
|
||||
|
|
@ -282,7 +282,7 @@ public class KsServiceImpl implements KsService {
|
|||
params.put("out_refund_no", orders.getOrdersNo());
|
||||
params.put("notify_url", url);
|
||||
params.put("reason", "系统退款");
|
||||
params.put("refund_amount", new Double(orders.getPayMoney().doubleValue()*100).intValue()+""); //金豆。分
|
||||
params.put("refund_amount", new Double(orders.getPayMoney().doubleValue()*100).intValue()+""); //金币。分
|
||||
String sign = calcSign(params); //签名
|
||||
params.put("sign",sign);
|
||||
//发起post请求
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ public class WxServiceImpl implements WxService {
|
|||
|
||||
/**
|
||||
* 微信支付订单生成
|
||||
* @param moneys 支付金豆 带小数点
|
||||
* @param moneys 支付金币 带小数点
|
||||
* @param type 类型 1app 2 二维码支付 3小程序 公众号支付
|
||||
* @param userId 用户id
|
||||
* @param outTradeNo 单号
|
||||
|
|
@ -314,8 +314,8 @@ public class WxServiceImpl implements WxService {
|
|||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(add);
|
||||
userMoneyDetails.setUserId(payDetails.getUserId());
|
||||
userMoneyDetails.setContent("微信充值金豆");
|
||||
userMoneyDetails.setTitle("微信充值金豆:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setContent("微信充值金币");
|
||||
userMoneyDetails.setTitle("微信充值金币:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setType(1);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
userMoneyDetails.setCreateTime(simpleDateFormat.format(new Date()));
|
||||
|
|
@ -393,8 +393,8 @@ public class WxServiceImpl implements WxService {
|
|||
userMoneyDetails.setClassify(1);
|
||||
userMoneyDetails.setMoney(add);
|
||||
userMoneyDetails.setUserId(payDetails.getUserId());
|
||||
userMoneyDetails.setContent("微信充值金豆");
|
||||
userMoneyDetails.setTitle("微信充值金豆:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setContent("微信充值金币");
|
||||
userMoneyDetails.setTitle("微信充值金币:"+payClassify.getMoney()+",赠送:"+payClassify.getGiveMoney());
|
||||
userMoneyDetails.setType(1);
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
userMoneyDetails.setCreateTime(simpleDateFormat.format(new Date()));
|
||||
|
|
@ -429,7 +429,7 @@ public class WxServiceImpl implements WxService {
|
|||
e.printStackTrace();
|
||||
}
|
||||
int commInfoId = 0;
|
||||
Integer payWay = orders.getPayWay(); //支付方式(1app微信 2微信公众号 3微信小程序 4app支付宝 5H5支付宝 6金豆)
|
||||
Integer payWay = orders.getPayWay(); //支付方式(1app微信 2微信公众号 3微信小程序 4app支付宝 5H5支付宝 6金币)
|
||||
switch (payWay){
|
||||
case 1 : commInfoId = 74; break; //appId
|
||||
case 2 : commInfoId = 5; break; //公众号id
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class TaskCenterRecord extends Model<TaskCenterRecord> {
|
|||
private Long taskId;
|
||||
@ApiModelProperty("奖励名称")
|
||||
private String name;
|
||||
@ApiModelProperty("奖励类型 1 金豆 2 现金 3 4 5 9转盘")
|
||||
@ApiModelProperty("奖励类型 1 金币 2 现金 3 4 5 9转盘")
|
||||
private Integer type;
|
||||
private Long targetId;
|
||||
@ApiModelProperty("数量")
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public class TaskCenterReward extends Model<TaskCenterReward> {
|
|||
private Long taskId;
|
||||
@ApiModelProperty("奖励名称")
|
||||
private String name;
|
||||
@ApiModelProperty("奖励类型 1 金豆 2 现金红包 3 4 5 9 大转盘抽奖次数")
|
||||
@ApiModelProperty("奖励类型 1 金币 2 现金红包 3 4 5 9 大转盘抽奖次数")
|
||||
private Integer type;
|
||||
private Integer targetId;
|
||||
@ApiModelProperty("数量")
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ public class TaskCenterServiceImpl extends ServiceImpl<TaskCenterDao, TaskCenter
|
|||
case 1:
|
||||
UserMoneyDetails userMoneyDetails1 = new UserMoneyDetails(
|
||||
userId, null, null, "[任务中心]", 8, 1, 2,
|
||||
new BigDecimal(reward.getNumber()), taskCenter.getTitle() + "任务完成,金豆奖励" + reward.getNumber(), 2);
|
||||
new BigDecimal(reward.getNumber()), taskCenter.getTitle() + "任务完成,金币奖励" + reward.getNumber(), 2);
|
||||
|
||||
userMoneyService.updateMoney(1, userId, reward.getNumber());
|
||||
userMoneyDetailsService.save(userMoneyDetails1);
|
||||
|
|
|
|||
|
|
@ -6,19 +6,19 @@ import java.math.RoundingMode;
|
|||
import java.text.DecimalFormat;
|
||||
|
||||
/**
|
||||
* 金豆计算工具类
|
||||
* 金币计算工具类
|
||||
* @author fang
|
||||
* @date 2020-04-17
|
||||
*/
|
||||
public class AmountCalUtils {
|
||||
|
||||
|
||||
//金豆计算 加法
|
||||
//金币计算 加法
|
||||
public static BigDecimal add(BigDecimal b1,BigDecimal b2){
|
||||
return b1.add(b2);
|
||||
}
|
||||
|
||||
//金豆计算 减法
|
||||
//金币计算 减法
|
||||
public static BigDecimal sub(BigDecimal n1, BigDecimal n2) {
|
||||
formater.setMaximumFractionDigits(2);
|
||||
formater.setGroupingSize(0);
|
||||
|
|
@ -27,14 +27,14 @@ public class AmountCalUtils {
|
|||
return new BigDecimal(formater.format(v));
|
||||
}
|
||||
|
||||
//金豆计算 乘法
|
||||
//金币计算 乘法
|
||||
public static Double mul(double v1, double v2) {
|
||||
BigDecimal n1 = new BigDecimal(Double.toString(v1));
|
||||
BigDecimal n2 = new BigDecimal(Double.toString(v2));
|
||||
return n1.multiply(n2).doubleValue();
|
||||
}
|
||||
|
||||
//金豆计算 乘法
|
||||
//金币计算 乘法
|
||||
public static BigDecimal mulMoney(BigDecimal n1, BigDecimal n2) {
|
||||
formater.setMaximumFractionDigits(2);
|
||||
formater.setGroupingSize(0);
|
||||
|
|
@ -43,7 +43,7 @@ public class AmountCalUtils {
|
|||
return new BigDecimal(formater.format(multiply));
|
||||
}
|
||||
|
||||
//金豆计算 除法
|
||||
//金币计算 除法
|
||||
public static Double divide(double v1, double v2) {
|
||||
BigDecimal n1 = new BigDecimal(Double.toString(v1));
|
||||
BigDecimal n2 = new BigDecimal(Double.toString(v2));
|
||||
|
|
@ -52,7 +52,7 @@ public class AmountCalUtils {
|
|||
|
||||
private final static DecimalFormat formater = new DecimalFormat();
|
||||
|
||||
//金豆计算除法,保留小数点后两位
|
||||
//金币计算除法,保留小数点后两位
|
||||
public static Double moneyDivide(BigDecimal n1, BigDecimal n2){
|
||||
BigDecimal v = n1.divide(n2, 10, BigDecimal.ROUND_HALF_UP);
|
||||
System.out.println(v);
|
||||
|
|
|
|||
Loading…
Reference in New Issue