开业运营方案
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.dto.openPreparation.FirstOrderDTO;
|
||||
import com.cool.store.entity.FirstOrderDO;
|
||||
import com.cool.store.request.FirstOrderRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.FirstOrderService;
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.beanutils.BeanUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午9:22
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/pc/firstOrder")
|
||||
@Api(tags = "PC首批订货金")
|
||||
@Slf4j
|
||||
public class FirstOrderController {
|
||||
|
||||
@Resource
|
||||
private FirstOrderService firstOrderService;
|
||||
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<FirstOrderDTO> get(@RequestParam("shopId") Long shopId) {
|
||||
FirstOrderDTO order = firstOrderService.getOrder(shopId);
|
||||
return ResponseResult.success(order);
|
||||
}
|
||||
@PostMapping("/submit")
|
||||
public ResponseResult getSubmit(@RequestBody FirstOrderRequest request) {
|
||||
FirstOrderDO firstOrderDO = new FirstOrderDO();
|
||||
try {
|
||||
BeanUtils.copyProperties(firstOrderDO,request );
|
||||
firstOrderService.saveOrder(firstOrderDO);
|
||||
return ResponseResult.success();
|
||||
} catch (IllegalAccessException |InvocationTargetException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -56,4 +56,5 @@ public class OpeningOperationPlanController {
|
||||
openingOperationPlanService.getPlanListPage(request);
|
||||
return ResponseResult.success(openingOperationPlanService.getPlanListPage(request));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
* @Date: 2024/04/24/下午7:32
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/mini/openingOperationPlan")
|
||||
@Api(tags = "开业运营方案操作")
|
||||
@Slf4j
|
||||
public class MiniOpeningOperationPlanController {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user