设备商城代码覆盖
This commit is contained in:
parent
654215e3dd
commit
4f8f238ea6
|
|
@ -0,0 +1,67 @@
|
|||
package cn.pluss.platform.controller;
|
||||
|
||||
import cn.hutool.core.lang.TypeReference;
|
||||
import cn.pluss.platform.api.Result;
|
||||
import cn.pluss.platform.api.ResultGenerator;
|
||||
import cn.pluss.platform.util.FileUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.assertj.core.error.ShouldBe;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.scheduling.annotation.Scheduled;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.PostConstruct;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author lyf
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("/payConfig")
|
||||
public class payConfigController {
|
||||
|
||||
private static JSONObject object=new JSONObject();
|
||||
|
||||
@GetMapping("/appconfig")
|
||||
public Result<Object> appConfig()throws IOException {
|
||||
object.put("path","/pages/app/pay");
|
||||
object.put("appid","wxfc7bd92a462eb191");
|
||||
object.put("id","gh_f987a9e9b1d0");
|
||||
object.put("type","0");
|
||||
return ResultGenerator.genSuccessResult(object);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// @Bean
|
||||
// public void readFile() throws IOException {
|
||||
// String filename = "/home/www/service/config.txt";
|
||||
// String filecontent= FileUtil.readFile(filename);
|
||||
//
|
||||
// JSONObject obj = JSON.parseObject(filecontent);
|
||||
// object=obj;
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// @Scheduled(cron = "0 0 0 * * ?")
|
||||
// public void readFileSche() throws IOException {
|
||||
//
|
||||
// log.info("~~~~~~~~~统计用户流水是否达标定时任务开始~~~~~~~~~~~~");
|
||||
// String filename = "/home/www/service/config.txt";
|
||||
// String filecontent= FileUtil.readFile(filename);
|
||||
// JSONObject obj = JSON.parseObject(filecontent);
|
||||
// object=obj;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -168,8 +168,10 @@ public class YsPayOldServiceImpl extends YsPayServiceImpl{
|
|||
String bank_type = Constant.PAY_TYPE_WECHAT.equals(order.getPayTypeCode()) ? "1902000" : Constant.PAY_TYPE_ALIPAY.equals(order.getPayTypeCode()) ? "1903000" : "9001002";
|
||||
reqData.put("bank_type",bank_type);
|
||||
}else{
|
||||
String defaultAppId =ParametersUtil.APPLETS_APPID;
|
||||
if(ObjectUtil.isNotEmpty(order.getAppletsAppid())){
|
||||
reqData.put("subAppId",order.getAppletsAppid());
|
||||
defaultAppId=order.getAppletsAppid();
|
||||
}else {
|
||||
reqData.put("subAppId",ParametersUtil.APPLETS_APPID);
|
||||
}
|
||||
|
|
@ -178,7 +180,6 @@ public class YsPayOldServiceImpl extends YsPayServiceImpl{
|
|||
// 会员充值主扫小程序 小程序当面付 10 小程序线上店
|
||||
if("3".equals(order.getOrderType()) || "9".equals(order.getOrderType()) || "10".equals(order.getOrderType())){
|
||||
reqData.put("is_minipg", 1);
|
||||
String defaultAppId = ParametersUtil.APPLETS_APPID;
|
||||
if(order.getOrderNumber().contains("WAP") || order.getOrderNumber().contains("APP")){
|
||||
defaultAppId = YsOldSrcMerchantNo.getSubAppIdByValue(channel.getSrcMerchantNo());
|
||||
}else{
|
||||
|
|
|
|||
Loading…
Reference in New Issue