master
parent
cc37d27dbe
commit
4f93df29ec
@ -0,0 +1,62 @@ |
||||
package com.zbkj.front.controller; |
||||
|
||||
import com.zbkj.common.model.express.Express; |
||||
import com.zbkj.common.result.CommonResult; |
||||
import com.zbkj.front.pojo.vo.ExpressVO; |
||||
import com.zbkj.service.service.ExpressService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springframework.beans.BeanUtils; |
||||
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; |
||||
import java.util.stream.Collectors; |
||||
|
||||
|
||||
/** |
||||
* 快递公司表 前端控制器 |
||||
* +---------------------------------------------------------------------- |
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ] |
||||
* +---------------------------------------------------------------------- |
||||
* | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||
* +---------------------------------------------------------------------- |
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 |
||||
* +---------------------------------------------------------------------- |
||||
* | Author: CRMEB Team <admin@crmeb.com> |
||||
* +---------------------------------------------------------------------- |
||||
*/ |
||||
@Slf4j |
||||
@RestController |
||||
@RequestMapping("api/front/express") |
||||
@Api(tags = "设置 -- 物流 -- 公司") |
||||
public class ExpressController { |
||||
|
||||
@Autowired |
||||
private ExpressService expressService; |
||||
|
||||
|
||||
/** |
||||
* 查询全部物流公司 |
||||
*/ |
||||
|
||||
@ApiOperation(value = "查询全部物流公司") |
||||
@RequestMapping(value = "/all", method = RequestMethod.GET) |
||||
public CommonResult<List<ExpressVO>> all() { |
||||
String type="normal"; |
||||
List<Express> all = expressService.findAll(type); |
||||
List<ExpressVO> collect = all.stream().map(item -> { |
||||
ExpressVO express = new ExpressVO(); |
||||
BeanUtils.copyProperties(item, express); |
||||
return express; |
||||
}).collect(Collectors.toList()); |
||||
return CommonResult.success(collect); |
||||
} |
||||
|
||||
} |
||||
|
||||
|
||||
|
||||
@ -0,0 +1,39 @@ |
||||
package com.zbkj.front.pojo; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType; |
||||
import com.baomidou.mybatisplus.annotation.TableId; |
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.experimental.Accessors; |
||||
|
||||
import java.io.Serializable; |
||||
|
||||
/** |
||||
* SKU信息 |
||||
* |
||||
* @author tanguojing |
||||
*/ |
||||
@Data |
||||
@TableName("m_xsbuy_cn.xs_sku") |
||||
@ApiModel(value = "SKU信息对象") |
||||
@Accessors(chain = true) |
||||
public class XsSkuInfo implements Serializable { |
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@TableId(type = IdType.AUTO) |
||||
private Long id; |
||||
@ApiModelProperty(value = "SKU编号") |
||||
private String skuNo; |
||||
@ApiModelProperty(value = "SKU名称") |
||||
private String skuName; |
||||
@ApiModelProperty(value = "分类名称") |
||||
private String categoryName; |
||||
@ApiModelProperty(value = "分类编号") |
||||
private String categoryCode; |
||||
@ApiModelProperty(value = "品牌编号") |
||||
private String brandCode; |
||||
@ApiModelProperty(value = "品牌名称") |
||||
private String brandName; |
||||
} |
||||
@ -0,0 +1,30 @@ |
||||
package com.zbkj.front.pojo.vo; |
||||
|
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* 快递公司表 |
||||
* +---------------------------------------------------------------------- |
||||
* | CRMEB [ CRMEB赋能开发者,助力企业发展 ] |
||||
* +---------------------------------------------------------------------- |
||||
* | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
|
||||
* +---------------------------------------------------------------------- |
||||
* | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权 |
||||
* +---------------------------------------------------------------------- |
||||
* | Author: CRMEB Team <admin@crmeb.com> |
||||
* +---------------------------------------------------------------------- |
||||
*/ |
||||
@Data |
||||
|
||||
@ApiModel(value="Express对象", description="快递公司表") |
||||
public class ExpressVO { |
||||
|
||||
@ApiModelProperty(value = "快递公司简称") |
||||
private String code; |
||||
|
||||
@ApiModelProperty(value = "快递公司全称") |
||||
private String name; |
||||
|
||||
} |
||||
Loading…
Reference in new issue