设备商城代码覆盖
This commit is contained in:
@@ -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;
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user