Browse Source

商品后台接口统一字段

master
wangpengfei 6 months ago
parent
commit
9b68a8c0e2
  1. 1
      ordermall/src/main/java/com/yxt/ordermall/api/lpkcustomer/LpkCustomer.java
  2. 9
      ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoods.java
  3. 12
      ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoodsDetailsVo.java
  4. 12
      ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoodsDto.java
  5. 9
      ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoodsQuery.java
  6. 4
      ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoodsVo.java
  7. 44
      ordermall/src/main/java/com/yxt/ordermall/apiadmin/AdminMallRest.java
  8. 69
      ordermall/src/main/java/com/yxt/ordermall/apiadmin/aggregation/BaseGoodsUnitRest.java
  9. 110
      ordermall/src/main/java/com/yxt/ordermall/apiadmin/aggregation/PmsBrandRest.java
  10. 223
      ordermall/src/main/java/com/yxt/ordermall/apiadmin/aggregation/PmsProductCategoryRest.java
  11. 9
      ordermall/src/main/java/com/yxt/ordermall/apiadmin/vo/PmsBrandVo.java
  12. 1
      ordermall/src/main/java/com/yxt/ordermall/apiadmin/vo/PmsProductCategoryVo.java
  13. 1
      ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodssku/BaseGoodsSku.java
  14. 3
      ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodssku/BaseGoodsSkuDto.java
  15. 9
      ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodssku/BaseGoodsSkuQuery.java
  16. 41
      ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodssku/GoodsSkuVo1.java
  17. 1
      ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodsspu/BaseGoodsSpuDto.java
  18. 31
      ordermall/src/main/java/com/yxt/ordermall/biz/lpkgoods/GoodsSkuSubunitDto.java
  19. 5
      ordermall/src/main/java/com/yxt/ordermall/biz/lpkgoods/LpkGoodsRest.java
  20. 300
      ordermall/src/main/java/com/yxt/ordermall/biz/lpkgoods/LpkGoodsService.java
  21. 6
      ordermall/src/main/java/com/yxt/ordermall/feign/base/basegoodssku/BaseGoodsSkuFeign.java
  22. 5
      ordermall/src/main/java/com/yxt/ordermall/feign/base/basegoodssku/BaseGoodsSkuFeignFallback.java
  23. 5
      ordermall/src/main/java/com/yxt/ordermall/feign/base/basegoodsspu/BaseGoodsSpuFeign.java
  24. 6
      ordermall/src/main/java/com/yxt/ordermall/feign/base/basegoodsspu/BaseGoodsSpuFeignFallback.java
  25. 168
      ordermall/src/main/java/com/yxt/ordermall/mallplus/biz/pms/controller/PmsBrandController.java
  26. 368
      ordermall/src/main/java/com/yxt/ordermall/mallplus/biz/pms/controller/PmsProductCategoryController.java
  27. 2
      ordermall/src/main/java/com/yxt/ordermall/mallplus/biz/pms/service/impl/PmsProductCategoryServiceImpl.java
  28. 11
      ordermall/src/main/java/com/yxt/ordermall/mallplus/mbg/pms/entity/PmsBrand.java
  29. 11
      ordermall/src/main/java/com/yxt/ordermall/mallplus/mbg/pms/entity/PmsProductCategory.java
  30. 1
      ordermall/src/main/java/com/yxt/ordermall/mallplus/mbg/pms/entity/brand/BrandVo.java

1
ordermall/src/main/java/com/yxt/ordermall/api/lpkcustomer/LpkCustomer.java

@ -48,4 +48,5 @@ public class LpkCustomer {
@ApiModelProperty("客户绑定的支行sid") @ApiModelProperty("客户绑定的支行sid")
private String customerBankSid; private String customerBankSid;
private String orgPath;
} }

9
ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoods.java

@ -1,5 +1,6 @@
package com.yxt.ordermall.api.lpkgoods; package com.yxt.ordermall.api.lpkgoods;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ -31,6 +32,8 @@ public class LpkGoods {
private String price; private String price;
private String picUrl; private String picUrl;
private String appContent; private String appContent;
@TableField(exist = false)
private String specificationUnitSid;
private String specificationUnit; private String specificationUnit;
private String number; private String number;
private String isAppletGrounding; private String isAppletGrounding;
@ -38,9 +41,9 @@ public class LpkGoods {
private String weight; private String weight;
private String useTo; private String useTo;
private Long brandId; // 品牌ID'; private String brandId; // 品牌ID';
private String brandName; // 品牌名称'; private String brandName; // 品牌名称';
private Long categoryId; // 类别ID'; private String categoryId; // 类别ID';
private String categoryName; // 类别名称'; private String categoryName; // 类别名称';
@ApiModelProperty("阶梯重量") @ApiModelProperty("阶梯重量")
private String stepWeight; private String stepWeight;
@ -48,4 +51,6 @@ public class LpkGoods {
private String stepPrice; private String stepPrice;
private String periodValidity; private String periodValidity;
private String sort; private String sort;
private String spuSid;
private String skuSid;
} }

12
ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoodsDetailsVo.java

@ -27,14 +27,17 @@ public class LpkGoodsDetailsVo implements Vo {
private String picUrl;//图片 private String picUrl;//图片
private String appContent; private String appContent;
private String specificationUnit; private String specificationUnit;
private String specificationUnitSid;
private double number; private double number;
private String content; private String content;
private String weight; private String weight;
private String isAppletGrounding;
private String useTo;
private Long brandId; // 品牌ID'; private String brandId; // 品牌ID';
private String brandName; // 品牌名称'; private String brandName; // 品牌名称';
private Long categoryId; // 类别ID'; private String categoryId; // 类别ID';
private String categoryName; // 类别名称'; private String categoryName; // 类别名称';
@ApiModelProperty("阶梯重量") @ApiModelProperty("阶梯重量")
@ -53,4 +56,9 @@ public class LpkGoodsDetailsVo implements Vo {
private String goodsNumber; private String goodsNumber;
private String mefenPrice; private String mefenPrice;
private String sort; private String sort;
private String spuSid;
private String skuSid;
private String useOrgSid;
private String createOrgSid;
private String userSid;
} }

12
ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoodsDto.java

@ -18,19 +18,21 @@ public class LpkGoodsDto implements Dto {
private String barcode; private String barcode;
private String name; private String name;
private String unitName; private String unitName;
private String unitSid;
private String typeCode; private String typeCode;
private String price; private String price;
private String picUrl; private String picUrl;
private String appContent; private String appContent;
private String specificationUnit; private String specificationUnit;
private String specificationUnitSid;
private double number; private double number;
private String content; private String content;
private String weight; private String weight;
private String useTo; private String useTo;
private Long brandId; // 品牌ID'; private String brandId; // 品牌ID';
private String brandName; // 品牌名称'; private String brandName; // 品牌名称';
private Long categoryId; // 类别ID'; private String categoryId; // 类别ID';
private String categoryName; // 类别名称'; private String categoryName; // 类别名称';
@ApiModelProperty("阶梯重量") @ApiModelProperty("阶梯重量")
@ -39,4 +41,10 @@ public class LpkGoodsDto implements Dto {
private String stepPrice; private String stepPrice;
private String periodValidity; private String periodValidity;
private String sort; private String sort;
private String useOrgSid;
private String createOrgSid;
private String userSid;
private String signSid;//标识sid 用于两端系统相对应
private String skuSid;
} }

9
ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoodsQuery.java

@ -2,6 +2,7 @@ package com.yxt.ordermall.api.lpkgoods;
import com.yxt.common.core.query.Query; import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
@ -17,4 +18,12 @@ public class LpkGoodsQuery implements Query {
private String brandId; private String brandId;
private String periodValidity; private String periodValidity;
private String now; private String now;
private String orgLevelKey;//权限等级
@ApiModelProperty("菜单路由")
private String menuUrl;
@ApiModelProperty("组织全路径sid")
private String orgPath;
@ApiModelProperty("用户sid")
private String userSid;
private int index;
} }

4
ordermall/src/main/java/com/yxt/ordermall/api/lpkgoods/LpkGoodsVo.java

@ -36,9 +36,9 @@ public class LpkGoodsVo implements Vo {
private String useTo; private String useTo;
private String weight; private String weight;
private Long brandId; // 品牌ID'; private String brandId; // 品牌ID';
private String brandName; // 品牌名称'; private String brandName; // 品牌名称';
private Long categoryId; // 类别ID'; private String categoryId; // 类别ID';
private String categoryName; // 类别名称'; private String categoryName; // 类别名称';
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date periodValidity; private Date periodValidity;

44
ordermall/src/main/java/com/yxt/ordermall/apiadmin/AdminMallRest.java

@ -4,11 +4,15 @@ import com.yxt.common.core.result.ResultBean;
import com.yxt.ordermall.apiadmin.vo.PmsBrandVo; import com.yxt.ordermall.apiadmin.vo.PmsBrandVo;
import com.yxt.ordermall.apiadmin.vo.PmsProductCategoryVo; import com.yxt.ordermall.apiadmin.vo.PmsProductCategoryVo;
import com.yxt.ordermall.adminservice.AdminMallService; import com.yxt.ordermall.adminservice.AdminMallService;
import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoVo;
import com.yxt.ordermall.biz.func.basegoodstype.BaseGoodsTypeVo;
import com.yxt.ordermall.feign.base.basebrandinfo.BaseBrandInfoFeign;
import com.yxt.ordermall.feign.base.basegoodstype.BaseGoodsTypeFeign;
import com.yxt.ordermall.utils.OrgPathQuery;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ArrayList;
import java.util.List; import java.util.List;
@RestController("com.yxt.ordermall.adminapi.AdminMallRest") @RestController("com.yxt.ordermall.adminapi.AdminMallRest")
@ -17,17 +21,35 @@ public class AdminMallRest {
@Autowired @Autowired
private AdminMallService adminMallService; private AdminMallService adminMallService;
@Autowired
BaseBrandInfoFeign baseBrandInfoFeign;
@Autowired
BaseGoodsTypeFeign baseGoodsTypeFeign;
@GetMapping(value = "/listAllBrand") @PostMapping(value = "/listAllBrand")
public ResultBean<List<PmsBrandVo>> listAllBrand() { public ResultBean<List<PmsBrandVo>> listAllBrand(@RequestBody OrgPathQuery query) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
List<PmsBrandVo> list = adminMallService.listBrand(); ResultBean<List<BaseBrandInfoVo>> list=baseBrandInfoFeign.listAll(query);
return rb.success().setData(list); List<PmsBrandVo> brandVos=new ArrayList<>();
for (BaseBrandInfoVo datum : list.getData()) {
PmsBrandVo vo=new PmsBrandVo();
vo.setName(datum.getBrandName());
vo.setSid(datum.getSid());
brandVos.add(vo);
}
return rb.success().setData(brandVos);
} }
@GetMapping(value = "/listAllCategory") @PostMapping(value = "/listAllCategory")
public ResultBean<List<PmsBrandVo>> listAllCategory() { public ResultBean<List<PmsBrandVo>> listAllCategory(@RequestBody OrgPathQuery query) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
List<PmsProductCategoryVo> list = adminMallService.listAllCategory(); ResultBean<List<BaseGoodsTypeVo>> list=baseGoodsTypeFeign.listAll(query);
return rb.success().setData(list); List<PmsProductCategoryVo> list1 = new ArrayList<>();
for (BaseGoodsTypeVo datum : list.getData()) {
PmsProductCategoryVo pmsProductCategoryVo=new PmsProductCategoryVo();
pmsProductCategoryVo.setName(datum.getGoodsTypeName());
pmsProductCategoryVo.setSid(datum.getSid());
list1.add(pmsProductCategoryVo);
}
return rb.success().setData(list1);
} }
} }

