Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -40,13 +40,13 @@ public class IntroduceController {
|
|||||||
//如果是推广宽图则看宽图是否开放
|
//如果是推广宽图则看宽图是否开放
|
||||||
if (Objects.equals(entity.getType(), "1")) {
|
if (Objects.equals(entity.getType(), "1")) {
|
||||||
String type = httpServletRequest.getHeader("type");
|
String type = httpServletRequest.getHeader("type");
|
||||||
//TODO 暂时安卓开发IOS不开
|
//TODO 双端开启
|
||||||
if ("1".equals(type)){
|
if ("1".equals(type) || "2".equals(type)){
|
||||||
return ResultGenerator.genSuccessResult(entity.getContent());
|
return ResultGenerator.genSuccessResult(entity.getContent());
|
||||||
}
|
}
|
||||||
else if ("2".equals(type)){
|
// else if ("2".equals(type)){
|
||||||
return ResultGenerator.genFailResult("");
|
// return ResultGenerator.genFailResult("");
|
||||||
}
|
// }
|
||||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||||
}else {
|
}else {
|
||||||
return ResultGenerator.genFailResult("");
|
return ResultGenerator.genFailResult("");
|
||||||
@@ -72,16 +72,55 @@ public class IntroduceController {
|
|||||||
//如果是推广宽图则看宽图是否开放
|
//如果是推广宽图则看宽图是否开放
|
||||||
if (Objects.equals(entity.getType(), "1")) {
|
if (Objects.equals(entity.getType(), "1")) {
|
||||||
String type = httpServletRequest.getHeader("type");
|
String type = httpServletRequest.getHeader("type");
|
||||||
//TODO 暂时安卓开发IOS不开
|
//TODO 双端开启
|
||||||
if ("1".equals(type)){
|
if ("1".equals(type)||"2".equals(type)) {
|
||||||
return ResultGenerator.genSuccessResult(image(params.get("typeCode"), params.get("merchantType")));
|
return ResultGenerator.genSuccessResult(image(params.get("typeCode"), params.get("merchantType")));
|
||||||
}else if ("2".equals(type)){
|
|
||||||
return ResultGenerator.genFailResult("");
|
|
||||||
}
|
}
|
||||||
|
// }else if ("2".equals(type)){
|
||||||
|
// return ResultGenerator.genFailResult("");
|
||||||
|
// }
|
||||||
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
return ResultGenerator.genSuccessResult(entity == null ? "" : entity.getContent());
|
||||||
}else {
|
}else {
|
||||||
return ResultGenerator.genFailResult("");
|
return ResultGenerator.genFailResult("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PostMapping ("/commonV2")
|
||||||
|
public Result<String> billIntroV2(HttpServletRequest httpServletRequest,
|
||||||
|
@RequestBody Map<String, String> params) {
|
||||||
|
AppGuide entity = appGuideService.getByCode(imageV2(params.get("typeCode"), params.get("merchantType")));
|
||||||
|
|
||||||
|
//如果是推广宽图则看宽图是否开放
|
||||||
|
if (Objects.equals(entity.getType(), "1")) {
|
||||||
|
//获取安卓或者IOS
|
||||||
|
String type = httpServletRequest.getHeader("type");
|
||||||
|
//安卓
|
||||||
|
if ("1".equals(type)){
|
||||||
|
if ("1".equals(entity.getAndroid())) {
|
||||||
|
return ResultGenerator.genSuccessResult(entity.getContent());
|
||||||
|
}
|
||||||
|
return ResultGenerator.genSuccessResult("");
|
||||||
|
//IOS
|
||||||
|
}else if ("2".equals(type)){
|
||||||
|
if ("1".equals(entity.getIos())) {
|
||||||
|
return ResultGenerator.genSuccessResult(entity.getContent());
|
||||||
|
}
|
||||||
|
return ResultGenerator.genSuccessResult("");
|
||||||
|
}
|
||||||
|
return ResultGenerator.genFailResult("");
|
||||||
|
}else {
|
||||||
|
return ResultGenerator.genFailResult("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private String imageV2(String typeCode, String merchantType){
|
||||||
|
if ("AG".equals(typeCode) || "FB".equals(typeCode) || "SB".equals(typeCode)){
|
||||||
|
return "SHTGKT";
|
||||||
|
}
|
||||||
|
if ("1".equals(merchantType)){
|
||||||
|
return "XWTG";
|
||||||
|
}
|
||||||
|
return "PUSH";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -4,13 +4,17 @@ import cn.pluss.platform.api.Result;
|
|||||||
import cn.pluss.platform.api.ResultGenerator;
|
import cn.pluss.platform.api.ResultGenerator;
|
||||||
import cn.pluss.platform.app.MainPageService;
|
import cn.pluss.platform.app.MainPageService;
|
||||||
import cn.pluss.platform.entity.UserApp;
|
import cn.pluss.platform.entity.UserApp;
|
||||||
|
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
||||||
import cn.pluss.platform.userApp.UserAppService;
|
import cn.pluss.platform.userApp.UserAppService;
|
||||||
|
import cn.pluss.platform.vo.MerchantProfitVO;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@@ -25,6 +29,8 @@ public class MainPageController {
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private MainPageService agentStaffMainPageService;
|
private MainPageService agentStaffMainPageService;
|
||||||
|
@Resource
|
||||||
|
private MerchantProfitService merchantProfitService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @page 商户推广
|
* @page 商户推广
|
||||||
@@ -37,12 +43,35 @@ public class MainPageController {
|
|||||||
UserApp userApp = userAppService.queryUserAppByToken();
|
UserApp userApp = userAppService.queryUserAppByToken();
|
||||||
Map<String, Object> resultMap;
|
Map<String, Object> resultMap;
|
||||||
|
|
||||||
if ("agent_staff".equals(userApp.getUserType())) {
|
resultMap = promoterMainPageService.getSpreadData(userApp.getUserId() + "");
|
||||||
resultMap = agentStaffMainPageService.getSpreadData(userApp.getUserId() + "");
|
|
||||||
} else {
|
|
||||||
resultMap = promoterMainPageService.getSpreadData(userApp.getUserId() + "");
|
|
||||||
}
|
|
||||||
|
|
||||||
return ResultGenerator.genSuccessResult(resultMap);
|
return ResultGenerator.genSuccessResult(resultMap);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/userApp/modifyFee")
|
||||||
|
public Result<Object> modifyFee(@RequestParam("id") Integer id, @RequestParam("fee") BigDecimal fee){
|
||||||
|
UserApp result = userAppService.queryUserBaseInfoByToken();
|
||||||
|
promoterMainPageService.modifyFee(result.getUserId(), id, fee);
|
||||||
|
return ResultGenerator.genSuccessResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团队管理
|
||||||
|
* @param name
|
||||||
|
* @param current
|
||||||
|
* @param size
|
||||||
|
* @param typeCode
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/userApp/teamControl")
|
||||||
|
public Result<Object> teamControl(String name,
|
||||||
|
@RequestParam(defaultValue = "1") Integer current,
|
||||||
|
@RequestParam(defaultValue = "10") Integer size,
|
||||||
|
@RequestParam("typeCode") String typeCode){
|
||||||
|
UserApp result = userAppService.queryUserBaseInfoByToken();
|
||||||
|
Map<String, Object> merchantProfitVOS = merchantProfitService.teamList(typeCode, result.getUserId(),
|
||||||
|
current,size,name);
|
||||||
|
return ResultGenerator.genSuccessResult(merchantProfitVOS);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ import cn.pluss.platform.merchantOrder.MerchantOrderService;
|
|||||||
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
||||||
import cn.pluss.platform.userApp.UserAppService;
|
import cn.pluss.platform.userApp.UserAppService;
|
||||||
import cn.pluss.platform.util.StringUtil;
|
import cn.pluss.platform.util.StringUtil;
|
||||||
|
import cn.pluss.platform.vo.MerchantProfitVO;
|
||||||
|
import cn.pluss.platform.vo.ProfitOrderVO;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiImplicitParam;
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
@@ -124,7 +126,7 @@ public class MerchantProfitController {
|
|||||||
map.put("endTime", sdf.parse(endTime));
|
map.put("endTime", sdf.parse(endTime));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
//直属
|
||||||
List<MerchantProfit> merchantProfitList = merchantProfitService.queryMerchantProfitPage(map);
|
List<MerchantProfit> merchantProfitList = merchantProfitService.queryMerchantProfitPage(map);
|
||||||
|
|
||||||
if (merchantProfitList != null && merchantProfitList.size() > 0) {
|
if (merchantProfitList != null && merchantProfitList.size() > 0) {
|
||||||
@@ -253,5 +255,17 @@ public class MerchantProfitController {
|
|||||||
merchantProfit = merchantProfitService.queryMerchantProfit(merchantProfit);
|
merchantProfit = merchantProfitService.queryMerchantProfit(merchantProfit);
|
||||||
return ResultGenerator.genSuccessResult(merchantProfit);
|
return ResultGenerator.genSuccessResult(merchantProfit);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/profitOrderList")
|
||||||
|
public Result<List<ProfitOrderVO>> ProfitOrderList(@RequestParam Integer type, @RequestParam Integer page,
|
||||||
|
@RequestParam Integer size, String startTime, String endTime){
|
||||||
|
UserApp userApp = userAppService.queryUserAppByToken();
|
||||||
|
Integer pageSize = size;
|
||||||
|
Integer offset = (page-1) * size;
|
||||||
|
if (type == 1) {
|
||||||
|
return ResultGenerator.genSuccessResult(merchantProfitMapper.directlyOrder(userApp.getUserId(), pageSize, offset, startTime, endTime));
|
||||||
|
}
|
||||||
|
return ResultGenerator.genSuccessResult(merchantProfitMapper.teamOrder(userApp.getUserId(), pageSize, offset, startTime, endTime));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -383,14 +383,16 @@ public class UserAppController {
|
|||||||
QueryWrapper<UserPromotion> QueryWrapper = new QueryWrapper<>();
|
QueryWrapper<UserPromotion> QueryWrapper = new QueryWrapper<>();
|
||||||
QueryWrapper.eq("user_id", result.getUserId());
|
QueryWrapper.eq("user_id", result.getUserId());
|
||||||
UserPromotion userPromotion = userPromotionService.getOne(QueryWrapper);
|
UserPromotion userPromotion = userPromotionService.getOne(QueryWrapper);
|
||||||
if (userPromotion== null) {
|
if("promoter".equals(result.getUserType())) {
|
||||||
MsgException.checkBlank("", "用户状态异常");
|
if (userPromotion == null) {
|
||||||
}
|
MsgException.checkBlank("", "用户状态异常");
|
||||||
result.setTypeCode(userPromotion == null?"null":userPromotion.getTypeCode());
|
}
|
||||||
result.setMinFee(userPromotion == null?"null":userPromotion.getCurrentFee());
|
result.setTypeCode(userPromotion == null ? "null" : userPromotion.getTypeCode());
|
||||||
|
result.setMinFee(userPromotion == null ? "null" : userPromotion.getCurrentFee());
|
||||||
|
|
||||||
result.setMaxFee("0.32");
|
result.setMaxFee("0.32");
|
||||||
result.setIsExtend(userPromotion.getIsExtend());
|
result.setIsExtend(userPromotion.getIsExtend());
|
||||||
|
}
|
||||||
return ResultGenerator.genSuccessResult(result);
|
return ResultGenerator.genSuccessResult(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,47 @@
|
|||||||
|
package cn.pluss.platform.util;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
import static java.math.BigDecimal.ROUND_DOWN;
|
||||||
|
|
||||||
|
public class N {
|
||||||
|
|
||||||
|
public static final int SCALE = 6;
|
||||||
|
|
||||||
|
public static final boolean isZero(BigDecimal num) {
|
||||||
|
return num == null || BigDecimal.ZERO.compareTo(num) == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final boolean isNull(BigDecimal num) {
|
||||||
|
return num == null;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static final boolean eq(BigDecimal n1, BigDecimal n2) {
|
||||||
|
return (!isNull(n1) && !isNull(n2) && n1.compareTo(n2) == 0);//n1==n2
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final boolean gt(BigDecimal n1, BigDecimal n2) {
|
||||||
|
return (!isNull(n1) && !isNull(n2) && n1.compareTo(n2) > 0);//n1>n2
|
||||||
|
}
|
||||||
|
|
||||||
|
public static final boolean egt(BigDecimal n1, BigDecimal n2) {
|
||||||
|
return (!isNull(n1) && !isNull(n2) && n1.compareTo(n2) >= 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static final BigDecimal mul(BigDecimal b1, BigDecimal b2) {
|
||||||
|
if (isNull(b1) || isNull(b2))
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
|
||||||
|
return b1.multiply(b2).setScale(SCALE, ROUND_DOWN);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static final BigDecimal div(BigDecimal b1, BigDecimal b2) {
|
||||||
|
if (isNull(b1) || isZero(b2))
|
||||||
|
throw new IllegalArgumentException();
|
||||||
|
|
||||||
|
return b1.divide(b2, SCALE, ROUND_DOWN);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -372,31 +372,5 @@ public class RSAEncrypt {
|
|||||||
}
|
}
|
||||||
return stringBuilder.toString();
|
return stringBuilder.toString();
|
||||||
}
|
}
|
||||||
public static void main(String[] args) {
|
|
||||||
try {
|
|
||||||
// 生成密钥对
|
|
||||||
|
|
||||||
// String privateKey = new String(Base64.encodeBase64(keyPair.getPrivate().getEncoded()));
|
|
||||||
// String publicKey = new String(Base64.encodeBase64(keyPair.getPublic().getEncoded()));
|
|
||||||
|
|
||||||
// RSA加密
|
|
||||||
String data = "{\"ordNo\":\"2017031601582703488262843972\",\"mno\":\"399190513665034\"}";
|
|
||||||
System.out.println(data);
|
|
||||||
// String encryptData = encrypt(data, getPublicKey(publicKey));
|
|
||||||
// System.out.println("加密后内容:" + encryptData);
|
|
||||||
// RSA解密
|
|
||||||
// String decryptData = decrypt(encryptData, getPrivateKey(privateKey));
|
|
||||||
// System.out.println("解密后内容:" + decryptData);
|
|
||||||
|
|
||||||
// RSA签名
|
|
||||||
String sign = RSASignature.sign(data, CERT);
|
|
||||||
System.out.println(sign);
|
|
||||||
// RSA验签
|
|
||||||
boolean result = signVerify(data, PUBLIC_KEY, sign);
|
|
||||||
System.out.print("验签结果:" + result);
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
System.out.print("加解密异常");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
package cn.pluss.platform.util;
|
package cn.pluss.platform.util;
|
||||||
|
|
||||||
|
|
||||||
import org.apache.tomcat.util.codec.binary.Base64;
|
import org.apache.commons.codec.binary.Base64;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import javax.crypto.Cipher;
|
import javax.crypto.Cipher;
|
||||||
import java.security.KeyFactory;
|
import java.security.KeyFactory;
|
||||||
@@ -18,11 +19,10 @@ import java.security.spec.X509EncodedKeySpec;
|
|||||||
*/
|
*/
|
||||||
public class RSAUtil {
|
public class RSAUtil {
|
||||||
|
|
||||||
public static String RSA_ALGORITHM = "SHA1WithRSA";
|
public static String RSA_ALGORITHM = "RSA";
|
||||||
|
|
||||||
public static String UTF8 = "UTF-8";
|
public static String UTF8 = "UTF-8";
|
||||||
|
|
||||||
public static final String PUBLIC_KEY ="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCKjak6oTfMxO3hWZ8CnMgUxDXHtsHQLZf4GgxzbjVYIN93UtuycdHypfUEh18s8sWwHRvBfeJ4mG0QbLazMphUY7ju9ox/qyB+tmJtZO5fCUi1StnSh17fJRw2kBlD9dKtBBKHJw0PXC/d6ATRtbbbFerzgLtUz70SvUxooUQHtQIDAQAB";
|
|
||||||
public static final String CERT ="MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBAIqNqTqhN8zE7eFZnwKcyBTENce2wdAtl/gaDHNuNVgg33dS27Jx0fKl9QSHXyzyxbAdG8F94niYbRBstrMymFRjuO72jH+rIH62Ym1k7l8JSLVK2dKHXt8lHDaQGUP10q0EEocnDQ9cL93oBNG1ttsV6vOAu1TPvRK9TGihRAe1AgMBAAECgYBmI8KCl0DkcrSOsRvYuC2DqZWf8el1B3eFjeZp3e/zVOCIPYv6Q5ArWg6DVSxjnWEA0KSagqvGjU+xkQMqnXzPcPMhsIS+1wyR/pP+pwiatO2ioHaQpEqHg9eXhxrgA477/xuKVw9zl5GNqaIgd++2NDXnqLh0Y6OR73f0OB5eDQJBAPihEm+UWLOam/Q/k2+k4Lm2dvxJTBur1fslBiJpgMhgcz/PlwRwpL7aPD0AuPv0NqLouuoTiKpq9icnUv12tgsCQQCOqTANw0IErCHUNdinjXewmG3ui1j9XgM41rSn5ZeTrPL4GhZc2zbS/pZT4PBKUL6NLGkfPHmw4rOmNL/Xc5E/AkBqAwQBX5eSvVHSC2mqKPtJNGv3lqlFAzfyJg8/jQzEY5vAkZsq4Xzdg+A7gptdkvvY6rMIK9wSDhl3CGVyfbORAkA1N+g1OiHmnFACWhP4bU25EyPvWQxZeDi7e1zpRTzGWj5JT3IIMb7B9zcdE0yQbI6pG2gbvvOmiOt7lTH7raEBAkBas2gugvR3f0aGqQcqMpyM627pyRppQ2h58/7KBylP3oR2BReqMUcXeiJ8TuBXzbRXpeVQ0DWOva5CWZJmBMdz";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建公钥私钥
|
* 创建公钥私钥
|
||||||
@@ -60,12 +60,14 @@ public class RSAUtil {
|
|||||||
/**
|
/**
|
||||||
* 获取公钥对象
|
* 获取公钥对象
|
||||||
*
|
*
|
||||||
* @param pubKey 公钥
|
* @param pubKey
|
||||||
|
* 公钥
|
||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public static RSAPublicKey getPublicKey(String pubKey) throws Exception {
|
public static RSAPublicKey getPublicKey(String pubKey) throws Exception {
|
||||||
return getPublicKey(Base64.decodeBase64(pubKey));
|
return getPublicKey(Base64.decodeBase64(pubKey));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -195,17 +197,24 @@ public class RSAUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
//KeyStore keyPair = RSAUtil.createKeys();
|
|
||||||
// String publickey=keyPair.getPublicKey();
|
// KeyStore keyStore= createKeys();
|
||||||
// String privateKey=keyPair.getPrivateKey();
|
// System.out.println(keyStore.publicKey);
|
||||||
System.out.println("公钥:" + PUBLIC_KEY);
|
// System.out.println(keyStore.privateKey);
|
||||||
System.out.println("私钥:" + CERT);
|
|
||||||
String encode=RSAUtil.encryptByPublicKey("1111",PUBLIC_KEY);
|
String pubKey="MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCt4B7TJ9vMml3p5qHEoYfZIuRqklbFSrI5jnq25vjjqpJp8Vc8Ir0n8QVCpfzaO5oU2tf4qZ4KIidwlysagdzLb73q8EQIf4ILt2BQFRS5RAGPnKNPA8BsWwqzbnAI2+GHCSWtixVatLbswfdmIQJEHMzDylLGHycbb3CG+mC/sQIDAQAB";
|
||||||
System.out.println("加密数据:"+encode);
|
|
||||||
System.out.println("解密数据:"+RSAUtil.decryptByPrivateKey(encode,CERT));
|
String priKey="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK3gHtMn28yaXenmocShh9ki5GqSVsVKsjmOerbm+OOqkmnxVzwivSfxBUKl/No7mhTa1/ipngoiJ3CXKxqB3MtvverwRAh/ggu3YFAVFLlEAY+co08DwGxbCrNucAjb4YcJJa2LFVq0tuzB92YhAkQczMPKUsYfJxtvcIb6YL+xAgMBAAECgYA6qkO8OtaOUgcdxBMQpO+Q85Td4EImju1TPh9pVsTjC8oatLMaNx5bO5bqxdZqS3HRV4VHAPOxt5RXCKoiZ253JMvmcWXmiwYNFEr9iFXOLVT0H6q+TT4cpp5klAFM5xELaR4WFsYlxvCA6KGdNqHg4wYSPwj+WdYM12xEhBtjgQJBAPttT2LuIoEyLvjrqUr8bMuFKHRuYp3rMtl3nwU0es2OuOOsWH69w+L7oi4tgHr1gzpN8k2XExMcf0uDnk9eBrsCQQCxCbdegzCiSafUxrDwZpROlfL1duRXDinkLc9KC2HfS+w4/9Mjuc49SFo3grKczGN3t6AnlBasONehmNuDAAqDAkAeFND3tCgarwdhrshdeWAG5ZKWg5J29GnsDNzQwZujtly2mKsp1sh2Asc/oSALFg6yThscX2Pf2Hv+a+vn8Qb7AkAuDXD9zPKhxLc7ylPMtWJu7uK8p6jOXIjZKnF5uWxEQeO5EBNEf9j+aAvP1NfRofld8w5ePU+IjWDKUJEJisExAkEA+L6M96L3ICNF3sYtdvILO2ExYb4AuxF18MmPVWEy0jK9xxan3rggpIG+BQQuy8DoL1snc+JABALiSFEbAZjm6Q==";
|
||||||
|
|
||||||
|
String data="hFAKmbWQ4mo/ARmGWPBUxPP0kbpiIukGrNWovZS3MJiq/wf63ZDtnfLlLDgGMbuNRxE0dX3sVM69O6Pndv1JNSGNs+NUsU8EAScg0gfWrBssoKFdi4ZFqla9uauoY7E/chsANvU3kwEoeMplloOilvvX4LTQueKnuNvHyt1WTYY=";
|
||||||
|
System.out.println(decryptByPrivateKey(data,priKey));
|
||||||
|
|
||||||
|
|
||||||
// String privateKey="MIICdAIBADANBgkqhkiG9w0BAQEFAASCAl4wggJaAgEAAoGBAJ81T1tVomxy1ncvqUxP3hAhLf+1Iajaan2j3J3NcwVvI9Mr96wgqg3D4mWQ3ngjRySHf1d7L5wcf4LNgox88ePjTF0i1rsneRsNnYIwt4NCAvDairM6LuRMrcneulVD7q7aoOzjSl4PcRUQbmyRou1LGykEzmbj/bK7aPE/gmMJAgMBAAECgYBRkhTIrQV9HxF3G3pYWQtjpDxXKUzHoLCzEsO0LlFiVWE7julkzY+TYeubMjBpyVloA+xgvALWr1s9f2IF7PZZh3eJO8YrIQCPhz3uX8m/3Yt+t7yu/Ju0EtdwVC9CYcoBx9MaxaPAmviy8Fmt8rFTX5v3AKB1NrydBgkF1j3tSQJBAMvLSYBH8bqd3bN+pajdaqzbA+8hpsyxITEj5fk8lsc34nwiDq7xp9Z2CLDG8FSmRZEUBTaXt6OnFWYSrTl56dcCQQDH/hsJGwwI/8UfV+RmnDTrQGGiXIJUzKKgAJ47GNfeAlNJELYYqtIi5Dj/LMggBWg2F1/ZEwko/q5E3mLkKz4fAkAhIGlRNeCgQhsQm0yYV22IrY1FKMYxTbWkhD5UtjmYJohlPy/91gA/Ry6AdcYJLIHwZD24sw7Bxl4fGngX+K4/Aj8CV/f5I1gAwv6MX3tNuIbmOtrqDCt60usU9OzlxGTDNUPEl22K3HWZ8xK36s5tkaKm/58f7BkvYcypAfImulsCQBRkLBcHXyGhbH0gfjQT9lfWSMBbv3oKfDlrxLDKb0eZr7AtBTDqfubq52yh1cH4kvzkn8eLBVnBTcdKi48gMM0=";
|
// JSONObject object=new JSONObject();
|
||||||
// System.out.println("解密数据:"+RSAUtil.decryptByPrivateKey("fy1w9GHsrpwJzs4RW2KSZhB8gU4B2gJ3Gc1yLi5Hi0aniDiWYF95VwgNw3tjLzuDIEzoCEUDUphxK2rVmWZl4ORU3ooS+57TLhN5xb/WuhEo9RmKwm6CJHUUKxms3RoRUHk6r9hOhA4Irdqp2V/fIWQUlwp0HWytUqx912D53fs=",privateKey));
|
// object.put("openId","xsaxmasomxoamxoamsxo");
|
||||||
|
//
|
||||||
|
// System.out.println(RSAUtil.encryptByPublicKey(object.toString(),"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDOUSIKUGRwvUFrDvD6s8PgL8hQoKQrzTTK6vKWzQ2MIQ09ArZOd0ndxaZVVygebA+6vb7lArn1rMwKPFvbCs/iQZtYyXe7l+sfaPp8VzWzmDyAqHgQjsD+0LAMsdqtLCpB6kzP/WojeKaxREGAalJNyVR3hX2UzW98qkAV40hepwIDAQAB"));
|
||||||
|
// String ssss = "4AAB79960924E25BE1B626FB7B42917711E48FFBEFBCF29C0E47716514073F97AB2C0A97F95BD80168E1FBD9852ABC21038631F40A79B1142E11570430A0C03D896722433886222BED782A3DB82C156B246C9E8A7287AAB1BAFB1D520BC030514E82130FD1D20DDCE8C67E3A552A8EFE6784BF657614D7B6D16BBED16B899E00";
|
||||||
|
// System.out.println(RSAUtil.decryptByPrivateKey(ssss,"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAJx0zH5Q01roGe33mUP27K4rHrWZ9UoPYcA7TE4ufv8wPk7/i1JZCZojx9BDUwwihn9Hwbv2XR66FRzQ7UzHsrjqNt5QcFUcbXh3Wm0BGQ6aLoK3qRAUIasvegIUxWHTvubQEGvV4Nld4FI0kStjLF89QzFBiyjCYa9xmWt62TU1AgMBAAECgYApWuouvViQn+cyso7NmzhGdVlhsTdYAybYdBQgWkPxWiQuJ3gBJU3Xc3u+ff02qO2aOTJpZ56Hn7Iy8rq239ZKhqnGJcQSjFTIODZo6S8xaWCv+DFjpsnTMA8rZ/ohiR/BoCMJPTFA3sRpjH4RquzV9y1HkSVvz96I/RAn2UU0QQJBAM8Cdudm96P67iYTRX/zAXeueV8wlqPKJ8i35lNBSprfyv0+N2v8ARjev8LCx8ebFzLNsLfEByx327KlnAY29EUCQQDBe5eya8wIqVRCbnZKzulCkSi8ZPg7Vzucg/W619hWe35ddXtUgLj/uPZ+SNZrGlWmt+dT9Mf7WEAxb4xXm+QxAkBtZ1QH//cpBtkN7mlwsbE421Dx6e/zKEfWYLqtjXgsWdIh/Nu1ij3aMv8No3uKFoEwLF0VAdj4u2+0/qly72AxAkEAo9MFUBKMMS1G5fTn/lGSGkYUqugHcx9anxzwvOK0EA4Cohmuco+HlSdEtwrvWsJykXaXzXOuvLgtqm4b87ZQkQJAWkKoEiIPloAVELKWqRtcoHNzdsJGZ5pMTlfOP0GgufNhZxYXFByEo7eZ7b7sbyaJkQOR6ubDlvwoPGxU1jnVKQ=="));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,7 +135,7 @@ public interface MerchantOrderMapper extends BaseMapper<MerchantOrder> {
|
|||||||
Double queryMerchantOrderEnterFeeByTime(Map map);
|
Double queryMerchantOrderEnterFeeByTime(Map map);
|
||||||
|
|
||||||
Double queryMerchantOrderShareMoneyByTime(Map map);
|
Double queryMerchantOrderShareMoneyByTime(Map map);
|
||||||
|
BigDecimal queryMerchantOrderMoneyByTime(Map map);
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* queryMerchantOrderPageShuju:(最新统计订单方法). <br/>
|
* queryMerchantOrderPageShuju:(最新统计订单方法). <br/>
|
||||||
@@ -235,6 +235,7 @@ public interface MerchantOrderMapper extends BaseMapper<MerchantOrder> {
|
|||||||
"WHERE merchantCode = #{merchantCode} AND createDate = #{date} AND `status` IN (1, 2)")
|
"WHERE merchantCode = #{merchantCode} AND createDate = #{date} AND `status` IN (1, 2)")
|
||||||
Map<String, Object> getConsumeFee(@Param("merchantCode") String merchantCode, @Param("date") String date);
|
Map<String, Object> getConsumeFee(@Param("merchantCode") String merchantCode, @Param("date") String date);
|
||||||
|
|
||||||
|
|
||||||
Map<String, Object> querySumCount(Map<String, Object> params);
|
Map<String, Object> querySumCount(Map<String, Object> params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -427,6 +428,23 @@ public interface MerchantOrderMapper extends BaseMapper<MerchantOrder> {
|
|||||||
|
|
||||||
@Select("SELECT * FROM tb_pluss_merchant_order WHERE mercOrderNo = #{mercOrderNo} limit 1")
|
@Select("SELECT * FROM tb_pluss_merchant_order WHERE mercOrderNo = #{mercOrderNo} limit 1")
|
||||||
MerchantOrder getByMercOrderNo(String mercOrderNo);
|
MerchantOrder getByMercOrderNo(String mercOrderNo);
|
||||||
|
@Select("SELECT count(0)\n" +
|
||||||
|
"FROM tb_pluss_merchant_order mo\n" +
|
||||||
|
"LEFT JOIN tb_pluss_user_app ua ON ua.merchantCode = mo.merchantCode\n" +
|
||||||
|
"WHERE\n" +
|
||||||
|
" ua.userId = #{userId} ")
|
||||||
|
Integer getCountUser(@Param("userId") Long userId);
|
||||||
|
|
||||||
|
@Select("SELECT IFNULL(SUM(consumeFee - refundAmt),0) FROM tb_pluss_merchant_order WHERE merchantCode=#{merchantCode} AND `status` = 1")
|
||||||
|
BigDecimal getAmountData(@Param("merchantCode") String merchantCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 昨日收款
|
||||||
|
* @param startDate
|
||||||
|
* @param endDate
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Select("SELECT IFNULL(SUM(consumeFee - refundAmt),0) FROM tb_pluss_merchant_order WHERE merchantCode=#{merchantCode} AND `status` = 1 AND transDt >= #{startDate} AND transDt <= #{endDate}")
|
||||||
|
BigDecimal getPlatformAmtYestday(@Param("merchantCode") String merchantCode,@Param("startDate") Date startDate, @Param("endDate") Date endDate);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
package cn.pluss.platform.mapper;
|
package cn.pluss.platform.mapper;
|
||||||
|
|
||||||
|
import cn.pluss.platform.api.PageInfo;
|
||||||
import cn.pluss.platform.dto.MerchantFeeDTO;
|
import cn.pluss.platform.dto.MerchantFeeDTO;
|
||||||
|
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||||
import cn.pluss.platform.entity.MerchantProfit;
|
import cn.pluss.platform.entity.MerchantProfit;
|
||||||
|
import cn.pluss.platform.vo.DeviceGoodsVO;
|
||||||
|
import cn.pluss.platform.vo.MerChannelStatusVO;
|
||||||
|
import cn.pluss.platform.vo.MerchantProfitVO;
|
||||||
|
import cn.pluss.platform.vo.ProfitOrderVO;
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
@@ -27,6 +33,7 @@ public interface MerchantProfitMapper extends BaseMapper<MerchantProfit> {
|
|||||||
List<MerchantProfit> queryMerchantProfitPage(Map map);
|
List<MerchantProfit> queryMerchantProfitPage(Map map);
|
||||||
|
|
||||||
Integer queryMerchantProfitPageCount(Map map);
|
Integer queryMerchantProfitPageCount(Map map);
|
||||||
|
Integer queryMerchantProfitPageCountV2(@Param("userId") String userId);
|
||||||
|
|
||||||
void saveMerchantProfitBatch(List<MerchantProfit> merchantProfitList);
|
void saveMerchantProfitBatch(List<MerchantProfit> merchantProfitList);
|
||||||
|
|
||||||
@@ -67,5 +74,84 @@ public interface MerchantProfitMapper extends BaseMapper<MerchantProfit> {
|
|||||||
|
|
||||||
|
|
||||||
Map<String, BigDecimal> getProfitAmtCount(MerchantProfit condition);
|
Map<String, BigDecimal> getProfitAmtCount(MerchantProfit condition);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 今日收益
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Select("SELECT\n" +
|
||||||
|
"\tsum( t.price ) \n" +
|
||||||
|
"FROM\n" +
|
||||||
|
"\ttb_pluss_merchant_profit t \n" +
|
||||||
|
"WHERE\n" +
|
||||||
|
"\tt.type = 5 \n" +
|
||||||
|
"\tAND t.userId = #{userId} \n" +
|
||||||
|
"\tAND date_format( `t`.`createDt`, '%Y-%m-%d' ) = date_format(( curdate() - INTERVAL 0 DAY ), '%Y-%m-%d' );")
|
||||||
|
BigDecimal getTodaySum(@Param("userId")String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直属商户交易金额
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Select("SELECT\n" +
|
||||||
|
"\tsum( o.consumeFee ) \n" +
|
||||||
|
"FROM\n" +
|
||||||
|
"\ttb_pluss_merchant_order o\n" +
|
||||||
|
"\tLEFT JOIN tb_pluss_merchant_base_info b ON o.merchantCode = b.merchantCode\n" +
|
||||||
|
"\tLEFT JOIN tb_pluss_user_promotion p ON b.userId = p.user_id \n" +
|
||||||
|
"WHERE\n" +
|
||||||
|
"\to.`status` = 1 \n" +
|
||||||
|
"\tAND p.parent_user_id = #{userId}")
|
||||||
|
BigDecimal getConsumeFee(@Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团队总交易金额
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BigDecimal getConsumeFeeTeam(@Param("userId") String userId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 团队总交易金额(今日)
|
||||||
|
* @param userId
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
BigDecimal getConsumeFeeTeamToday(@Param("userId") String userId);
|
||||||
|
|
||||||
|
List<MerchantProfitVO> getTeamList(@Param("typeCode") String typeCode, @Param("userId") Long userId,
|
||||||
|
@Param("userName") String userName, @Param("pageSize") Integer pageSize,
|
||||||
|
@Param("offset") Integer offset);
|
||||||
|
List<MerchantProfitVO> getMerchantTeamList(@Param("typeCode") String typeCode, @Param("userId") Long userId,
|
||||||
|
@Param("userName") String userName, @Param("pageSize") Integer pageSize,
|
||||||
|
@Param("offset") Integer offset);
|
||||||
|
|
||||||
|
|
||||||
|
@Select("SELECT\n" +
|
||||||
|
"\tcount(*) \n" +
|
||||||
|
"FROM\n" +
|
||||||
|
"\ttb_pluss_user_promotion \n" +
|
||||||
|
"WHERE\n" +
|
||||||
|
"\tparent_user_id = #{userId}\n" +
|
||||||
|
"\tAND type_code = #{typeCode}")
|
||||||
|
Integer getCountChild( @Param("userId") Long userId,@Param("typeCode") String typeCod);
|
||||||
|
Integer getCountChildV2( @Param("userId") Long userId);
|
||||||
|
|
||||||
|
List<MerChannelStatusVO> getChannelStatus(@Param("merchantCode") String merchantCode);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直属交易
|
||||||
|
* @param userId
|
||||||
|
* @param pageSize
|
||||||
|
* @param offset
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
List<ProfitOrderVO> directlyOrder(@Param("userId") Long userId,@Param("pageSize") Integer pageSize,@Param("offset") Integer offset,
|
||||||
|
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
|
/**
|
||||||
|
* 团队交易
|
||||||
|
*/
|
||||||
|
List<ProfitOrderVO> teamOrder(@Param("userId") Long userId,@Param("pageSize") Integer pageSize,@Param("offset") Integer offset,
|
||||||
|
@Param("startTime") String startTime, @Param("endTime") String endTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package cn.pluss.platform.mapper;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
|||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import lombok.Data;
|
||||||
import lombok.val;
|
import lombok.val;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
import org.apache.ibatis.annotations.Mapper;
|
||||||
import cn.pluss.platform.entity.UserApp;
|
import cn.pluss.platform.entity.UserApp;
|
||||||
@@ -45,6 +47,7 @@ public interface UserAppMapper extends BaseMapper<UserApp> {
|
|||||||
MerchSummaryVO selectBillCountAndTotalFee(@Param("condition") MerchSearchDTO condition);
|
MerchSummaryVO selectBillCountAndTotalFee(@Param("condition") MerchSearchDTO condition);
|
||||||
|
|
||||||
Integer queryUserAppPageCount(Map<String, Object> map);
|
Integer queryUserAppPageCount(Map<String, Object> map);
|
||||||
|
Integer queryUserPageCount(Map<String, Object> map);
|
||||||
|
|
||||||
List<UserInfoVO> queryUserInfoVOPage(Map<String, Object> map);
|
List<UserInfoVO> queryUserInfoVOPage(Map<String, Object> map);
|
||||||
|
|
||||||
@@ -144,6 +147,7 @@ public interface UserAppMapper extends BaseMapper<UserApp> {
|
|||||||
* 获取指定进件状态的商户
|
* 获取指定进件状态的商户
|
||||||
*/
|
*/
|
||||||
Integer selectUserAppWithChannelStatusCount(@Param(Constants.WRAPPER) Wrapper<UserApp> updateWrapper);
|
Integer selectUserAppWithChannelStatusCount(@Param(Constants.WRAPPER) Wrapper<UserApp> updateWrapper);
|
||||||
|
Integer selectUserAppWithChannelStatusCountV2(@Param("userId") String userId, @Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取指定进件状态的商户
|
* 获取指定进件状态的商户
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||||||
import org.apache.ibatis.annotations.Param;
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.apache.ibatis.annotations.Select;
|
import org.apache.ibatis.annotations.Select;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Mapper
|
@Mapper
|
||||||
@@ -31,4 +32,14 @@ public interface UserPromotionMapper extends BaseMapper<UserPromotion> {
|
|||||||
"WHERE\n" +
|
"WHERE\n" +
|
||||||
"\tP.user_id = #{userId}")
|
"\tP.user_id = #{userId}")
|
||||||
UserPromotion selectByUserId(@Param("userId") String userId);
|
UserPromotion selectByUserId(@Param("userId") String userId);
|
||||||
|
|
||||||
|
UserPromotion selectByPrimaryKey(Long userId);
|
||||||
|
@Select("select max(current_fee) from tb_pluss_user_promotion where parent_user_id=#{id}")
|
||||||
|
BigDecimal selectMaxFeeByUserId(@Param("id")String id);
|
||||||
|
@Select(" select *\n" +
|
||||||
|
" from tb_pluss_user_promotion\n" +
|
||||||
|
" where user_id = #{userId}" +
|
||||||
|
" limit 1 ")
|
||||||
|
UserPromotion getOne(@Param("userId") Long userId);
|
||||||
|
int updateByPrimaryKey(UserPromotion record);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2981,4 +2981,18 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="queryMerchantOrderMoneyByTime" resultType="java.math.BigDecimal">
|
||||||
|
SELECT sum(consumeFee) from tb_pluss_merchant_order
|
||||||
|
<where>
|
||||||
|
<if test="startTime != null">
|
||||||
|
and transDt >= #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime!= null">
|
||||||
|
and transDt <= #{endTime}
|
||||||
|
</if>
|
||||||
|
AND merchantCode = #{merchantCode}
|
||||||
|
AND status = 1
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -249,13 +249,15 @@
|
|||||||
resultType="cn.pluss.platform.entity.MerchantProfit">
|
resultType="cn.pluss.platform.entity.MerchantProfit">
|
||||||
SELECT
|
SELECT
|
||||||
profit.*,
|
profit.*,
|
||||||
ua.userType
|
ua.userType,
|
||||||
|
bi.alias
|
||||||
FROM
|
FROM
|
||||||
tb_pluss_merchant_profit profit
|
tb_pluss_merchant_profit profit
|
||||||
LEFT JOIN tb_pluss_merchant_order merchantOrder ON profit.orderNumber = merchantOrder.orderNumber
|
LEFT JOIN tb_pluss_merchant_order merchantOrder ON profit.orderNumber = merchantOrder.orderNumber
|
||||||
LEFT JOIN tb_pluss_user_app ua ON ua.userId = profit.userId
|
LEFT JOIN tb_pluss_user_app ua ON ua.userId = profit.userId
|
||||||
|
LEFT JOIN tb_pluss_merchant_base_info bi ON merchantOrder.merchantCode = bi.merchantCode
|
||||||
<where>
|
<where>
|
||||||
and merchantOrder.status = 1
|
profit.userId=#{userId}
|
||||||
<if test="id!= null">
|
<if test="id!= null">
|
||||||
and profit.id = #{id}
|
and profit.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
@@ -278,7 +280,7 @@
|
|||||||
and profit.merchantCode = #{merchantCode}
|
and profit.merchantCode = #{merchantCode}
|
||||||
</if>
|
</if>
|
||||||
<if test="merchantName!= null">
|
<if test="merchantName!= null">
|
||||||
and profit.merchantName like CONCAT('%',#{merchantName},'%')
|
and bi.alias like CONCAT('%',#{merchantName},'%')
|
||||||
</if>
|
</if>
|
||||||
<if test="consumeFee!= null">
|
<if test="consumeFee!= null">
|
||||||
and profit.consumeFee = #{consumeFee}
|
and profit.consumeFee = #{consumeFee}
|
||||||
@@ -346,7 +348,6 @@
|
|||||||
<if test="merchantParentPhone!= null">
|
<if test="merchantParentPhone!= null">
|
||||||
and profit.merchantParentPhone = #{merchantParentPhone}
|
and profit.merchantParentPhone = #{merchantParentPhone}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</where>
|
</where>
|
||||||
order by id desc limit #{pageSize} offset #{offset}
|
order by id desc limit #{pageSize} offset #{offset}
|
||||||
</select>
|
</select>
|
||||||
@@ -554,7 +555,8 @@
|
|||||||
|
|
||||||
|
|
||||||
<select id="queryMerchantProfitSumPrice" parameterType="java.util.Map" resultType="java.lang.Double">
|
<select id="queryMerchantProfitSumPrice" parameterType="java.util.Map" resultType="java.lang.Double">
|
||||||
SELECT sum(price) from tb_pluss_merchant_profit profit where profit.type=5
|
SELECT sum(price) from tb_pluss_merchant_profit profit
|
||||||
|
WHERE profit.type = 5
|
||||||
<if test="id!= null">
|
<if test="id!= null">
|
||||||
and profit.id = #{id}
|
and profit.id = #{id}
|
||||||
</if>
|
</if>
|
||||||
@@ -564,9 +566,6 @@
|
|||||||
<if test="userId!= null">
|
<if test="userId!= null">
|
||||||
and profit.userId = #{userId}
|
and profit.userId = #{userId}
|
||||||
</if>
|
</if>
|
||||||
<if test="type!= null">
|
|
||||||
and profit.type = #{type}
|
|
||||||
</if>
|
|
||||||
<if test="price!= null">
|
<if test="price!= null">
|
||||||
and profit.price = #{price}
|
and profit.price = #{price}
|
||||||
</if>
|
</if>
|
||||||
@@ -645,6 +644,9 @@
|
|||||||
<if test="merchantParentPhone!= null">
|
<if test="merchantParentPhone!= null">
|
||||||
and profit.merchantParentPhone = #{merchantParentPhone}
|
and profit.merchantParentPhone = #{merchantParentPhone}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="retype!= null">
|
||||||
|
and profit.type !=4
|
||||||
|
</if>
|
||||||
<if test="recordDate != null">
|
<if test="recordDate != null">
|
||||||
and profit.recordDate = #{recordDate}
|
and profit.recordDate = #{recordDate}
|
||||||
</if>
|
</if>
|
||||||
@@ -654,6 +656,7 @@
|
|||||||
<if test="recordDateEnd != null">
|
<if test="recordDateEnd != null">
|
||||||
and profit.recordDate <= #{recordDateEnd}
|
and profit.recordDate <= #{recordDateEnd}
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
||||||
@@ -860,4 +863,253 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
GROUP BY userId
|
GROUP BY userId
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getConsumeFeeTeam" resultType="java.math.BigDecimal">
|
||||||
|
SELECT
|
||||||
|
SUM(v.consumeFee)
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
@ids AS _ids,
|
||||||
|
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||||
|
@l := @l + 1 AS LEVEL
|
||||||
|
FROM
|
||||||
|
tb_pluss_user_promotion,
|
||||||
|
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||||
|
WHERE @ids IS NOT NULL ) ID,
|
||||||
|
tb_pluss_user_promotion p
|
||||||
|
LEFT JOIN tb_pluss_merchant_base_info b ON b.userId = p.user_id
|
||||||
|
LEFT JOIN tb_pluss_merchant_order v ON v.merchantCode = b.merchantCode
|
||||||
|
WHERE
|
||||||
|
b.userId != #{userId}
|
||||||
|
AND FIND_IN_SET( p.user_id, ID._ids )
|
||||||
|
AND v.status = 1
|
||||||
|
</select>
|
||||||
|
<select id="getConsumeFeeTeamToday" resultType="java.math.BigDecimal">
|
||||||
|
SELECT
|
||||||
|
IFNULL(SUM(v.consumeFee),0)
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
@ids AS _ids,
|
||||||
|
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||||
|
@l := @l + 1 AS LEVEL
|
||||||
|
FROM
|
||||||
|
tb_pluss_user_promotion,
|
||||||
|
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||||
|
WHERE @ids IS NOT NULL ) ID,
|
||||||
|
tb_pluss_user_promotion p
|
||||||
|
LEFT JOIN tb_pluss_merchant_base_info b ON b.userId = p.user_id
|
||||||
|
LEFT JOIN tb_pluss_merchant_order v ON v.merchantCode = b.merchantCode
|
||||||
|
WHERE
|
||||||
|
FIND_IN_SET( p.user_id, ID._ids )
|
||||||
|
AND b.userId != #{userId}
|
||||||
|
AND v.status = 1
|
||||||
|
AND date_format( `v`.`transDt`, '%Y-%m-%d' ) = date_format(( curdate() - INTERVAL 0 DAY ), '%Y-%m-%d' )
|
||||||
|
</select>
|
||||||
|
<select id="getTeamList" resultType="cn.pluss.platform.vo.MerchantProfitVO">
|
||||||
|
SELECT
|
||||||
|
ua.userId,
|
||||||
|
ua.userName,
|
||||||
|
ui.phone,
|
||||||
|
up.current_fee,
|
||||||
|
up.type_code,
|
||||||
|
ua.merchantCode,
|
||||||
|
ua.createDt
|
||||||
|
FROM
|
||||||
|
tb_pluss_user_promotion up
|
||||||
|
LEFT JOIN tb_pluss_user_app ua ON ua.userId = up.user_id
|
||||||
|
LEFT JOIN tb_pluss_user_info ui ON ui.id = ua.userId
|
||||||
|
WHERE
|
||||||
|
up.parent_user_id = #{userId}
|
||||||
|
AND up.type_code = #{typeCode}
|
||||||
|
<if test="userName != null and userName != ''">
|
||||||
|
AND ua.userName = #{userName}
|
||||||
|
</if>
|
||||||
|
order by ua.userId DESC
|
||||||
|
LIMIT #{pageSize} OFFSET #{offset}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="getMerchantTeamList" resultType="cn.pluss.platform.vo.MerchantProfitVO">
|
||||||
|
SELECT
|
||||||
|
p.user_id AS id,
|
||||||
|
u.loginName AS phone,
|
||||||
|
ua.userName,
|
||||||
|
pr.createTime AS createDt,
|
||||||
|
p.parent_user_id,
|
||||||
|
pr.trueName AS parentTrueName,
|
||||||
|
p.type_code,
|
||||||
|
IFNULL( k.sumConsumeFee, 0 ) AS consumeFee,
|
||||||
|
IFNULL( k.yestedayConsumeFee, 0 ) AS yestedayConsumeFee,
|
||||||
|
IFNULL(n.num,0) as countNum,
|
||||||
|
k.merchantCode
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
@ids AS _ids,
|
||||||
|
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||||
|
@l := @l + 1 AS LEVEL
|
||||||
|
FROM
|
||||||
|
tb_pluss_user_promotion,
|
||||||
|
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||||
|
WHERE @ids IS NOT NULL ) ID,
|
||||||
|
tb_pluss_user_promotion p
|
||||||
|
LEFT JOIN tb_pluss_user_info u ON p.user_id = u.id
|
||||||
|
LEFT JOIN tb_pluss_user_info pr ON p.parent_user_id = pr.id
|
||||||
|
left join view_order_user_num n on p.user_id=n.userId
|
||||||
|
LEFT JOIN tb_pluss_user_app ua ON n.userId = ua.userId
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
i.userId,
|
||||||
|
i.merchantCode,
|
||||||
|
IFNULL( sum( i.sumConsumeFee ), 0 ) AS sumConsumeFee,
|
||||||
|
IFNULL( sum( i.yestedayConsumeFee ), 0 ) AS yestedayConsumeFee
|
||||||
|
FROM
|
||||||
|
view_order_info i
|
||||||
|
GROUP BY
|
||||||
|
i.userId
|
||||||
|
) k ON p.user_id = k.userId
|
||||||
|
WHERE
|
||||||
|
FIND_IN_SET( p.user_id, ID._ids )
|
||||||
|
AND p.user_id != #{userId}
|
||||||
|
<if test="userName != null and userName != ''">
|
||||||
|
AND u.trueName = #{userName}
|
||||||
|
</if>
|
||||||
|
ORDER BY
|
||||||
|
user_id
|
||||||
|
LIMIT #{pageSize} OFFSET #{offset}
|
||||||
|
</select>
|
||||||
|
<select id="getChannelStatus" resultType="cn.pluss.platform.vo.MerChannelStatusVO">
|
||||||
|
SELECT
|
||||||
|
`status`, authorizationStatus,remark,virChannelFlag
|
||||||
|
FROM
|
||||||
|
tb_pluss_merchant_channel_status
|
||||||
|
WHERE merchantCode = #{merchantCode}
|
||||||
|
AND virChannelFlag != 1
|
||||||
|
</select>
|
||||||
|
<select id="directlyOrder" resultType="cn.pluss.platform.vo.ProfitOrderVO">
|
||||||
|
SELECT
|
||||||
|
v.merchantName,
|
||||||
|
v.consumeFee,
|
||||||
|
v.transDt,
|
||||||
|
v.orderNumber
|
||||||
|
FROM
|
||||||
|
view_base_order v
|
||||||
|
WHERE v.userId in (select p.user_id from tb_pluss_user_promotion p where p.parent_user_id= #{userId})
|
||||||
|
<if test="startTime != null">
|
||||||
|
AND v.createDt >= #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
AND v.createDt <= #{endTime}
|
||||||
|
</if>
|
||||||
|
order by v.id desc
|
||||||
|
limit #{pageSize} offset #{offset}
|
||||||
|
</select>
|
||||||
|
<select id="teamOrder" resultType="cn.pluss.platform.vo.ProfitOrderVO">
|
||||||
|
SELECT
|
||||||
|
v.merchantName,
|
||||||
|
v.consumeFee,
|
||||||
|
v.transDt,
|
||||||
|
v.orderNumber
|
||||||
|
FROM
|
||||||
|
view_base_order v
|
||||||
|
WHERE
|
||||||
|
v.userId IN (
|
||||||
|
SELECT
|
||||||
|
p.user_id
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
@ids AS _ids,
|
||||||
|
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||||
|
@l := @l + 1 AS LEVEL
|
||||||
|
FROM
|
||||||
|
tb_pluss_user_promotion,
|
||||||
|
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||||
|
WHERE
|
||||||
|
@ids IS NOT NULL
|
||||||
|
) ID,
|
||||||
|
tb_pluss_user_promotion p
|
||||||
|
WHERE
|
||||||
|
FIND_IN_SET( p.user_id, ID._ids )
|
||||||
|
|
||||||
|
ORDER BY
|
||||||
|
user_id
|
||||||
|
)
|
||||||
|
and v.userId!=#{userId}
|
||||||
|
<if test="startTime != null">
|
||||||
|
AND v.createDt >= #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime != null">
|
||||||
|
AND v.createDt <= #{endTime}
|
||||||
|
</if>
|
||||||
|
ORDER BY
|
||||||
|
v.id desc
|
||||||
|
limit #{pageSize} offset #{offset}
|
||||||
|
</select>
|
||||||
|
<select id="queryMerchantProfitPageCountV2" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
COUNT(v.userId)
|
||||||
|
FROM
|
||||||
|
view_base_order v
|
||||||
|
WHERE
|
||||||
|
v.userId IN (
|
||||||
|
SELECT
|
||||||
|
p.user_id
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
@ids AS _ids,
|
||||||
|
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||||
|
@l := @l + 1 AS LEVEL
|
||||||
|
FROM
|
||||||
|
tb_pluss_user_promotion,
|
||||||
|
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||||
|
WHERE
|
||||||
|
@ids IS NOT NULL
|
||||||
|
) ID,
|
||||||
|
tb_pluss_user_promotion p
|
||||||
|
WHERE
|
||||||
|
FIND_IN_SET( p.user_id, ID._ids )
|
||||||
|
ORDER BY
|
||||||
|
user_id
|
||||||
|
)
|
||||||
|
AND v.userId != #{userId}
|
||||||
|
ORDER BY
|
||||||
|
v.id DESC
|
||||||
|
</select>
|
||||||
|
<select id="getCountChildV2" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(p.user_id)
|
||||||
|
FROM
|
||||||
|
(
|
||||||
|
SELECT
|
||||||
|
@ids AS _ids,
|
||||||
|
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
|
||||||
|
@l := @l + 1 AS LEVEL
|
||||||
|
FROM
|
||||||
|
tb_pluss_user_promotion,
|
||||||
|
( SELECT @ids := #{userId}, @l := 0 ) b
|
||||||
|
WHERE @ids IS NOT NULL ) ID,
|
||||||
|
tb_pluss_user_promotion p
|
||||||
|
LEFT JOIN tb_pluss_user_info u ON p.user_id = u.id
|
||||||
|
LEFT JOIN tb_pluss_user_info pr ON p.parent_user_id = pr.id
|
||||||
|
LEFT JOIN view_order_user_num n ON p.user_id = n.userId
|
||||||
|
LEFT JOIN tb_pluss_user_app ua ON n.userId = ua.userId
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
i.userId,
|
||||||
|
i.merchantCode,
|
||||||
|
IFNULL( sum( i.sumConsumeFee ), 0 ) AS sumConsumeFee,
|
||||||
|
IFNULL( sum( i.yestedayConsumeFee ), 0 ) AS yestedayConsumeFee
|
||||||
|
FROM
|
||||||
|
view_order_info i
|
||||||
|
GROUP BY
|
||||||
|
i.userId
|
||||||
|
) k ON p.user_id = k.userId
|
||||||
|
WHERE
|
||||||
|
FIND_IN_SET( p.user_id, ID._ids )
|
||||||
|
AND p.user_id != #{userId}
|
||||||
|
ORDER BY
|
||||||
|
user_id
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -239,6 +239,202 @@
|
|||||||
</where>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<select id="queryUserPageCount" parameterType="java.util.Map" resultType="java.lang.Integer">
|
||||||
|
SELECT count(*) from tb_pluss_user_app ua
|
||||||
|
LEFT JOIN tb_pluss_user_info ui ON ua.userId = ui.id
|
||||||
|
<where>
|
||||||
|
<if test="phone != null">
|
||||||
|
and ui.phone = #{phone}
|
||||||
|
</if>
|
||||||
|
<if test="id!= null">
|
||||||
|
and ua.id = #{id}
|
||||||
|
</if>
|
||||||
|
<if test="userId!= null">
|
||||||
|
and ua.userId = #{userId}
|
||||||
|
</if>
|
||||||
|
<if test="logo!= null">
|
||||||
|
and ua.logo = #{logo}
|
||||||
|
</if>
|
||||||
|
<if test="level!= null">
|
||||||
|
and ua.level = #{level}
|
||||||
|
</if>
|
||||||
|
<if test="userType!= null">
|
||||||
|
and ua.userType = #{userType}
|
||||||
|
</if>
|
||||||
|
<if test="createDt!= null">
|
||||||
|
and ua.createDt = #{createDt}
|
||||||
|
</if>
|
||||||
|
<if test="stTime!= null">
|
||||||
|
and ua.createDt >= #{stTime}
|
||||||
|
</if>
|
||||||
|
<if test="enTime!= null">
|
||||||
|
and ua.createDt <= #{enTime}
|
||||||
|
</if>
|
||||||
|
<if test="status!= null">
|
||||||
|
and ua.status = #{status}
|
||||||
|
</if>
|
||||||
|
<if test="certnum!= null">
|
||||||
|
and ua.certnum = #{certnum}
|
||||||
|
</if>
|
||||||
|
<if test="certBacKPhoto!= null">
|
||||||
|
and ua.certBacKPhoto = #{certBacKPhoto}
|
||||||
|
</if>
|
||||||
|
<if test="handCertPhoto!= null">
|
||||||
|
and ua.handCertPhoto = #{handCertPhoto}
|
||||||
|
</if>
|
||||||
|
<if test="bankName!= null">
|
||||||
|
and ua.bankName = #{bankName}
|
||||||
|
</if>
|
||||||
|
<if test="bankAddress!= null">
|
||||||
|
and ua.bankAddress = #{bankAddress}
|
||||||
|
</if>
|
||||||
|
<if test="bankBranch!= null">
|
||||||
|
and ua.bankBranch = #{bankBranch}
|
||||||
|
</if>
|
||||||
|
<if test="bankNo!= null">
|
||||||
|
and ua.bankNo = #{bankNo}
|
||||||
|
</if>
|
||||||
|
<if test="bankPhoto!= null">
|
||||||
|
and ua.bankPhoto = #{bankPhoto}
|
||||||
|
</if>
|
||||||
|
<if test="merchantCode!= null">
|
||||||
|
and ua.merchantCode = #{merchantCode}
|
||||||
|
</if>
|
||||||
|
<if test="fansProfit!= null">
|
||||||
|
and ua.fansProfit = #{fansProfit}
|
||||||
|
</if>
|
||||||
|
<if test="extendProfit!= null">
|
||||||
|
and ua.extendProfit = #{extendProfit}
|
||||||
|
</if>
|
||||||
|
<if test="cashProfit!= null">
|
||||||
|
and ua.cashProfit = #{cashProfit}
|
||||||
|
</if>
|
||||||
|
<if test="userName!= null">
|
||||||
|
and ua.userName = #{userName}
|
||||||
|
</if>
|
||||||
|
<if test="staffType!= null">
|
||||||
|
and ua.staffType = #{staffType}
|
||||||
|
</if>
|
||||||
|
<if test="parentId!= null">
|
||||||
|
and ua.parentId = #{parentId}
|
||||||
|
</if>
|
||||||
|
<if test="inviteNum!= null">
|
||||||
|
and ua.inviteNum = #{inviteNum}
|
||||||
|
</if>
|
||||||
|
<if test="bankStatus!= null">
|
||||||
|
and ua.bankStatus = #{bankStatus}
|
||||||
|
</if>
|
||||||
|
<if test="merchantStatus!= null">
|
||||||
|
and ua.merchantStatus = #{merchantStatus}
|
||||||
|
</if>
|
||||||
|
<if test="certReason!= null">
|
||||||
|
and ua.certReason = #{certReason}
|
||||||
|
</if>
|
||||||
|
<if test="bankReason!= null">
|
||||||
|
and ua.bankReason = #{bankReason}
|
||||||
|
</if>
|
||||||
|
<if test="merchantReason!= null">
|
||||||
|
and ua.merchantReason = #{merchantReason}
|
||||||
|
</if>
|
||||||
|
<if test="certPeriod!= null">
|
||||||
|
and ua.certPeriod = #{certPeriod}
|
||||||
|
</if>
|
||||||
|
<if test="certStartTime!= null">
|
||||||
|
and ua.certStartTime = #{certStartTime}
|
||||||
|
</if>
|
||||||
|
<if test="bankAddressCode!= null">
|
||||||
|
and ua.bankAddressCode = #{bankAddressCode}
|
||||||
|
</if>
|
||||||
|
<if test="merchantName!= null">
|
||||||
|
and ua.merchantName = #{merchantName}
|
||||||
|
</if>
|
||||||
|
<if test="merchantAddress!= null">
|
||||||
|
and ua.merchantAddress = #{merchantAddress}
|
||||||
|
</if>
|
||||||
|
<if test="merchantDetailAddress!= null">
|
||||||
|
and ua.merchantDetailAddress = #{merchantDetailAddress}
|
||||||
|
</if>
|
||||||
|
<if test="contactName!= null">
|
||||||
|
and ua.contactName = #{contactName}
|
||||||
|
</if>
|
||||||
|
<if test="contactPhone!= null">
|
||||||
|
and ua.contactPhone = #{contactPhone}
|
||||||
|
</if>
|
||||||
|
<if test="productDesc!= null">
|
||||||
|
and ua.productDesc = #{productDesc}
|
||||||
|
</if>
|
||||||
|
<if test="bussAuthNum!= null">
|
||||||
|
and ua.bussAuthNum = #{bussAuthNum}
|
||||||
|
</if>
|
||||||
|
<if test="bussAuthPeriod!= null">
|
||||||
|
and ua.bussAuthPeriod = #{bussAuthPeriod}
|
||||||
|
</if>
|
||||||
|
<if test="storeId!= null">
|
||||||
|
and ua.storeId = #{storeId}
|
||||||
|
</if>
|
||||||
|
<if test="appAuthToken!= null">
|
||||||
|
and ua.appAuthToken = #{appAuthToken}
|
||||||
|
</if>
|
||||||
|
<if test="tradeMoney!= null">
|
||||||
|
and ua.tradeMoney = #{tradeMoney}
|
||||||
|
</if>
|
||||||
|
<if test="authCount!= null">
|
||||||
|
and ua.authCount = #{authCount}
|
||||||
|
</if>
|
||||||
|
<if test="subMchId!= null">
|
||||||
|
and ua.subMchId = #{subMchId}
|
||||||
|
</if>
|
||||||
|
<if test="aisleSwitch!= null">
|
||||||
|
and ua.aisleSwitch = #{aisleSwitch}
|
||||||
|
</if>
|
||||||
|
<if test="unionpay!= null">
|
||||||
|
and ua.unionpay = #{unionpay}
|
||||||
|
</if>
|
||||||
|
<if test="mccCode!= null">
|
||||||
|
and ua.mccCode = #{mccCode}
|
||||||
|
</if>
|
||||||
|
<if test="contactEmail!= null">
|
||||||
|
and ua.contactEmail = #{contactEmail}
|
||||||
|
</if>
|
||||||
|
<if test="mccName!= null">
|
||||||
|
and ua.mccName = #{mccName}
|
||||||
|
</if>
|
||||||
|
<if test="leshuaLicenseName!= null">
|
||||||
|
and ua.leshuaLicenseName = #{leshuaLicenseName}
|
||||||
|
</if>
|
||||||
|
<if test="aliAccount!= null">
|
||||||
|
and ua.aliAccount = #{aliAccount}
|
||||||
|
</if>
|
||||||
|
<if test="aliName!= null">
|
||||||
|
and ua.aliName = #{aliName}
|
||||||
|
</if>
|
||||||
|
<if test="aliSignUrl!= null">
|
||||||
|
and ua.aliSignUrl = #{aliSignUrl}
|
||||||
|
</if>
|
||||||
|
<if test="wechatSignUrl!= null">
|
||||||
|
and ua.wechatSignUrl = #{wechatSignUrl}
|
||||||
|
</if>
|
||||||
|
<if test="token!= null">
|
||||||
|
and ua.token = #{token}
|
||||||
|
</if>
|
||||||
|
<if test="endTime!= null">
|
||||||
|
and ua.createDt <![CDATA[>=]]> #{startTime}
|
||||||
|
</if>
|
||||||
|
<if test="endTime!= null">
|
||||||
|
and ua.createDt <![CDATA[<=]]> #{endTime}
|
||||||
|
</if>
|
||||||
|
<if test="isVoice!= null">
|
||||||
|
and ua.isVoice = #{isVoice}
|
||||||
|
</if>
|
||||||
|
<if test="parentIdList!= null">
|
||||||
|
and ua.parentId in
|
||||||
|
<foreach collection="parentIdList" item="item" open="(" close=")" index="index" separator=",">
|
||||||
|
#{item}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="queryUserInfoVOPage" parameterType="java.util.Map" resultMap="userInfoVO">
|
<select id="queryUserInfoVOPage" parameterType="java.util.Map" resultMap="userInfoVO">
|
||||||
SELECT DISTINCT SQL_CALC_FOUND_ROWS
|
SELECT DISTINCT SQL_CALC_FOUND_ROWS
|
||||||
ua.id,
|
ua.id,
|
||||||
@@ -1470,4 +1666,16 @@
|
|||||||
left join tb_pluss_user_info ui on ua.userId = ui.id
|
left join tb_pluss_user_info ui on ua.userId = ui.id
|
||||||
where ui.phone = #{phone} and userType not in ('agent_staff','staff') AND LENGTH(ui.phone) = 11
|
where ui.phone = #{phone} and userType not in ('agent_staff','staff') AND LENGTH(ui.phone) = 11
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectUserAppWithChannelStatusCountV2" resultType="java.lang.Integer">
|
||||||
|
SELECT
|
||||||
|
count(*)
|
||||||
|
FROM
|
||||||
|
tb_pluss_user_app ua
|
||||||
|
LEFT JOIN tb_pluss_user_promotion up ON ua.userId = up.parent_user_id
|
||||||
|
WHERE
|
||||||
|
up.parent_user_id = #{userId}
|
||||||
|
AND up.type_code = 'MC'
|
||||||
|
AND up.create_time <![CDATA[ >= ]]> #{startTime}
|
||||||
|
AND up.create_time <![CDATA[ <= ]]> #{endTime}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -3,21 +3,38 @@
|
|||||||
<mapper namespace="cn.pluss.platform.mapper.UserPromotionMapper">
|
<mapper namespace="cn.pluss.platform.mapper.UserPromotionMapper">
|
||||||
|
|
||||||
<!-- 通用查询映射结果 -->
|
<!-- 通用查询映射结果 -->
|
||||||
<!-- <resultMap id="BaseResultMap" type="cn.pluss.platform.entity.UserVoice">-->
|
<resultMap id="BaseResultMap" type="cn.pluss.platform.entity.UserPromotion">
|
||||||
<!-- <id column="id" property="id" />-->
|
<id column="id" property="userId" jdbcType="VARCHAR" />
|
||||||
<!-- <result column="userId" property="userId" />-->
|
<result column="user_id" property="userId" />
|
||||||
<!-- <result column="paySuccess" property="paySuccess" />-->
|
<result column="type_code" property="typeCode" />
|
||||||
<!-- <result column="payCancel" property="payCancel" />-->
|
<result column="current_fee" property="currentFee" />
|
||||||
<!-- <result column="memberCharge" property="memberCharge" />-->
|
<result column="parent_user_id" property="parentUserId" />
|
||||||
<!-- <result column="memberConsume" property="memberConsume" />-->
|
<result column="create_time" property="createTime" />
|
||||||
<!-- <result column="deliveryOrder" property="deliveryOrder" />-->
|
<result column="is_extend" property="isExtend" />
|
||||||
<!-- <result column="storeOrder" property="storeOrder" />-->
|
<result column="update_time" property="updateTime" />
|
||||||
<!-- <result column="urge" property="urge" />-->
|
</resultMap>
|
||||||
<!-- </resultMap>-->
|
<sql id="Base_Column_List">
|
||||||
|
user_id, type_code, current_fee, parent_user_id, is_extend, create_time, update_time
|
||||||
|
</sql>
|
||||||
|
<update id="updateByPrimaryKey">
|
||||||
|
update tb_pluss_user_promotion
|
||||||
|
set type_code = #{typeCode,jdbcType=VARCHAR},
|
||||||
|
current_fee = #{currentFee,jdbcType=DECIMAL},
|
||||||
|
parent_user_id = #{parentUserId,jdbcType=VARCHAR},
|
||||||
|
is_extend = #{isExtend,jdbcType=VARCHAR},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}
|
||||||
|
where user_id = #{userId,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
<select id="selectListByUserId" resultType="cn.pluss.platform.entity.UserProfit">
|
<select id="selectListByUserId" resultType="cn.pluss.platform.entity.UserProfit">
|
||||||
SELECT * FROM tb_pluss_user_promotion WHERE `user_id` IN
|
SELECT * FROM tb_pluss_user_promotion WHERE `user_id` IN
|
||||||
<foreach open="(" separator="," close=")" collection="userIdList" item="item">
|
<foreach open="(" separator="," close=")" collection="userIdList" item="item">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</select>
|
</select>
|
||||||
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap">
|
||||||
|
select *
|
||||||
|
from tb_pluss_user_promotion
|
||||||
|
where user_id = #{userId}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 引导页
|
* 引导页
|
||||||
*
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/index", method = RequestMethod.GET)
|
@RequestMapping(value = "/index", method = RequestMethod.GET)
|
||||||
@@ -64,7 +64,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
|||||||
@RequestMapping(value = "/queryActivityActivateByPage", method = RequestMethod.POST)
|
@RequestMapping(value = "/queryActivityActivateByPage", method = RequestMethod.POST)
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public Map<String, Object> queryActivityActivateByPage(@RequestParam(defaultValue = "1") Integer currPage,
|
public Map<String, Object> queryActivityActivateByPage(@RequestParam(defaultValue = "1") Integer currPage,
|
||||||
String name) {
|
String name) {
|
||||||
Map<String, Object> map = new HashMap<>(16);
|
Map<String, Object> map = new HashMap<>(16);
|
||||||
Map<String, Object> result = new HashMap<>(16);
|
Map<String, Object> result = new HashMap<>(16);
|
||||||
Boolean bol = verifyUserRole();
|
Boolean bol = verifyUserRole();
|
||||||
@@ -182,7 +182,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存对象
|
* 保存对象
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/saveActivityActivate", method = RequestMethod.POST)
|
@RequestMapping(value = "/saveActivityActivate", method = RequestMethod.POST)
|
||||||
@@ -238,7 +238,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改对象
|
* 修改对象
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/updateActivityActivate", method = RequestMethod.POST)
|
@RequestMapping(value = "/updateActivityActivate", method = RequestMethod.POST)
|
||||||
@@ -256,7 +256,7 @@ public class ActivityActivateController extends BaseNoModelController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除对象
|
* 删除对象
|
||||||
*
|
*
|
||||||
* @throws IOException
|
* @throws IOException
|
||||||
*/
|
*/
|
||||||
@RequestMapping(value = "/deleteActivityActivate", method = RequestMethod.POST)
|
@RequestMapping(value = "/deleteActivityActivate", method = RequestMethod.POST)
|
||||||
@@ -298,5 +298,4 @@ public class ActivityActivateController extends BaseNoModelController {
|
|||||||
List<MerchantBaseInfo> merchantBaseInfoList = merchantBaseInfoService.queryMerchantBaseInfoList(null);
|
List<MerchantBaseInfo> merchantBaseInfoList = merchantBaseInfoService.queryMerchantBaseInfoList(null);
|
||||||
request.setAttribute("merchantBaseInfoList", merchantBaseInfoList);
|
request.setAttribute("merchantBaseInfoList", merchantBaseInfoList);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,5 +90,9 @@ public class AppGuide implements Serializable {
|
|||||||
private Date updateTimeEnd;
|
private Date updateTimeEnd;
|
||||||
@TableField("type")
|
@TableField("type")
|
||||||
private String type;
|
private String type;
|
||||||
|
@TableField("android")
|
||||||
|
private String android;
|
||||||
|
@TableField("ios")
|
||||||
|
private String ios;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -81,6 +81,10 @@ public class MerchantProfit {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date endTime;
|
private Date endTime;
|
||||||
|
//订单支付时间
|
||||||
|
@TableField(exist = false)
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date transDt;
|
||||||
|
|
||||||
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
@DateTimeFormat(pattern = "yyyy-MM-dd")
|
||||||
@TableField(select = false, insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
@TableField(select = false, insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER)
|
||||||
@@ -115,6 +119,9 @@ public class MerchantProfit {
|
|||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String userType;
|
private String userType;
|
||||||
|
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String type_code;
|
||||||
|
|
||||||
public MerchantProfit(UserApp userApp, UserApp profitUserApp, MerchantOrder order,BigDecimal profitAmt,BigDecimal profitRate,String type,String orderType) {
|
public MerchantProfit(UserApp userApp, UserApp profitUserApp, MerchantOrder order,BigDecimal profitAmt,BigDecimal profitRate,String type,String orderType) {
|
||||||
this.userId = profitUserApp.getUserId();
|
this.userId = profitUserApp.getUserId();
|
||||||
//V2.0模式
|
//V2.0模式
|
||||||
|
|||||||
@@ -0,0 +1,69 @@
|
|||||||
|
package cn.pluss.platform.vo;
|
||||||
|
|
||||||
|
import cn.pluss.platform.entity.MerchantChannelStatus;
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 团队管理
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class MerchantProfitVO {
|
||||||
|
private String userName;
|
||||||
|
private String phone;
|
||||||
|
/**
|
||||||
|
* 费率
|
||||||
|
*/
|
||||||
|
private String current_fee;
|
||||||
|
/**
|
||||||
|
* 角色
|
||||||
|
*/
|
||||||
|
private String type_code;
|
||||||
|
/**
|
||||||
|
* userId
|
||||||
|
*/
|
||||||
|
private String userId;
|
||||||
|
/**
|
||||||
|
* parent_user_id
|
||||||
|
*/
|
||||||
|
private Integer parent_user_id;
|
||||||
|
/**
|
||||||
|
*总交易金额
|
||||||
|
*/
|
||||||
|
private BigDecimal consumeFee = BigDecimal.ZERO;
|
||||||
|
/**
|
||||||
|
* 本月交易金额
|
||||||
|
*/
|
||||||
|
private BigDecimal currentMonth = BigDecimal.ZERO;
|
||||||
|
/**
|
||||||
|
* 昨日收款
|
||||||
|
*/
|
||||||
|
private BigDecimal yestedayConsumeFee = BigDecimal.ZERO;
|
||||||
|
/**
|
||||||
|
*昨日收款笔数
|
||||||
|
*/
|
||||||
|
private Integer countNum = 0;
|
||||||
|
/**
|
||||||
|
* 商户号
|
||||||
|
*/
|
||||||
|
private String merchantCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 入网时间
|
||||||
|
*/
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||||
|
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date createDt;
|
||||||
|
|
||||||
|
private List<MerChannelStatusVO> channelStatus;
|
||||||
|
private String statusD1 = "0";
|
||||||
|
private String statusD0 = "0";
|
||||||
|
private String authorizationStatus = "0";
|
||||||
|
private String remarkD1;
|
||||||
|
private String remarkD0;
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
package cn.pluss.platform.vo;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.annotation.JSONField;
|
||||||
|
import lombok.Data;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 直推间推商户收款
|
||||||
|
* @author lyf
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class ProfitOrderVO {
|
||||||
|
|
||||||
|
private String merchantName;
|
||||||
|
|
||||||
|
private BigDecimal consumeFee;
|
||||||
|
@DateTimeFormat(pattern = "yyyy-MM-dd hh:mm:ss")
|
||||||
|
@JSONField(format = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
private Date transDt;
|
||||||
|
|
||||||
|
private String orderNumber;
|
||||||
|
}
|
||||||
@@ -24,7 +24,7 @@ public class SpreadData {
|
|||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 直属商户交易额
|
* 银收客额
|
||||||
*/
|
*/
|
||||||
private BigDecimal ownAmt;
|
private BigDecimal ownAmt;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package cn.pluss.platform.app;
|
package cn.pluss.platform.app;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -21,4 +22,6 @@ public interface MainPageService {
|
|||||||
* @return 推广数据
|
* @return 推广数据
|
||||||
*/
|
*/
|
||||||
Map<String, Object> getSpreadData(String userId);
|
Map<String, Object> getSpreadData(String userId);
|
||||||
|
|
||||||
|
void modifyFee(Long userId, Integer id, BigDecimal fee);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -93,6 +94,12 @@ public class AgentStaffMainPageServiceImpl implements MainPageService {
|
|||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void modifyFee(Long userId, Integer id, BigDecimal fee) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getHomeData(String userId) {
|
public Map<String, Object> getHomeData(String userId) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -1,16 +1,20 @@
|
|||||||
package cn.pluss.platform.app.impl;
|
package cn.pluss.platform.app.impl;
|
||||||
|
|
||||||
import cn.hutool.core.date.DateUtil;
|
import cn.hutool.core.date.DateUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.pluss.platform.app.MainPageService;
|
import cn.pluss.platform.app.MainPageService;
|
||||||
import cn.pluss.platform.entity.MerchantOrderStatistics;
|
import cn.pluss.platform.entity.MerchantOrderStatistics;
|
||||||
import cn.pluss.platform.entity.UserApp;
|
import cn.pluss.platform.entity.UserApp;
|
||||||
|
import cn.pluss.platform.entity.UserPromotion;
|
||||||
import cn.pluss.platform.exception.MsgException;
|
import cn.pluss.platform.exception.MsgException;
|
||||||
import cn.pluss.platform.mapper.MerchantOrderMapper;
|
import cn.pluss.platform.mapper.MerchantProfitMapper;
|
||||||
import cn.pluss.platform.merchantOrder.MerchantOrderService;
|
import cn.pluss.platform.mapper.UserAppMapper;
|
||||||
|
import cn.pluss.platform.mapper.UserPromotionMapper;
|
||||||
import cn.pluss.platform.merchantOrder.MerchantOrderStatisticsService;
|
import cn.pluss.platform.merchantOrder.MerchantOrderStatisticsService;
|
||||||
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
||||||
import cn.pluss.platform.userApp.UserAppService;
|
import cn.pluss.platform.userApp.UserAppService;
|
||||||
import cn.pluss.platform.util.DateUtils;
|
import cn.pluss.platform.util.DateUtils;
|
||||||
|
import cn.pluss.platform.util.N;
|
||||||
import cn.pluss.platform.util.StringUtil;
|
import cn.pluss.platform.util.StringUtil;
|
||||||
import cn.pluss.platform.vo.MerchantOrderStatisticsVO;
|
import cn.pluss.platform.vo.MerchantOrderStatisticsVO;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||||
@@ -19,11 +23,15 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import static com.baomidou.mybatisplus.core.toolkit.StringPool.N;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 推广者的主页面信息查询实现类
|
* 推广者的主页面信息查询实现类
|
||||||
*/
|
*/
|
||||||
@@ -38,9 +46,12 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
@Lazy
|
||||||
private MerchantOrderStatisticsService mosService;
|
private MerchantOrderStatisticsService mosService;
|
||||||
|
@Resource
|
||||||
@Autowired
|
private MerchantProfitMapper merchantProfitMapper;
|
||||||
private MerchantOrderMapper merchantOrderMapper;
|
@Resource
|
||||||
|
private UserPromotionMapper userPromotionMapper;
|
||||||
|
@Resource
|
||||||
|
private UserAppMapper userAppMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getSpreadData(String userId) {
|
public Map<String, Object> getSpreadData(String userId) {
|
||||||
@@ -68,7 +79,7 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
|||||||
Map<String, Object> queryMap = new HashMap<>();
|
Map<String, Object> queryMap = new HashMap<>();
|
||||||
queryMap.put("userId", userId);
|
queryMap.put("userId", userId);
|
||||||
queryMap.put("status", 1);
|
queryMap.put("status", 1);
|
||||||
// 累计总分润
|
// 累计总收益
|
||||||
promoteFee = merchantProfitService.queryMerchantProfitSumPrice(queryMap);
|
promoteFee = merchantProfitService.queryMerchantProfitSumPrice(queryMap);
|
||||||
if (promoteFee == null) {
|
if (promoteFee == null) {
|
||||||
promoteFee = 0d;
|
promoteFee = 0d;
|
||||||
@@ -77,20 +88,33 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
|||||||
//今日收款笔数
|
//今日收款笔数
|
||||||
queryMap.put("recordDate", DateUtils.getDayBegin());
|
queryMap.put("recordDate", DateUtils.getDayBegin());
|
||||||
queryMap.put("retype", "1");
|
queryMap.put("retype", "1");
|
||||||
totalOrderCount = merchantProfitService.queryMerchantProfitPageCount(queryMap);
|
totalOrderCount = merchantProfitMapper.queryMerchantProfitPageCountV2(userId);
|
||||||
todayProfit = merchantProfitService.queryMerchantProfitSumPrice(queryMap);
|
todayProfit = merchantProfitService.queryMerchantProfitSumPrice(queryMap);
|
||||||
|
//今日收益
|
||||||
|
BigDecimal todaySum = merchantProfitMapper.getTodaySum(userId);
|
||||||
|
|
||||||
//今日新增商户数
|
//今日新增商户数
|
||||||
QueryWrapper<UserApp> queryWrapper = new QueryWrapper<>();
|
Integer newMerchantCount = userAppMapper.selectUserAppWithChannelStatusCountV2(userId, DateUtils.getDayBegin(), DateUtils.getDayEnd());
|
||||||
queryWrapper.eq("parentId", queryUserApp.getUserId());
|
//直属商户交易
|
||||||
queryWrapper.in("merchantAuditStatus", 3, 4);
|
BigDecimal consumeFee = merchantProfitMapper.getConsumeFee(userId);
|
||||||
queryWrapper.between("createDt", DateUtils.getDayBegin(), DateUtils.getDayEnd());
|
//团队商户交易
|
||||||
Integer newMerchantCount = userAppService.getUserAppWithChannelStatus(queryWrapper);
|
BigDecimal consumeFeeTeam = merchantProfitMapper.getConsumeFeeTeam(userId);
|
||||||
|
//今日收款
|
||||||
|
BigDecimal consumeFeeTeamToday = merchantProfitMapper.getConsumeFeeTeamToday(userId);
|
||||||
|
//总商户数
|
||||||
|
Integer countChildAll = merchantProfitMapper.getCountChildV2(Long.valueOf(userId));
|
||||||
|
|
||||||
resultMap.put("promoteFee", promoteFee + "");
|
resultMap.put("promoteFee", promoteFee + "");
|
||||||
resultMap.put("totalOrderCount", totalOrderCount + "");
|
resultMap.put("totalOrderCount", totalOrderCount + "");
|
||||||
resultMap.put("newMerchantCount", newMerchantCount + "");
|
resultMap.put("newMerchantCount", newMerchantCount + "");
|
||||||
resultMap.put("todayProfit", todayProfit == null? "0.00": todayProfit + "");
|
resultMap.put("todayProfit", todayProfit == null? "0.00": todayProfit + "");
|
||||||
|
|
||||||
|
resultMap.put("todaySum", todaySum);
|
||||||
|
resultMap.put("consumeFee", consumeFee);
|
||||||
|
resultMap.put("consumeFeeTeam", consumeFeeTeam);
|
||||||
|
resultMap.put("consumeFeeTeamToday", consumeFeeTeamToday);
|
||||||
|
resultMap.put("countChildAll", countChildAll);
|
||||||
|
|
||||||
String currentMonth = DateUtil.format(new Date(), "yyyy-MM");
|
String currentMonth = DateUtil.format(new Date(), "yyyy-MM");
|
||||||
|
|
||||||
MerchantOrderStatistics directTotalCurrentMonth = mosService.getDirectTotal(queryUserApp.getUserId() + "", currentMonth);
|
MerchantOrderStatistics directTotalCurrentMonth = mosService.getDirectTotal(queryUserApp.getUserId() + "", currentMonth);
|
||||||
@@ -112,6 +136,69 @@ public class PromoterMainPageServiceImpl implements MainPageService {
|
|||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void modifyFee(Long userId, Integer id, BigDecimal fee) {
|
||||||
|
QueryWrapper<UserPromotion> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("user_id",id);
|
||||||
|
UserPromotion promotion = userPromotionMapper.selectOne(queryWrapper);
|
||||||
|
if(ObjectUtil.isEmpty(promotion)){
|
||||||
|
throw new MsgException("费率信息不存在");
|
||||||
|
}
|
||||||
|
UserPromotion userPromotion = userPromotionMapper.selectByPrimaryKey(userId);
|
||||||
|
if(ObjectUtil.isEmpty(userPromotion)){
|
||||||
|
throw new MsgException("父级机构信息异常");
|
||||||
|
}
|
||||||
|
|
||||||
|
Boolean flag=true;
|
||||||
|
switch (userPromotion.getTypeCode()){
|
||||||
|
case "MG":
|
||||||
|
if(promotion.getTypeCode().equals("FO")){
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "FO":
|
||||||
|
if(promotion.getTypeCode().equals("SO")){
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "SO" :
|
||||||
|
if(promotion.getTypeCode().equals("AG")){
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "AG":
|
||||||
|
if(promotion.getTypeCode().equals("FB")){
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "FB":
|
||||||
|
if(promotion.getTypeCode().equals("SB")){
|
||||||
|
flag=false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if(flag){
|
||||||
|
throw new MsgException("当前用户权限不足");
|
||||||
|
}
|
||||||
|
|
||||||
|
if(cn.pluss.platform.util.N.gt(new BigDecimal(userPromotion.getCurrentFee()),fee)){
|
||||||
|
throw new MsgException("修改费率不允许小于上级费率");
|
||||||
|
}
|
||||||
|
|
||||||
|
BigDecimal lowFee=userPromotionMapper.selectMaxFeeByUserId(id.toString());
|
||||||
|
if(ObjectUtil.isNotEmpty(lowFee)&&cn.pluss.platform.util.N.gt(fee,lowFee)){
|
||||||
|
throw new MsgException("修改费率不允许小于下级最大费率");
|
||||||
|
}
|
||||||
|
|
||||||
|
promotion.setCurrentFee(String.valueOf(fee));
|
||||||
|
promotion.setUpdateTime(new Date());
|
||||||
|
int i = userPromotionMapper.updateByPrimaryKey(promotion);
|
||||||
|
if (i < 1){
|
||||||
|
throw new MsgException("修改失败");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Map<String, Object> getHomeData(String userId) {
|
public Map<String, Object> getHomeData(String userId) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -1178,7 +1178,7 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
|
|||||||
|
|
||||||
UserApp ua = uaService.getOne(new LambdaQueryWrapper<UserApp>().eq(UserApp::getUserId, bankCardDTO.getUserId()));
|
UserApp ua = uaService.getOne(new LambdaQueryWrapper<UserApp>().eq(UserApp::getUserId, bankCardDTO.getUserId()));
|
||||||
|
|
||||||
MerchantChannelStatus mcs = mcsService.getByMerchantCodeAndChannelType(ua.getMerchantCode(), bankCardDTO.getChannelType());
|
MerchantChannelStatus mcs = mcsService.getByMerchantCodeAndChannelTypeNew(ua.getMerchantCode(), bankCardDTO.getChannelType());
|
||||||
|
|
||||||
MsgException.checkNull(mcs, "商户还未进件");
|
MsgException.checkNull(mcs, "商户还未进件");
|
||||||
|
|
||||||
|
|||||||
@@ -38,6 +38,14 @@ public interface MerchantChannelStatusService extends IService<MerchantChannelSt
|
|||||||
|
|
||||||
return getOne(qWrapper);
|
return getOne(qWrapper);
|
||||||
}
|
}
|
||||||
|
default MerchantChannelStatus getByMerchantCodeAndChannelTypeNew(String merchantCode, String channelType) {
|
||||||
|
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = Wrappers.lambdaQuery();
|
||||||
|
qWrapper.eq(MerchantChannelStatus::getVirChannelFlag, channelType);
|
||||||
|
qWrapper.eq(MerchantChannelStatus::getMerchantCode, merchantCode);
|
||||||
|
qWrapper.eq(MerchantChannelStatus::getStatus,3);
|
||||||
|
|
||||||
|
return getOne(qWrapper);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 进件请求前参数校验
|
* 进件请求前参数校验
|
||||||
|
|||||||
@@ -565,6 +565,26 @@ public class MerchantOrderServiceImpl extends ServiceImpl<MerchantOrderMapper, M
|
|||||||
// 手续费
|
// 手续费
|
||||||
BigDecimal totalCommission = getTotalCommission(totalConsumeFee, totalRefundConsumeFee, totalEnterFee);
|
BigDecimal totalCommission = getTotalCommission(totalConsumeFee, totalRefundConsumeFee, totalEnterFee);
|
||||||
|
|
||||||
|
|
||||||
|
//日账单
|
||||||
|
HashMap<String, Object> mapToday = new HashMap<>();
|
||||||
|
mapToday.put("startTime", DateUtils.getDayBegin());
|
||||||
|
mapToday.put("endTime", DateUtils.getDayEnd());
|
||||||
|
mapToday.put("merchantCode", merchantOrder.getMerchantCode());
|
||||||
|
BigDecimal today = merchantOrderMapper.queryMerchantOrderMoneyByTime(mapToday);
|
||||||
|
//周账单
|
||||||
|
HashMap<String, Object> mapWeek = new HashMap<>();
|
||||||
|
mapWeek.put("startTime", DateUtils.getBeginDayOfWeek());
|
||||||
|
mapWeek.put("endTime", DateUtils.getEndDayOfWeek());
|
||||||
|
mapWeek.put("merchantCode", merchantOrder.getMerchantCode());
|
||||||
|
BigDecimal week = merchantOrderMapper.queryMerchantOrderMoneyByTime(mapWeek);
|
||||||
|
//月账单
|
||||||
|
HashMap<String, Object> mapMonth = new HashMap<>();
|
||||||
|
mapMonth.put("startTime", DateUtils.getBeginDayOfMonth());
|
||||||
|
mapMonth.put("endTime", DateUtils.getEndDayOfMonth());
|
||||||
|
mapMonth.put("merchantCode", merchantOrder.getMerchantCode());
|
||||||
|
BigDecimal month = merchantOrderMapper.queryMerchantOrderMoneyByTime(mapMonth);
|
||||||
|
|
||||||
Map<String, Object> resultMap = new HashMap<>();
|
Map<String, Object> resultMap = new HashMap<>();
|
||||||
resultMap.put("orderNum", consumeCount == null ? 0 : consumeCount);
|
resultMap.put("orderNum", consumeCount == null ? 0 : consumeCount);
|
||||||
resultMap.put("returnOrderNum", refundCount == null ? 0 : refundCount);
|
resultMap.put("returnOrderNum", refundCount == null ? 0 : refundCount);
|
||||||
@@ -573,6 +593,9 @@ public class MerchantOrderServiceImpl extends ServiceImpl<MerchantOrderMapper, M
|
|||||||
resultMap.put("totalReceiveFee", totalConsumeFee);
|
resultMap.put("totalReceiveFee", totalConsumeFee);
|
||||||
resultMap.put("commission", totalCommission);
|
resultMap.put("commission", totalCommission);
|
||||||
resultMap.put("returnMoney", totalRefundConsumeFee);
|
resultMap.put("returnMoney", totalRefundConsumeFee);
|
||||||
|
resultMap.put("today", today);
|
||||||
|
resultMap.put("week", week);
|
||||||
|
resultMap.put("month",month);
|
||||||
|
|
||||||
return resultMap;
|
return resultMap;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,9 +4,11 @@ import cn.pluss.platform.entity.MerchantOrder;
|
|||||||
import cn.pluss.platform.entity.MerchantProfit;
|
import cn.pluss.platform.entity.MerchantProfit;
|
||||||
import cn.pluss.platform.entity.UserApp;
|
import cn.pluss.platform.entity.UserApp;
|
||||||
import cn.pluss.platform.mapper.MerchantProfitMapper;
|
import cn.pluss.platform.mapper.MerchantProfitMapper;
|
||||||
|
import cn.pluss.platform.vo.MerchantProfitVO;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Vector;
|
import java.util.Vector;
|
||||||
@@ -89,5 +91,9 @@ public interface MerchantProfitService extends IService<MerchantProfit> {
|
|||||||
* @param orderNumber
|
* @param orderNumber
|
||||||
*/
|
*/
|
||||||
void sendProfitMessage(UserApp userApp, BigDecimal profitMoney, String orderNumber);
|
void sendProfitMessage(UserApp userApp, BigDecimal profitMoney, String orderNumber);
|
||||||
|
|
||||||
|
Map<String, Object> teamList(String typeCode, Long userId, Integer page,Integer size,String name);
|
||||||
|
|
||||||
|
Map<String, Object> merchantListData(Long userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +6,10 @@ import cn.pluss.platform.entity.*;
|
|||||||
import cn.pluss.platform.enums.BstLevelCode;
|
import cn.pluss.platform.enums.BstLevelCode;
|
||||||
import cn.pluss.platform.enums.UserRoleEnum;
|
import cn.pluss.platform.enums.UserRoleEnum;
|
||||||
import cn.pluss.platform.exception.MsgException;
|
import cn.pluss.platform.exception.MsgException;
|
||||||
import cn.pluss.platform.mapper.*;
|
import cn.pluss.platform.mapper.MerchantOrderMapper;
|
||||||
import cn.pluss.platform.merchant.MerchantRateNewService;
|
import cn.pluss.platform.mapper.MerchantProfitMapper;
|
||||||
|
import cn.pluss.platform.mapper.UserAppMapper;
|
||||||
|
import cn.pluss.platform.mapper.UserPromotionMapper;
|
||||||
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
import cn.pluss.platform.merchantProfit.MerchantProfitService;
|
||||||
import cn.pluss.platform.notice.NoticeService;
|
import cn.pluss.platform.notice.NoticeService;
|
||||||
import cn.pluss.platform.user.UserLevelService;
|
import cn.pluss.platform.user.UserLevelService;
|
||||||
@@ -15,13 +17,11 @@ import cn.pluss.platform.user.impl.GeneralPushUtil;
|
|||||||
import cn.pluss.platform.userAssess.UserAssessService;
|
import cn.pluss.platform.userAssess.UserAssessService;
|
||||||
import cn.pluss.platform.userRewardFlow.UserRewardFlowService;
|
import cn.pluss.platform.userRewardFlow.UserRewardFlowService;
|
||||||
import cn.pluss.platform.util.DateUtils;
|
import cn.pluss.platform.util.DateUtils;
|
||||||
import cn.pluss.platform.util.StringUtil;
|
import cn.pluss.platform.vo.MerChannelStatusVO;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import cn.pluss.platform.vo.MerchantProfitVO;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.dao.DuplicateKeyException;
|
|
||||||
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;
|
||||||
@@ -52,6 +52,10 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private UserAssessService userAssessService;
|
private UserAssessService userAssessService;
|
||||||
|
@Resource
|
||||||
|
private MerchantProfitMapper merchantProfitMapper;
|
||||||
|
@Resource
|
||||||
|
private MerchantOrderMapper mapperOrderMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = RuntimeException.class, propagation = Propagation.NESTED)
|
@Transactional(rollbackFor = RuntimeException.class, propagation = Propagation.NESTED)
|
||||||
@@ -100,6 +104,135 @@ public class MerchantProfitServiceImpl extends ServiceImpl<MerchantProfitMapper,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> teamList(String typeCode, Long userId,Integer page,Integer size,
|
||||||
|
String name) {
|
||||||
|
switch (typeCode){
|
||||||
|
case "AG":
|
||||||
|
typeCode = "FB";
|
||||||
|
break;
|
||||||
|
case "FB":
|
||||||
|
typeCode = "SB";
|
||||||
|
break;
|
||||||
|
case "SB":
|
||||||
|
typeCode = "";
|
||||||
|
break;
|
||||||
|
case "MC":
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new MsgException("身份错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
// PageInfo<MerchantProfitVO> teamList= merchantProfitMapper.getTeamList(typeCode, userId, page,size,name);
|
||||||
|
|
||||||
|
Integer countChild = merchantProfitMapper.getCountChild(userId, typeCode);
|
||||||
|
Integer pagerSize = size;
|
||||||
|
Integer offset = (page - 1) * size;
|
||||||
|
//商户列表
|
||||||
|
if ("MC".equals(typeCode)) {
|
||||||
|
List<MerchantProfitVO> teamList = merchantProfitMapper.getMerchantTeamList(typeCode, userId, name, pagerSize, offset);
|
||||||
|
for (MerchantProfitVO values : teamList) {
|
||||||
|
List<MerChannelStatusVO> list = new ArrayList<>();
|
||||||
|
if (values.getMerchantCode() == null) {
|
||||||
|
MerChannelStatusVO V0 = new MerChannelStatusVO();
|
||||||
|
V0.setStatus("1");
|
||||||
|
V0.setVirChannelFlag("D1");
|
||||||
|
V0.setAuthorizationStatus("0");
|
||||||
|
V0.setRemark("");
|
||||||
|
list.add(V0);
|
||||||
|
MerChannelStatusVO V1 = new MerChannelStatusVO();
|
||||||
|
V1.setStatus("1");
|
||||||
|
V1.setVirChannelFlag("D0");
|
||||||
|
V1.setAuthorizationStatus("0");
|
||||||
|
V1.setRemark("");
|
||||||
|
list.add(V1);
|
||||||
|
values.setChannelStatus(list);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
String merchantCode = values.getMerchantCode();
|
||||||
|
List<MerChannelStatusVO> channelStatus = merchantProfitMapper.getChannelStatus(merchantCode);
|
||||||
|
//没有
|
||||||
|
if (ObjectUtil.isEmpty(channelStatus) || channelStatus.size() <= 0) {
|
||||||
|
MerChannelStatusVO V0 = new MerChannelStatusVO();
|
||||||
|
V0.setStatus("1");
|
||||||
|
V0.setVirChannelFlag("D1");
|
||||||
|
V0.setAuthorizationStatus("0");
|
||||||
|
V0.setRemark("");
|
||||||
|
list.add(V0);
|
||||||
|
MerChannelStatusVO V1 = new MerChannelStatusVO();
|
||||||
|
V1.setStatus("1");
|
||||||
|
V1.setVirChannelFlag("D0");
|
||||||
|
V1.setAuthorizationStatus("0");
|
||||||
|
V1.setRemark("");
|
||||||
|
list.add(V1);
|
||||||
|
values.setChannelStatus(list);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//一个
|
||||||
|
if (channelStatus.size() == 1) {
|
||||||
|
MerChannelStatusVO channelStatus1 = channelStatus.get(0);
|
||||||
|
switch (channelStatus1.getVirChannelFlag()) {
|
||||||
|
case "D0":
|
||||||
|
list.add(channelStatus1);
|
||||||
|
MerChannelStatusVO V1 = new MerChannelStatusVO();
|
||||||
|
V1.setStatus("1");
|
||||||
|
V1.setVirChannelFlag("D1");
|
||||||
|
V1.setAuthorizationStatus("0");
|
||||||
|
V1.setRemark("");
|
||||||
|
list.add(V1);
|
||||||
|
values.setChannelStatus(list);
|
||||||
|
break;
|
||||||
|
case "D1":
|
||||||
|
list.add(channelStatus1);
|
||||||
|
MerChannelStatusVO V0 = new MerChannelStatusVO();
|
||||||
|
V0.setStatus("1");
|
||||||
|
V0.setVirChannelFlag("D0");
|
||||||
|
V0.setAuthorizationStatus("0");
|
||||||
|
V0.setRemark("");
|
||||||
|
list.add(V0);
|
||||||
|
values.setChannelStatus(list);
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
//两个
|
||||||
|
if (channelStatus.size() == 2) {
|
||||||
|
values.setChannelStatus(channelStatus);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// Integer countUser = mapperOrderMapper.getCountUser(Long.valueOf(values.getUserId()));
|
||||||
|
// if (countUser > 0) {
|
||||||
|
// values.setCountNum(countUser);
|
||||||
|
// values.setConsumeFee(mapperOrderMapper.getAmountData(values.getMerchantCode()));
|
||||||
|
// values.setYestedayConsumeFee(mapperOrderMapper.getPlatformAmtYestday(values.getMerchantCode(),
|
||||||
|
// DateUtils.getBeginDayOfYesterday(), DateUtils.getEndDayOfYesterDay()));
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
HashMap<String, Object> hashMap = new HashMap<>();
|
||||||
|
hashMap.put("total", countChild);
|
||||||
|
hashMap.put("teamList", teamList);
|
||||||
|
return hashMap;
|
||||||
|
}
|
||||||
|
//团队管理
|
||||||
|
List<MerchantProfitVO> teamList = merchantProfitMapper.getTeamList(typeCode, userId, name, pagerSize, offset);
|
||||||
|
for (MerchantProfitVO values : teamList) {
|
||||||
|
values.setCurrentMonth(mapperOrderMapper.getPlatformAmtYestday(values.getMerchantCode(),
|
||||||
|
DateUtils.getBeginDayOfMonth(), DateUtils.getEndDayOfMonth()));
|
||||||
|
values.setConsumeFee(mapperOrderMapper.getAmountData(values.getMerchantCode()));
|
||||||
|
}
|
||||||
|
HashMap<String, Object> hashMap = new HashMap<>();
|
||||||
|
hashMap.put("total", countChild);
|
||||||
|
hashMap.put("teamList", teamList);
|
||||||
|
return hashMap;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, Object> merchantListData(Long userId) {
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分润创建2.0模式
|
* 分润创建2.0模式
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -483,6 +483,7 @@ public class SxfPayServiceImpl implements SxfPayService {
|
|||||||
JSONObject reqData = new JSONObject();
|
JSONObject reqData = new JSONObject();
|
||||||
reqData.put("ordNo", order.getOrderNumber());
|
reqData.put("ordNo", order.getOrderNumber());
|
||||||
reqData.put("mno", channel.getMerchantId());
|
reqData.put("mno", channel.getMerchantId());
|
||||||
|
log.info("+++++++++++++++++++++++++++++给到随行付的金额为{}",order.getConsumeFee());
|
||||||
reqData.put("amt", order.getConsumeFee());
|
reqData.put("amt", order.getConsumeFee());
|
||||||
if ("wechatPay".equalsIgnoreCase(order.getPayTypeCode()) || "sxfPay1".equalsIgnoreCase(order.getPayTypeCode())) {
|
if ("wechatPay".equalsIgnoreCase(order.getPayTypeCode()) || "sxfPay1".equalsIgnoreCase(order.getPayTypeCode())) {
|
||||||
reqData.put("payType", "WECHAT");
|
reqData.put("payType", "WECHAT");
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ public class UserAppServiceImpl extends ServiceImpl<UserAppMapper, UserApp> impl
|
|||||||
long pageSize = ((Integer) map.get("pageSize")).longValue();
|
long pageSize = ((Integer) map.get("pageSize")).longValue();
|
||||||
Page<UserInfoVO> pageResult = new Page<>(page, pageSize);
|
Page<UserInfoVO> pageResult = new Page<>(page, pageSize);
|
||||||
pageResult.setRecords(result);
|
pageResult.setRecords(result);
|
||||||
Long count = baseMapper.queryUserAppPageCount(map).longValue();
|
Long count = baseMapper.queryUserPageCount(map).longValue();
|
||||||
pageResult.setTotal(count);
|
pageResult.setTotal(count);
|
||||||
|
|
||||||
if (result.isEmpty()) {
|
if (result.isEmpty()) {
|
||||||
|
|||||||
@@ -352,21 +352,10 @@ public abstract class BaseUserInfoService extends ServiceImpl<UserInfoMapper, Us
|
|||||||
|
|
||||||
MsgException.checkNull(checkUserInfo, "无此用户!");
|
MsgException.checkNull(checkUserInfo, "无此用户!");
|
||||||
|
|
||||||
QueryWrapper<UserPromotion> queryWrapper = new QueryWrapper<>();
|
|
||||||
queryWrapper.eq("user_id", checkUserInfo.getId());
|
|
||||||
UserPromotion promotion= userPromotionMapper.selectOne(queryWrapper);
|
|
||||||
if(ObjectUtil.isEmpty(promotion)){
|
|
||||||
MsgException.checkNull(null,"用户状态错误");
|
|
||||||
}
|
|
||||||
|
|
||||||
if("MG".equals(promotion.getTypeCode())||"FO".equals(promotion.getTypeCode())||"SO".equals(promotion.getTypeCode())){
|
|
||||||
MsgException.checkNull(null,"此用户不允许登录");
|
|
||||||
}
|
|
||||||
// 原则上不能以原密码进行对比,这里只是给后台登录页面一个方便
|
// 原则上不能以原密码进行对比,这里只是给后台登录页面一个方便
|
||||||
if (password.equalsIgnoreCase(checkUserInfo.getPassword())) {
|
if (password.equalsIgnoreCase(checkUserInfo.getPassword())) {
|
||||||
UserApp queryUserApp;
|
UserApp queryUserApp;
|
||||||
queryUserApp = userAppMapper.selectUserApp(new QueryWrapper<>().eq("ua.userId", checkUserInfo.getId()));
|
queryUserApp = userAppMapper.selectUserApp(new QueryWrapper<>().eq("ua.userId", checkUserInfo.getId()));
|
||||||
log.error("=====================queryUserApp=====================" + JSON.toJSONString(queryUserApp));
|
|
||||||
String genRandomNum = StringUtil.genRandomNum(6) + StringUtil.getBillno() + StringUtil.genRandomNum(6);
|
String genRandomNum = StringUtil.genRandomNum(6) + StringUtil.getBillno() + StringUtil.genRandomNum(6);
|
||||||
UserApp uApp = new UserApp();
|
UserApp uApp = new UserApp();
|
||||||
uApp.setToken(genRandomNum);
|
uApp.setToken(genRandomNum);
|
||||||
@@ -396,6 +385,19 @@ public abstract class BaseUserInfoService extends ServiceImpl<UserInfoMapper, Us
|
|||||||
UserApp queryUserApp = new UserApp().setUserId(checkUserInfo.getId());
|
UserApp queryUserApp = new UserApp().setUserId(checkUserInfo.getId());
|
||||||
queryUserApp = userAppMapper.selectOne(new QueryWrapper<>(queryUserApp));
|
queryUserApp = userAppMapper.selectOne(new QueryWrapper<>(queryUserApp));
|
||||||
|
|
||||||
|
if ("promoter".equals(queryUserApp.getUserType())){
|
||||||
|
QueryWrapper<UserPromotion> queryWrapper = new QueryWrapper<>();
|
||||||
|
queryWrapper.eq("user_id", checkUserInfo.getId());
|
||||||
|
UserPromotion promotion= userPromotionMapper.selectOne(queryWrapper);
|
||||||
|
if(ObjectUtil.isEmpty(promotion)){
|
||||||
|
MsgException.checkNull(null,"用户状态错误");
|
||||||
|
}
|
||||||
|
|
||||||
|
if("MG".equals(promotion.getTypeCode())||"FO".equals(promotion.getTypeCode())||"SO".equals(promotion.getTypeCode())){
|
||||||
|
MsgException.checkNull(null,"此用户不允许登录");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO 去掉该用户只能登录一个设备
|
// TODO 去掉该用户只能登录一个设备
|
||||||
//String genRandomNum = StringUtil.genRandomNum(6) + StringUtil.getBillno() + StringUtil.genRandomNum(6);
|
//String genRandomNum = StringUtil.genRandomNum(6) + StringUtil.getBillno() + StringUtil.genRandomNum(6);
|
||||||
String genRandomNum = loginName;
|
String genRandomNum = loginName;
|
||||||
|
|||||||
@@ -2447,37 +2447,87 @@ public class MerchantController {
|
|||||||
public ModelAndView register() {
|
public ModelAndView register() {
|
||||||
ModelAndView modelAndView = new ModelAndView("merchant/share");
|
ModelAndView modelAndView = new ModelAndView("merchant/share");
|
||||||
Map<String, String> result = new HashMap<>(16);
|
Map<String, String> result = new HashMap<>(16);
|
||||||
String inviteNum = request.getParameter("inviteNum");// 推广码
|
|
||||||
String phone = "";
|
String inviteNum1 = request.getParameter("inviteNum");
|
||||||
String userName = "";
|
if (ObjectUtil.isNotEmpty(inviteNum1)){
|
||||||
if (StringUtil.isNotEmpty(inviteNum)) {
|
String phone = "";
|
||||||
UserApp appInfo = userAppService.queryUserAppByInviteNum(inviteNum);
|
String userName = "";
|
||||||
|
UserApp appInfo = userAppService.queryUserAppByInviteNum(inviteNum1);
|
||||||
if (appInfo != null) {
|
if (appInfo != null) {
|
||||||
phone = appInfo.getPhone();
|
phone = appInfo.getPhone();
|
||||||
userName = appInfo.getUserName();
|
userName = appInfo.getUserName();
|
||||||
}
|
}
|
||||||
}
|
String enPhone = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");// 中间隐藏4位数的号码
|
||||||
String enPhone = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");// 中间隐藏4位数的号码
|
if (StringUtil.isNotEmpty(userName)) {
|
||||||
if (StringUtil.isNotEmpty(userName)) {
|
String reg = ".{1}";
|
||||||
String reg = ".{1}";
|
StringBuffer sb = new StringBuffer();
|
||||||
StringBuffer sb = new StringBuffer();
|
Pattern p = Pattern.compile(reg);
|
||||||
Pattern p = Pattern.compile(reg);
|
Matcher m = p.matcher(userName);
|
||||||
Matcher m = p.matcher(userName);
|
int i = 0;
|
||||||
int i = 0;
|
while (m.find()) {
|
||||||
while (m.find()) {
|
i++;
|
||||||
i++;
|
if (i == 1) {
|
||||||
if (i == 1) {
|
continue;
|
||||||
continue;
|
}
|
||||||
|
m.appendReplacement(sb, "*");
|
||||||
}
|
}
|
||||||
m.appendReplacement(sb, "*");
|
m.appendTail(sb);
|
||||||
|
result.put("userName", sb.toString());
|
||||||
}
|
}
|
||||||
m.appendTail(sb);
|
result.put("enPhone", enPhone);
|
||||||
result.put("userName", sb.toString());
|
result.put("inviteNum", inviteNum1);
|
||||||
|
modelAndView.addAllObjects(result);
|
||||||
|
return modelAndView;
|
||||||
}
|
}
|
||||||
result.put("enPhone", enPhone);
|
try {
|
||||||
result.put("inviteNum", inviteNum);
|
String str= request.getQueryString();
|
||||||
modelAndView.addAllObjects(result);
|
String strs= RSAUtil.decryptByPrivateKey(str,"MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK3gHtMn28yaXenmocShh9ki5GqSVsVKsjmOerbm+OOqkmnxVzwivSfxBUKl/No7mhTa1/ipngoiJ3CXKxqB3MtvverwRAh/ggu3YFAVFLlEAY+co08DwGxbCrNucAjb4YcJJa2LFVq0tuzB92YhAkQczMPKUsYfJxtvcIb6YL+xAgMBAAECgYA6qkO8OtaOUgcdxBMQpO+Q85Td4EImju1TPh9pVsTjC8oatLMaNx5bO5bqxdZqS3HRV4VHAPOxt5RXCKoiZ253JMvmcWXmiwYNFEr9iFXOLVT0H6q+TT4cpp5klAFM5xELaR4WFsYlxvCA6KGdNqHg4wYSPwj+WdYM12xEhBtjgQJBAPttT2LuIoEyLvjrqUr8bMuFKHRuYp3rMtl3nwU0es2OuOOsWH69w+L7oi4tgHr1gzpN8k2XExMcf0uDnk9eBrsCQQCxCbdegzCiSafUxrDwZpROlfL1duRXDinkLc9KC2HfS+w4/9Mjuc49SFo3grKczGN3t6AnlBasONehmNuDAAqDAkAeFND3tCgarwdhrshdeWAG5ZKWg5J29GnsDNzQwZujtly2mKsp1sh2Asc/oSALFg6yThscX2Pf2Hv+a+vn8Qb7AkAuDXD9zPKhxLc7ylPMtWJu7uK8p6jOXIjZKnF5uWxEQeO5EBNEf9j+aAvP1NfRofld8w5ePU+IjWDKUJEJisExAkEA+L6M96L3ICNF3sYtdvILO2ExYb4AuxF18MmPVWEy0jK9xxan3rggpIG+BQQuy8DoL1snc+JABALiSFEbAZjm6Q==");
|
||||||
return modelAndView;
|
String[] params= strs.split("&");
|
||||||
|
String inviteNum="";
|
||||||
|
if(params.length<=1){
|
||||||
|
inviteNum=params[0].split("=")[1];
|
||||||
|
result.put("typeCode","MC");
|
||||||
|
result.put("currentFee","");
|
||||||
|
}else {
|
||||||
|
inviteNum=params[0].split("=")[1];
|
||||||
|
result.put("typeCode",params[1].split("=")[1]);
|
||||||
|
result.put("currentFee",(params[1].split("=").length<=1)?"":params[1].split("=")[1]);
|
||||||
|
}
|
||||||
|
String phone = "";
|
||||||
|
String userName = "";
|
||||||
|
if (StringUtil.isNotEmpty(inviteNum)) {
|
||||||
|
UserApp appInfo = userAppService.queryUserAppByInviteNum(inviteNum);
|
||||||
|
if (appInfo != null) {
|
||||||
|
phone = appInfo.getPhone();
|
||||||
|
userName = appInfo.getUserName();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
String enPhone = phone.replaceAll("(\\d{3})\\d{4}(\\d{4})", "$1****$2");// 中间隐藏4位数的号码
|
||||||
|
if (StringUtil.isNotEmpty(userName)) {
|
||||||
|
String reg = ".{1}";
|
||||||
|
StringBuffer sb = new StringBuffer();
|
||||||
|
Pattern p = Pattern.compile(reg);
|
||||||
|
Matcher m = p.matcher(userName);
|
||||||
|
int i = 0;
|
||||||
|
while (m.find()) {
|
||||||
|
i++;
|
||||||
|
if (i == 1) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
m.appendReplacement(sb, "*");
|
||||||
|
}
|
||||||
|
m.appendTail(sb);
|
||||||
|
result.put("userName", sb.toString());
|
||||||
|
}
|
||||||
|
result.put("enPhone", enPhone);
|
||||||
|
result.put("inviteNum", inviteNum);
|
||||||
|
modelAndView.addAllObjects(result);
|
||||||
|
return modelAndView;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -6,6 +6,8 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
|
||||||
|
<script src="http://code.jquery.com/jquery-1.8.3.min.js"></script>
|
||||||
|
<script src="http://passport.cnblogs.com/scripts/jsencrypt.min.js"></script>
|
||||||
<title>分享</title>
|
<title>分享</title>
|
||||||
<style>
|
<style>
|
||||||
div,
|
div,
|
||||||
@@ -58,7 +60,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body >
|
||||||
<div class="bg-logo">
|
<div class="bg-logo">
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="page-title tcenter h40 bluebg white">
|
<!-- <div class="page-title tcenter h40 bluebg white">
|
||||||
@@ -130,7 +132,7 @@
|
|||||||
<div class="weui-cell weui-cell_warn">
|
<div class="weui-cell weui-cell_warn">
|
||||||
<div class="weui-cell__hd"><span class="icon icon-123 f24"></span></div>
|
<div class="weui-cell__hd"><span class="icon icon-123 f24"></span></div>
|
||||||
<div class="weui-cell__bd pl10">
|
<div class="weui-cell__bd pl10">
|
||||||
<input class="weui-input tleft" type="text" readonly value="推荐人:${userName}${enPhone }" />
|
<input class="weui-input tleft" type="text" readonly value="推荐人:${userName}${enPhone }" id="tuijianren" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -152,40 +154,41 @@
|
|||||||
inapp: false,
|
inapp: false,
|
||||||
params: {}
|
params: {}
|
||||||
});*/
|
});*/
|
||||||
// console.log(window.location.href)
|
//
|
||||||
// console.log(decodeURI(window.location.href))
|
// function decryptData() {
|
||||||
//var priKey = "MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK3gHtMn28yaXenmocShh9ki5GqSVsVKsjmOerbm+OOqkmnxVzwivSfxBUKl/No7mhTa1/ipngoiJ3CXKxqB3MtvverwRAh/ggu3YFAVFLlEAY+co08DwGxbCrNucAjb4YcJJa2LFVq0tuzB92YhAkQczMPKUsYfJxtvcIb6YL+xAgMBAAECgYA6qkO8OtaOUgcdxBMQpO+Q85Td4EImju1TPh9pVsTjC8oatLMaNx5bO5bqxdZqS3HRV4VHAPOxt5RXCKoiZ253JMvmcWXmiwYNFEr9iFXOLVT0H6q+TT4cpp5klAFM5xELaR4WFsYlxvCA6KGdNqHg4wYSPwj+WdYM12xEhBtjgQJBAPttT2LuIoEyLvjrqUr8bMuFKHRuYp3rMtl3nwU0es2OuOOsWH69w+L7oi4tgHr1gzpN8k2XExMcf0uDnk9eBrsCQQCxCbdegzCiSafUxrDwZpROlfL1duRXDinkLc9KC2HfS+w4/9Mjuc49SFo3grKczGN3t6AnlBasONehmNuDAAqDAkAeFND3tCgarwdhrshdeWAG5ZKWg5J29GnsDNzQwZujtly2mKsp1sh2Asc/oSALFg6yThscX2Pf2Hv+a+vn8Qb7AkAuDXD9zPKhxLc7ylPMtWJu7uK8p6jOXIjZKnF5uWxEQeO5EBNEf9j+aAvP1NfRofld8w5ePU+IjWDKUJEJisExAkEA+L6M96L3ICNF3sYtdvILO2ExYb4AuxF18MmPVWEy0jK9xxan3rggpIG+BQQuy8DoL1snc+JABALiSFEbAZjm6Q=="
|
// let url = window.location.href
|
||||||
let url = window.location.href
|
// let urlStr = url.split('?')[1]
|
||||||
// function RSAdecrypt(){
|
// let urlt=url.split("?")[0]
|
||||||
// var data="XiBfUFtMYDNqQvYnehWdbWxr5BBjB9qkCgBE8QPV81HJVbVpk3OCDFn6c7gTky6laKkxps3q7bcgsWUOy9d2eUy56g4p9nTGN4zvx0XfXq4eXX/6firvYuKYMy5q960A56BMwbGO8IioCs6bsv7ka3IoQccbL3nAgjbTYQa88lU=";
|
// var decrypted;
|
||||||
// var decrypt = new JSEncrypt();
|
// var privateKey="MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAK3gHtMn28yaXenmocShh9ki5GqSVsVKsjmOerbm+OOqkmnxVzwivSfxBUKl/No7mhTa1/ipngoiJ3CXKxqB3MtvverwRAh/ggu3YFAVFLlEAY+co08DwGxbCrNucAjb4YcJJa2LFVq0tuzB92YhAkQczMPKUsYfJxtvcIb6YL+xAgMBAAECgYA6qkO8OtaOUgcdxBMQpO+Q85Td4EImju1TPh9pVsTjC8oatLMaNx5bO5bqxdZqS3HRV4VHAPOxt5RXCKoiZ253JMvmcWXmiwYNFEr9iFXOLVT0H6q+TT4cpp5klAFM5xELaR4WFsYlxvCA6KGdNqHg4wYSPwj+WdYM12xEhBtjgQJBAPttT2LuIoEyLvjrqUr8bMuFKHRuYp3rMtl3nwU0es2OuOOsWH69w+L7oi4tgHr1gzpN8k2XExMcf0uDnk9eBrsCQQCxCbdegzCiSafUxrDwZpROlfL1duRXDinkLc9KC2HfS+w4/9Mjuc49SFo3grKczGN3t6AnlBasONehmNuDAAqDAkAeFND3tCgarwdhrshdeWAG5ZKWg5J29GnsDNzQwZujtly2mKsp1sh2Asc/oSALFg6yThscX2Pf2Hv+a+vn8Qb7AkAuDXD9zPKhxLc7ylPMtWJu7uK8p6jOXIjZKnF5uWxEQeO5EBNEf9j+aAvP1NfRofld8w5ePU+IjWDKUJEJisExAkEA+L6M96L3ICNF3sYtdvILO2ExYb4AuxF18MmPVWEy0jK9xxan3rggpIG+BQQuy8DoL1snc+JABALiSFEbAZjm6Q==";
|
||||||
// decrypt.setPrivateKey(priKey);
|
// var rsaDecrypt = new JSEncrypt();
|
||||||
// var u=decrypt.decrypt(data);
|
// rsaDecrypt.setPrivateKey(privateKey);
|
||||||
// console.log("解密"+u);
|
// decrypted = rsaDecrypt.decrypt(urlStr);
|
||||||
// return u;
|
// return urlt+"?"+decrypted;
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// function getQueryString(url, name) {
|
||||||
|
//
|
||||||
|
// // var url1= url.split("?")[1];
|
||||||
|
// // RSAD
|
||||||
|
//
|
||||||
|
// var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
||||||
|
// var r = url.substr(1).match(reg)
|
||||||
|
// if (r != null) {
|
||||||
|
// return r[2]
|
||||||
|
// }
|
||||||
|
// return '';
|
||||||
// }
|
// }
|
||||||
|
|
||||||
function getQueryString(url, name) {
|
|
||||||
|
|
||||||
// var url1= url.split("?")[1];
|
|
||||||
// RSAD
|
|
||||||
|
|
||||||
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
|
|
||||||
var r = url.substr(1).match(reg)
|
|
||||||
if (r != null) {
|
|
||||||
return r[2]
|
|
||||||
}
|
|
||||||
return '';
|
|
||||||
}
|
|
||||||
function goreGister() {
|
function goreGister() {
|
||||||
// RSAdecrypt();
|
// RSAdecrypt();
|
||||||
var phone = $("#phone").val();
|
var phone = $("#phone").val();
|
||||||
var phoneverify = $("#phoneverify").val();
|
var phoneverify = $("#phoneverify").val();
|
||||||
var password = $("#password").val();
|
var password = $("#password").val();
|
||||||
var againPassword = $("#againPassword").val();
|
var againPassword = $("#againPassword").val();
|
||||||
var inviteNum = $("#inviteNum").val();
|
var inviteNum =$("#inviteNum").val();
|
||||||
var typeCode = getQueryString(url,'typeCode');
|
var typeCode = $("#typeCode").val();
|
||||||
var currentFee =getQueryString(url,'currentFee') && getQueryString(url,'currentFee').replace('%', '');
|
var currentFee =$("#currentFee").val();
|
||||||
var phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
|
var phoneReg = /(^1[3|4|5|6|7|8|9]\d{9}$)|(^09\d{8}$)/;
|
||||||
// var psdReg = /^(?=.*[a-z|A-Z]).{6,20}$/;
|
// var psdReg = /^(?=.*[a-z|A-Z]).{6,20}$/;
|
||||||
if (!phoneReg.test(phone)) {
|
if (!phoneReg.test(phone)) {
|
||||||
@@ -207,13 +210,7 @@
|
|||||||
$.alert("两次的密码必须相同!", "系统提示");
|
$.alert("两次的密码必须相同!", "系统提示");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(typeCode==''){
|
|
||||||
$.alert("类型错误")
|
|
||||||
}
|
|
||||||
|
|
||||||
if(currentFee==''){
|
|
||||||
$.alert("费率错误")
|
|
||||||
}
|
|
||||||
$.showLoading("提交中...")
|
$.showLoading("提交中...")
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: ctx + '/merchant/goRegister',
|
url: ctx + '/merchant/goRegister',
|
||||||
|
|||||||
Reference in New Issue
Block a user