|
@@ -1,10 +1,12 @@
|
|
|
package com.rongwei.savecheck.controller;
|
|
|
|
|
|
import com.rongwei.rwcommon.base.R;
|
|
|
+import com.rongwei.sfcommon.sys.service.impl.JfCommonServiceImpl;
|
|
|
import com.rongwei.sfcommon.utils.CommonUtil;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.slf4j.Logger;
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.format.annotation.DateTimeFormat;
|
|
|
import org.springframework.web.bind.annotation.GetMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@@ -20,11 +22,14 @@ import java.util.Date;
|
|
|
* @date 2021/01/08
|
|
|
*/
|
|
|
@RestController
|
|
|
-@RequestMapping("common-util")
|
|
|
+@RequestMapping("/common-util")
|
|
|
@Slf4j
|
|
|
public class CommonUtilController {
|
|
|
private final Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private JfCommonServiceImpl jfCommonService;
|
|
|
+
|
|
|
@GetMapping("/week-for-year")
|
|
|
public R weekForYear(@RequestParam("date") @DateTimeFormat(pattern = "yyyy-MM-dd") Date date,
|
|
|
@RequestParam("returnLastWeek") String returnLastWeek) {
|
|
@@ -39,4 +44,9 @@ public class CommonUtilController {
|
|
|
r.putData(CommonUtil.getWeekForYear(date, Boolean.parseBoolean(returnLastWeek)));
|
|
|
return r;
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping("/gps")
|
|
|
+ public R getLocationIdFormBDApi(@RequestParam(name = "address") String address){
|
|
|
+ return jfCommonService.getLocationIdFormBDApi(address);
|
|
|
+ }
|
|
|
}
|