69
ordermall/src/main/java/com/yxt/ordermall/apiadmin/aggregation/BaseGoodsUnitRest.java

@ -0,0 +1,69 @@
package com.yxt.ordermall.apiadmin.aggregation;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.ordermall.biz.func.basegoodsunit.BaseGoodsUnitDto;
import com.yxt.ordermall.biz.func.basegoodsunit.BaseGoodsUnitQuery;
import com.yxt.ordermall.biz.func.basegoodsunit.BaseGoodsUnitService;
import com.yxt.ordermall.biz.func.basegoodsunit.BaseGoodsUnitVo;
import com.yxt.ordermall.utils.OrgPathQuery;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author wangpengfei
* @date 2024/3/8 9:19
*/
@Api(tags = "商品类型")
@RestController
@RequestMapping("/apiadmin/base/basegoodsunit")
public class BaseGoodsUnitRest {
@Autowired
BaseGoodsUnitService baseGoodsUnitService;
@ApiOperation("分页列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<BaseGoodsUnitVo>> listPage(@RequestBody PagerQuery<BaseGoodsUnitQuery> pq) {
return baseGoodsUnitService.listPage(pq);
}
@ApiOperation("查询所有的类别")
@PostMapping("/listAll")
public ResultBean<List<BaseGoodsUnitVo>> listAll(@RequestBody OrgPathQuery query) {
return baseGoodsUnitService.listAll(query);
}
@ApiOperation("保存修改")
@PostMapping("/saveOrUpdate")
public ResultBean<String> saveOrUpdate(@RequestBody BaseGoodsUnitDto dto) {
return baseGoodsUnitService.saveOrUpdate(dto);
}
@ApiOperation("初始化")
@GetMapping("/initialization/{sid}")
public ResultBean<BaseGoodsUnitVo> initialization(@PathVariable("sid") String sid) {
return baseGoodsUnitService.initialization(sid);
}
@ApiOperation("删除")
@DeleteMapping("/delete/{sid}")
public ResultBean delete(@PathVariable("sid") String sid) {
return baseGoodsUnitService.delete(sid);
}
@ApiOperation("删除")
@DeleteMapping("/delBySids")
public ResultBean delBySids(@RequestBody String[] sids) {
return baseGoodsUnitService.delAll(sids);
}
@ApiOperation("更改可用状态")
@GetMapping("/updateIsEnable/{sid}/{isEnable}")
public ResultBean updateIsEnable(@PathVariable("sid") String sid,@PathVariable("isEnable")String isEnable) {
return baseGoodsUnitService.updateIsEnable(sid,isEnable);
}
}

110
ordermall/src/main/java/com/yxt/ordermall/apiadmin/aggregation/PmsBrandRest.java

