建店资料收集
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.enums.PosAndOrderEnum;
|
||||
import com.cool.store.request.PostAndOrderRequest;
|
||||
import com.cool.store.response.PosAndOrderResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.PosAndOrderInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午5:44
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Api("pc订货系统")
|
||||
@RestController
|
||||
@RequestMapping("/pc/orderSys")
|
||||
public class PCOrderSysController {
|
||||
|
||||
@Resource
|
||||
private PosAndOrderInfoService posAndOrderInfoService;
|
||||
|
||||
@ApiOperation("提交或修改")
|
||||
@PostMapping("/submitOrUpdate")
|
||||
public ResponseResult<Integer> submitOrUpdate(@RequestBody @Validated PostAndOrderRequest request){
|
||||
request.setType(PosAndOrderEnum.ORDER.getCode());
|
||||
return ResponseResult.success(posAndOrderInfoService.submitOrUpdate(request, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@ApiOperation("获取")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<PosAndOrderResponse> get(@RequestParam("shopId") Long shopId){
|
||||
return ResponseResult.success(posAndOrderInfoService.get(shopId,PosAndOrderEnum.ORDER.getCode()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.enums.PosAndOrderEnum;
|
||||
import com.cool.store.request.PostAndOrderRequest;
|
||||
import com.cool.store.response.PosAndOrderResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.PosAndOrderInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午5:44
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Api("pcPos")
|
||||
@RestController
|
||||
@RequestMapping("/pc/pos")
|
||||
public class PCPosController {
|
||||
|
||||
@Resource
|
||||
private PosAndOrderInfoService posAndOrderInfoService;
|
||||
|
||||
@ApiOperation("提交或修改")
|
||||
@PostMapping("/submitOrUpdate")
|
||||
public ResponseResult<Integer> submitOrUpdate(@RequestBody @Validated PostAndOrderRequest request){
|
||||
request.setType(PosAndOrderEnum.POS.getCode());
|
||||
return ResponseResult.success(posAndOrderInfoService.submitOrUpdate(request, CurrentUserHolder.getUserId()));
|
||||
}
|
||||
|
||||
@ApiOperation("获取")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<PosAndOrderResponse> get(@RequestParam("shopId") Long shopId){
|
||||
return ResponseResult.success(posAndOrderInfoService.get(shopId,PosAndOrderEnum.POS.getCode()));
|
||||
}
|
||||
}
|
||||
@@ -30,16 +30,12 @@ public class MiniBuildInformationController {
|
||||
return ResponseResult.success(buildInformationService.getBuildInformation(shopId));
|
||||
}
|
||||
|
||||
@ApiOperation("提交")
|
||||
@PostMapping("/submit")
|
||||
@ApiOperation("提交/修改")
|
||||
@PostMapping("/submitOrUpdate")
|
||||
public ResponseResult<Integer> submitBuildInformation(@RequestBody @Validated BuildInformationRequest request) {
|
||||
return ResponseResult.success(buildInformationService.submit(request));
|
||||
}
|
||||
@ApiOperation("修改")
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Integer> update(@RequestBody @Validated BuildInformationRequest request) {
|
||||
return ResponseResult.success(buildInformationService.update(request));
|
||||
return ResponseResult.success(buildInformationService.submitOrUpdate(request));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.enums.PosAndOrderEnum;
|
||||
import com.cool.store.response.PosAndOrderResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.PosAndOrderInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午5:44
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Api("mini订货系统")
|
||||
@RestController
|
||||
@RequestMapping("/mini/OrderSys")
|
||||
public class miniOrderSysController {
|
||||
|
||||
@Resource
|
||||
private PosAndOrderInfoService posAndOrderInfoService;
|
||||
|
||||
|
||||
@ApiOperation("获取")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<PosAndOrderResponse> get(@RequestParam("shopId") Long shopId){
|
||||
return ResponseResult.success(posAndOrderInfoService.get(shopId,PosAndOrderEnum.ORDER.getCode()));
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.context.CurrentUserHolder;
|
||||
import com.cool.store.enums.PosAndOrderEnum;
|
||||
import com.cool.store.request.PostAndOrderRequest;
|
||||
import com.cool.store.response.PosAndOrderResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.PosAndOrderInfoService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午5:44
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Api("miniPos")
|
||||
@RestController
|
||||
@RequestMapping("/mini/pos")
|
||||
public class miniPosController {
|
||||
|
||||
@Resource
|
||||
private PosAndOrderInfoService posAndOrderInfoService;
|
||||
|
||||
|
||||
@ApiOperation("获取")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<PosAndOrderResponse> get(@RequestParam("shopId") Long shopId){
|
||||
return ResponseResult.success(posAndOrderInfoService.get(shopId,PosAndOrderEnum.POS.getCode()));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user