parent
							
								
									e9e0841d1d
								
							
						
					
					
						commit
						c5f52f0821
					
				@ -0,0 +1,31 @@ | 
				
			|||||||
 | 
					package com.zbkj.admin.controller; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.zbkj.common.model.reshipping.ReshippingStockAddressPO; | 
				
			||||||
 | 
					import com.zbkj.service.service.ReshippingService; | 
				
			||||||
 | 
					import io.swagger.annotations.Api; | 
				
			||||||
 | 
					import io.swagger.annotations.ApiOperation; | 
				
			||||||
 | 
					import lombok.extern.slf4j.Slf4j; | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMapping; | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RequestMethod; | 
				
			||||||
 | 
					import org.springframework.web.bind.annotation.RestController; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** | 
				
			||||||
 | 
					 * @author wyq | 
				
			||||||
 | 
					 */ | 
				
			||||||
 | 
					@Slf4j | 
				
			||||||
 | 
					@RestController | 
				
			||||||
 | 
					@RequestMapping("api/admin/reshipping") | 
				
			||||||
 | 
					@Api(tags = "退货") | 
				
			||||||
 | 
					public class ReshippingController { | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Autowired | 
				
			||||||
 | 
					    ReshippingService reservationService; | 
				
			||||||
 | 
					    @ApiOperation(value = "退货地址列表") | 
				
			||||||
 | 
					    @RequestMapping(value = "/queryAddress", method = RequestMethod.GET) | 
				
			||||||
 | 
					    public List<ReshippingStockAddressPO> queryAddress() { | 
				
			||||||
 | 
					        return reservationService.queryAddress(); | 
				
			||||||
 | 
					    } | 
				
			||||||
 | 
					} | 
				
			||||||
@ -0,0 +1,70 @@ | 
				
			|||||||
 | 
					package com.zbkj.common.model.reshipping; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.annotation.IdType; | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.annotation.TableId; | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.annotation.TableName; | 
				
			||||||
 | 
					import com.fasterxml.jackson.annotation.JsonFormat; | 
				
			||||||
 | 
					import io.swagger.annotations.ApiModel; | 
				
			||||||
 | 
					import io.swagger.annotations.ApiModelProperty; | 
				
			||||||
 | 
					import lombok.Data; | 
				
			||||||
 | 
					import lombok.EqualsAndHashCode; | 
				
			||||||
 | 
					import lombok.experimental.Accessors; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.time.LocalDateTime; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** | 
				
			||||||
 | 
					 * @author wyq | 
				
			||||||
 | 
					 */ | 
				
			||||||
 | 
					@Data | 
				
			||||||
 | 
					@EqualsAndHashCode(callSuper = false) | 
				
			||||||
 | 
					@Accessors(chain = true) | 
				
			||||||
 | 
					@TableName("eb_reshipping_stock_address") | 
				
			||||||
 | 
					@ApiModel(value="ReshippingStockAddressPO", description="退货仓库地址") | 
				
			||||||
 | 
					public class ReshippingStockAddressPO { | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** | 
				
			||||||
 | 
					     * 主键ID | 
				
			||||||
 | 
					     */ | 
				
			||||||
 | 
					    @TableId(type = IdType.AUTO) | 
				
			||||||
 | 
					    private Long id; | 
				
			||||||
 | 
					    @ApiModelProperty(value = "回寄收货人手机号") | 
				
			||||||
 | 
					    private String reshippingPhone; | 
				
			||||||
 | 
					    @ApiModelProperty(value = "回寄地址") | 
				
			||||||
 | 
					    private String reshippingAddress; | 
				
			||||||
 | 
					    @ApiModelProperty(value = "回寄收货人") | 
				
			||||||
 | 
					    private String reshippingName; | 
				
			||||||
 | 
					    @ApiModelProperty(value = "是否默认") | 
				
			||||||
 | 
					    private Integer hasDefault; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** | 
				
			||||||
 | 
					     * 创建人 | 
				
			||||||
 | 
					     */ | 
				
			||||||
 | 
					    @ApiModelProperty(value = "创建人") | 
				
			||||||
 | 
					    private String createdBy; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** | 
				
			||||||
 | 
					     * 更新人 | 
				
			||||||
 | 
					     */ | 
				
			||||||
 | 
					    @ApiModelProperty(value = "更新人") | 
				
			||||||
 | 
					    private String updatedBy; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** | 
				
			||||||
 | 
					     * 创建时间 | 
				
			||||||
 | 
					     */ | 
				
			||||||
 | 
					    @ApiModelProperty(value = "创建时间") | 
				
			||||||
 | 
					    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
				
			||||||
 | 
					    private LocalDateTime createdTime; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** | 
				
			||||||
 | 
					     * 更新时间 | 
				
			||||||
 | 
					     */ | 
				
			||||||
 | 
					    @ApiModelProperty(value = "更新时间") | 
				
			||||||
 | 
					    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") | 
				
			||||||
 | 
					    private LocalDateTime updatedTime; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    /** | 
				
			||||||
 | 
					     * 是否逻辑删除:0未删除,1已删除 | 
				
			||||||
 | 
					     */ | 
				
			||||||
 | 
					    private Integer deleted; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} | 
				
			||||||