@ -3,12 +3,16 @@ package com.yxt.ordermall.apiadmin.aggregation;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yxt.common.base.config.component.FileUploadComponent;
import com.yxt.common.base.utils.StringUtils;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoDto; import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoDto;
import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoQuery; import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoQuery;
import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoVo; import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoVo;
import com.yxt.ordermall.biz.func.commonmethod.CommonMethod;
import com.yxt.ordermall.biz.func.commonmethod.DataRule;
import com.yxt.ordermall.feign.base.basebrandinfo.BaseBrandInfoFeign; import com.yxt.ordermall.feign.base.basebrandinfo.BaseBrandInfoFeign;
import com.yxt.ordermall.mallplus.biz.pms.service.IPmsBrandService; import com.yxt.ordermall.mallplus.biz.pms.service.IPmsBrandService;
import com.yxt.ordermall.mallplus.mbg.pms.entity.PmsBrand; import com.yxt.ordermall.mallplus.mbg.pms.entity.PmsBrand;
@ -43,18 +47,28 @@ public class PmsBrandRest {
private IPmsBrandService IPmsBrandService; private IPmsBrandService IPmsBrandService;
@Autowired @Autowired
BaseBrandInfoFeign baseBrandInfoFeign; BaseBrandInfoFeign baseBrandInfoFeign;
@Autowired
CommonMethod commonMethod;
@Autowired
private FileUploadComponent fileUploadComponent;
// @SysLog(MODULE = "pms", REMARK = "根据条件查询所有品牌表列表") // @SysLog(MODULE = "pms", REMARK = "根据条件查询所有品牌表列表")
@ApiOperation("根据条件查询所有品牌表列表") @ApiOperation("根据条件查询所有品牌表列表")
@GetMapping(value = "/list") @PostMapping(value = "/list")
public ResultBean getPmsBrandByPage(@RequestBody PagerQuery<BaseBrandInfoQuery> pq) { public ResultBean getPmsBrandByPage(@RequestBody PagerQuery<BaseBrandInfoQuery> pq) {
PmsBrand brand=new PmsBrand(); BaseBrandInfoQuery query=pq.getParams();
DataRule dataRule=commonMethod.dataRule(query.getOrgPath(),query.getMenuUrl(),query.getUserSid()).getData();
pq.getParams().setOrgLevelKey(dataRule.getDataRuleId());
pq.getParams().setIndex(dataRule.getIndex());
List<PmsBrand> brands=new ArrayList<>(); List<PmsBrand> brands=new ArrayList<>();
PagerVo vo=new PagerVo(); PagerVo vo=new PagerVo();
ResultBean<PagerVo<BaseBrandInfoVo>> voResultBean=baseBrandInfoFeign.listPage(pq); ResultBean<PagerVo<BaseBrandInfoVo>> voResultBean=baseBrandInfoFeign.listPage(pq);
for (BaseBrandInfoVo record : voResultBean.getData().getRecords()) { for (BaseBrandInfoVo record : voResultBean.getData().getRecords()) {
brand.setId(Long.valueOf(record.getBrandCode())); PmsBrand brand=new PmsBrand();
// brand.setId(Long.valueOf(record.getBrandCode()));
brand.setName(record.getBrandName()); brand.setName(record.getBrandName());
brand.setFirstLetter(record.getLetter()); brand.setFirstLetter(record.getLetter());
brand.setSid(record.getSid());
// brand.setSort(record.get); // brand.setSort(record.get);
brands.add(brand); brands.add(brand);
} }
@ -67,75 +81,67 @@ public class PmsBrandRest {
@ApiOperation("保存品牌表") @ApiOperation("保存品牌表")
@PostMapping(value = "/create") @PostMapping(value = "/create")
// @PreAuthorize("hasAuthority('pms:PmsBrand:create')") // @PreAuthorize("hasAuthority('pms:PmsBrand:create')")
public Object savePmsBrand(@RequestBody PmsBrand entity) { public ResultBean savePmsBrand(@RequestBody PmsBrand entity) {
BaseBrandInfoDto dto =new BaseBrandInfoDto(); BaseBrandInfoDto dto =new BaseBrandInfoDto();
dto.setBrandCode(entity.getId().toString()); BeanUtil.copyProperties(entity,dto);
// dto.setBrandCode(entity.getId().toString());
dto.setRemarks(entity.getBrandStory());
String urlPrefix = fileUploadComponent.getUrlPrefix();
if(StringUtils.isNotBlank(entity.getLogo())){
String path = entity.getLogo().substring(urlPrefix.length());
dto.setImage(path);
}
dto.setBrandName(entity.getName()); dto.setBrandName(entity.getName());
// dto.set dto.setLetter(entity.getFirstLetter());
baseBrandInfoFeign.saveOrUpdate(dto);
try { return baseBrandInfoFeign.saveOrUpdate(dto);
if (IPmsBrandService.save(entity)) {
return new CommonResult().success();
}
} catch (Exception e) {
log.error("保存品牌表:%s", e.getMessage(), e);
return new CommonResult().failed();
}
return new CommonResult().failed();
} }
// @SysLog(MODULE = "pms", REMARK = "更新品牌表") // @SysLog(MODULE = "pms", REMARK = "更新品牌表")
@ApiOperation("更新品牌表") @ApiOperation("更新品牌表")
@PostMapping(value = "/update/{id}") @PostMapping(value = "/update/{id}")
public Object updatePmsBrand(@RequestBody PmsBrand entity) { public Object updatePmsBrand(@RequestBody PmsBrand entity) {
try { BaseBrandInfoDto dto =new BaseBrandInfoDto();
if (IPmsBrandService.updateById(entity)) { BeanUtil.copyProperties(entity,dto);
return new CommonResult().success(); // dto.setBrandCode(entity.getId().toString());
} dto.setRemarks(entity.getBrandStory());
} catch (Exception e) { String urlPrefix = fileUploadComponent.getUrlPrefix();
log.error("更新品牌表:%s", e.getMessage(), e); if(StringUtils.isNotBlank(entity.getLogo())){
return new CommonResult().failed(); String path = entity.getLogo().substring(urlPrefix.length());
dto.setImage(path);
} }
return new CommonResult().failed(); dto.setBrandName(entity.getName());
dto.setLetter(entity.getFirstLetter());
return baseBrandInfoFeign.saveOrUpdate(dto);
} }
// @SysLog(MODULE = "pms", REMARK = "删除品牌表") // @SysLog(MODULE = "pms", REMARK = "删除品牌表")
@ApiOperation("删除品牌表") @ApiOperation("删除品牌表")
@GetMapping(value = "/delete/{id}") @DeleteMapping(value = "/delete")
// @PreAuthorize("hasAuthority('pms:PmsBrand:delete')") // @PreAuthorize("hasAuthority('pms:PmsBrand:delete')")
public Object deletePmsBrand(@ApiParam("品牌表id") @PathVariable Long id) { public Object deletePmsBrand( @RequestBody String [] sids) {
try { return baseBrandInfoFeign.delBySids(sids);
if (ValidatorUtils.empty(id)) {
return new CommonResult().paramFailed("品牌表id");
}
if (IPmsBrandService.removeById(id)) {
return new CommonResult().success();
}
} catch (Exception e) {
log.error("删除品牌表:%s", e.getMessage(), e);
return new CommonResult().failed();
}
return new CommonResult().failed();
} }
// @SysLog(MODULE = "pms", REMARK = "给品牌表分配品牌表") // @SysLog(MODULE = "pms", REMARK = "给品牌表分配品牌表")
@ApiOperation("查询品牌表明细") @ApiOperation("查询品牌表明细")
@GetMapping(value = "/{id}") @GetMapping(value = "/{sid}")
public Object getPmsBrandById(@ApiParam("品牌表id") @PathVariable Long id) { public Object getPmsBrandById(@ApiParam("sid") @PathVariable String sid) {
try { ResultBean<BaseBrandInfoVo> bean= baseBrandInfoFeign.initialization(sid);
if (ValidatorUtils.empty(id)) { PmsBrand coupon =new PmsBrand();
return new CommonResult().paramFailed("品牌表id"); BeanUtil.copyProperties(bean.getData(),coupon);
} coupon.setName(bean.getData().getBrandName());
PmsBrand coupon = IPmsBrandService.getById(id); coupon.setBrandStory(bean.getData().getRemarks());
return new CommonResult().success(coupon); coupon.setFirstLetter(bean.getData().getLetter());
} catch (Exception e) { coupon.setUseOrgSid(bean.getData().getUseOrgSid());
log.error("查询品牌表明细:%s", e.getMessage(), e); coupon.setCreateOrgSid(bean.getData().getCreateOrgSid());
return new CommonResult().failed(); coupon.setUserSid(bean.getData().getCreateOrgSid());
if(StringUtils.isNotBlank(bean.getData().getImage())){
coupon.setLogo(fileUploadComponent.getUrlPrefix()+bean.getData().getImage());
} }
// coupon.setId(Long.valueOf(bean.getData().getBrandCode()));
return new ResultBean<>().success().setData(coupon);
} }
@ApiOperation(value = "批量删除品牌表") @ApiOperation(value = "批量删除品牌表")

223
ordermall/src/main/java/com/yxt/ordermall/apiadmin/aggregation/PmsProductCategoryRest.java

@ -0,0 +1,223 @@
package com.yxt.ordermall.apiadmin.aggregation;
import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo;
import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoQuery;
import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoVo;
import com.yxt.ordermall.biz.func.basegoodstype.BaseGoodsTypeDto;
import com.yxt.ordermall.biz.func.basegoodstype.BaseGoodsTypeQuery;
import com.yxt.ordermall.biz.func.basegoodstype.BaseGoodsTypeVo;
import com.yxt.ordermall.biz.func.commonmethod.CommonMethod;
import com.yxt.ordermall.biz.func.commonmethod.DataRule;
import com.yxt.ordermall.feign.base.basegoodstype.BaseGoodsTypeFeign;
import com.yxt.ordermall.mallplus.biz.pms.service.IPmsProductCategoryService;
import com.yxt.ordermall.mallplus.mbg.pms.entity.PmsBrand;
import com.yxt.ordermall.mallplus.mbg.pms.entity.PmsProductCategory;
import com.yxt.ordermall.mallplus.mbg.pms.vo.PmsProductCategoryWithChildrenItem;
import com.zscat.mallplus.utils.CommonResult;
import com.zscat.mallplus.utils.ValidatorUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
/**
* <p>
* 产品分类
* </p>
*
* @author zscat
* @since 2019-04-19
*/
@Slf4j
@RestController
@Api(tags = "PmsProductCategoryController", description = "产品分类管理")
@RequestMapping("/pms/PmsProductCategory")
public class PmsProductCategoryRest {
@Resource
private IPmsProductCategoryService IPmsProductCategoryService;
@Autowired
BaseGoodsTypeFeign baseGoodsTypeFeign;
@Autowired
CommonMethod commonMethod;
// // @SysLog(MODULE = "pms", REMARK = "根据条件查询所有产品分类列表")
// @ApiOperation("根据条件查询所有产品分类列表")
// @PostMapping(value = "/list")
// public Object getPmsProductCategoryByPage(@RequestBody PagerQuery<BaseGoodsTypeQuery> pq) {
// BaseGoodsTypeQuery query=pq.getParams();
// DataRule dataRule=commonMethod.dataRule(query.getOrgPath(),query.getMenuUrl(),query.getUserSid()).getData();
// pq.getParams().setOrgLevelKey(dataRule.getDataRuleId());
// pq.getParams().setIndex(dataRule.getIndex());
// PmsProductCategory c=new PmsProductCategory();
// List<PmsProductCategory> list=new ArrayList<>();
// PagerVo vo=new PagerVo();
// ResultBean<PagerVo<BaseGoodsTypeVo>> voResultBean= baseGoodsTypeFeign.listPage(pq);
// for (BaseGoodsTypeVo record : voResultBean.getData().getRecords()) {
// c.setId(Long.valueOf(record.getGoodsTypeCode()));
// c.setName(record.getGoodsTypeName());
// list.add(c);
// }
// BeanUtil.copyProperties(voResultBean.getData(),vo);
// vo.setRecords(list);
// return new ResultBean<>().success().setData(vo);
// }
@ApiOperation("分页查询商品分类")
@PostMapping(value = "/list")
@ResponseBody
public ResultBean getList(@RequestBody PagerQuery<BaseGoodsTypeQuery> pq) {
BaseGoodsTypeQuery query=pq.getParams();
DataRule dataRule=commonMethod.dataRule(query.getOrgPath(),query.getMenuUrl(),query.getUserSid()).getData();
pq.getParams().setOrgLevelKey(dataRule.getDataRuleId());
pq.getParams().setIndex(dataRule.getIndex());
List<PmsProductCategory> list=new ArrayList<>();
PagerVo vo=new PagerVo();
ResultBean<PagerVo<BaseGoodsTypeVo>> voResultBean= baseGoodsTypeFeign.listPage(pq);
for (BaseGoodsTypeVo record : voResultBean.getData().getRecords()) {
PmsProductCategory c=new PmsProductCategory();
// c.setId(Long.valueOf(record.getGoodsTypeCode()));
c.setDescription(record.getRemarks());
c.setName(record.getGoodsTypeName());
c.setSid(record.getSid());
c.setShowStatus(record.getIsEnable());
list.add(c);
}
BeanUtil.copyProperties(voResultBean.getData(),vo);
vo.setRecords(list);
return new ResultBean<>().success().setData(vo);
}
// @SysLog(MODULE = "pms", REMARK = "保存产品分类")
@ApiOperation("保存产品分类")
@PostMapping(value = "/create")
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:create')")
public Object savePmsProductCategory(@RequestBody PmsProductCategory entity) {
BaseGoodsTypeDto dto =new BaseGoodsTypeDto();
BeanUtil.copyProperties(entity,dto);
// dto.setGoodsTypeCode(entity.getId().toString());
dto.setRemarks(entity.getDescription());
dto.setGoodsTypeName(entity.getName());
dto.setIsEnable(entity.getShowStatus());
return baseGoodsTypeFeign.saveOrUpdate(dto);
}
// @SysLog(MODULE = "pms", REMARK = "更新产品分类")
@ApiOperation("更新产品分类")
@PostMapping(value = "/update/{id}")
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
public Object updatePmsProductCategory(@RequestBody PmsProductCategory entity) {
BaseGoodsTypeDto dto =new BaseGoodsTypeDto();
BeanUtil.copyProperties(entity,dto);
// dto.setGoodsTypeCode(entity.getId().toString());
dto.setRemarks(entity.getDescription());
dto.setGoodsTypeName(entity.getName());
dto.setIsEnable(entity.getShowStatus());
return baseGoodsTypeFeign.saveOrUpdate(dto);
}
// @SysLog(MODULE = "pms", REMARK = "删除产品分类")
@ApiOperation("删除产品分类")
@DeleteMapping(value = "/delete")
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:delete')")
public Object deletePmsProductCategory(@ApiParam("产品分类id") @RequestBody String [] sids) {
return baseGoodsTypeFeign.delBySids(sids);
}
// @SysLog(MODULE = "pms", REMARK = "给产品分类分配产品分类")
@ApiOperation("查询产品分类明细")
@GetMapping(value = "/{sid}")
public Object getPmsProductCategoryById(@ApiParam("产品分类id") @PathVariable String sid) {
ResultBean<BaseGoodsTypeVo> bean= baseGoodsTypeFeign.initialization(sid);
PmsProductCategory coupon =new PmsProductCategory();
BeanUtil.copyProperties(bean.getData(),coupon);
coupon.setName(bean.getData().getGoodsTypeName());
coupon.setDescription(bean.getData().getRemarks());
coupon.setUseOrgSid(bean.getData().getUseOrgSid());
coupon.setCreateOrgSid(bean.getData().getCreateOrgSid());
coupon.setShowStatus(bean.getData().getIsEnable());
coupon.setUserSid(bean.getData().getCreateOrgSid());
return new ResultBean<>().success().setData(coupon);
}
@ApiOperation(value = "批量删除产品分类")
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET)
@ResponseBody
// @SysLog(MODULE = "pms", REMARK = "批量删除产品分类")
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:delete')")
public Object deleteBatch(@RequestParam("ids") List<Long> ids) {
boolean count = IPmsProductCategoryService.removeByIds(ids);
if (count) {
return new CommonResult().success(count);
} else {
return new CommonResult().failed();
}
}
@ApiOperation("查询所有一级分类及子分类")
@RequestMapping(value = "/list/withChildren", method = RequestMethod.GET)
@ResponseBody
public Object listWithChildren() {
List<PmsProductCategoryWithChildrenItem> list = IPmsProductCategoryService.listWithChildren();
return new CommonResult().success(list);
}
@ApiOperation("修改导航栏显示状态")
@RequestMapping(value = "/update/navStatus", method = RequestMethod.POST)
@ResponseBody
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
public Object updateNavStatus(@RequestParam("ids") Long ids, @RequestParam("navStatus") Integer navStatus) {
PmsProductCategory entity = new PmsProductCategory();
entity.setId(ids);
entity.setNavStatus(navStatus);
if (IPmsProductCategoryService.updateById(entity)) {
return new CommonResult().success();
} else {
return new CommonResult().failed();
}
}
// public Object updateNavStatus(@RequestParam("ids") List<Long> ids, @RequestParam("navStatus") Integer navStatus) {
// int count = IPmsProductCategoryService.updateNavStatus(ids, navStatus);
// if (count > 0) {
// return new CommonResult().success(count);
// } else {
// return new CommonResult().failed();
// }
// }
@ApiOperation("修改显示状态")
@RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
@ResponseBody
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
public Object updateShowStatus(@RequestParam("sid") String sid, @RequestParam("showStatus") Integer showStatus) {
return baseGoodsTypeFeign.updateIsEnable(sid,String.valueOf(showStatus));
}
@ApiOperation("修改首页显示状态")
@RequestMapping(value = "/update/indexStatus", method = RequestMethod.POST)
@ResponseBody
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
public Object updateIndexStatus(@RequestParam("ids") Long ids, @RequestParam("indexStatus") Integer indexStatus) {
PmsProductCategory entity = new PmsProductCategory();
entity.setId(ids);
entity.setIndexStatus(indexStatus);
if (IPmsProductCategoryService.updateById(entity)) {
return new CommonResult().success();
} else {
return new CommonResult().failed();
}
}
}

9
ordermall/src/main/java/com/yxt/ordermall/apiadmin/vo/PmsBrandVo.java

@ -1,6 +1,7 @@
package com.yxt.ordermall.apiadmin.vo; package com.yxt.ordermall.apiadmin.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data; import lombok.Data;
@Data @Data
@ -27,4 +28,12 @@ public class PmsBrandVo {
* 专区大图 * 专区大图
*/ */
private String bigPic; private String bigPic;
@TableField(exist = false)
private String sid;
@TableField(exist = false)
private String useOrgSid;//使用组织sid
@TableField(exist = false)
private String createOrgSid;//创建组织sid
@TableField(exist = false)
private String userSid;
} }

1
ordermall/src/main/java/com/yxt/ordermall/apiadmin/vo/PmsProductCategoryVo.java

@ -8,6 +8,7 @@ public class PmsProductCategoryVo {
private Long parentId; private Long parentId;
private String name; private String name;
private String sid;
private Integer level; private Integer level;
private Integer sort; private Integer sort;

1
ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodssku/BaseGoodsSku.java

@ -19,4 +19,5 @@ public class BaseGoodsSku extends BaseEntity {
private String ownSpec;//sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序 private String ownSpec;//sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序
private String barCode;//条形码 private String barCode;//条形码
private String aidBarCode;//辅助条码 private String aidBarCode;//辅助条码
private String signSid;
} }

3
ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodssku/BaseGoodsSkuDto.java

@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.dto.Dto; import com.yxt.common.core.dto.Dto;
import com.yxt.ordermall.biz.func.basegoodsskuextend.BaseGoodsSkuExtendDto; import com.yxt.ordermall.biz.func.basegoodsskuextend.BaseGoodsSkuExtendDto;
import com.yxt.ordermall.biz.lpkgoods.GoodsSkuSubunitDto;
import lombok.Data; import lombok.Data;
import java.util.Date; import java.util.Date;
@ -30,4 +31,6 @@ public class BaseGoodsSkuDto implements Dto {
private BaseGoodsSkuExtendDto baseGoodsSkuExtend;//sku扩展 private BaseGoodsSkuExtendDto baseGoodsSkuExtend;//sku扩展
private String barCode;//条形码 private String barCode;//条形码
private String aidBarCode;//辅助条码 private String aidBarCode;//辅助条码
private GoodsSkuSubunitDto goodsSkuSubunit;
private String signSid;
} }

9
ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodssku/BaseGoodsSkuQuery.java

@ -1,6 +1,7 @@
package com.yxt.ordermall.biz.func.basegoodssku; package com.yxt.ordermall.biz.func.basegoodssku;
import com.yxt.common.core.query.Query; import com.yxt.common.core.query.Query;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
/** /**
@ -10,4 +11,12 @@ import lombok.Data;
@Data @Data
public class BaseGoodsSkuQuery implements Query { public class BaseGoodsSkuQuery implements Query {
private String name; private String name;
private String orgLevelKey;//权限等级
@ApiModelProperty("菜单路由")
private String menuUrl;
@ApiModelProperty("组织全路径sid")
private String orgPath;
@ApiModelProperty("用户sid")
private String userSid;
private int index;
} }

41
ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodssku/GoodsSkuVo1.java

@ -0,0 +1,41 @@
package com.yxt.ordermall.biz.func.basegoodssku;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/12/5 9:01
*/
@Data
public class GoodsSkuVo1 {
private String id;
private String sid;
private String lockVersion;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date modifyTime;
private String remarks;
private String isEnable;
private String state;
private String isDelete;
private String title;//商品Skutitle
private String skuSid;//
private String goodsSkuCode;//skuCode
private String barCode;//条码
private String picUrl;//图片
private String salesPrice;//销售价格
private String sortNo;//排序
private String goodsName;//spuName
private String goodsCode;//spuName
private String spuSid;//
private String unitName;//单位
private String unitSid;//
private String goodsTypeName;//分类
private String typeSid;//
private String brandName;//品牌
private String brandSid;//
}

1
ordermall/src/main/java/com/yxt/ordermall/biz/func/basegoodsspu/BaseGoodsSpuDto.java

@ -20,6 +20,7 @@ public class BaseGoodsSpuDto implements Dto {
private String sid; private String sid;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime; private Date createTime;
private String createBySid;
private String remarks; private String remarks;
private String isEnable; private String isEnable;
private String goodsCode;//商品代码 private String goodsCode;//商品代码

31
ordermall/src/main/java/com/yxt/ordermall/biz/lpkgoods/GoodsSkuSubunitDto.java

@ -0,0 +1,31 @@
package com.yxt.ordermall.biz.lpkgoods;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.yxt.common.core.dto.Dto;
import lombok.Data;
import java.util.Date;
/**
* @author wangpengfei
* @date 2024/2/26 13:38
*/
@Data
public class GoodsSkuSubunitDto implements Dto {
private String id;
private String sid;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date createTime;
private String remarks;
private String isEnable;
private String skuSid;//
private String unitName;//计量单位名称
private String unitBarCode;//计量单位名称
private String ruler;//换算规则(该单位与基础单位的量级关系)数字类型
private String price;//销售价格后续害应该包括采购价、销售价、批发价、参考成本等多个价格字段
private String weight;//重量
private String volume;//体积
private String vLength;//长
private String vWidth;//宽
private String vHeight;//高
}

5
ordermall/src/main/java/com/yxt/ordermall/biz/lpkgoods/LpkGoodsRest.java

@ -6,6 +6,7 @@ import com.yxt.common.core.vo.PagerVo;
import com.yxt.ordermall.api.appletgiftbag.MyGoodsVo; import com.yxt.ordermall.api.appletgiftbag.MyGoodsVo;
import com.yxt.ordermall.api.lpkgiftcard.LpkGiftCardQuery; import com.yxt.ordermall.api.lpkgiftcard.LpkGiftCardQuery;
import com.yxt.ordermall.api.lpkgoods.*; import com.yxt.ordermall.api.lpkgoods.*;
import com.yxt.ordermall.utils.OrgPathQuery;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -100,8 +101,8 @@ public class LpkGoodsRest {
} }
@ApiOperation("获取所有的商品类型和品牌") @ApiOperation("获取所有的商品类型和品牌")
@GetMapping("/getGoodsTypeAndBrand") @GetMapping("/getGoodsTypeAndBrand")
public ResultBean getGoodsTypeAndBrand() { public ResultBean getGoodsTypeAndBrand(@RequestBody OrgPathQuery query) {
return lpkGoodsService.getGoodsTypeAndBrand(); return lpkGoodsService.getGoodsTypeAndBrand(query);
} }
@ApiOperation("根据类型查询商品") @ApiOperation("根据类型查询商品")
@PostMapping("/getGoodsByType") @PostMapping("/getGoodsByType")

300
ordermall/src/main/java/com/yxt/ordermall/biz/lpkgoods/LpkGoodsService.java

@ -2,6 +2,7 @@ package com.yxt.ordermall.biz.lpkgoods;
import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.date.DateTime; import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.yxt.common.base.config.component.FileUploadComponent; import com.yxt.common.base.config.component.FileUploadComponent;
@ -21,21 +22,36 @@ import com.yxt.ordermall.api.shoppingcart.ShoppingCart;
import com.yxt.ordermall.api.shoppingcart.ShoppingCartQuery; import com.yxt.ordermall.api.shoppingcart.ShoppingCartQuery;
import com.yxt.ordermall.api.shoppingcart.ShoppingCartVo; import com.yxt.ordermall.api.shoppingcart.ShoppingCartVo;
import com.yxt.ordermall.biz.enterprisecertification.EnterpriseCertificationService; import com.yxt.ordermall.biz.enterprisecertification.EnterpriseCertificationService;
import com.yxt.ordermall.biz.func.basebrandinfo.BaseBrandInfoVo;
import com.yxt.ordermall.biz.func.basegoodssku.*;
import com.yxt.ordermall.biz.func.basegoodsskuextend.BaseGoodsSkuExtendDto;
import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuDto;
import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuVo;
import com.yxt.ordermall.biz.func.basegoodsspudetail.BaseGoodsSpuDetailDto;
import com.yxt.ordermall.biz.func.basegoodstype.BaseGoodsTypeQuery;
import com.yxt.ordermall.biz.func.basegoodstype.BaseGoodsTypeVo;
import com.yxt.ordermall.biz.func.commonmethod.CommonMethod;
import com.yxt.ordermall.biz.func.commonmethod.DataRule;
import com.yxt.ordermall.biz.lpkcustomer.LpkCustomerService; import com.yxt.ordermall.biz.lpkcustomer.LpkCustomerService;
import com.yxt.ordermall.biz.shoppingcart.ShoppingCartService; import com.yxt.ordermall.biz.shoppingcart.ShoppingCartService;
import com.yxt.ordermall.feign.base.basebrandinfo.BaseBrandInfoFeign;
import com.yxt.ordermall.feign.base.basegoodssku.BaseGoodsSkuFeign;
import com.yxt.ordermall.feign.base.basegoodsspu.BaseGoodsSpuFeign;
import com.yxt.ordermall.feign.base.basegoodstype.BaseGoodsTypeFeign;
import com.yxt.ordermall.mallplus.biz.pms.service.IPmsBrandService; import com.yxt.ordermall.mallplus.biz.pms.service.IPmsBrandService;
import com.yxt.ordermall.mallplus.mbg.pms.entity.PmsBrand; import com.yxt.ordermall.mallplus.mbg.pms.entity.PmsBrand;
import com.yxt.ordermall.mallplus.mbg.pms.entity.brand.BrandVo; import com.yxt.ordermall.mallplus.mbg.pms.entity.brand.BrandVo;
import com.yxt.ordermall.utils.DoubleUtils; import com.yxt.ordermall.utils.DoubleUtils;
import com.yxt.ordermall.utils.OrgPathQuery;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import java.awt.*;
import java.awt.event.InputEvent;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.text.DecimalFormat; import java.text.DecimalFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.ArrayList; import java.util.*;
import java.util.Collections;
import java.util.Date;
import java.util.List; import java.util.List;
/** /**
@ -55,77 +71,162 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
LpkCustomerService lpkCustomerService; LpkCustomerService lpkCustomerService;
@Autowired @Autowired
EnterpriseCertificationService enterpriseCertificationService; EnterpriseCertificationService enterpriseCertificationService;
@Autowired
CommonMethod commonMethod;
@Autowired
BaseGoodsSkuFeign baseGoodsSkuFeign;
@Autowired
BaseGoodsSpuFeign baseGoodsSpuFeign;
@Autowired
BaseGoodsTypeFeign baseGoodsTypeFeign;
@Autowired
BaseBrandInfoFeign baseBrandInfoFeign;
public ResultBean<PagerVo<LpkGoodsVo>> goodsListPage(PagerQuery<LpkGoodsQuery> pq) { public ResultBean<PagerVo<LpkGoodsVo>> goodsListPage(PagerQuery<LpkGoodsQuery> pq) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
LpkGoodsQuery query = pq.getParams(); LpkGoodsQuery query = pq.getParams();
QueryWrapper<LpkGoods> qw = new QueryWrapper<>(); DataRule dataRule=commonMethod.dataRule(query.getOrgPath(),query.getMenuUrl(),query.getUserSid()).getData();
qw.eq("1", "1"); pq.getParams().setOrgLevelKey(dataRule.getDataRuleId());
if (StringUtils.isNotBlank(query.getName())) { pq.getParams().setIndex(dataRule.getIndex());
qw.like("name", query.getName()); PagerQuery<BaseGoodsSkuQuery> baseGoodsSkuQueryPagerQuery=new PagerQuery<>();
} BeanUtil.copyProperties(pq,baseGoodsSkuQueryPagerQuery);
qw.orderByAsc("sort"); ResultBean<PagerVo<GoodsSkuVo1>>sku= baseGoodsSkuFeign.listPage(baseGoodsSkuQueryPagerQuery);
IPage<LpkGoods> page = PagerUtil.queryToPage(pq); List<LpkGoodsVo> records = new ArrayList<>();
IPage<LpkGoodsVo> pagging = baseMapper.goodsListPage(page, qw); PagerVo vo=new PagerVo();
PagerVo<LpkGoodsVo> p = PagerUtil.pageToVo(pagging, null); BeanUtil.copyProperties(sku.getData(),vo);
List<LpkGoodsVo> records = pagging.getRecords(); LpkGoodsVo vv=new LpkGoodsVo();
records.removeAll(Collections.singleton(null)); for (GoodsSkuVo1 record : sku.getData().getRecords()) {
if (!records.isEmpty()) { vv.setCreateTime(new Date());
for (LpkGoodsVo record : records) { vv.setCode(record.getGoodsCode());
if (StringUtils.isNotBlank(record.getPicUrl())) { vv.setPrice(record.getSalesPrice());
record.setPicUrl(fileUploadComponent.getUrlPrefix() + record.getPicUrl()); vv.setBarcode(record.getBarCode());
} vv.setName(record.getGoodsName());
vv.setWeight(record.getTitle());
vv.setUnitName(record.getUnitName());
vv.setPrice(record.getSalesPrice());
vv.setBrandId(record.getBrandSid());
vv.setBrandName(record.getBrandName());
vv.setCategoryId(record.getTypeSid());
vv.setCategoryName(record.getGoodsTypeName());
vv.setSort(record.getSortNo());
vv.setSid(record.getSkuSid());
if (StringUtils.isNotBlank(record.getPicUrl())) {
vv.setPicUrl(fileUploadComponent.getUrlPrefix() + record.getPicUrl());
} }
LpkGoods lpkGoods = baseMapper.selectOne(new QueryWrapper<LpkGoods>().eq("skuSid", vv.getSid()));
vv.setIsAppletGrounding(lpkGoods.getIsAppletGrounding());
vv.setUseTo(lpkGoods.getUseTo());
records.add(vv);
} }
return rb.success().setData(p); vo.setRecords(records);
return rb.success().setData(vo);
} }
public ResultBean saveGoods(LpkGoodsDto dto) {
public ResultBean<String> saveGoods(LpkGoodsDto dto) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
String sid = ""; dto.setSignSid(UUID.randomUUID().toString());
if (StringUtils.isNotBlank(dto.getSid())) { BaseGoodsSpuDto spuDto=new BaseGoodsSpuDto();
sid = dto.getSid(); BaseGoodsSpuDetailDto detailDto=new BaseGoodsSpuDetailDto();
LpkGoods lpkGoods = fetchBySid(dto.getSid()); detailDto.setGoodsExplain(dto.getAppContent());
BeanUtil.copyProperties(dto, lpkGoods, "id", "sid"); spuDto.setSid(dto.getSid());
if (StringUtils.isNotBlank(dto.getPicUrl())) { spuDto.setBrandSid(dto.getBrandId());
String urlPrefix = fileUploadComponent.getUrlPrefix(); spuDto.setBrandName(dto.getBrandName());
String path = dto.getPicUrl().substring(urlPrefix.length()); spuDto.setGoodsName(dto.getName());
lpkGoods.setPicUrl(path); spuDto.setGoodsTypeName(dto.getCategoryName());
} spuDto.setGoodsTypeSid(dto.getCategoryId());
baseMapper.updateById(lpkGoods);
} else { spuDto.setGoodsUnitSid(dto.getSpecificationUnitSid());
LpkGoods goods=baseMapper.selectOne(new QueryWrapper<LpkGoods>().eq("name",dto.getName())); spuDto.setGoodsUnitName(dto.getSpecificationUnit());
if(null!=goods){ spuDto.setGoodsCode(dto.getCode());
return rb.setMsg("商品名不能重复"); spuDto.setBarCode(dto.getBarcode());
} spuDto.setUseOrgSid(dto.getUseOrgSid());
LpkGoods lpkGoods = new LpkGoods(); spuDto.setCreateOrgSid(dto.getUseOrgSid());
sid = lpkGoods.getSid(); spuDto.setCreateBySid(dto.getUserSid());
BeanUtil.copyProperties(dto, lpkGoods, "id", "sid"); spuDto.setSortNo(dto.getSort());
lpkGoods.setCreateTime(new DateTime()); List<BaseGoodsSkuDto> baseGoodsSkus=new ArrayList<>();//商品sku
if (StringUtils.isNotBlank(dto.getPicUrl())) { BaseGoodsSkuDto dto1=new BaseGoodsSkuDto();
String urlPrefix = fileUploadComponent.getUrlPrefix(); BaseGoodsSkuExtendDto extendDto=new BaseGoodsSkuExtendDto();
String path = dto.getPicUrl().substring(urlPrefix.length()); String urlPrefix = fileUploadComponent.getUrlPrefix();
lpkGoods.setPicUrl(path); if(StringUtils.isNotBlank(dto.getPicUrl())){
} String path = dto.getPicUrl().substring(urlPrefix.length());
baseMapper.insert(lpkGoods); extendDto.setPicUrl(path);
}
extendDto.setPackUnit(dto.getUnitName());
extendDto.setSalesPrice(dto.getPrice());
dto1.setSid(dto.getSkuSid());
dto1.setTitle(dto.getWeight());
dto1.setIndexes(dto.getRemarks());
dto1.setRemarks(dto.getContent());
dto1.setSignSid(dto.getSignSid());
baseGoodsSkus.add(dto1);
for (BaseGoodsSkuDto goodsSkus : baseGoodsSkus) {
goodsSkus.setBaseGoodsSkuExtend(extendDto);
} }
return rb.success().setData(sid); spuDto.setBaseGoodsSpuDetail(detailDto);
spuDto.setBaseGoodsSkus(baseGoodsSkus);
ResultBean<List<BaseGoodsSku>> listResultBean = baseGoodsSpuFeign.saveOrUpdateByName(spuDto);
if(!listResultBean.getCode().equals("200")){
return listResultBean;
}
List<BaseGoodsSku>skus= listResultBean.getData();
baseMapper.delete(new QueryWrapper<LpkGoods>().eq("spuSid",skus.get(0).getGoodsSpuSid()));
LpkGoods lpkGoods=new LpkGoods();
BeanUtil.copyProperties(dto,lpkGoods);
lpkGoods.setSid(UUID.randomUUID().toString());
lpkGoods.setSpuSid(skus.get(0).getGoodsSpuSid());
lpkGoods.setSkuSid(skus.get(0).getSid());
SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
lpkGoods.setPeriodValidity(sdf.format(new Date()));
lpkGoods.setSort("1");
baseMapper.insert(lpkGoods);
return rb.success().setMsg("成功");
} }
public ResultBean<LpkGoodsDetailsVo> goodsInit(String sid) { public ResultBean goodsInit(String sid) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
LpkGoodsDetailsVo vo = new LpkGoodsDetailsVo(); ResultBean<BaseGoodsSkuVo> w=baseGoodsSkuFeign.initialization(sid);
LpkGoods lpkGoods = fetchBySid(sid); if(!w.getCode().equals("200")){
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); return w;
if (null != lpkGoods) {
BeanUtil.copyProperties(lpkGoods, vo);
if (StringUtils.isNotBlank(lpkGoods.getPicUrl())) {
vo.setPicUrl(fileUploadComponent.getUrlPrefix() + lpkGoods.getPicUrl());
}
vo.setCreateTime(sdf.format(lpkGoods.getCreateTime()));
} }
return rb.success().setData(vo); ResultBean<BaseGoodsSpuVo> initialization = baseGoodsSpuFeign.initialization(w.getData().getGoodsSpuSid());
if(!initialization.getCode().equals("200")){
return initialization;
}
LpkGoods lpkGoods1 = baseMapper.selectOne(new QueryWrapper<LpkGoods>().eq("skuSid", w.getData().getSid()));
BaseGoodsSpuVo data = initialization.getData();
LpkGoodsDetailsVo lpkGoods = new LpkGoodsDetailsVo();
lpkGoods.setBarcode(data.getBarCode());
lpkGoods.setCreateTime(data.getCreateTime().toString());
lpkGoods.setCode(data.getGoodsCode());
lpkGoods.setName(data.getGoodsName());
lpkGoods.setUnitName(data.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getPackUnit());
// lpkGoods.setTypeCode();
lpkGoods.setPrice(data.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getSalesPrice());
lpkGoods.setAppContent(data.getBaseGoodsSpuDetail().getGoodsExplain());
lpkGoods.setSpecificationUnit(data.getGoodsUnitName());
lpkGoods.setSpecificationUnitSid(data.getGoodsUnitSid());
// lpkGoods.setNumber(d);
lpkGoods.setIsAppletGrounding(lpkGoods1.getIsAppletGrounding());
lpkGoods.setContent(data.getBaseGoodsSkus().get(0).getRemarks());
lpkGoods.setWeight(data.getBaseGoodsSkus().get(0).getTitle());
lpkGoods.setUseTo(lpkGoods1.getUseTo());
lpkGoods.setBrandId(data.getBrandSid());
lpkGoods.setBrandName(data.getBrandName());
lpkGoods.setCategoryId(data.getGoodsTypeSid());
lpkGoods.setCategoryName(data.getTypeName());
lpkGoods.setStepWeight(lpkGoods1.getStepWeight());
lpkGoods.setPeriodValidity(DateUtil.parse(lpkGoods1.getPeriodValidity()));
lpkGoods.setSort(data.getSortNo());
lpkGoods.setSpuSid(data.getSid());
lpkGoods.setSkuSid(data.getBaseGoodsSkus().get(0).getSid());
lpkGoods.setSid(data.getSid());
lpkGoods.setRemarks(data.getBaseGoodsSkus().get(0).getIndexes());
lpkGoods.setUseOrgSid(data.getUseOrgSid());
lpkGoods.setCreateOrgSid(data.getCreateOrgSid());
if (StringUtils.isNotBlank(data.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getPicUrl())) {
lpkGoods.setPicUrl(fileUploadComponent.getUrlPrefix() + data.getBaseGoodsSkus().get(0).getBaseGoodsSkuExtend().getPicUrl());
}
return rb.success().setData(lpkGoods);
} }
public ResultBean<LpkGoodsDetailsVo> goodsDetails(String sid,String customerSid) { public ResultBean<LpkGoodsDetailsVo> goodsDetails(String sid,String customerSid) {
@ -178,7 +279,7 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
public ResultBean appletGrounding(String sid,String state) { public ResultBean appletGrounding(String sid,String state) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
LpkGoods lpkGoods = fetchBySid(sid); LpkGoods lpkGoods=baseMapper.selectOne(new QueryWrapper<LpkGoods>().eq("skuSid",sid));
if (null != lpkGoods) { if (null != lpkGoods) {
lpkGoods.setIsAppletGrounding(state); lpkGoods.setIsAppletGrounding(state);
baseMapper.updateById(lpkGoods); baseMapper.updateById(lpkGoods);
@ -190,7 +291,8 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
} }
public ResultBean appletUseTo(String sid,String state) { public ResultBean appletUseTo(String sid,String state) {
ResultBean rb = ResultBean.fireFail(); ResultBean rb = ResultBean.fireFail();
LpkGoods lpkGoods = fetchBySid(sid); // LpkGoods lpkGoods = fetchBySid(sid);
LpkGoods lpkGoods=baseMapper.selectOne(new QueryWrapper<LpkGoods>().eq("skuSid",sid));
if (null != lpkGoods) { if (null != lpkGoods) {
lpkGoods.setUseTo(state); lpkGoods.setUseTo(state);
baseMapper.updateById(lpkGoods); baseMapper.updateById(lpkGoods);
@ -304,16 +406,33 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
List<GoodsTypeVo> list=baseMapper.getType(); List<GoodsTypeVo> list=baseMapper.getType();
return rb.success().setData(list); return rb.success().setData(list);
} }
public ResultBean<List<GoodsTypeVo>> getGoodsTypeAndBrand() { public ResultBean<List<GoodsTypeVo>> getGoodsTypeAndBrand(OrgPathQuery query) {
ResultBean rb=new ResultBean().fail(); ResultBean rb=new ResultBean().fail();
GoodsTypeVo vo=new GoodsTypeVo(); GoodsTypeVo vo=new GoodsTypeVo();
List<GoodsTypeVo> list=baseMapper.getType(); ResultBean<List<BaseGoodsTypeVo>> listResultBean = baseGoodsTypeFeign.listAll(query);
List<GoodsTypeVo> list=new ArrayList<>();
for (BaseGoodsTypeVo datum : listResultBean.getData()) {
GoodsTypeVo vo1=new GoodsTypeVo();
vo1.setName(datum.getGoodsTypeName());
// vo1.setId();
vo1.setSid(datum.getSid());
}
GoodsTypeVo vo1=new GoodsTypeVo(); GoodsTypeVo vo1=new GoodsTypeVo();
vo1.setName("全部分类"); vo1.setName("全部分类");
vo1.setId("0"); vo1.setId("0");
vo1.setSid("0");
list.add(0,vo1); list.add(0,vo1);
vo.setTypeVos(list); vo.setTypeVos(list);
List<BrandVo> list1= IPmsBrandService.getList().getData(); ResultBean<List<BaseBrandInfoVo>> listResultBean1 = baseBrandInfoFeign.listAll(query);
List<BrandVo> list1= new ArrayList<>();
for (BaseBrandInfoVo datum : listResultBean1.getData()) {
BrandVo vo2=new BrandVo();
vo2.setBrandName(datum.getBrandName());
vo2.setSid(datum.getSid());
list1.add(vo2);
}
vo.setBrandVos(list1); vo.setBrandVos(list1);
return rb.success().setData(vo); return rb.success().setData(vo);
} }
@ -396,10 +515,51 @@ public class LpkGoodsService extends MybatisBaseService<LpkGoodsMapper, LpkGoods
return rb.success(); return rb.success();
} }
public static void main(String[] args) { public static void main(String[] args) throws AWTException, InterruptedException {
double a =1.88; Robot robot = new Robot();
double b =10; // robot.delay(50000);
System.out.println(a*b); // 76, 198, 244;
int rgb = robot.getPixelColor(1629, 336).getBlue();
int rgb1 = robot.getPixelColor(1629, 336).getRed();
int rgb2= robot.getPixelColor(1629, 336).getGreen();
while (1==1){
if(rgb!=242){
if(rgb1!=80){
if(rgb2!=201){
System.out.println(1111);
// robot.mouseMove(1522, 562);
// robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
// robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
// robot.delay(100);
// robot.mouseMove(1674, 750);
// robot.delay(100);
// robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
// robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
// robot.delay(100);
// robot.mouseMove(1664, 400);
// robot.delay(2000);
// robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
// robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
// robot.delay(100);
// robot.mouseMove(1780,750);
// robot.delay(2000);
// robot.mousePress(InputEvent.BUTTON1_DOWN_MASK);
// robot.mouseRelease(InputEvent.BUTTON1_DOWN_MASK);
}
}
}else{
System.out.println(222);
Thread.sleep(2000);
}
}
// System.out.println(rgb);
// robot.mousePress();
// double a =1.88;
// double b =10;
// System.out.println(a*b);
} }
/** /**
* 去除多余.0 * 去除多余.0

6
ordermall/src/main/java/com/yxt/ordermall/feign/base/basegoodssku/BaseGoodsSkuFeign.java

@ -22,7 +22,9 @@ import java.util.List;
path = "/apiadmin/base/basegoodssku", path = "/apiadmin/base/basegoodssku",
fallback = BaseGoodsSkuFeignFallback.class) fallback = BaseGoodsSkuFeignFallback.class)
public interface BaseGoodsSkuFeign { public interface BaseGoodsSkuFeign {
@ApiOperation("分页列表")
@PostMapping("/listPage")
public ResultBean<PagerVo<GoodsSkuVo1>> listPage(@RequestBody PagerQuery<BaseGoodsSkuQuery> pq);
@ApiOperation("获取商品信息") @ApiOperation("获取商品信息")
@GetMapping("/getDetails") @GetMapping("/getDetails")
ResultBean<BaseGoodsSkuDetailsVo> getDetails(@RequestParam("sid") String sid); ResultBean<BaseGoodsSkuDetailsVo> getDetails(@RequestParam("sid") String sid);
@ -38,4 +40,6 @@ public interface BaseGoodsSkuFeign {
@ApiOperation("根据code查询商品") @ApiOperation("根据code查询商品")
@GetMapping("/getSkuByCode/{code}/{title}") @GetMapping("/getSkuByCode/{code}/{title}")
public ResultBean<BaseGoodsSku> getSkuByCode(@PathVariable("code") String code,@PathVariable("title") String title); public ResultBean<BaseGoodsSku> getSkuByCode(@PathVariable("code") String code,@PathVariable("title") String title);
} }

5
ordermall/src/main/java/com/yxt/ordermall/feign/base/basegoodssku/BaseGoodsSkuFeignFallback.java

@ -16,6 +16,11 @@ import java.util.List;
**/ **/
@Component @Component
public class BaseGoodsSkuFeignFallback implements BaseGoodsSkuFeign{ public class BaseGoodsSkuFeignFallback implements BaseGoodsSkuFeign{
@Override
public ResultBean<PagerVo<GoodsSkuVo1>> listPage(PagerQuery<BaseGoodsSkuQuery> pq) {
return null;
}
@Override @Override
public ResultBean<BaseGoodsSkuDetailsVo> getDetails(String sid) { public ResultBean<BaseGoodsSkuDetailsVo> getDetails(String sid) {
return null; return null;

5
ordermall/src/main/java/com/yxt/ordermall/feign/base/basegoodsspu/BaseGoodsSpuFeign.java

@ -3,6 +3,7 @@ package com.yxt.ordermall.feign.base.basegoodsspu;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
import com.yxt.ordermall.biz.func.basegoodssku.BaseGoodsSku;
import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuDto; import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuDto;
import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuQuery; import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuQuery;
import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuVo; import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuVo;
@ -35,7 +36,9 @@ public interface BaseGoodsSpuFeign {
@ApiOperation("保存修改") @ApiOperation("保存修改")
@PostMapping("/saveOrUpdate") @PostMapping("/saveOrUpdate")
public ResultBean<String> saveOrUpdate(@RequestBody BaseGoodsSpuDto dto); public ResultBean<String> saveOrUpdate(@RequestBody BaseGoodsSpuDto dto);
@ApiOperation("保存修改")
@PostMapping("/saveOrUpdateByName")
public ResultBean<List<BaseGoodsSku>> saveOrUpdateByName(@RequestBody BaseGoodsSpuDto dto);
@ApiOperation("初始化") @ApiOperation("初始化")
@GetMapping("/initialization/{sid}") @GetMapping("/initialization/{sid}")
public ResultBean<BaseGoodsSpuVo> initialization(@PathVariable("sid") String sid); public ResultBean<BaseGoodsSpuVo> initialization(@PathVariable("sid") String sid);

6
ordermall/src/main/java/com/yxt/ordermall/feign/base/basegoodsspu/BaseGoodsSpuFeignFallback.java

@ -3,6 +3,7 @@ package com.yxt.ordermall.feign.base.basegoodsspu;
import com.yxt.common.core.query.PagerQuery; import com.yxt.common.core.query.PagerQuery;
import com.yxt.common.core.result.ResultBean; import com.yxt.common.core.result.ResultBean;
import com.yxt.common.core.vo.PagerVo; import com.yxt.common.core.vo.PagerVo;
import com.yxt.ordermall.biz.func.basegoodssku.BaseGoodsSku;
import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuDto; import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuDto;
import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuQuery; import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuQuery;
import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuVo; import com.yxt.ordermall.biz.func.basegoodsspu.BaseGoodsSpuVo;
@ -31,6 +32,11 @@ public class BaseGoodsSpuFeignFallback implements BaseGoodsSpuFeign {
return null; return null;
} }
@Override
public ResultBean<List<BaseGoodsSku>> saveOrUpdateByName(BaseGoodsSpuDto dto) {
return null;
}
@Override @Override
public ResultBean<BaseGoodsSpuVo> initialization(String sid) { public ResultBean<BaseGoodsSpuVo> initialization(String sid) {
return null; return null;

168
ordermall/src/main/java/com/yxt/ordermall/mallplus/biz/pms/controller/PmsBrandController.java

@ -1,168 +0,0 @@
package com.yxt.ordermall.mallplus.biz.pms.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yxt.common.core.result.ResultBean;
import com.yxt.ordermall.mallplus.biz.pms.service.IPmsBrandService;
import com.yxt.ordermall.mallplus.mbg.pms.entity.PmsBrand;
import com.yxt.ordermall.mallplus.mbg.pms.entity.brand.BrandVo;
import com.zscat.mallplus.utils.CommonResult;
import com.zscat.mallplus.utils.ValidatorUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* <p>
* 品牌表
* </p>
*
* @author zscat
* @since 2019-04-19
*/
@Slf4j
@RestController
@Api(tags = "PmsBrandController", description = "品牌表管理")
@RequestMapping("/pms/PmsBrand")
public class PmsBrandController {
@Resource
private IPmsBrandService IPmsBrandService;
// @SysLog(MODULE = "pms", REMARK = "根据条件查询所有品牌表列表")
@ApiOperation("根据条件查询所有品牌表列表")
@GetMapping(value = "/list")
public Object getPmsBrandByPage(PmsBrand entity,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) {
try {
if (ValidatorUtils.notEmpty(entity.getName())) {
return new CommonResult().success(IPmsBrandService.page(new Page<PmsBrand>(pageNum, pageSize), new QueryWrapper<PmsBrand>(new PmsBrand()).like("name", entity.getName())));
}
return new CommonResult().success(IPmsBrandService.page(new Page<PmsBrand>(pageNum, pageSize), new QueryWrapper<>(entity)));
} catch (Exception e) {
log.error("根据条件查询所有品牌表列表:%s", e.getMessage(), e);
}
return new CommonResult().failed();
}
// @SysLog(MODULE = "pms", REMARK = "保存品牌表")
@ApiOperation("保存品牌表")
@PostMapping(value = "/create")
// @PreAuthorize("hasAuthority('pms:PmsBrand:create')")
public Object savePmsBrand(@RequestBody PmsBrand entity) {
try {
if (IPmsBrandService.save(entity)) {
return new CommonResult().success();
}
} catch (Exception e) {
log.error("保存品牌表:%s", e.getMessage(), e);
return new CommonResult().failed();
}
return new CommonResult().failed();
}
// @SysLog(MODULE = "pms", REMARK = "更新品牌表")
@ApiOperation("更新品牌表")
@PostMapping(value = "/update/{id}")
public Object updatePmsBrand(@RequestBody PmsBrand entity) {
try {
if (IPmsBrandService.updateById(entity)) {
return new CommonResult().success();
}
} catch (Exception e) {
log.error("更新品牌表:%s", e.getMessage(), e);
return new CommonResult().failed();
}
return new CommonResult().failed();
}
// @SysLog(MODULE = "pms", REMARK = "删除品牌表")
@ApiOperation("删除品牌表")
@GetMapping(value = "/delete/{id}")
// @PreAuthorize("hasAuthority('pms:PmsBrand:delete')")
public Object deletePmsBrand(@ApiParam("品牌表id") @PathVariable Long id) {
try {
if (ValidatorUtils.empty(id)) {
return new CommonResult().paramFailed("品牌表id");
}
if (IPmsBrandService.removeById(id)) {
return new CommonResult().success();
}
} catch (Exception e) {
log.error("删除品牌表:%s", e.getMessage(), e);
return new CommonResult().failed();
}
return new CommonResult().failed();
}
// @SysLog(MODULE = "pms", REMARK = "给品牌表分配品牌表")
@ApiOperation("查询品牌表明细")
@GetMapping(value = "/{id}")
public Object getPmsBrandById(@ApiParam("品牌表id") @PathVariable Long id) {
try {
if (ValidatorUtils.empty(id)) {
return new CommonResult().paramFailed("品牌表id");
}
PmsBrand coupon = IPmsBrandService.getById(id);
return new CommonResult().success(coupon);
} catch (Exception e) {
log.error("查询品牌表明细:%s", e.getMessage(), e);
return new CommonResult().failed();
}
}
@ApiOperation(value = "批量删除品牌表")
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET)
@ResponseBody
// @SysLog(MODULE = "pms", REMARK = "批量删除品牌表")
// @PreAuthorize("hasAuthority('pms:PmsBrand:delete')")
public Object deleteBatch(@RequestParam("ids") List<Long> ids) {
boolean count = IPmsBrandService.removeByIds(ids);
if (count) {
return new CommonResult().success(count);
} else {
return new CommonResult().failed();
}
}
@ApiOperation(value = "批量更新显示状态")
@RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
@ResponseBody
// @SysLog(MODULE = "pms", REMARK = "批量更新显示状态")
public Object updateShowStatus(@RequestParam("ids") List<Long> ids,
@RequestParam("showStatus") Integer showStatus) {
int count = IPmsBrandService.updateShowStatus(ids, showStatus);
if (count > 0) {
return new CommonResult().success(count);
} else {
return new CommonResult().failed();
}
}
@ApiOperation(value = "批量更新厂家制造商状态")
@RequestMapping(value = "/update/factoryStatus", method = RequestMethod.POST)
@ResponseBody
// @SysLog(MODULE = "pms", REMARK = "批量更新厂家制造商状态")
public Object updateFactoryStatus(@RequestParam("ids") List<Long> ids,
@RequestParam("factoryStatus") Integer factoryStatus) {
int count = IPmsBrandService.updateFactoryStatus(ids, factoryStatus);
if (count > 0) {
return new CommonResult().success(count);
} else {
return new CommonResult().failed();
}
}
@ApiOperation(value = "获取品牌")
@GetMapping("/getList")
ResultBean<List<BrandVo>> getList(){
return IPmsBrandService.getList();
}
}

368
ordermall/src/main/java/com/yxt/ordermall/mallplus/biz/pms/controller/PmsProductCategoryController.java

@ -29,194 +29,194 @@ import java.util.List;
@Api(tags = "PmsProductCategoryController", description = "产品分类管理") @Api(tags = "PmsProductCategoryController", description = "产品分类管理")
@RequestMapping("/pms/PmsProductCategory") @RequestMapping("/pms/PmsProductCategory")
public class PmsProductCategoryController { public class PmsProductCategoryController {
@Resource // @Resource
private IPmsProductCategoryService IPmsProductCategoryService; // private IPmsProductCategoryService IPmsProductCategoryService;
//
// @SysLog(MODULE = "pms", REMARK = "根据条件查询所有产品分类列表") // // @SysLog(MODULE = "pms", REMARK = "根据条件查询所有产品分类列表")
@ApiOperation("根据条件查询所有产品分类列表") // @ApiOperation("根据条件查询所有产品分类列表")
@GetMapping(value = "/list") // @GetMapping(value = "/list")
public Object getPmsProductCategoryByPage(PmsProductCategory entity, // public Object getPmsProductCategoryByPage(PmsProductCategory entity,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, // @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize // @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize
) { // ) {
try { // try {
return new CommonResult().success(IPmsProductCategoryService.page(new Page<PmsProductCategory>(pageNum, pageSize), new QueryWrapper<>(entity))); // return new CommonResult().success(IPmsProductCategoryService.page(new Page<PmsProductCategory>(pageNum, pageSize), new QueryWrapper<>(entity)));
} catch (Exception e) { // } catch (Exception e) {
log.error("根据条件查询所有产品分类列表:%s", e.getMessage(), e); // log.error("根据条件查询所有产品分类列表:%s", e.getMessage(), e);
} // }
return new CommonResult().failed(); // return new CommonResult().failed();
} // }
//
@ApiOperation("分页查询商品分类") // @ApiOperation("分页查询商品分类")
@RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET) // @RequestMapping(value = "/list/{parentId}", method = RequestMethod.GET)
@ResponseBody // @ResponseBody
public Object getList(@PathVariable Long parentId, // public Object getList(@PathVariable Long parentId,
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize, // @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize,
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) { // @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum) {
PmsProductCategory entity = new PmsProductCategory(); // PmsProductCategory entity = new PmsProductCategory();
entity.setParentId(parentId); // entity.setParentId(parentId);
QueryWrapper queryWrapper=new QueryWrapper<>(entity); // QueryWrapper queryWrapper=new QueryWrapper<>(entity);
queryWrapper.orderByAsc("sort"); // queryWrapper.orderByAsc("sort");
return new CommonResult().success(IPmsProductCategoryService.page(new Page<PmsProductCategory>(pageNum, pageSize), queryWrapper)); // return new CommonResult().success(IPmsProductCategoryService.page(new Page<PmsProductCategory>(pageNum, pageSize), queryWrapper));
} // }
//
// @SysLog(MODULE = "pms", REMARK = "保存产品分类") // // @SysLog(MODULE = "pms", REMARK = "保存产品分类")
@ApiOperation("保存产品分类") // @ApiOperation("保存产品分类")
@PostMapping(value = "/create") // @PostMapping(value = "/create")
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:create')") // // @PreAuthorize("hasAuthority('pms:PmsProductCategory:create')")
public Object savePmsProductCategory(@RequestBody PmsProductCategory entity) { // public Object savePmsProductCategory(@RequestBody PmsProductCategory entity) {
try { // try {
//查询是否存在相同级别的相同名称的分类 // //查询是否存在相同级别的相同名称的分类
Long parentId = entity.getParentId(); // Long parentId = entity.getParentId();
String name = entity.getName(); // String name = entity.getName();
int count = IPmsProductCategoryService.selectCountByNameAndLevel(parentId,name); // int count = IPmsProductCategoryService.selectCountByNameAndLevel(parentId,name);
if(count>0){ // if(count>0){
return new CommonResult().failed("该分类已存在"); // return new CommonResult().failed("该分类已存在");
} // }
if (IPmsProductCategoryService.saveAnd(entity)) { // if (IPmsProductCategoryService.saveAnd(entity)) {
return new CommonResult().success(); // return new CommonResult().success();
} // }
} catch (Exception e) { // } catch (Exception e) {
log.error("保存产品分类:%s", e.getMessage(), e); // log.error("保存产品分类:%s", e.getMessage(), e);
return new CommonResult().failed(); // return new CommonResult().failed();
} // }
return new CommonResult().failed(); // return new CommonResult().failed();
} // }
//
// @SysLog(MODULE = "pms", REMARK = "更新产品分类") // // @SysLog(MODULE = "pms", REMARK = "更新产品分类")
@ApiOperation("更新产品分类") // @ApiOperation("更新产品分类")
@PostMapping(value = "/update/{id}") // @PostMapping(value = "/update/{id}")
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')") // // @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
public Object updatePmsProductCategory(@RequestBody PmsProductCategory entity) { // public Object updatePmsProductCategory(@RequestBody PmsProductCategory entity) {
try { // try {
//查询是否存在相同级别的相同名称的分类 // //查询是否存在相同级别的相同名称的分类
Long parentId = entity.getParentId(); // Long parentId = entity.getParentId();
String name = entity.getName(); // String name = entity.getName();
Long id = entity.getId(); // Long id = entity.getId();
int count = IPmsProductCategoryService.selectCountByNameAndLevelId(parentId,name,id); // int count = IPmsProductCategoryService.selectCountByNameAndLevelId(parentId,name,id);
if(count>0){ // if(count>0){
return new CommonResult().failed("该分类已存在"); // return new CommonResult().failed("该分类已存在");
} // }
if (IPmsProductCategoryService.updateAnd(entity)) { // if (IPmsProductCategoryService.updateAnd(entity)) {
return new CommonResult().success(); // return new CommonResult().success();
} // }
} catch (Exception e) { // } catch (Exception e) {
log.error("更新产品分类:%s", e.getMessage(), e); // log.error("更新产品分类:%s", e.getMessage(), e);
return new CommonResult().failed(); // return new CommonResult().failed();
} // }
return new CommonResult().failed(); // return new CommonResult().failed();
} // }
//
// @SysLog(MODULE = "pms", REMARK = "删除产品分类") // // @SysLog(MODULE = "pms", REMARK = "删除产品分类")
@ApiOperation("删除产品分类") // @ApiOperation("删除产品分类")
@GetMapping(value = "/delete/{id}") // @GetMapping(value = "/delete/{id}")
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:delete')") // // @PreAuthorize("hasAuthority('pms:PmsProductCategory:delete')")
public Object deletePmsProductCategory(@ApiParam("产品分类id") @PathVariable Long id) { // public Object deletePmsProductCategory(@ApiParam("产品分类id") @PathVariable Long id) {
try { // try {
if (ValidatorUtils.empty(id)) { // if (ValidatorUtils.empty(id)) {
return new CommonResult().paramFailed("产品分类id"); // return new CommonResult().paramFailed("产品分类id");
} // }
if (IPmsProductCategoryService.removeById(id)) { // if (IPmsProductCategoryService.removeById(id)) {
return new CommonResult().success(); // return new CommonResult().success();
} // }
} catch (Exception e) { // } catch (Exception e) {
log.error("删除产品分类:%s", e.getMessage(), e); // log.error("删除产品分类:%s", e.getMessage(), e);
return new CommonResult().failed(); // return new CommonResult().failed();
} // }
return new CommonResult().failed(); // return new CommonResult().failed();
} // }
//
// @SysLog(MODULE = "pms", REMARK = "给产品分类分配产品分类") // // @SysLog(MODULE = "pms", REMARK = "给产品分类分配产品分类")
@ApiOperation("查询产品分类明细") // @ApiOperation("查询产品分类明细")
@GetMapping(value = "/{id}") // @GetMapping(value = "/{id}")
public Object getPmsProductCategoryById(@ApiParam("产品分类id") @PathVariable Long id) { // public Object getPmsProductCategoryById(@ApiParam("产品分类id") @PathVariable Long id) {
try { // try {
if (ValidatorUtils.empty(id)) { // if (ValidatorUtils.empty(id)) {
return new CommonResult().paramFailed("产品分类id"); // return new CommonResult().paramFailed("产品分类id");
} // }
PmsProductCategory coupon = IPmsProductCategoryService.getById(id); // PmsProductCategory coupon = IPmsProductCategoryService.getById(id);
return new CommonResult().success(coupon); // return new CommonResult().success(coupon);
} catch (Exception e) { // } catch (Exception e) {
log.error("查询产品分类明细:%s", e.getMessage(), e); // log.error("查询产品分类明细:%s", e.getMessage(), e);
return new CommonResult().failed(); // return new CommonResult().failed();
} // }
//
} // }
//
@ApiOperation(value = "批量删除产品分类") // @ApiOperation(value = "批量删除产品分类")
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) // @RequestMapping(value = "/delete/batch", method = RequestMethod.GET)
@ResponseBody // @ResponseBody
// @SysLog(MODULE = "pms", REMARK = "批量删除产品分类") // // @SysLog(MODULE = "pms", REMARK = "批量删除产品分类")
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:delete')") // // @PreAuthorize("hasAuthority('pms:PmsProductCategory:delete')")
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { // public Object deleteBatch(@RequestParam("ids") List<Long> ids) {
boolean count = IPmsProductCategoryService.removeByIds(ids); // boolean count = IPmsProductCategoryService.removeByIds(ids);
if (count) { // if (count) {
return new CommonResult().success(count);
} else {
return new CommonResult().failed();
}
}
@ApiOperation("查询所有一级分类及子分类")
@RequestMapping(value = "/list/withChildren", method = RequestMethod.GET)
@ResponseBody
public Object listWithChildren() {
List<PmsProductCategoryWithChildrenItem> list = IPmsProductCategoryService.listWithChildren();
return new CommonResult().success(list);
}
@ApiOperation("修改导航栏显示状态")
@RequestMapping(value = "/update/navStatus", method = RequestMethod.POST)
@ResponseBody
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
public Object updateNavStatus(@RequestParam("ids") Long ids, @RequestParam("navStatus") Integer navStatus) {
PmsProductCategory entity = new PmsProductCategory();
entity.setId(ids);
entity.setNavStatus(navStatus);
if (IPmsProductCategoryService.updateById(entity)) {
return new CommonResult().success();
} else {
return new CommonResult().failed();
}
}
// public Object updateNavStatus(@RequestParam("ids") List<Long> ids, @RequestParam("navStatus") Integer navStatus) {
// int count = IPmsProductCategoryService.updateNavStatus(ids, navStatus);
// if (count > 0) {
// return new CommonResult().success(count); // return new CommonResult().success(count);
// } else { // } else {
// return new CommonResult().failed(); // return new CommonResult().failed();
// } // }
// } // }
//
@ApiOperation("修改显示状态") // @ApiOperation("查询所有一级分类及子分类")
@RequestMapping(value = "/update/showStatus", method = RequestMethod.POST) // @RequestMapping(value = "/list/withChildren", method = RequestMethod.GET)
@ResponseBody // @ResponseBody
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')") // public Object listWithChildren() {
public Object updateShowStatus(@RequestParam("ids") Long ids, @RequestParam("showStatus") Integer showStatus) { // List<PmsProductCategoryWithChildrenItem> list = IPmsProductCategoryService.listWithChildren();
PmsProductCategory entity = new PmsProductCategory(); // return new CommonResult().success(list);
entity.setId(ids); // }
entity.setShowStatus(showStatus); //
if (IPmsProductCategoryService.updateById(entity)) { // @ApiOperation("修改导航栏显示状态")
return new CommonResult().success(); // @RequestMapping(value = "/update/navStatus", method = RequestMethod.POST)
} else { // @ResponseBody
return new CommonResult().failed(); // // @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
} // public Object updateNavStatus(@RequestParam("ids") Long ids, @RequestParam("navStatus") Integer navStatus) {
} // PmsProductCategory entity = new PmsProductCategory();
// entity.setId(ids);
@ApiOperation("修改首页显示状态") // entity.setNavStatus(navStatus);
@RequestMapping(value = "/update/indexStatus", method = RequestMethod.POST) //
@ResponseBody // if (IPmsProductCategoryService.updateById(entity)) {
// @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')") // return new CommonResult().success();
public Object updateIndexStatus(@RequestParam("ids") Long ids, @RequestParam("indexStatus") Integer indexStatus) { // } else {
PmsProductCategory entity = new PmsProductCategory(); // return new CommonResult().failed();
entity.setId(ids); // }
entity.setIndexStatus(indexStatus); // }
if (IPmsProductCategoryService.updateById(entity)) { //// public Object updateNavStatus(@RequestParam("ids") List<Long> ids, @RequestParam("navStatus") Integer navStatus) {
return new CommonResult().success(); //// int count = IPmsProductCategoryService.updateNavStatus(ids, navStatus);
} else { //// if (count > 0) {
return new CommonResult().failed(); //// return new CommonResult().success(count);
} //// } else {
} //// return new CommonResult().failed();
//// }
//// }
//
// @ApiOperation("修改显示状态")
// @RequestMapping(value = "/update/showStatus", method = RequestMethod.POST)
// @ResponseBody
// // @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
// public Object updateShowStatus(@RequestParam("ids") Long ids, @RequestParam("showStatus") Integer showStatus) {
// PmsProductCategory entity = new PmsProductCategory();
// entity.setId(ids);
// entity.setShowStatus(showStatus);
// if (IPmsProductCategoryService.updateById(entity)) {
// return new CommonResult().success();
// } else {
// return new CommonResult().failed();
// }
// }
//
// @ApiOperation("修改首页显示状态")
// @RequestMapping(value = "/update/indexStatus", method = RequestMethod.POST)
// @ResponseBody
// // @PreAuthorize("hasAuthority('pms:PmsProductCategory:update')")
// public Object updateIndexStatus(@RequestParam("ids") Long ids, @RequestParam("indexStatus") Integer indexStatus) {
// PmsProductCategory entity = new PmsProductCategory();
// entity.setId(ids);
// entity.setIndexStatus(indexStatus);
// if (IPmsProductCategoryService.updateById(entity)) {
// return new CommonResult().success();
// } else {
// return new CommonResult().failed();
// }
// }
} }

2
ordermall/src/main/java/com/yxt/ordermall/mallplus/biz/pms/service/impl/PmsProductCategoryServiceImpl.java

@ -54,7 +54,7 @@ public class PmsProductCategoryServiceImpl extends ServiceImpl<PmsProductCategor
@Override @Override
public int updateShowStatus(List<Long> ids, Integer showStatus) { public int updateShowStatus(List<Long> ids, Integer showStatus) {
PmsProductCategory productCategory = new PmsProductCategory(); PmsProductCategory productCategory = new PmsProductCategory();
productCategory.setShowStatus(showStatus); // productCategory.setShowStatus(showStatus);
return categoryMapper.update(productCategory, new QueryWrapper<PmsProductCategory>().in("id", ids)); return categoryMapper.update(productCategory, new QueryWrapper<PmsProductCategory>().in("id", ids));
} }

11
ordermall/src/main/java/com/yxt/ordermall/mallplus/mbg/pms/entity/PmsBrand.java

@ -5,6 +5,7 @@ import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.zscat.mallplus.utils.BaseEntity; import com.zscat.mallplus.utils.BaseEntity;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
@ -17,10 +18,18 @@ import java.io.Serializable;
* @since 2019-04-19 * @since 2019-04-19
*/ */
@TableName("pms_brand") @TableName("pms_brand")
@Data
public class PmsBrand extends BaseEntity implements Serializable { public class PmsBrand extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableField(exist = false)
private String sid;
@TableField(exist = false)
private String useOrgSid;//使用组织sid
@TableField(exist = false)
private String createOrgSid;//创建组织sid
@TableField(exist = false)
private String userSid;
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Long id; private Long id;

11
ordermall/src/main/java/com/yxt/ordermall/mallplus/mbg/pms/entity/PmsProductCategory.java

@ -57,7 +57,7 @@ public class PmsProductCategory extends BaseEntity implements Serializable {
* 显示状态0->不显示1->显示 * 显示状态0->不显示1->显示
*/ */
@TableField("show_status") @TableField("show_status")
private Integer showStatus; private String showStatus;
/** /**
* 是否是首页分类0-->不是1--> * 是否是首页分类0-->不是1-->
*/ */
@ -83,5 +83,12 @@ public class PmsProductCategory extends BaseEntity implements Serializable {
private List<Long> productAttributeIdList; private List<Long> productAttributeIdList;
@TableField(exist = false) @TableField(exist = false)
private List<PmsProductCategory> childList; private List<PmsProductCategory> childList;
@TableField(exist = false)
private String sid;
@TableField(exist = false)
private String useOrgSid;//使用组织sid
@TableField(exist = false)
private String createOrgSid;//创建组织sid
@TableField(exist = false)
private String userSid;
} }

1
ordermall/src/main/java/com/yxt/ordermall/mallplus/mbg/pms/entity/brand/BrandVo.java

@ -22,4 +22,5 @@ public class BrandVo {
@ApiModelProperty("起订协议") @ApiModelProperty("起订协议")
private String qdxy; private String qdxy;
private String count; private String count;
private String sid;
} }

Loading…
Cancel
Save