电子面单
This commit is contained in:
@@ -7,6 +7,7 @@ import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.security.OperationalJudgment;
|
||||
import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.kdBrid.service.KdNiaoService;
|
||||
import cn.lili.modules.member.entity.dto.MemberAddressDTO;
|
||||
import cn.lili.modules.member.service.StoreLogisticsService;
|
||||
import cn.lili.modules.order.order.entity.dto.OrderExportDTO;
|
||||
@@ -61,6 +62,12 @@ public class OrderStoreController {
|
||||
@Autowired
|
||||
private StoreLogisticsService storeLogisticsService;
|
||||
|
||||
/**
|
||||
* 快递鸟电子面单
|
||||
*/
|
||||
@Autowired
|
||||
private KdNiaoService kdNiaoService;
|
||||
|
||||
|
||||
@ApiOperation(value = "查询订单列表")
|
||||
@GetMapping
|
||||
@@ -174,4 +181,16 @@ public class OrderStoreController {
|
||||
public ResultMessage<List<OrderExportDTO>> queryExportOrder(OrderSearchParams orderSearchParams) {
|
||||
return ResultUtil.data(orderService.queryExportOrder(orderSearchParams));
|
||||
}
|
||||
|
||||
@PreventDuplicateSubmissions
|
||||
@ApiOperation(value = "创建电子面单")
|
||||
@PostMapping(value = "/{orderSn}/createElectronicsFaceSheet")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "orderSn", value = "订单号", required = true, paramType = "path"),
|
||||
@ApiImplicitParam(name = "logisticsId", value = "物流公司", required = true, dataType = "String", paramType = "query")
|
||||
})
|
||||
public ResultMessage<Object> createElectronicsFaceSheet(@NotNull(message = "参数非法") @PathVariable String orderSn,
|
||||
@NotNull(message = "请选择物流公司") String logisticsId) throws Exception{
|
||||
return ResultUtil.data(kdNiaoService.createElectronicsFaceSheet(orderSn,logisticsId));
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,12 @@ import cn.lili.common.security.context.UserContext;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.member.service.StoreLogisticsService;
|
||||
import cn.lili.modules.store.entity.dos.StoreLogistics;
|
||||
import cn.lili.modules.store.entity.dto.StoreLogisticsCustomerDTO;
|
||||
import cn.lili.modules.system.entity.vo.StoreLogisticsVO;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiImplicitParam;
|
||||
import io.swagger.annotations.ApiImplicitParams;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@@ -38,7 +40,12 @@ public class LogisticsStoreController {
|
||||
@GetMapping
|
||||
public ResultMessage<List<StoreLogisticsVO>> get() {
|
||||
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
|
||||
return ResultUtil.data(storeLogisticsService.getStoreLogistics(storeId));
|
||||
//获取已开启的物流公司
|
||||
List<StoreLogisticsVO> storeLogistics = storeLogisticsService.getOpenStoreLogistics(storeId);
|
||||
//获取未开启的物流公司
|
||||
List<StoreLogisticsVO> closeStoreLogistics = storeLogisticsService.getCloseStoreLogistics(storeId);
|
||||
storeLogistics.addAll(closeStoreLogistics);
|
||||
return ResultUtil.data(storeLogistics);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取商家已选择物流公司列表")
|
||||
@@ -49,11 +56,13 @@ public class LogisticsStoreController {
|
||||
}
|
||||
|
||||
@ApiOperation(value = "选择物流公司")
|
||||
@ApiImplicitParam(name = "logisticsId", value = "物流公司ID", required = true, paramType = "path")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "logisticsId", value = "物流公司ID", required = true, paramType = "path"),
|
||||
})
|
||||
@PostMapping("/{logisticsId}")
|
||||
public ResultMessage<StoreLogistics> checked(@PathVariable String logisticsId) {
|
||||
public ResultMessage<StoreLogistics> checked(@PathVariable String logisticsId,@RequestBody StoreLogisticsCustomerDTO storeLogisticsCustomerDTO) {
|
||||
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
|
||||
return ResultUtil.data(storeLogisticsService.add(logisticsId, storeId));
|
||||
return ResultUtil.data(storeLogisticsService.add(logisticsId, storeId,storeLogisticsCustomerDTO));
|
||||
}
|
||||
|
||||
|
||||
@@ -66,4 +75,28 @@ public class LogisticsStoreController {
|
||||
return ResultUtil.data(remove);
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改电子面单参数")
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "logisticsId", value = "物流公司ID", required = true, paramType = "path"),
|
||||
})
|
||||
@PutMapping("/{logisticsId}/updateStoreLogistics")
|
||||
public ResultMessage<StoreLogistics> updateStoreLogistics(@PathVariable String logisticsId,StoreLogisticsCustomerDTO storeLogisticsCustomerDTO){
|
||||
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
|
||||
return ResultUtil.data(storeLogisticsService.update(logisticsId, storeId,storeLogisticsCustomerDTO));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取商家已选择物流公司并且使用电子面单列表")
|
||||
@GetMapping("/getCheckedFaceSheet")
|
||||
public ResultMessage<List<StoreLogisticsVO>> getCheckedFaceSheet() {
|
||||
String storeId = Objects.requireNonNull(UserContext.getCurrentUser()).getStoreId();
|
||||
return ResultUtil.data(storeLogisticsService.getStoreSelectedLogisticsUseFaceSheet(storeId));
|
||||
}
|
||||
|
||||
@ApiOperation(value = "获取店铺-物流公司详细信息")
|
||||
@ApiImplicitParam(name = "logisticsId", value = "物流公司ID", required = true, paramType = "path")
|
||||
@GetMapping("/{logisticsId}/getStoreLogistics")
|
||||
public ResultMessage<StoreLogistics> getStoreLogistics(@PathVariable String logisticsId){
|
||||
return ResultUtil.data(storeLogisticsService.getStoreLogisticsInfo(logisticsId));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import cn.lili.common.enums.ResultUtil;
|
||||
import cn.lili.common.vo.ResultMessage;
|
||||
import cn.lili.modules.store.entity.dto.FuLuConfigureDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreAfterSaleAddressDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreDeliverGoodsAddressDTO;
|
||||
import cn.lili.modules.store.entity.dto.StoreSettingDTO;
|
||||
import cn.lili.modules.store.entity.vos.StoreVO;
|
||||
import cn.lili.modules.store.service.StoreDetailService;
|
||||
@@ -103,4 +104,19 @@ public class StoreSettingsController {
|
||||
boolean result = storeDetailService.editFuLuConfigureDTO(fuLuConfigureDTO);
|
||||
return ResultUtil.data(result);
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation(value = "获取商家发货地址")
|
||||
@GetMapping("/storeDeliverGoodsAddress")
|
||||
public ResultMessage<StoreDeliverGoodsAddressDTO> getStoreDeliverGoodsAddress(){
|
||||
return ResultUtil.data(storeDetailService.getStoreDeliverGoodsAddressDto());
|
||||
}
|
||||
|
||||
@ApiOperation(value = "修改商家发货地址")
|
||||
@PutMapping("/storeDeliverGoodsAddress")
|
||||
public ResultMessage<Object> editStoreDeliverGoodsAddress(@Valid StoreDeliverGoodsAddressDTO storeDeliverGoodsAddressDTO) {
|
||||
//修改商家退货收件地址
|
||||
boolean result = storeDetailService.editStoreDeliverGoodsAddressDTO(storeDeliverGoodsAddressDTO);
|
||||
return ResultUtil.data(result);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user