Commit d74c428f authored by jiaorz's avatar jiaorz

Merge remote-tracking branch 'origin/dev' into jrz_dev

parents c1e556cc dc7c171f
...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -11,7 +11,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping("/tour") @RequestMapping("app/unauth/tour")
@Slf4j @Slf4j
@IgnoreClientToken @IgnoreClientToken
public class GwTourController extends CommonBaseController { public class GwTourController extends CommonBaseController {
......
...@@ -5,6 +5,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken; ...@@ -5,6 +5,7 @@ import com.github.wxiaoqi.security.auth.client.annotation.IgnoreClientToken;
import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken; import com.github.wxiaoqi.security.auth.client.annotation.IgnoreUserToken;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.CommonBaseController; import com.github.wxiaoqi.security.common.rest.CommonBaseController;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.vehicle.entity.VehicleModel; import com.xxfc.platform.vehicle.entity.VehicleModel;
import com.xxfc.platform.vehicle.feign.VehicleFeign; import com.xxfc.platform.vehicle.feign.VehicleFeign;
import com.xxfc.platform.vehicle.pojo.VModelDetailVO; import com.xxfc.platform.vehicle.pojo.VModelDetailVO;
...@@ -52,9 +53,10 @@ public class VehicleModelController extends CommonBaseController { ...@@ -52,9 +53,10 @@ public class VehicleModelController extends CommonBaseController {
* @return * @return
*/ */
@ApiOperation("车型列表") @ApiOperation("车型列表")
@PostMapping(value = "/findVehicleModelPage") @GetMapping(value = "/findVehicleModelPage")
@IgnoreUserToken @IgnoreUserToken
public ObjectRestResponse<VehicleModelVo> findVehicleModelPageUnauthfind(@RequestBody VehicleModelQueryCondition vmqc) { public ObjectRestResponse<PageDataVO<VehicleModelVo>> findVehicleModelPageUnauthfind(VehicleModelQueryCondition vmqc) {
return vehicleFeign.findVehicleModelPageUnauthfind(vmqc); ObjectRestResponse<PageDataVO<VehicleModelVo>> objectRestResponse = vehicleFeign.findVehicleModelPageUnauthfind(vmqc);
return objectRestResponse;
} }
} }
...@@ -2,6 +2,7 @@ package com.xxfc.platform.vehicle.feign; ...@@ -2,6 +2,7 @@ package com.xxfc.platform.vehicle.feign;
import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.vo.GoodDataVO; import com.github.wxiaoqi.security.common.vo.GoodDataVO;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.vehicle.common.RestResponse; import com.xxfc.platform.vehicle.common.RestResponse;
import com.xxfc.platform.vehicle.entity.*; import com.xxfc.platform.vehicle.entity.*;
import com.xxfc.platform.vehicle.pojo.*; import com.xxfc.platform.vehicle.pojo.*;
...@@ -133,5 +134,5 @@ public interface VehicleFeign { ...@@ -133,5 +134,5 @@ public interface VehicleFeign {
ObjectRestResponse<VModelDetailVO> detailByParam(@RequestParam("vehicleModel") Map<String, Object> vehicleModel); ObjectRestResponse<VModelDetailVO> detailByParam(@RequestParam("vehicleModel") Map<String, Object> vehicleModel);
@PostMapping("/vehicleModel/app/unauth/findVehicleModelPage") @PostMapping("/vehicleModel/app/unauth/findVehicleModelPage")
public ObjectRestResponse<VehicleModelVo> findVehicleModelPageUnauthfind(@RequestBody VehicleModelQueryCondition vmqc); public ObjectRestResponse<PageDataVO<VehicleModelVo>> findVehicleModelPageUnauthfind(@RequestBody VehicleModelQueryCondition vmqc);
} }
...@@ -46,12 +46,10 @@ public class VehicleJobHandler extends IJobHandler { ...@@ -46,12 +46,10 @@ public class VehicleJobHandler extends IJobHandler {
List<String> existVehicleIds = vehicleBiz.findExistVehicleIds(); List<String> existVehicleIds = vehicleBiz.findExistVehicleIds();
Dictionary dictionary = thirdFeign.findDictionaryByTypeAndCode(DIC_VEHICLE_TYPE, DIC_VEHICLE_CODE); Dictionary dictionary = thirdFeign.findDictionaryByTypeAndCode(DIC_VEHICLE_TYPE, DIC_VEHICLE_CODE);
LocalDate date = LocalDate.now(); LocalDate date = LocalDate.now();
date = date.plusMonths(Integer.valueOf(dictionary.getDetail()));
int year = date.getYear(); int year = date.getYear();
int nowMonth = date.getMonthValue(); int month = date.getMonthValue();
int betweenMonth = Integer.valueOf(dictionary.getDetail()).intValue(); String yearAndMonth = String.format("%d-%02d", year,month);
int month = nowMonth + betweenMonth> 12 ? (betweenMonth + nowMonth) - 12 : nowMonth + betweenMonth;
year = month > nowMonth ? year : year + 1;
String yearAndMonth = String.format("%d-%s", year, month>=10?month:"0"+month);
XxlJobLogger.log("----查询到的车型ids:【{}】",existVehicleIds); XxlJobLogger.log("----查询到的车型ids:【{}】",existVehicleIds);
if (CollectionUtils.isNotEmpty(existVehicleIds)) { if (CollectionUtils.isNotEmpty(existVehicleIds)) {
List<VehicleBookInfo> bookInfos = existVehicleIds.stream().map(vehicleId -> { List<VehicleBookInfo> bookInfos = existVehicleIds.stream().map(vehicleId -> {
......
...@@ -11,6 +11,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse; ...@@ -11,6 +11,7 @@ import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.util.process.ResultCode; import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.github.wxiaoqi.security.common.vo.GoodDataVO; import com.github.wxiaoqi.security.common.vo.GoodDataVO;
import com.github.wxiaoqi.security.common.vo.PageDataVO;
import com.xxfc.platform.vehicle.biz.VehicleCataBiz; import com.xxfc.platform.vehicle.biz.VehicleCataBiz;
import com.xxfc.platform.vehicle.biz.VehicleModelBiz; import com.xxfc.platform.vehicle.biz.VehicleModelBiz;
import com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz; import com.xxfc.platform.vehicle.biz.VehiclePlatCataBiz;
...@@ -133,7 +134,7 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi ...@@ -133,7 +134,7 @@ public class VehicleModelController extends BaseController<VehicleModelBiz, Vehi
@ApiOperation("车型列表") @ApiOperation("车型列表")
@PostMapping(value = "/app/unauth/findVehicleModelPage") @PostMapping(value = "/app/unauth/findVehicleModelPage")
@IgnoreUserToken @IgnoreUserToken
public ObjectRestResponse<VehicleModelVo> findVehicleModelPageUnauthfind( public ObjectRestResponse<PageDataVO<VehicleModelVo>> findVehicleModelPageUnauthfind(
@RequestBody @ApiParam("查询条件") VehicleModelQueryCondition vmqc, HttpServletRequest request) { @RequestBody @ApiParam("查询条件") VehicleModelQueryCondition vmqc, HttpServletRequest request) {
if (vmqc.getIsDel() == null) { if (vmqc.getIsDel() == null) {
vmqc.setIsDel(0); vmqc.setIsDel(0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment