后台主页逻辑加规则,账单详情改变接口传参方式,vip同步小程序,后台营业执照日期格式,银盛回调暂时在测试服上
This commit is contained in:
@@ -1296,8 +1296,8 @@ public class MerchantOrderController {
|
|||||||
merchantIncomeService.saveMerchantIncome(merchantIncome);
|
merchantIncomeService.saveMerchantIncome(merchantIncome);
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/couponList/{orderNumber}")
|
@GetMapping("/couponList")
|
||||||
public Result<List<Map<String, Object>>> getCouponListByOrderNumber(@PathVariable("orderNumber") String orderNumber) {
|
public Result<List<Map<String, Object>>> getCouponListByOrderNumber(String orderNumber) {
|
||||||
List<Map<String, Object>> couponList = merchantOrderService.getCouponList(orderNumber);
|
List<Map<String, Object>> couponList = merchantOrderService.getCouponList(orderNumber);
|
||||||
return ResultGenerator.genSuccessResult(couponList);
|
return ResultGenerator.genSuccessResult(couponList);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ public class TokenRegistryInterceptor extends HandlerInterceptorAdapter {
|
|||||||
limitUri.add("/api/merchantOrder/posScanPay");
|
limitUri.add("/api/merchantOrder/posScanPay");
|
||||||
limitUri.add("/api/merchantOrder/pos/tradeQuery");
|
limitUri.add("/api/merchantOrder/pos/tradeQuery");
|
||||||
limitUri.add("/api/merchantOrder/returnOrder");
|
limitUri.add("/api/merchantOrder/returnOrder");
|
||||||
|
limitUri.add("/api/memberOrder");
|
||||||
boolean passFlag = limitUri.stream().anyMatch(s -> s.equals(requestUri) || requestUri.startsWith(s));
|
boolean passFlag = limitUri.stream().anyMatch(s -> s.equals(requestUri) || requestUri.startsWith(s));
|
||||||
if (passFlag) {
|
if (passFlag) {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
@@ -77,11 +77,24 @@ public class HomeController extends BaseNoModelController {
|
|||||||
BigDecimal yestDayNowTransAmt = merchantOrderService.getPlatformAmtYestNowData(date,yestStartDate,yestEndDate);
|
BigDecimal yestDayNowTransAmt = merchantOrderService.getPlatformAmtYestNowData(date,yestStartDate,yestEndDate);
|
||||||
BigDecimal toDayTransCount = orderData.get("toDayTransCount") == null ? BigDecimal.ZERO :BigDecimal.valueOf((double)orderData.get("toDayTransCount"));
|
BigDecimal toDayTransCount = orderData.get("toDayTransCount") == null ? BigDecimal.ZERO :BigDecimal.valueOf((double)orderData.get("toDayTransCount"));
|
||||||
BigDecimal subtract = toDayTransCount.subtract(yestDayNowTransAmt);
|
BigDecimal subtract = toDayTransCount.subtract(yestDayNowTransAmt);
|
||||||
BigDecimal scale = subtract.divide(yestDayNowTransAmt,4,BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(100)).setScale(2,BigDecimal.ROUND_DOWN);
|
BigDecimal scale;
|
||||||
|
if((BigDecimal.ZERO).compareTo(yestDayNowTransAmt) == 0){
|
||||||
|
scale = new BigDecimal("0.00");
|
||||||
|
}else {
|
||||||
|
scale = subtract.divide(yestDayNowTransAmt,4,BigDecimal.ROUND_DOWN).multiply(BigDecimal.valueOf(100)).setScale(2,BigDecimal.ROUND_DOWN);
|
||||||
|
}
|
||||||
result.putAll(orderData);
|
result.putAll(orderData);
|
||||||
result.putAll(refundData);
|
result.putAll(refundData);
|
||||||
result.putAll(otherData);
|
result.putAll(otherData);
|
||||||
result.putAll(amtData);
|
if(amtData == null){
|
||||||
|
HashMap<String, Object> amtDataMap = new HashMap<>(16);
|
||||||
|
amtDataMap.put("toDayProfitCount", "0.00");
|
||||||
|
amtDataMap.put("toDayShareCount", "0.00");
|
||||||
|
amtDataMap.put("toDayFansCount", "0.00");
|
||||||
|
result.putAll(amtDataMap);
|
||||||
|
} else {
|
||||||
|
result.putAll(amtData);
|
||||||
|
}
|
||||||
result.putAll(transData);
|
result.putAll(transData);
|
||||||
PlatformData yesterDayData = platformDataService.censusPlatformData();
|
PlatformData yesterDayData = platformDataService.censusPlatformData();
|
||||||
result.put("yesterDay",yesterDayData);
|
result.put("yesterDay",yesterDayData);
|
||||||
@@ -121,6 +134,14 @@ public class HomeController extends BaseNoModelController {
|
|||||||
return ResultGenerator.genSuccessResult("获取成功",result);
|
return ResultGenerator.genSuccessResult("获取成功",result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
HashMap<String, Object> objectObjectHashMap = new HashMap<>();
|
||||||
|
objectObjectHashMap.put("toDayProfitCount", "0.00");
|
||||||
|
objectObjectHashMap.put("toDayShareCount", "0.00");
|
||||||
|
objectObjectHashMap.put("toDayFansCount", "0.00");
|
||||||
|
System.out.println(objectObjectHashMap);
|
||||||
|
|
||||||
|
}
|
||||||
@PostMapping("/logout")
|
@PostMapping("/logout")
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Map<String, Object> login(HttpServletRequest request) {
|
public Map<String, Object> login(HttpServletRequest request) {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import cn.pluss.platform.annotation.PassToken;
|
|||||||
import cn.pluss.platform.api.Result;
|
import cn.pluss.platform.api.Result;
|
||||||
import cn.pluss.platform.api.ResultGenerator;
|
import cn.pluss.platform.api.ResultGenerator;
|
||||||
import cn.pluss.platform.channel.MerchantAuditService;
|
import cn.pluss.platform.channel.MerchantAuditService;
|
||||||
|
import cn.pluss.platform.channel.ys.YSAuditServiceV3;
|
||||||
import cn.pluss.platform.common.CommonRemarkService;
|
import cn.pluss.platform.common.CommonRemarkService;
|
||||||
import cn.pluss.platform.controller.BaseNoModelController;
|
import cn.pluss.platform.controller.BaseNoModelController;
|
||||||
import cn.pluss.platform.entitiy.ShiroUser;
|
import cn.pluss.platform.entitiy.ShiroUser;
|
||||||
@@ -85,6 +86,8 @@ public class MerchantStoreController extends BaseNoModelController {
|
|||||||
|
|
||||||
@Setter(onMethod_ = {@Autowired, @Qualifier("ysAuditServiceV2")})
|
@Setter(onMethod_ = {@Autowired, @Qualifier("ysAuditServiceV2")})
|
||||||
private MerchantAuditService ysAuditServiceV2;
|
private MerchantAuditService ysAuditServiceV2;
|
||||||
|
@Resource
|
||||||
|
private YSAuditServiceV3 ysAuditServiceV3;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -462,8 +465,8 @@ public class MerchantStoreController extends BaseNoModelController {
|
|||||||
try {
|
try {
|
||||||
JSONObject params = new JSONObject();
|
JSONObject params = new JSONObject();
|
||||||
params.put("userId", ua.getUserId() + "");
|
params.put("userId", ua.getUserId() + "");
|
||||||
ysAuditServiceV2.merchantAudit(ua.getUserId() + "", false);
|
//ysAuditServiceV2.merchantAudit(ua.getUserId() + "", false);
|
||||||
// userAppService.merchantAudit(params, "4");
|
ysAuditServiceV3.merchantAuditV3(String.valueOf(ua.getUserId()), false); // userAppService.merchantAudit(params, "4");
|
||||||
result.put("code", "1");
|
result.put("code", "1");
|
||||||
result.put("msg", "发起进件成功, 稍后查看进件状态");
|
result.put("msg", "发起进件成功, 稍后查看进件状态");
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
@@ -476,9 +476,13 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
|||||||
if (!mbi.getMerchantType().equals(MerchantBaseInfo.MERCH_TYPE_MICRO)) {
|
if (!mbi.getMerchantType().equals(MerchantBaseInfo.MERCH_TYPE_MICRO)) {
|
||||||
busInfo.setBusNm(mbi.getBussAuthName());
|
busInfo.setBusNm(mbi.getBussAuthName());
|
||||||
busInfo.setBusNo(mbi.getBussAuthNum());
|
busInfo.setBusNo(mbi.getBussAuthNum());
|
||||||
busInfo.setBusCertBgn(mbi.getBussAuthStartTime().replace("-", ""));
|
if (mbi.getBussAuthStartTime() == null || mbi.getBussAuthEndTime() == null){
|
||||||
//TODO 有时营业执照有效日期没有填写
|
throw new MsgException("营业执照日期有误");
|
||||||
busInfo.setBusCertExpire(mbi.getBussAuthEndTime().replace("-", ""));
|
}
|
||||||
|
busInfo.setBusCertBgn(mbi.getBussAuthStartTime().replace("年","")
|
||||||
|
.replace("月", "").replace("日", ""));
|
||||||
|
busInfo.setBusCertExpire(mbi.getBussAuthEndTime().replace("年","")
|
||||||
|
.replace("月", "").replace("日", ""));
|
||||||
busInfo.setBusAddr(mbi.getBussAuthAddress());
|
busInfo.setBusAddr(mbi.getBussAuthAddress());
|
||||||
busInfo.setBusCertType("19");
|
busInfo.setBusCertType("19");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -390,9 +390,9 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
account.setBankCardId(accountDTO.getBankCard().getId() + "");
|
account.setBankCardId(accountDTO.getBankCard().getId() + "");
|
||||||
save(account);
|
save(account);
|
||||||
|
|
||||||
if (!accountDTO.getChannelType().equals(Account.CHANNEL_TYPE_D1)) {
|
// if (!accountDTO.getChannelType().equals(Account.CHANNEL_TYPE_D1)) {
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
|
|
||||||
// 如果不存在D0的结算信息,则直接将D1的结算信息带过来
|
// 如果不存在D0的结算信息,则直接将D1的结算信息带过来
|
||||||
LambdaQueryWrapper<Account> qWrapperAccountD1 = Wrappers.lambdaQuery();
|
LambdaQueryWrapper<Account> qWrapperAccountD1 = Wrappers.lambdaQuery();
|
||||||
@@ -1161,7 +1161,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
|
|
||||||
bankCardDTO.setBankHolder(certName);
|
bankCardDTO.setBankHolder(certName);
|
||||||
try {
|
try {
|
||||||
aliyunService.checkBankCorrect(bankCardDTO.getPhone(), bankCardDTO.getBankCardNo(), accountIdCard.getCertNo(), certName);
|
aliyunService.checkBankCorrectNow(bankCardDTO.getPhone(), bankCardDTO.getBankCardNo(), accountIdCard.getCertNo(), certName);
|
||||||
} catch (MsgException e) {
|
} catch (MsgException e) {
|
||||||
throw new MsgException("银行卡信息校验不通过,请填写结算人【" + DesensitizedUtil.chineseName(certName) + "】的银行卡");
|
throw new MsgException("银行卡信息校验不通过,请填写结算人【" + DesensitizedUtil.chineseName(certName) + "】的银行卡");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ import lombok.Setter;
|
|||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import lombok.val;
|
import lombok.val;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.junit.Test;
|
||||||
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
import org.springframework.amqp.rabbit.core.RabbitTemplate;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Qualifier;
|
import org.springframework.beans.factory.annotation.Qualifier;
|
||||||
@@ -76,6 +77,8 @@ import org.springframework.context.annotation.Lazy;
|
|||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Propagation;
|
import org.springframework.transaction.annotation.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
import org.springframework.util.LinkedMultiValueMap;
|
||||||
|
import org.springframework.web.client.RestTemplate;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
@@ -839,6 +842,7 @@ public class MerchantOrderServiceImpl extends ServiceImpl<MerchantOrderMapper, M
|
|||||||
setMemberRechargeOrder(dto, menber, memberOrder, recharge, order);
|
setMemberRechargeOrder(dto, menber, memberOrder, recharge, order);
|
||||||
try {
|
try {
|
||||||
merchantMenberService.sendMenberBalanceChangeNotice(menber,recharge.getRechargeMoney(),"3");
|
merchantMenberService.sendMenberBalanceChangeNotice(menber,recharge.getRechargeMoney(),"3");
|
||||||
|
synchronizedUsers(dto, menber);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -850,6 +854,7 @@ public class MerchantOrderServiceImpl extends ServiceImpl<MerchantOrderMapper, M
|
|||||||
setMemberRechargeOrder(dto, menber, memberOrder, recharge, order);
|
setMemberRechargeOrder(dto, menber, memberOrder, recharge, order);
|
||||||
try {
|
try {
|
||||||
merchantMenberService.sendMenberBalanceChangeNotice(menber,recharge.getRechargeMoney(),"1");
|
merchantMenberService.sendMenberBalanceChangeNotice(menber,recharge.getRechargeMoney(),"1");
|
||||||
|
synchronizedUsers(dto, menber);
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
@@ -863,6 +868,21 @@ public class MerchantOrderServiceImpl extends ServiceImpl<MerchantOrderMapper, M
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//数据同步到小程序
|
||||||
|
public static void synchronizedUsers(MemberRechargeDTO userDTO, MerchantMenber menber){
|
||||||
|
RestTemplate restTemplate = new RestTemplate();
|
||||||
|
String baseUrl = "https://kysh.sxczgkj.cn/javaApi/java-api/add-member";
|
||||||
|
LinkedMultiValueMap<String, Object> param = new LinkedMultiValueMap<>(16);
|
||||||
|
String useFee = BigDecimal.valueOf(menber.getUsableRechargeFee() + menber.getUsableGiveFee()).setScale(2,BigDecimal.ROUND_HALF_DOWN).toString();
|
||||||
|
param.add("type", userDTO.getType());
|
||||||
|
param.add("rechargeMoney", userDTO.getRechargeMoney());
|
||||||
|
param.add("storeId", userDTO.getStoreId());
|
||||||
|
param.add("phone", userDTO.getPhone());
|
||||||
|
param.add("useFee", useFee);
|
||||||
|
param.add("memberCode",menber.getMemberCode());
|
||||||
|
String s = restTemplate.postForObject(baseUrl, param, String.class);
|
||||||
|
System.out.println("搞定");
|
||||||
|
}
|
||||||
/**
|
/**
|
||||||
* @param order
|
* @param order
|
||||||
* @param dto
|
* @param dto
|
||||||
|
|||||||
@@ -40,10 +40,10 @@ public class YsConfigV3 {
|
|||||||
public static final String REQ_SUCCESS = "00000";
|
public static final String REQ_SUCCESS = "00000";
|
||||||
|
|
||||||
public static final String BIZ_SUCCESS = "0000";
|
public static final String BIZ_SUCCESS = "0000";
|
||||||
|
//银盛进件回调
|
||||||
public static final String AUDIT_NOTIFY_URL = "https://ky.sxczgkj.cn/api/auditCallback/ysV3";
|
public static final String AUDIT_NOTIFY_URL = "http://wxgzh.sxczgkj.cn/api/auditCallback/ysV3";
|
||||||
|
//银盛签约回调
|
||||||
public static final String AUDIT_SIGN_NOTIFY_URL = "https://ky.sxczgkj.cn/api/auditCallback/ysSignV3";
|
public static final String AUDIT_SIGN_NOTIFY_URL = "http://wxgzh.sxczgkj.cn/api/auditCallback/ysSignV3";
|
||||||
|
|
||||||
/** 成功 */
|
/** 成功 */
|
||||||
public static final String STATUS_SUCCESS = "00";
|
public static final String STATUS_SUCCESS = "00";
|
||||||
|
|||||||
Reference in New Issue
Block a user