@ -0,0 +1,21 @@ | 
				
			|||||||
 | 
					package com.zbkj.service.dao; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.core.mapper.BaseMapper; | 
				
			||||||
 | 
					import com.zbkj.common.model.reshipping.ReshippingStockAddressPO; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** | 
				
			||||||
 | 
					 * 订单表 Mapper 接口 | 
				
			||||||
 | 
					 * +---------------------------------------------------------------------- | 
				
			||||||
 | 
					 * | CRMEB [ CRMEB赋能开发者,助力企业发展 ] | 
				
			||||||
 | 
					 * +---------------------------------------------------------------------- | 
				
			||||||
 | 
					 * | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
 | 
				
			||||||
 | 
					 * +---------------------------------------------------------------------- | 
				
			||||||
 | 
					 * | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 | 
				
			||||||
 | 
					 * +---------------------------------------------------------------------- | 
				
			||||||
 | 
					 * | Author: CRMEB Team <admin@crmeb.com> | 
				
			||||||
 | 
					 * +---------------------------------------------------------------------- | 
				
			||||||
 | 
					 */ | 
				
			||||||
 | 
					public interface ReshippingStockAddressDao extends BaseMapper<ReshippingStockAddressPO> { | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					} | 
				
			||||||
@ -0,0 +1,12 @@ | 
				
			|||||||
 | 
					package com.zbkj.service.service; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.zbkj.common.model.reshipping.ReshippingStockAddressPO; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** | 
				
			||||||
 | 
					 * @author wyq | 
				
			||||||
 | 
					 */ | 
				
			||||||
 | 
					public interface ReshippingService { | 
				
			||||||
 | 
					    List<ReshippingStockAddressPO> queryAddress(); | 
				
			||||||
 | 
					} | 
				
			||||||
@ -0,0 +1,26 @@ | 
				
			|||||||
 | 
					package com.zbkj.service.service.impl; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; | 
				
			||||||
 | 
					import com.zbkj.common.model.reshipping.ReshippingStockAddressPO; | 
				
			||||||
 | 
					import com.zbkj.service.dao.ReshippingStockAddressDao; | 
				
			||||||
 | 
					import com.zbkj.service.service.ReshippingService; | 
				
			||||||
 | 
					import org.springframework.beans.factory.annotation.Autowired; | 
				
			||||||
 | 
					import org.springframework.stereotype.Service; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import java.util.List; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/** | 
				
			||||||
 | 
					 * @author wyq | 
				
			||||||
 | 
					 */ | 
				
			||||||
 | 
					@Service | 
				
			||||||
 | 
					public class ReshippingServiceImpl implements ReshippingService { | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Autowired | 
				
			||||||
 | 
					    private ReshippingStockAddressDao reshippingStockAddressDao; | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    @Override | 
				
			||||||
 | 
					    public List<ReshippingStockAddressPO> queryAddress() { | 
				
			||||||
 | 
					        return reshippingStockAddressDao.selectList(new LambdaQueryWrapper<ReshippingStockAddressPO>().eq(ReshippingStockAddressPO::getDeleted, 0) | 
				
			||||||
 | 
					                .orderByDesc(ReshippingStockAddressPO::getHasDefault).orderByDesc(ReshippingStockAddressPO::getId)); | 
				
			||||||
 | 
					    } | 
				
			||||||
 | 
					} | 
				
			||||||
					Loading…
					
					
				
		Reference in new issue