user项目
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basebrandinfo;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:36
|
||||
*/
|
||||
@Data
|
||||
public class BaseBrandInfo extends BaseEntity {
|
||||
|
||||
private String brandName;//品牌代码
|
||||
private String brandCode;//品牌名称
|
||||
private String image;//品牌图片url地址
|
||||
private String letter;//品牌的首字母大写
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basebrandinfo;
|
||||
|
||||
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 BaseBrandInfoDto 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 brandName;//品牌代码
|
||||
private String brandCode;//品牌名称
|
||||
private String image;//品牌图片url地址
|
||||
private String letter;//品牌的首字母大写
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basebrandinfo;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseBrandInfoMapper extends BaseMapper<BaseBrandInfo> {
|
||||
|
||||
IPage<BaseBrandInfoVo> listPage(IPage<BaseBrandInfo> page, @Param(Constants.WRAPPER) QueryWrapper<BaseBrandInfo> qw);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basebrandinfo.BaseBrandInfoMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basebrandinfo.BaseBrandInfoVo">
|
||||
select
|
||||
*
|
||||
from base_brand_info
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basebrandinfo;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseBrandInfoQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,127 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basebrandinfo;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseBrandInfoService extends MybatisBaseService<BaseBrandInfoMapper, BaseBrandInfo> {
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
|
||||
public ResultBean<PagerVo<BaseBrandInfoVo>> listPage(PagerQuery<BaseBrandInfoQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseBrandInfoQuery query = pq.getParams();
|
||||
QueryWrapper<BaseBrandInfo> qw = new QueryWrapper<>();
|
||||
|
||||
if(StringUtils.isNotBlank(query.getName())){
|
||||
qw.like("brandName",query.getName());
|
||||
}
|
||||
IPage<BaseBrandInfo> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseBrandInfoVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseBrandInfoVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
List<BaseBrandInfoVo> records = pagging.getRecords();
|
||||
records.removeAll(Collections.singleton(null));
|
||||
// if (!records.isEmpty()) {
|
||||
// for (BaseBrandInfoVo record : records) {
|
||||
// if (StringUtils.isNotBlank(record.getBigPic())) {
|
||||
// record.setBigPic(fileUploadComponent.getUrlPrefix() + record.getBigPic());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
public ResultBean<List<BaseBrandInfo>> listAll() {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseBrandInfo> pagging = baseMapper.selectList(new QueryWrapper<BaseBrandInfo>().eq("isEnable",1));
|
||||
return rb.success().setData(pagging);
|
||||
}
|
||||
public ResultBean<String> saveOrUpdate(BaseBrandInfoDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
sid = dto.getSid();
|
||||
BaseBrandInfo wmsGoodsBrand = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoodsBrand, "id", "sid");
|
||||
// if (StringUtils.isNotBlank(dto.getBigPic())) {
|
||||
// String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
// String path = dto.getBigPic().substring(urlPrefix.length());
|
||||
// wmsGoodsBrand.setBigPic(path);
|
||||
// }
|
||||
wmsGoodsBrand.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoodsBrand);
|
||||
} else {
|
||||
BaseBrandInfo goods=baseMapper.selectOne(new QueryWrapper<BaseBrandInfo>().eq("name",dto.getBrandName()));
|
||||
if(null!=goods){
|
||||
return rb.setMsg("商品名不能重复");
|
||||
}
|
||||
BaseBrandInfo wmsGoodsBrand = new BaseBrandInfo();
|
||||
sid = wmsGoodsBrand.getSid();
|
||||
BeanUtil.copyProperties(dto, wmsGoodsBrand, "id", "sid");
|
||||
wmsGoodsBrand.setCreateTime(new DateTime());
|
||||
// if (StringUtils.isNotBlank(dto.getBigPic())) {
|
||||
// String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
// String path = dto.getBigPic().substring(urlPrefix.length());
|
||||
// wmsGoodsBrand.setBigPic(path);
|
||||
// }
|
||||
baseMapper.insert(wmsGoodsBrand);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseBrandInfoVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseBrandInfoVo vo = new BaseBrandInfoVo();
|
||||
BaseBrandInfo wmsGoodsBrand = fetchBySid(sid);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
BeanUtil.copyProperties(wmsGoodsBrand, vo);
|
||||
// if (null != wmsGoodsBrand) {
|
||||
//
|
||||
// if (StringUtils.isNotBlank(wmsGoodsBrand.getBigPic())) {
|
||||
// vo.setBigPic(fileUploadComponent.getUrlPrefix() + wmsGoodsBrand.getBigPic());
|
||||
// }
|
||||
//// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime()));
|
||||
// }
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseBrandInfo wmsGoodsBrand = fetchBySid(sid);
|
||||
if (null != wmsGoodsBrand) {
|
||||
baseMapper.deleteById(wmsGoodsBrand.getId());
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
public ResultBean updateIsEnable(String sid,String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseBrandInfo wmsGoodsBrand = fetchBySid(sid);
|
||||
if (null != wmsGoodsBrand) {
|
||||
wmsGoodsBrand.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoodsBrand);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basebrandinfo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseBrandInfoVo implements Vo {
|
||||
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 brandName;//品牌代码
|
||||
private String brandCode;//品牌名称
|
||||
private String image;//品牌图片url地址
|
||||
private String letter;//品牌的首字母大写
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basecategorybrand;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseCategoryBrand extends BaseEntity {
|
||||
private String categorySid;//商品分类sid
|
||||
private String brandSid;//品牌sid
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basecategorybrand;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseCategoryBrandDto {
|
||||
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 categorySid;//商品分类sid
|
||||
private String brandSid;//品牌sid
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basecategorybrand;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseCategoryBrandMapper extends BaseMapper<BaseCategoryBrand> {
|
||||
|
||||
IPage<BaseCategoryBrandVo> listPage(IPage<BaseCategoryBrand> page, @Param(Constants.WRAPPER) QueryWrapper<BaseCategoryBrand> qw);
|
||||
List<BaseCategoryBrandVo> getSkusBySpuSid(@Param("spuSid")String spuSid);
|
||||
BaseCategoryBrandVo getVoBySid(@Param("sid")String sid);
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basecategorybrand.BaseCategoryBrandMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basecategorybrand.BaseCategoryBrandVo">
|
||||
select s.*,a.goodsTypeName as categoryName ,b.brandName as brandName;
|
||||
from base_category_brand s
|
||||
left join base_goods_type a on a.sid =s.ceategorySid
|
||||
left join base_brand_info b on b.sid= s.brandSid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getSkusBySpuSid" resultType="com.yxt.goods.biz.base.basecategorybrand.BaseCategoryBrandVo">
|
||||
select s.*,
|
||||
s.own_spec as ownSpec
|
||||
from base_goods_sku s
|
||||
where s.goodsSpuSid = #{spuSid}
|
||||
</select>
|
||||
<select id="getVoBySid" resultType="com.yxt.goods.biz.base.basecategorybrand.BaseCategoryBrandVo">
|
||||
select s.*,a.goodsTypeName as categoryName ,b.brandName as brandName;
|
||||
from base_category_brand s
|
||||
left join base_goods_type a on a.sid =s.ceategorySid
|
||||
left join base_brand_info b on b.sid= s.brandSid
|
||||
where s.sid = #{sid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basecategorybrand;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseCategoryBrandQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basecategorybrand;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseCategoryBrandService extends MybatisBaseService<BaseCategoryBrandMapper, BaseCategoryBrand> {
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
|
||||
|
||||
public ResultBean<PagerVo<BaseCategoryBrandVo>> listPage(PagerQuery<BaseCategoryBrandQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseCategoryBrandQuery query = pq.getParams();
|
||||
QueryWrapper<BaseCategoryBrand> qw = new QueryWrapper<>();
|
||||
if (StringUtils.isNotBlank(query.getName())) {
|
||||
qw.like("goodsName", query.getName());
|
||||
}
|
||||
IPage<BaseCategoryBrand> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseCategoryBrandVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseCategoryBrandVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(BaseCategoryBrandDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
sid = dto.getSid();
|
||||
BaseCategoryBrand wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoods);
|
||||
} else {
|
||||
BaseCategoryBrand wmsGoods = new BaseCategoryBrand();
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(List<BaseCategoryBrandDto> dtos) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
for (BaseCategoryBrandDto dto : dtos) {
|
||||
BaseCategoryBrand sku=baseMapper.selectOne(new QueryWrapper<BaseCategoryBrand>().eq("sid",dto.getSid()));
|
||||
String sid = "";
|
||||
if (null!=sku) {
|
||||
sid = dto.getSid();
|
||||
BaseCategoryBrand wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoods);
|
||||
} else {
|
||||
BaseCategoryBrand wmsGoods = new BaseCategoryBrand();
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
}
|
||||
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseCategoryBrandVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseCategoryBrandVo vo = baseMapper.getVoBySid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
public ResultBean<List<BaseCategoryBrandVo>> getSkusBySpuSid(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseCategoryBrandVo> vo = baseMapper.getSkusBySpuSid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseCategoryBrand wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
baseMapper.deleteById(wmsGoods.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
|
||||
public ResultBean updateIsEnable(String sid, String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseCategoryBrand wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
wmsGoods.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basecategorybrand;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseCategoryBrandVo {
|
||||
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 categorySid;//商品分类sid
|
||||
private String brandSid;//品牌sid
|
||||
private String categoryName;//分类名
|
||||
private String brandName;//品牌名
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:36
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSku extends BaseEntity {
|
||||
private String goodsSkuCode;//商品Sku代码
|
||||
private String title;//商品标题
|
||||
private String goodsSpuSid;//商品基础信息Sid
|
||||
private String externalCode;//外部编码
|
||||
private String indexes;//特有规格属性在spu表中special_spec字段对应每个参数值数组下标的组合,如0_0_0,1_0_0,相当于SKU这条记录的编码。
|
||||
@TableField(value = "own_spec")
|
||||
private String ownSpec;//sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序
|
||||
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: dimengzhe
|
||||
* @date: 2024/3/19
|
||||
**/
|
||||
@Data
|
||||
public class BaseGoodsSkuDetailsVo {
|
||||
|
||||
@ApiModelProperty("商品代码")
|
||||
private String goodsCode;
|
||||
@ApiModelProperty("条形码")
|
||||
private String barCode;
|
||||
@ApiModelProperty("商品名称")
|
||||
private String goodsName;
|
||||
@ApiModelProperty("副标题")
|
||||
private String subTitle;
|
||||
@ApiModelProperty("拼音缩写")
|
||||
private String goodsPY;
|
||||
@ApiModelProperty("商品简称")
|
||||
private String goodsShortName;
|
||||
@ApiModelProperty("商品分类sid")
|
||||
private String goodsTypeSid;
|
||||
@ApiModelProperty("品牌sid")
|
||||
private String brandSid;
|
||||
@ApiModelProperty("厂家sid")
|
||||
private String manufacturersid;
|
||||
@ApiModelProperty("商品单位sid")
|
||||
private String goodsUnitSid;
|
||||
@ApiModelProperty("商品单位名称")
|
||||
private String goodsUnitName;
|
||||
|
||||
@ApiModelProperty("商品Sku代码")
|
||||
private String goodsSkuCode;
|
||||
@ApiModelProperty("商品标题")
|
||||
private String title;
|
||||
@ApiModelProperty("是否一品一码(goodID),0否,1是")
|
||||
@JsonProperty("isGoodsID")
|
||||
private int isGoodsID;
|
||||
|
||||
//=================================
|
||||
|
||||
//商品名称
|
||||
//零件号
|
||||
//拼音
|
||||
//条形码
|
||||
//计量单位
|
||||
//商品类别
|
||||
private String goodsTypeName;//商品类别名称
|
||||
//厂家
|
||||
//规格
|
||||
//品牌
|
||||
//车型
|
||||
//原厂标志
|
||||
//产地
|
||||
//锁定售价
|
||||
//备注
|
||||
//上限数量
|
||||
//下限数量
|
||||
//积分商品
|
||||
//所需积分
|
||||
|
||||
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendDto;
|
||||
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 BaseGoodsSkuDto 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 goodsSkuCode;//商品Sku代码
|
||||
private String title;//商品标题
|
||||
private String goodsSpuSid;//商品基础信息Sid
|
||||
private String externalCode;//外部编码
|
||||
private String indexes;//特有规格属性在spu表中special_spec字段对应每个参数值数组下标的组合,如0_0_0,1_0_0,相当于SKU这条记录的编码。
|
||||
@TableField(value = "own_spec")
|
||||
private String ownSpec;//sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序
|
||||
private BaseGoodsSkuExtendDto baseGoodsSkuExtend;//sku扩展
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseGoodsSkuMapper extends BaseMapper<BaseGoodsSku> {
|
||||
|
||||
IPage<BaseGoodsSkuVo> listPage(IPage<BaseGoodsSku> page, @Param(Constants.WRAPPER) QueryWrapper<BaseGoodsSku> qw);
|
||||
List<BaseGoodsSkuVo> getSkusBySpuSid(@Param("spuSid")String spuSid);
|
||||
BaseGoodsSkuVo getSkuBySid(@Param("sid")String sid);
|
||||
|
||||
IPage<BaseGoodsSkuSelectList> getSelectList(IPage<BaseGoodsSku> page, @Param(Constants.WRAPPER)QueryWrapper<BaseGoodsSku> qw);
|
||||
|
||||
IPage<BaseGoodsSkuPurSelectList> purGoodsListPage(IPage<BaseGoodsSku> page, @Param(Constants.WRAPPER) QueryWrapper<BaseGoodsSku> qw);
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuVo">
|
||||
select s.*,s.own_spec as ownSpec,a.goodsName
|
||||
from base_goods_sku s
|
||||
left join base_goods_spu a on a.sid=s.goodsSpuSid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getSkusBySpuSid" resultType="com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuVo">
|
||||
select s.*,
|
||||
s.own_spec as ownSpec
|
||||
from base_goods_sku s
|
||||
where s.goodsSpuSid = #{spuSid}
|
||||
</select>
|
||||
<select id="getSkuBySid" resultType="com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuVo">
|
||||
select *,
|
||||
s.own_spec as ownSpec
|
||||
from base_goods_sku s
|
||||
where s.sid = #{sid}
|
||||
</select>
|
||||
|
||||
<select id="getSelectList" resultType="com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuSelectList">
|
||||
select sku.sid goodsSkuSid,
|
||||
spu.sid as goodsSpuSid,
|
||||
spu.goodsName goodsSpuName,
|
||||
sku.goodsSkuCode,
|
||||
sku.title as goodsSkuTitle,
|
||||
spu.goodsUnitSid,
|
||||
spu.goodsUnitName
|
||||
from base_goods_sku sku
|
||||
left join base_goods_spu spu on spu.sid = sku.goodsSpuSid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="purGoodsListPage" resultType="com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuPurSelectList">
|
||||
SELECT
|
||||
s.sid,
|
||||
s.goodsSkuCode,
|
||||
s.title,
|
||||
s.own_spec AS ownSpec,
|
||||
a.goodsName,
|
||||
a.goodsPY,
|
||||
a.goodsShortName,
|
||||
a.goodsTypeSid,
|
||||
a.brandSid,
|
||||
a.manufacturerSid,
|
||||
a.goodsUnitName
|
||||
FROM
|
||||
base_goods_sku s
|
||||
LEFT JOIN base_goods_spu a
|
||||
ON a.sid = s.goodsSpuSid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: dimengzhe
|
||||
* @date: 2024/3/21
|
||||
**/
|
||||
@Data
|
||||
public class BaseGoodsSkuPurSelectList {
|
||||
|
||||
//sid
|
||||
private String sid;
|
||||
//零件号
|
||||
private String goodsSkuCode;
|
||||
//规格
|
||||
private String title;
|
||||
//商品名称
|
||||
private String goodsName;
|
||||
//商品拼音
|
||||
private String goodsPY;
|
||||
//商品简称
|
||||
private String goodsShortName;
|
||||
//商品类别sid
|
||||
private String goodsTypeSid;
|
||||
//品牌sid
|
||||
private String brandSid;
|
||||
//厂家sid
|
||||
private String manufacturerSid;
|
||||
//商品单位名称
|
||||
private String goodsUnitName;
|
||||
//sku特有规格参数键值对
|
||||
private String ownSpec;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: dimengzhe
|
||||
* @date: 2024/3/21
|
||||
**/
|
||||
@Data
|
||||
public class BaseGoodsSkuPurSelectQuery implements Query {
|
||||
|
||||
//组织sid
|
||||
private String orgSid;
|
||||
//商品名称
|
||||
private String goodsName;
|
||||
//商品类别sid
|
||||
private String goodsTypeSid;
|
||||
//商品拼音
|
||||
private String goodsPY;
|
||||
//品牌sid
|
||||
private String brandSid;
|
||||
//零件号
|
||||
private String goodsSkuCode;
|
||||
//规格
|
||||
private String title;
|
||||
//其他查询条件
|
||||
private String otherQuery;
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSkuQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: dimengzhe
|
||||
* @date: 2024/3/21
|
||||
**/
|
||||
@Data
|
||||
public class BaseGoodsSkuSelectList {
|
||||
|
||||
//商品名称
|
||||
private String goodsSpuSid;
|
||||
private String goodsSpuName;
|
||||
//商品sid
|
||||
private String goodsSkuSid;
|
||||
//商品编码
|
||||
private String goodsSkuCode;
|
||||
//规格/型号
|
||||
private String goodsSkuTitle;
|
||||
//计量单位
|
||||
private String goodsUnitSid;
|
||||
private String goodsUnitName;
|
||||
//仓库名称
|
||||
//货位
|
||||
//单位成本(进货价)
|
||||
//数量
|
||||
//税额
|
||||
//含税价
|
||||
//金额
|
||||
//销售价1
|
||||
//销售价2
|
||||
//操作时间
|
||||
//操作人
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description:
|
||||
* @author: dimengzhe
|
||||
* @date: 2024/3/21
|
||||
**/
|
||||
@Data
|
||||
public class BaseGoodsSkuSelectQuery implements Query {
|
||||
|
||||
private String goodsSkuCode;
|
||||
}
|
||||
@@ -1,208 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendService;
|
||||
import com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo;
|
||||
import com.yxt.goods.biz.base.basegoodsspu.BaseGoodsSpu;
|
||||
import com.yxt.goods.biz.base.basegoodsspu.BaseGoodsSpuService;
|
||||
import com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailService;
|
||||
import com.yxt.goods.biz.base.basegoodstype.BaseGoodsType;
|
||||
import com.yxt.goods.biz.base.basegoodstype.BaseGoodsTypeService;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseGoodsSkuService extends MybatisBaseService<BaseGoodsSkuMapper, BaseGoodsSku> {
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
@Autowired
|
||||
BaseGoodsSpuDetailService baseGoodsSpuDetailService;
|
||||
@Autowired
|
||||
BaseGoodsSkuExtendService baseGoodsSkuExtendService;
|
||||
@Autowired
|
||||
private BaseGoodsSpuService baseGoodsSpuService;
|
||||
@Autowired
|
||||
BaseGoodsTypeService baseGoodsTypeService;
|
||||
|
||||
public ResultBean<PagerVo<BaseGoodsSkuVo>> listPage(PagerQuery<BaseGoodsSkuQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuQuery query = pq.getParams();
|
||||
QueryWrapper<BaseGoodsSku> qw = new QueryWrapper<>();
|
||||
if (StringUtils.isNotBlank(query.getName())) {
|
||||
qw.like("goodsName", query.getName());
|
||||
}
|
||||
IPage<BaseGoodsSku> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseGoodsSkuVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseGoodsSkuVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(BaseGoodsSkuDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
sid = dto.getSid();
|
||||
BaseGoodsSku wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoods);
|
||||
dto.getBaseGoodsSkuExtend().setGoodsSkuSid(wmsGoods.getSid());
|
||||
baseGoodsSkuExtendService.saveOrUpdate(dto.getBaseGoodsSkuExtend());
|
||||
} else {
|
||||
BaseGoodsSku wmsGoods = new BaseGoodsSku();
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
dto.getBaseGoodsSkuExtend().setGoodsSkuSid(wmsGoods.getSid());
|
||||
baseGoodsSkuExtendService.saveOrUpdate(dto.getBaseGoodsSkuExtend());
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(List<BaseGoodsSkuDto> dtos) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
for (BaseGoodsSkuDto dto : dtos) {
|
||||
BaseGoodsSku sku=baseMapper.selectOne(new QueryWrapper<BaseGoodsSku>().eq("sid",dto.getSid()));
|
||||
String sid = "";
|
||||
if (null!=sku) {
|
||||
sid = dto.getSid();
|
||||
BaseGoodsSku wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoods);
|
||||
dto.getBaseGoodsSkuExtend().setGoodsSkuSid(wmsGoods.getSid());
|
||||
baseGoodsSkuExtendService.saveOrUpdate(dto.getBaseGoodsSkuExtend());
|
||||
} else {
|
||||
BaseGoodsSku wmsGoods = new BaseGoodsSku();
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
dto.getBaseGoodsSkuExtend().setGoodsSkuSid(wmsGoods.getSid());
|
||||
baseGoodsSkuExtendService.saveOrUpdate(dto.getBaseGoodsSkuExtend());
|
||||
}
|
||||
}
|
||||
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseGoodsSkuVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuVo vo = baseMapper.getSkuBySid(sid);
|
||||
BaseGoodsSkuExtendVo vo1=baseGoodsSkuExtendService.getExtendBySkuSid(vo.getSid()).getData();
|
||||
if(vo1==null){
|
||||
vo.setBaseGoodsSkuExtend(new BaseGoodsSkuExtendVo());
|
||||
}
|
||||
vo.setBaseGoodsSkuExtend(vo1);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
public ResultBean<List<BaseGoodsSkuVo>> getSkusBySpuSid(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseGoodsSkuVo> vo = baseMapper.getSkusBySpuSid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSku wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
baseMapper.deleteById(wmsGoods.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
|
||||
public ResultBean updateIsEnable(String sid, String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSku wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
wmsGoods.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseGoodsSkuDetailsVo> getDetails(String sid) {
|
||||
ResultBean<BaseGoodsSkuDetailsVo> rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuDetailsVo baseGoodsSkuDetailsVo = new BaseGoodsSkuDetailsVo();
|
||||
BaseGoodsSku baseGoodsSku = fetchBySid(sid);
|
||||
BaseGoodsSpu baseGoodsSpu = baseGoodsSpuService.fetchBySid(baseGoodsSku.getGoodsSpuSid());
|
||||
BeanUtil.copyProperties(baseGoodsSku, baseGoodsSkuDetailsVo);
|
||||
BeanUtil.copyProperties(baseGoodsSpu, baseGoodsSkuDetailsVo);
|
||||
BaseGoodsType baseGoodsType = baseGoodsTypeService.fetchBySid(baseGoodsSpu.getGoodsTypeSid());
|
||||
if (baseGoodsType != null && StringUtils.isNotBlank(baseGoodsType.getIsGoodsID())) {
|
||||
baseGoodsSkuDetailsVo.setIsGoodsID(Integer.parseInt(baseGoodsType.getIsGoodsID()));
|
||||
baseGoodsSkuDetailsVo.setGoodsTypeName(baseGoodsType.getGoodsTypeName());
|
||||
} else {
|
||||
baseGoodsSkuDetailsVo.setIsGoodsID(0);
|
||||
}
|
||||
return rb.success().setData(baseGoodsSkuDetailsVo);
|
||||
}
|
||||
|
||||
public PagerVo<BaseGoodsSkuSelectList> getSelectList(PagerQuery<BaseGoodsSkuSelectQuery> pagerQuery) {
|
||||
BaseGoodsSkuSelectQuery query = pagerQuery.getParams();
|
||||
QueryWrapper<BaseGoodsSku> qw = new QueryWrapper<>();
|
||||
if (query != null) {
|
||||
//商品编码
|
||||
if (StringUtils.isNotBlank(query.getGoodsSkuCode())) {
|
||||
qw.like("sku.goodsSkuCode", query.getGoodsSkuCode());
|
||||
}
|
||||
}
|
||||
IPage<BaseGoodsSku> page = PagerUtil.queryToPage(pagerQuery);
|
||||
IPage<BaseGoodsSkuSelectList> pagging = baseMapper.getSelectList(page, qw);
|
||||
PagerVo<BaseGoodsSkuSelectList> p = PagerUtil.pageToVo(pagging, null);
|
||||
return p;
|
||||
}
|
||||
|
||||
public ResultBean<PagerVo<BaseGoodsSkuPurSelectList>> purGoodsListPage(PagerQuery<BaseGoodsSkuPurSelectQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuPurSelectQuery query = pq.getParams();
|
||||
QueryWrapper<BaseGoodsSku> qw = new QueryWrapper<>();
|
||||
if (StringUtils.isNotBlank(query.getOrgSid())){
|
||||
qw.eq("s.createOrgSid",query.getOrgSid());
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getGoodsName())) {
|
||||
qw.like("a.goodsName", query.getGoodsName());
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getGoodsTypeSid())) {
|
||||
qw.eq("a.goodsTypeSid", query.getGoodsTypeSid());
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getGoodsPY())) {
|
||||
qw.like("a.goodsPY", query.getGoodsPY());
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getBrandSid())) {
|
||||
qw.like("a.brandSid", query.getBrandSid());
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getGoodsSkuCode())) {
|
||||
qw.like("s.goodsSkuCode", query.getGoodsSkuCode());
|
||||
}
|
||||
if (StringUtils.isNotBlank(query.getTitle())) {
|
||||
qw.like("s.title", query.getTitle());
|
||||
}
|
||||
if (org.apache.commons.lang3.StringUtils.isNotBlank(query.getOtherQuery())){
|
||||
qw.and(wrapper -> wrapper.like("a.goodsName", query.getOtherQuery()).or().like("s.goodsSkuCode", query.getOtherQuery()).or().like("a.goodsPY",query.getOtherQuery()));
|
||||
}
|
||||
IPage<BaseGoodsSku> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseGoodsSkuPurSelectList> pagging = baseMapper.purGoodsListPage(page, qw);
|
||||
PagerVo<BaseGoodsSkuPurSelectList> p = PagerUtil.pageToVo(pagging, null);
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodssku;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSkuVo implements Vo {
|
||||
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 goodsSkuCode;//商品Sku代码
|
||||
private String title;//商品标题
|
||||
private String goodsSpuSid;//商品基础信息Sid
|
||||
private String externalCode;//外部编码
|
||||
private String indexes;//特有规格属性在spu表中special_spec字段对应每个参数值数组下标的组合,如0_0_0,1_0_0,相当于SKU这条记录的编码。
|
||||
@TableField(value = "own_spec")
|
||||
private String ownSpec;//sku的特有规格参数键值对,json格式,反序列化时请使用linkedHashMap,保证有序
|
||||
private String goodsName;
|
||||
private BaseGoodsSkuExtendVo baseGoodsSkuExtend;
|
||||
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsskuextend;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:36
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSkuExtend extends BaseEntity {
|
||||
private String goodsSkuSid;//商品Sku代码
|
||||
private String finalPurchasePrice;//最后采购价
|
||||
private String safetyStockDays;//安全库存天数
|
||||
private String isOriginalFactory;//是否原厂
|
||||
private String isInventoryAlert;//是否库存警戒
|
||||
@TableField(value = "InventoryAlertUpperLimit")
|
||||
private String inventoryAlertUpperLimit;//库存警戒上线
|
||||
@TableField(value = "InventoryAlertLowerLimit")
|
||||
private String inventoryAlertLowerLimit;//库存警戒下线
|
||||
private String costPrice;//成本价
|
||||
private String tagPrice;//吊牌价
|
||||
private String salesPrice;//销售单价
|
||||
private String standardPurchasePrice;//标准进价
|
||||
private String agencyPrice;//代理价
|
||||
private String discount;//折扣
|
||||
private String minimumSalesPrice;//最低零售价
|
||||
private String isLockingSalesPrice;//是否锁定销售价
|
||||
private String isIntegralExchange;//是否可以积分兑换
|
||||
private String integralAmount;//积分数量
|
||||
private String sortNo;//排序
|
||||
private String picUrl;//商品的图片,多个图片以‘,’分割
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsskuextend;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:38
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSkuExtendDto 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 goodsSkuSid;//商品Sku代码
|
||||
private String finalPurchasePrice;//最后采购价
|
||||
private String safetyStockDays;//安全库存天数
|
||||
private String isOriginalFactory;//是否原厂
|
||||
private String isInventoryAlert;//是否库存警戒
|
||||
@TableField(value = "InventoryAlertUpperLimit")
|
||||
private String inventoryAlertUpperLimit;//库存警戒上线
|
||||
@TableField(value = "InventoryAlertLowerLimit")
|
||||
private String inventoryAlertLowerLimit;//库存警戒下线
|
||||
private String costPrice;//成本价
|
||||
private String tagPrice;//吊牌价
|
||||
private String salesPrice;//销售单价
|
||||
private String standardPurchasePrice;//标准进价
|
||||
private String agencyPrice;//代理价
|
||||
private String discount;//折扣
|
||||
private String minimumSalesPrice;//最低零售价
|
||||
private String isLockingSalesPrice;//是否锁定销售价
|
||||
private String isIntegralExchange;//是否可以积分兑换
|
||||
private String integralAmount;//积分数量
|
||||
private String sortNo;//排序
|
||||
private String picUrl;//商品的图片,多个图片以‘,’分割
|
||||
// private String [] Urls={};//图片数组
|
||||
private List<UrlsVo> urls;//图片数组
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsskuextend;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseGoodsSkuExtendMapper extends BaseMapper<BaseGoodsSkuExtend> {
|
||||
|
||||
IPage<BaseGoodsSkuExtendVo> listPage(IPage<BaseGoodsSkuExtend> page, @Param(Constants.WRAPPER) QueryWrapper<BaseGoodsSkuExtend> qw);
|
||||
BaseGoodsSkuExtendVo getExtendBySkuSid(@Param("skuSid")String skuSid);
|
||||
BaseGoodsSkuExtendVo getExtendBySid(@Param("sid")String sid);
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo">
|
||||
select
|
||||
s.*,a.title
|
||||
from base_goods_sku_extend s
|
||||
left join base_goods_sku a on a.sid=s.goodsSkuSid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getExtendBySkuSid" resultType="com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo">
|
||||
select
|
||||
s.*,s.InventoryAlertUpperLimit as inventoryAlertUpperLimit,s.InventoryAlertLowerLimit as inventoryAlertLowerLimit
|
||||
from base_goods_sku_extend s
|
||||
where s.goodsSkuSid=#{skuSid}
|
||||
</select>
|
||||
<select id="getExtendBySid" resultType="com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo">
|
||||
select
|
||||
s.*,s.InventoryAlertUpperLimit as inventoryAlertUpperLimit,s.InventoryAlertLowerLimit as inventoryAlertLowerLimit
|
||||
from base_goods_sku_extend s
|
||||
where s.sid=#{sid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsskuextend;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSkuExtendQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,139 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsskuextend;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.goods.biz.base.basebrandinfo.BaseBrandInfoService;
|
||||
import com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailService;
|
||||
import com.yxt.goods.biz.base.basegoodstype.BaseGoodsTypeService;
|
||||
import com.yxt.goods.biz.base.basemanufacturer.BaseManufacturerService;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseGoodsSkuExtendService extends MybatisBaseService<BaseGoodsSkuExtendMapper, BaseGoodsSkuExtend> {
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
@Autowired
|
||||
private BaseBrandInfoService baseBrandInfoService;
|
||||
@Autowired
|
||||
private BaseGoodsTypeService baseGoodsTypeService;
|
||||
@Autowired
|
||||
private BaseManufacturerService baseManufacturerService;
|
||||
@Autowired
|
||||
BaseGoodsSpuDetailService baseGoodsSpuDetailService;
|
||||
|
||||
public ResultBean<PagerVo<BaseGoodsSkuExtendVo>> listPage(PagerQuery<BaseGoodsSkuExtendQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuExtendQuery query = pq.getParams();
|
||||
QueryWrapper<BaseGoodsSkuExtend> qw = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(query.getName())){
|
||||
qw.like("goodsName",query.getName());
|
||||
}
|
||||
IPage<BaseGoodsSkuExtend> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseGoodsSkuExtendVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseGoodsSkuExtendVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
List<BaseGoodsSkuExtendVo> records = pagging.getRecords();
|
||||
records.removeAll(Collections.singleton(null));
|
||||
// if (!records.isEmpty()) {
|
||||
// for (BaseGoodsSpuVo record : records) {
|
||||
// if (StringUtils.isNotBlank(record.getPicUrl())) {
|
||||
// record.setPicUrl(fileUploadComponent.getUrlPrefix() + record.getPicUrl());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(BaseGoodsSkuExtendDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
BaseGoodsSkuExtend extend=baseMapper.selectOne(new QueryWrapper<BaseGoodsSkuExtend>().eq("sid",dto.getSid()));
|
||||
if (null!=extend) {
|
||||
sid = dto.getSid();
|
||||
BaseGoodsSkuExtend wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
for (UrlsVo url : dto.getUrls()) {
|
||||
String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
String path = url.getUrl().substring(urlPrefix.length());
|
||||
if(StringUtils.isBlank(dto.getPicUrl())){
|
||||
wmsGoods.setPicUrl(path);
|
||||
}else{
|
||||
wmsGoods.setPicUrl(wmsGoods.getPicUrl()+","+path);
|
||||
}
|
||||
}
|
||||
if (StringUtils.isNotBlank(dto.getPicUrl())) {
|
||||
String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
String path = dto.getPicUrl().substring(urlPrefix.length());
|
||||
wmsGoods.setPicUrl(path);
|
||||
}
|
||||
baseMapper.updateById(wmsGoods);
|
||||
|
||||
} else {
|
||||
BaseGoodsSkuExtend wmsGoods = new BaseGoodsSkuExtend();
|
||||
sid = wmsGoods.getSid();
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
for (UrlsVo url : dto.getUrls()) {
|
||||
String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
String path = url.getUrl().substring(urlPrefix.length());
|
||||
if(StringUtils.isBlank(dto.getPicUrl())){
|
||||
wmsGoods.setPicUrl(path);
|
||||
}else{
|
||||
wmsGoods.setPicUrl(wmsGoods.getPicUrl()+","+path);
|
||||
}
|
||||
}
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseGoodsSkuExtendVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuExtendVo vo = baseMapper.getExtendBySid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
public ResultBean<BaseGoodsSkuExtendVo> getExtendBySkuSid(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuExtendVo vo = baseMapper.getExtendBySkuSid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuExtend wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
baseMapper.deleteById(wmsGoods.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
|
||||
public ResultBean updateIsEnable(String sid,String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSkuExtend wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
wmsGoods.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsskuextend;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSkuExtendVo implements Vo {
|
||||
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 goodsSkuSid;//商品Skusid
|
||||
private String finalPurchasePrice;//最后采购价
|
||||
private String safetyStockDays;//安全库存天数
|
||||
private String isOriginalFactory;//是否原厂
|
||||
private String isInventoryAlert;//是否库存警戒
|
||||
@TableField(value = "InventoryAlertUpperLimit")
|
||||
private String inventoryAlertUpperLimit;//库存警戒上线
|
||||
@TableField(value = "InventoryAlertLowerLimit")
|
||||
private String inventoryAlertLowerLimit;//库存警戒下线
|
||||
private String costPrice;//成本价
|
||||
private String tagPrice;//吊牌价
|
||||
private String salesPrice;//销售单价
|
||||
private String standardPurchasePrice;//标准进价
|
||||
private String agencyPrice;//代理价
|
||||
private String discount;//折扣
|
||||
private String minimumSalesPrice;//最低零售价
|
||||
private String isLockingSalesPrice;//是否锁定销售价
|
||||
private String isIntegralExchange;//是否可以积分兑换
|
||||
private String integralAmount;//积分数量
|
||||
private String sortNo;//排序
|
||||
private String picUrl;//商品的图片,多个图片以‘,’分割
|
||||
// private String [] Urls={};//图片数组
|
||||
private List<UrlsVo> urls;//图片数组
|
||||
private String title;//sku标题
|
||||
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsskuextend;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/3/22 10:20
|
||||
*/
|
||||
@Data
|
||||
public class UrlsVo {
|
||||
private String url;
|
||||
}
|
||||
@@ -1,32 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspu;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:36
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSpu extends BaseEntity {
|
||||
private String goodsCode;//商品代码
|
||||
private String barCode;//条形码
|
||||
private String goodsName;//商品名称
|
||||
private String subTitle;//商品名称
|
||||
private String goodsPY;//拼音缩写
|
||||
private String goodsShortName;//商品简称
|
||||
private String goodsTypeSid;//商品分类sid
|
||||
private String brandSid;//品牌sid
|
||||
private String manufacturerSid;//厂家sid
|
||||
private String goodsUnitSid;//商品单位sid
|
||||
private String goodsUnitName;//商品单位名称
|
||||
private String taxRate;//税率
|
||||
private String shelfLife;//保质期天
|
||||
private String nationalStandardCode;//国标码
|
||||
private String sortNo;//排序
|
||||
private String externalCode;//外部编码
|
||||
private String factoryCode;//厂家货号
|
||||
private String isListed;//是否上架
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspu;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuDto;
|
||||
import com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailDto;
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:38
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSpuDto 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 goodsCode;//商品代码
|
||||
private String barCode;//条形码
|
||||
private String goodsName;//商品名称
|
||||
private String subTitle;//副标题
|
||||
private String goodsPY;//拼音缩写
|
||||
private String goodsShortName;//商品简称
|
||||
private String goodsTypeSid;//商品分类sid
|
||||
private String brandSid;//品牌sid
|
||||
private String manufacturerSid;//厂家sid
|
||||
private String goodsUnitSid;//商品单位sid
|
||||
private String goodsUnitName;//商品单位名称
|
||||
private String taxRate;//税率
|
||||
private String shelfLife;//保质期天
|
||||
private String nationalStandardCode;//国标码
|
||||
private String sortNo;//排序
|
||||
private String externalCode;//外部编码
|
||||
private String factoryCode;//厂家货号
|
||||
private String isListed;//是否上架
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
private BaseGoodsSpuDetailDto baseGoodsSpuDetail;//商品spu详情
|
||||
private List<BaseGoodsSkuDto> baseGoodsSkus;//商品sku
|
||||
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspu;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseGoodsSpuMapper extends BaseMapper<BaseGoodsSpu> {
|
||||
|
||||
IPage<BaseGoodsSpuVo> listPage(IPage<BaseGoodsSpu> page, @Param(Constants.WRAPPER) QueryWrapper<BaseGoodsSpu> qw);
|
||||
BaseGoodsSpuVo initialization(@Param("sid")String sid);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basegoodsspu.BaseGoodsSpuMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basegoodsspu.BaseGoodsSpuVo">
|
||||
select
|
||||
s.*,a.goodsTypeName as typeName,b.brandName as brandName,c.manufacturerName as manufacturerName
|
||||
from base_goods_spu s
|
||||
left join base_goods_type a on a.sid=s.goodsTypeSid
|
||||
left join base_brand_info b on b.sid=s.brandSid
|
||||
left join base_manufacturer c on c.sid=s.manufacturerSid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
<select id="initialization" resultType="com.yxt.goods.biz.base.basegoodsspu.BaseGoodsSpuVo">
|
||||
select
|
||||
s.*,a.goodsTypeName as typeName,b.brandName as brandName,c.manufacturerName as manufacturerName
|
||||
from base_goods_spu s
|
||||
left join base_goods_type a on a.sid=s.goodsTypeSid
|
||||
left join base_brand_info b on b.sid=s.brandSid
|
||||
left join base_manufacturer c on c.sid=s.manufacturerSid
|
||||
where s.sid=#{sid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspu;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSpuQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,165 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspu;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuService;
|
||||
import com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuVo;
|
||||
import com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendService;
|
||||
import com.yxt.goods.biz.base.basegoodsskuextend.BaseGoodsSkuExtendVo;
|
||||
import com.yxt.goods.biz.base.basegoodsskuextend.UrlsVo;
|
||||
import com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailService;
|
||||
import com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailVo;
|
||||
import com.yxt.goods.biz.base.basegoodsunit.BaseGoodsUnit;
|
||||
import com.yxt.goods.biz.base.basegoodsunit.BaseGoodsUnitService;
|
||||
import com.yxt.goods.utils.PinYinUtils;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseGoodsSpuService extends MybatisBaseService<BaseGoodsSpuMapper, BaseGoodsSpu> {
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
@Autowired
|
||||
BaseGoodsSpuDetailService baseGoodsSpuDetailService;
|
||||
@Autowired
|
||||
BaseGoodsSkuService baseGoodsSkuService;
|
||||
@Autowired
|
||||
BaseGoodsUnitService baseGoodsUnitService;
|
||||
@Autowired
|
||||
BaseGoodsSkuExtendService baseGoodsSkuExtendService;
|
||||
|
||||
|
||||
public ResultBean<PagerVo<BaseGoodsSpuVo>> listPage(PagerQuery<BaseGoodsSpuQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpuQuery query = pq.getParams();
|
||||
QueryWrapper<BaseGoodsSpu> qw = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(query.getName())){
|
||||
qw.like("goodsName",query.getName());
|
||||
}
|
||||
IPage<BaseGoodsSpu> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseGoodsSpuVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseGoodsSpuVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
List<BaseGoodsSpuVo> records = pagging.getRecords();
|
||||
records.removeAll(Collections.singleton(null));
|
||||
// if (!records.isEmpty()) {
|
||||
// for (BaseGoodsSpuVo record : records) {
|
||||
// if (StringUtils.isNotBlank(record.getPicUrl())) {
|
||||
// record.setPicUrl(fileUploadComponent.getUrlPrefix() + record.getPicUrl());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(BaseGoodsSpuDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
BaseGoodsSpu spun= baseMapper.selectOne(new QueryWrapper<BaseGoodsSpu>().eq("sid",dto.getSid()));
|
||||
BaseGoodsUnit baseGoodsUnit=baseGoodsUnitService.getOne(new QueryWrapper<BaseGoodsUnit>().eq("sid",dto.getGoodsUnitSid()));
|
||||
if(null!=baseGoodsUnit){
|
||||
dto.setGoodsUnitName(baseGoodsUnit.getUnitName());
|
||||
}
|
||||
|
||||
if (spun!=null) {
|
||||
if(!spun.getSid().equals(dto.getSid())){
|
||||
return rb.setMsg("商品编码重复");
|
||||
}
|
||||
sid = dto.getSid();
|
||||
BaseGoodsSpu wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
wmsGoods.setGoodsPY(PinYinUtils.getPinYinName(wmsGoods.getGoodsName()));;
|
||||
baseMapper.updateById(wmsGoods);
|
||||
//spu详情
|
||||
dto.getBaseGoodsSpuDetail().setGoodSpuSid(wmsGoods.getSid());
|
||||
baseGoodsSpuDetailService.saveOrUpdate(dto.getBaseGoodsSpuDetail());
|
||||
//商品sku
|
||||
dto.getBaseGoodsSkus().forEach(s->{
|
||||
s.setGoodsSpuSid(wmsGoods.getSid());
|
||||
});
|
||||
baseGoodsSkuService.saveOrUpdate(dto.getBaseGoodsSkus());
|
||||
} else {
|
||||
BaseGoodsSpu spu=baseMapper.selectOne(new QueryWrapper<BaseGoodsSpu>().eq("goodsCode",dto.getGoodsCode()));
|
||||
if(spu!=null){
|
||||
return rb.setMsg("商品编码重复");
|
||||
}
|
||||
BaseGoodsSpu wmsGoods = new BaseGoodsSpu();
|
||||
sid = wmsGoods.getSid();
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
//spu详情
|
||||
dto.getBaseGoodsSpuDetail().setGoodSpuSid(wmsGoods.getSid());
|
||||
baseGoodsSpuDetailService.saveOrUpdate(dto.getBaseGoodsSpuDetail());
|
||||
//商品sku
|
||||
dto.getBaseGoodsSkus().forEach(s->{
|
||||
s.setGoodsSpuSid(wmsGoods.getSid());
|
||||
});
|
||||
baseGoodsSkuService.saveOrUpdate(dto.getBaseGoodsSkus());
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseGoodsSpuVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpuVo vo = baseMapper.initialization(sid);
|
||||
BaseGoodsSpuDetailVo vo1=baseGoodsSpuDetailService.getSpuDetailsBySpuSid(vo.getSid()).getData();
|
||||
vo.setBaseGoodsSpuDetail(vo1);
|
||||
List<BaseGoodsSkuVo> vos=baseGoodsSkuService.getSkusBySpuSid(vo.getSid()).getData();
|
||||
for (BaseGoodsSkuVo baseGoodsSkuVo : vos) {
|
||||
List<UrlsVo> ur=new ArrayList<>();
|
||||
BaseGoodsSkuExtendVo vo2=baseGoodsSkuExtendService.getExtendBySkuSid(baseGoodsSkuVo.getSid()).getData();
|
||||
if(StringUtils.isNotBlank(vo2.getPicUrl())){
|
||||
for (String url : vo2.getPicUrl().split(",")) {
|
||||
url=fileUploadComponent.getUrlPrefix()+url;
|
||||
UrlsVo vo3=new UrlsVo();vo3.setUrl(url);
|
||||
ur.add(vo3);
|
||||
}
|
||||
}
|
||||
vo2.setUrls(ur);
|
||||
baseGoodsSkuVo.setBaseGoodsSkuExtend(vo2);
|
||||
}
|
||||
vo.setBaseGoodsSkus(vos);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpu wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
baseMapper.deleteById(wmsGoods.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
|
||||
public ResultBean updateIsEnable(String sid,String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpu wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
wmsGoods.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspu;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.goods.biz.base.basegoodssku.BaseGoodsSkuVo;
|
||||
import com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailVo;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSpuVo implements Vo {
|
||||
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 goodsCode;//商品代码
|
||||
private String barCode;//条形码
|
||||
private String goodsName;//商品名称
|
||||
private String subTitle;//商品名称
|
||||
private String goodsPY;//拼音缩写
|
||||
private String goodsShortName;//商品简称
|
||||
private String goodsTypeSid;//商品分类sid
|
||||
private String brandSid;//品牌sid
|
||||
private String manufacturerSid;//厂家sid
|
||||
private String goodsUnitSid;//商品单位sid
|
||||
private String goodsUnitName;//商品单位名称
|
||||
private String taxRate;//税率
|
||||
private String shelfLife;//保质期天
|
||||
private String nationalStandardCode;//国标码
|
||||
private String sortNo;//排序
|
||||
private String externalCode;//外部编码
|
||||
private String factoryCode;//厂家货号
|
||||
private String isListed;//是否上架
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
private BaseGoodsSpuDetailVo baseGoodsSpuDetail;
|
||||
private List<BaseGoodsSkuVo> baseGoodsSkus;
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspudetail;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:36
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSpuDetail extends BaseEntity {
|
||||
private String goodSpuSid;//商品基础信息Sid
|
||||
private String goodsExplain;//商品详细说明
|
||||
private String goodsDescription;//商品描述
|
||||
@TableField(value = "generic_spec")
|
||||
private String genericSpec;//通用规格参数及数据,json格式(规格参数id,规格参数值的键值对)
|
||||
@TableField(value = "special_spec")
|
||||
private String specialSpec;//特有规格参数及可选值信息,json格式(特有规格参数id,[可选参数值])
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspudetail;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
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 BaseGoodsSpuDetailDto 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 goodSpuSid;//商品基础信息Sid
|
||||
private String goodsExplain;//商品详细说明
|
||||
private String goodsDescription;//商品描述
|
||||
@TableField(value = "generic_spec")
|
||||
private String genericSpec;//通用规格参数及数据,json格式(规格参数id,规格参数值的键值对)
|
||||
@TableField(value = "special_spec")
|
||||
private String specialSpec;//特有规格参数及可选值信息,json格式(特有规格参数id,[可选参数值])
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspudetail;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseGoodsSpuDetailMapper extends BaseMapper<BaseGoodsSpuDetail> {
|
||||
|
||||
IPage<BaseGoodsSpuDetailVo> listPage(IPage<BaseGoodsSpuDetail> page, @Param(Constants.WRAPPER) QueryWrapper<BaseGoodsSpuDetail> qw);
|
||||
|
||||
BaseGoodsSpuDetailVo getSpuDetailsBySpuSid (@Param("skuSid")String skuSid);
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailVo">
|
||||
select
|
||||
s.*,a.goodsName
|
||||
from base_goods_spu_detail s
|
||||
left join base_goods_spu a on a.sid=s.goodSpuSid
|
||||
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getSpuDetailsBySpuSid" resultType="com.yxt.goods.biz.base.basegoodsspudetail.BaseGoodsSpuDetailVo">
|
||||
select
|
||||
s.*,s.generic_spec as genericSpec,s.special_spec as specialSpec
|
||||
from base_goods_spu_detail s
|
||||
where s.goodSpuSid=#{skuSid}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspudetail;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSpuDetailQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,105 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspudetail;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.goods.biz.base.basebrandinfo.BaseBrandInfoService;
|
||||
import com.yxt.goods.biz.base.basegoodstype.BaseGoodsTypeService;
|
||||
import com.yxt.goods.biz.base.basemanufacturer.BaseManufacturerService;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseGoodsSpuDetailService extends MybatisBaseService<BaseGoodsSpuDetailMapper, BaseGoodsSpuDetail> {
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
@Autowired
|
||||
private BaseBrandInfoService baseBrandInfoService;
|
||||
@Autowired
|
||||
private BaseGoodsTypeService baseGoodsTypeService;
|
||||
@Autowired
|
||||
private BaseManufacturerService wmsManufacturerService;
|
||||
public ResultBean<PagerVo<BaseGoodsSpuDetailVo>> listPage(PagerQuery<BaseGoodsSpuDetailQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpuDetailQuery query = pq.getParams();
|
||||
QueryWrapper<BaseGoodsSpuDetail> qw = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(query.getName())){
|
||||
qw.like("goodsName",query.getName());
|
||||
}
|
||||
IPage<BaseGoodsSpuDetail> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseGoodsSpuDetailVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseGoodsSpuDetailVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
|
||||
public ResultBean<String> saveOrUpdate(BaseGoodsSpuDetailDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpuDetail detail=baseMapper.selectOne(new QueryWrapper<BaseGoodsSpuDetail>().eq("sid",dto.getSid()));
|
||||
String sid = "";
|
||||
if (null!=detail) {
|
||||
sid = dto.getSid();
|
||||
BaseGoodsSpuDetail baseGoodsSpuDetail = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, baseGoodsSpuDetail);
|
||||
baseGoodsSpuDetail.setModifyTime(new Date());
|
||||
baseMapper.updateById(baseGoodsSpuDetail);
|
||||
} else {
|
||||
|
||||
BaseGoodsSpuDetail baseGoodsSpuDetail = new BaseGoodsSpuDetail();
|
||||
sid = baseGoodsSpuDetail.getSid();
|
||||
BeanUtil.copyProperties(dto, baseGoodsSpuDetail);
|
||||
baseGoodsSpuDetail.setCreateTime(new DateTime());
|
||||
|
||||
baseMapper.insert(baseGoodsSpuDetail);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseGoodsSpuDetailVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpuDetailVo vo = new BaseGoodsSpuDetailVo();
|
||||
BaseGoodsSpuDetail wmsGoods = fetchBySid(sid);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
BeanUtil.copyProperties(wmsGoods, vo);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
public ResultBean<BaseGoodsSpuDetailVo> getSpuDetailsBySpuSid(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpuDetailVo vo = baseMapper.getSpuDetailsBySpuSid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpuDetail wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
baseMapper.deleteById(wmsGoods.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
|
||||
public ResultBean updateIsEnable(String sid,String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsSpuDetail wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
wmsGoods.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsspudetail;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsSpuDetailVo implements Vo {
|
||||
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 goodSpuSid;//商品基础信息Sid
|
||||
private String goodsExplain;//商品详细说明
|
||||
private String goodsDescription;//商品描述
|
||||
@TableField(value = "generic_spec")
|
||||
private String genericSpec;//通用规格参数及数据,json格式(规格参数id,规格参数值的键值对)
|
||||
@TableField(value = "special_spec")
|
||||
private String specialSpec;//特有规格参数及可选值信息,json格式(特有规格参数id,[可选参数值])
|
||||
private String goodsName;
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodstype;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:36
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsType extends BaseEntity {
|
||||
private String goodsTypeName;//商品类别名称
|
||||
private String goodsTypeCode;//类别编码
|
||||
private String percentageRate;//提成比例
|
||||
private String percentageAmount;//提成金额
|
||||
private String pSid;//父级sid
|
||||
private String isParent;//是否为父节点,0为否,1为是,0标识为叶子节点
|
||||
private String isGoodsID;//是否一品一码 0 否 1是
|
||||
private String sortNo;//排序
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodstype;
|
||||
|
||||
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 BaseGoodsTypeDto 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 goodsTypeName;//商品类别名称
|
||||
private String goodsTypeCode;//类别编码
|
||||
private String percentageRate;//提成比例
|
||||
private String percentageAmount;//提成金额
|
||||
private String pSid;//父级sid
|
||||
private String isParent;//是否为父节点,0为否,1为是,0标识为叶子节点
|
||||
private String isGoodsID;//是否一品一码 0 否 1是
|
||||
private String sortNo;//排序
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
private String pName;//创建组织sid
|
||||
private String sids;//父级sid
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodstype;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseGoodsTypeMapper extends BaseMapper<BaseGoodsType> {
|
||||
IPage<BaseGoodsTypeVo> listPage(IPage<BaseGoodsType> page, @Param(Constants.WRAPPER) QueryWrapper<BaseGoodsType> qw);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basegoodstype.BaseGoodsTypeMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basegoodstype.BaseGoodsTypeVo">
|
||||
select
|
||||
*
|
||||
from base_goods_type
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodstype;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsTypeQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodstype;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseGoodsTypeService extends MybatisBaseService<BaseGoodsTypeMapper, BaseGoodsType> {
|
||||
|
||||
|
||||
public ResultBean<PagerVo<BaseGoodsTypeVo>> listPage(PagerQuery<BaseGoodsTypeQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsTypeQuery query = pq.getParams();
|
||||
QueryWrapper<BaseGoodsType> qw = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(query.getName())){
|
||||
qw.like("goodsTypeName",query.getName());
|
||||
}
|
||||
|
||||
IPage<BaseGoodsType> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseGoodsTypeVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseGoodsTypeVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
List<BaseGoodsTypeVo> records = pagging.getRecords();
|
||||
for (BaseGoodsTypeVo record : records) {
|
||||
if(StringUtils.isNotBlank(record.getPSid())){
|
||||
BaseGoodsType wmsGoodsType1 = fetchBySid(record.getPSid());
|
||||
record.setPName(wmsGoodsType1.getGoodsTypeName());
|
||||
record.setSids(record.getPSid());
|
||||
}
|
||||
}
|
||||
return rb.success().setData(p);
|
||||
} public ResultBean<List<BaseGoodsType>> listAll() {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseGoodsType> pagging = baseMapper.selectList(new QueryWrapper<BaseGoodsType>().eq("isEnable",1));
|
||||
return rb.success().setData(pagging);
|
||||
}
|
||||
|
||||
public ResultBean<String> saveOrUpdate(BaseGoodsTypeDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
dto.setPSid(dto.getSids());
|
||||
if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
sid = dto.getSid();
|
||||
BaseGoodsType wmsGoodsType = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoodsType, "id", "sid");
|
||||
wmsGoodsType.setModifyTime(new Date());
|
||||
wmsGoodsType.setIsParent("0");
|
||||
if(StringUtils.isBlank(wmsGoodsType.getPSid())){
|
||||
wmsGoodsType.setIsParent("1");
|
||||
}
|
||||
baseMapper.updateById(wmsGoodsType);
|
||||
} else {
|
||||
BaseGoodsType wmsGoods = new BaseGoodsType();
|
||||
sid = wmsGoods.getSid();
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
wmsGoods.setIsParent("0");
|
||||
if(StringUtils.isBlank(wmsGoods.getPSid())){
|
||||
wmsGoods.setIsParent("1");
|
||||
}
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseGoodsTypeVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsTypeVo vo = new BaseGoodsTypeVo();
|
||||
BaseGoodsType wmsGoodsType = fetchBySid(sid);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if (null != wmsGoodsType) {
|
||||
BeanUtil.copyProperties(wmsGoodsType, vo);
|
||||
// if (StringUtils.isNotBlank(wmsGoods.getPicUrl())) {
|
||||
// vo.setPicUrl(fileUploadComponent.getUrlPrefix() + wmsGoods.getPicUrl());
|
||||
// }
|
||||
// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime()));
|
||||
if(StringUtils.isNotBlank(wmsGoodsType.getPSid())){
|
||||
BaseGoodsType wmsGoodsType1 = fetchBySid(wmsGoodsType.getPSid());
|
||||
vo.setPName(wmsGoodsType1.getGoodsTypeName());
|
||||
}
|
||||
vo.setSids(wmsGoodsType.getPSid());
|
||||
}
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsType wmsGoodsType = fetchBySid(sid);
|
||||
if (null != wmsGoodsType) {
|
||||
baseMapper.deleteById(wmsGoodsType.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
public ResultBean updateIsEnable(String sid,String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsType wmsGoodsType = fetchBySid(sid);
|
||||
if (null != wmsGoodsType) {
|
||||
wmsGoodsType.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoodsType);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodstype;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsTypeVo implements Vo {
|
||||
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 goodsTypeName;//商品类别名称
|
||||
private String goodsTypeCode;//类别编码
|
||||
private String percentageRate;//提成比例
|
||||
private String percentageAmount;//提成金额
|
||||
private String pSid;//父级sid
|
||||
private String pName;//父级sid
|
||||
private String isParent;//是否为父节点,0为否,1为是,0标识为叶子节点
|
||||
private String isGoodsID;//是否一品一码 0 否 1是
|
||||
private String sortNo;//排序
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
private String sids;//创建组织sid
|
||||
}
|
||||
@@ -1,14 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsunit;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:36
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsUnit extends BaseEntity {
|
||||
|
||||
private String unitName;//单位名称
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsunit;
|
||||
|
||||
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 BaseGoodsUnitDto implements Dto {
|
||||
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 unitName;//单位名称
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsunit;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseGoodsUnitMapper extends BaseMapper<BaseGoodsUnit> {
|
||||
IPage<BaseGoodsUnitVo> listPage(IPage<BaseGoodsUnit> page, @Param(Constants.WRAPPER) QueryWrapper<BaseGoodsUnit> qw);
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basegoodsunit.BaseGoodsUnitMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basegoodsunit.BaseGoodsUnitVo">
|
||||
select
|
||||
*
|
||||
from base_goods_unit
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsunit;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsUnitQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,107 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsunit;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseGoodsUnitService extends MybatisBaseService<BaseGoodsUnitMapper, BaseGoodsUnit> {
|
||||
|
||||
|
||||
public ResultBean<PagerVo<BaseGoodsUnitVo>> listPage(PagerQuery<BaseGoodsUnitQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsUnitQuery query = pq.getParams();
|
||||
QueryWrapper<BaseGoodsUnit> qw = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(query.getName())){
|
||||
qw.like("unitName",query.getName());
|
||||
}
|
||||
|
||||
IPage<BaseGoodsUnit> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseGoodsUnitVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseGoodsUnitVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
List<BaseGoodsUnitVo> records = pagging.getRecords();
|
||||
return rb.success().setData(p);
|
||||
} public ResultBean<List<BaseGoodsUnit>> listAll() {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseGoodsUnit> pagging = baseMapper.selectList(new QueryWrapper<BaseGoodsUnit>().eq("isEnable",1));
|
||||
return rb.success().setData(pagging);
|
||||
}
|
||||
|
||||
public ResultBean<String> saveOrUpdate(BaseGoodsUnitDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
sid = dto.getSid();
|
||||
BaseGoodsUnit wmsGoodsType = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoodsType, "id", "sid");
|
||||
wmsGoodsType.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoodsType);
|
||||
} else {
|
||||
BaseGoodsUnit wmsGoods = new BaseGoodsUnit();
|
||||
sid = wmsGoods.getSid();
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
// if (StringUtils.isNotBlank(dto.getPicUrl())) {
|
||||
// String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
// String path = dto.getPicUrl().substring(urlPrefix.length());
|
||||
// lpkGoods.setPicUrl(path);
|
||||
// }
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseGoodsUnitVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsUnitVo vo = new BaseGoodsUnitVo();
|
||||
BaseGoodsUnit wmsGoodsType = fetchBySid(sid);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
BeanUtil.copyProperties(wmsGoodsType, vo);
|
||||
if (null != wmsGoodsType) {
|
||||
// BeanUtil.copyProperties(wmsGoodsType, vo);
|
||||
// if (StringUtils.isNotBlank(wmsGoods.getPicUrl())) {
|
||||
// vo.setPicUrl(fileUploadComponent.getUrlPrefix() + wmsGoods.getPicUrl());
|
||||
// }
|
||||
// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime()));
|
||||
// BaseGoodsUnit wmsGoodsType1 = fetchBySid(wmsGoodsType.getPSid());
|
||||
// vo.setPName(wmsGoodsType1.getGoodsTypeName());
|
||||
}
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsUnit wmsGoodsType = fetchBySid(sid);
|
||||
if (null != wmsGoodsType) {
|
||||
baseMapper.deleteById(wmsGoodsType.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
public ResultBean updateIsEnable(String sid,String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseGoodsUnit wmsGoodsType = fetchBySid(sid);
|
||||
if (null != wmsGoodsType) {
|
||||
wmsGoodsType.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoodsType);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basegoodsunit;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseGoodsUnitVo implements Vo {
|
||||
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 unitName;//单位名称
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basemanufacturer;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:36
|
||||
*/
|
||||
@Data
|
||||
public class BaseManufacturer extends BaseEntity {
|
||||
private String manufacturerName;//厂家名称
|
||||
private String manufacturerCode;//厂家编码
|
||||
private String address;//地址
|
||||
private String telephone;//电话
|
||||
private String contacts;//联系人
|
||||
private String sortNo;//排序
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
}
|
||||
@@ -1,35 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basemanufacturer;
|
||||
|
||||
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 BaseManufacturerDto implements Dto {
|
||||
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 manufacturerName;//厂家名称
|
||||
private String manufacturerCode;//厂家编码
|
||||
private String address;//地址
|
||||
private String telephone;//电话
|
||||
private String contacts;//联系人
|
||||
private String sortNo;//排序
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basemanufacturer;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseManufacturerMapper extends BaseMapper<BaseManufacturer> {
|
||||
IPage<BaseManufacturerVo> listPage(IPage<BaseManufacturer> page, @Param(Constants.WRAPPER) QueryWrapper<BaseManufacturer> qw);
|
||||
|
||||
List<BaseManufacturerVo> getAllTypeByUseOrgSid(@Param("useOrgSid") String useOrgSid);
|
||||
}
|
||||
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basemanufacturer.BaseManufacturerMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basemanufacturer.BaseManufacturerVo">
|
||||
select
|
||||
*
|
||||
from base_manufacturer
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getAllTypeByUseOrgSid" resultType="com.yxt.goods.biz.base.basemanufacturer.BaseManufacturerVo">
|
||||
select *
|
||||
from base_manufacturer
|
||||
where useOrgSid = #{useOrgSid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basemanufacturer;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseManufacturerQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,111 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basemanufacturer;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseManufacturerService extends MybatisBaseService<BaseManufacturerMapper, BaseManufacturer> {
|
||||
|
||||
|
||||
public ResultBean<PagerVo<BaseManufacturerVo>> listPage(PagerQuery<BaseManufacturerQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseManufacturerQuery query = pq.getParams();
|
||||
QueryWrapper<BaseManufacturer> qw = new QueryWrapper<>();
|
||||
if(StringUtils.isNotBlank(query.getName())){
|
||||
qw.like("goodsTypeName",query.getName());
|
||||
}
|
||||
|
||||
IPage<BaseManufacturer> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseManufacturerVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseManufacturerVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
List<BaseManufacturerVo> records = pagging.getRecords();
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
public ResultBean<List<BaseManufacturer>> listAll() {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseManufacturer> pagging = baseMapper.selectList(new QueryWrapper<BaseManufacturer>().eq("isEnable",1));
|
||||
return rb.success().setData(pagging);
|
||||
}
|
||||
|
||||
public ResultBean<String> saveOrUpdate(BaseManufacturerDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
sid = dto.getSid();
|
||||
BaseManufacturer wmsManufacturer = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsManufacturer, "id", "sid");
|
||||
wmsManufacturer.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsManufacturer);
|
||||
} else {
|
||||
BaseManufacturer wmsManufacturer = new BaseManufacturer();
|
||||
sid = wmsManufacturer.getSid();
|
||||
BeanUtil.copyProperties(dto, wmsManufacturer, "id", "sid");
|
||||
wmsManufacturer.setCreateTime(new DateTime());
|
||||
// if (StringUtils.isNotBlank(dto.getPicUrl())) {
|
||||
// String urlPrefix = fileUploadComponent.getUrlPrefix();
|
||||
// String path = dto.getPicUrl().substring(urlPrefix.length());
|
||||
// lpkGoods.setPicUrl(path);
|
||||
// }
|
||||
baseMapper.insert(wmsManufacturer);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseManufacturerVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseManufacturerVo vo = new BaseManufacturerVo();
|
||||
BaseManufacturer wmsManufacturer = fetchBySid(sid);
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
if (null != wmsManufacturer) {
|
||||
BeanUtil.copyProperties(wmsManufacturer, vo);
|
||||
// if (StringUtils.isNotBlank(wmsGoods.getPicUrl())) {
|
||||
// vo.setPicUrl(fileUploadComponent.getUrlPrefix() + wmsGoods.getPicUrl());
|
||||
// }
|
||||
// vo.setCreateTime(sdf.format(lpkGoods.getCreateTime()));
|
||||
}
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseManufacturer wmsManufacturer = fetchBySid(sid);
|
||||
if (null != wmsManufacturer) {
|
||||
baseMapper.deleteById(wmsManufacturer.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
public ResultBean updateIsEnable(String sid,String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseManufacturer wmsManufacturer = fetchBySid(sid);
|
||||
if (null != wmsManufacturer) {
|
||||
wmsManufacturer.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsManufacturer);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<List<BaseManufacturerVo>> getAllTypeByUseOrgSid(String useOrgSid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseManufacturerVo> list = baseMapper.getAllTypeByUseOrgSid(useOrgSid);
|
||||
return rb.success().setData(list);
|
||||
}
|
||||
}
|
||||
@@ -1,36 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basemanufacturer;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:37
|
||||
*/
|
||||
@Data
|
||||
public class BaseManufacturerVo implements Vo {
|
||||
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 createBySid;
|
||||
private String updateBySid;
|
||||
private String manufacturerName;//厂家名称
|
||||
private String manufacturerCode;//厂家编码
|
||||
private String address;//地址
|
||||
private String telephone;//电话
|
||||
private String contacts;//联系人
|
||||
private String sortNo;//排序
|
||||
private String useOrgSid;//使用组织sid
|
||||
private String createOrgSid;//创建组织sid
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecgroup;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseSpecGroup extends BaseEntity {
|
||||
private String categorySid;//商品分类sid
|
||||
private String groupName;//组名
|
||||
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecgroup;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseSpecGroupDto {
|
||||
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 categorySid;//商品分类sid
|
||||
private String groupName;//组名
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecgroup;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseSpecGroupMapper extends BaseMapper<BaseSpecGroup> {
|
||||
|
||||
IPage<BaseSpecGroupVo> listPage(IPage<BaseSpecGroup> page, @Param(Constants.WRAPPER) QueryWrapper<BaseSpecGroup> qw);
|
||||
List<BaseSpecGroupVo> getSkusBySpuSid(@Param("spuSid")String spuSid);
|
||||
BaseSpecGroupVo getVoBySid(@Param("sid")String sid);
|
||||
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basespecgroup.BaseSpecGroupMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basespecgroup.BaseSpecGroupVo">
|
||||
select s.*,a.goodsTypeName as categoryName
|
||||
from base_spec_group s
|
||||
left join base_goods_type a on a.sid =s.categroySid
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getSkusBySpuSid" resultType="com.yxt.goods.biz.base.basespecgroup.BaseSpecGroupVo">
|
||||
select s.*,
|
||||
s.own_spec as ownSpec
|
||||
from base_goods_sku s
|
||||
where s.goodsSpuSid = #{spuSid}
|
||||
</select>
|
||||
<select id="getVoBySid" resultType="com.yxt.goods.biz.base.basespecgroup.BaseSpecGroupVo">
|
||||
select s.*,a.goodsTypeName as categoryName
|
||||
from base_spec_group s
|
||||
left join base_goods_type a on a.sid =s.categroySid
|
||||
where s.sid = #{sid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecgroup;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseSpecGroupQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,115 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecgroup;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseSpecGroupService extends MybatisBaseService<BaseSpecGroupMapper, BaseSpecGroup> {
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
|
||||
|
||||
public ResultBean<PagerVo<BaseSpecGroupVo>> listPage(PagerQuery<BaseSpecGroupQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseSpecGroupQuery query = pq.getParams();
|
||||
QueryWrapper<BaseSpecGroup> qw = new QueryWrapper<>();
|
||||
if (StringUtils.isNotBlank(query.getName())) {
|
||||
qw.like("goodsName", query.getName());
|
||||
}
|
||||
IPage<BaseSpecGroup> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseSpecGroupVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseSpecGroupVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(BaseSpecGroupDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
sid = dto.getSid();
|
||||
BaseSpecGroup wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoods);
|
||||
} else {
|
||||
BaseSpecGroup wmsGoods = new BaseSpecGroup();
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(List<BaseSpecGroupDto> dtos) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
for (BaseSpecGroupDto dto : dtos) {
|
||||
BaseSpecGroup sku=baseMapper.selectOne(new QueryWrapper<BaseSpecGroup>().eq("sid",dto.getSid()));
|
||||
String sid = "";
|
||||
if (null!=sku) {
|
||||
sid = dto.getSid();
|
||||
BaseSpecGroup wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoods);
|
||||
} else {
|
||||
BaseSpecGroup wmsGoods = new BaseSpecGroup();
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
}
|
||||
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseSpecGroupVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseSpecGroupVo vo = baseMapper.getVoBySid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
public ResultBean<List<BaseSpecGroupVo>> getSkusBySpuSid(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseSpecGroupVo> vo = baseMapper.getSkusBySpuSid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseSpecGroup wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
baseMapper.deleteById(wmsGoods.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
|
||||
public ResultBean updateIsEnable(String sid, String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseSpecGroup wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
wmsGoods.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecgroup;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseSpecGroupVo {
|
||||
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 categorySid;//商品分类sid
|
||||
private String categoryName;//商品分类名
|
||||
private String groupName;//组名
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecparam;
|
||||
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseSpecParam extends BaseEntity {
|
||||
private String categorySid;//商品分类sid
|
||||
private String groupSid;//参数组sid
|
||||
private String paramName;//参数名
|
||||
private String numeric;//是否数字类型 1 true 2false
|
||||
private String unit;//数字类型的单位 非数字行可为空
|
||||
private String generic;//是否sku通用属性1true 2 false
|
||||
private String searching;//是否用于搜索过滤 1true 2 false
|
||||
private String segments;//数值类型参数,如果需要搜索。则添加分段间隔值
|
||||
|
||||
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecparam;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseSpecParamDto {
|
||||
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 categorySid;//商品分类sid
|
||||
private String groupSid;//参数组sid
|
||||
private String paramName;//参数名
|
||||
private String numeric;//是否数字类型 1 true 2false
|
||||
private String unit;//数字类型的单位 非数字行可为空
|
||||
private String generic;//是否sku通用属性1true 2 false
|
||||
private String searching;//是否用于搜索过滤 1true 2 false
|
||||
private String segments;//数值类型参数,如果需要搜索。则添加分段间隔值
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecparam;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseSpecParamMapper extends BaseMapper<BaseSpecParam> {
|
||||
|
||||
IPage<BaseSpecParamVo> listPage(IPage<BaseSpecParam> page, @Param(Constants.WRAPPER) QueryWrapper<BaseSpecParam> qw);
|
||||
List<BaseSpecParamVo> getSkusBySpuSid(@Param("spuSid")String spuSid);
|
||||
BaseSpecParamVo getVoBySid(@Param("sid")String sid);
|
||||
|
||||
}
|
||||
@@ -1,29 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basespecparam.BaseSpecParamMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
|
||||
<select id="listPage" resultType="com.yxt.goods.biz.base.basespecparam.BaseSpecParamVo">
|
||||
select s.*,a.groupName,b.goodsTypeName as categoryName
|
||||
from base_spec_param s
|
||||
left join base_spec_group a on a.sid=s.groupSid
|
||||
left join base_goods_type b on b.sid =s.categorySid;
|
||||
<where>
|
||||
${ew.sqlSegment}
|
||||
</where>
|
||||
</select>
|
||||
<select id="getSkusBySpuSid" resultType="com.yxt.goods.biz.base.basespecparam.BaseSpecParamVo">
|
||||
select s.*,
|
||||
s.own_spec as ownSpec
|
||||
from base_goods_sku s
|
||||
where s.goodsSpuSid = #{spuSid}
|
||||
</select>
|
||||
<select id="getVoBySid" resultType="com.yxt.goods.biz.base.basespecparam.BaseSpecParamVo">
|
||||
select s.*,a.groupName,b.goodsTypeName as categoryName
|
||||
from base_spec_param s
|
||||
left join base_spec_group a on a.sid=s.groupSid
|
||||
left join base_goods_type b on b.sid =s.categorySid;
|
||||
where s.sid = #{sid}
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecparam;
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseSpecParamQuery implements Query {
|
||||
private String name;
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecparam;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.date.DateTime;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.config.component.FileUploadComponent;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.base.utils.StringUtils;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.result.ResultBean;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/2/26 13:40
|
||||
*/
|
||||
@Service
|
||||
public class BaseSpecParamService extends MybatisBaseService<BaseSpecParamMapper, BaseSpecParam> {
|
||||
@Autowired
|
||||
private FileUploadComponent fileUploadComponent;
|
||||
|
||||
|
||||
public ResultBean<PagerVo<BaseSpecParamVo>> listPage(PagerQuery<BaseSpecParamQuery> pq) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseSpecParamQuery query = pq.getParams();
|
||||
QueryWrapper<BaseSpecParam> qw = new QueryWrapper<>();
|
||||
if (StringUtils.isNotBlank(query.getName())) {
|
||||
qw.like("goodsName", query.getName());
|
||||
}
|
||||
IPage<BaseSpecParam> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseSpecParamVo> pagging = baseMapper.listPage(page, qw);
|
||||
PagerVo<BaseSpecParamVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return rb.success().setData(p);
|
||||
}
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(BaseSpecParamDto dto) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
String sid = "";
|
||||
if (StringUtils.isNotBlank(dto.getSid())) {
|
||||
sid = dto.getSid();
|
||||
BaseSpecParam wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoods);
|
||||
} else {
|
||||
BaseSpecParam wmsGoods = new BaseSpecParam();
|
||||
BeanUtil.copyProperties(dto, wmsGoods, "id", "sid");
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
|
||||
@Transactional
|
||||
public ResultBean<String> saveOrUpdate(List<BaseSpecParamDto> dtos) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
for (BaseSpecParamDto dto : dtos) {
|
||||
BaseSpecParam sku=baseMapper.selectOne(new QueryWrapper<BaseSpecParam>().eq("sid",dto.getSid()));
|
||||
String sid = "";
|
||||
if (null!=sku) {
|
||||
sid = dto.getSid();
|
||||
BaseSpecParam wmsGoods = fetchBySid(dto.getSid());
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setModifyTime(new Date());
|
||||
baseMapper.updateById(wmsGoods);
|
||||
} else {
|
||||
BaseSpecParam wmsGoods = new BaseSpecParam();
|
||||
BeanUtil.copyProperties(dto, wmsGoods);
|
||||
wmsGoods.setCreateTime(new DateTime());
|
||||
baseMapper.insert(wmsGoods);
|
||||
}
|
||||
}
|
||||
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
|
||||
public ResultBean<BaseSpecParamVo> initialization(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseSpecParamVo vo = baseMapper.getVoBySid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
public ResultBean<List<BaseSpecParamVo>> getSkusBySpuSid(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
List<BaseSpecParamVo> vo = baseMapper.getSkusBySpuSid(sid);
|
||||
return rb.success().setData(vo);
|
||||
}
|
||||
|
||||
|
||||
public ResultBean delete(String sid) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseSpecParam wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
baseMapper.deleteById(wmsGoods.getId());
|
||||
}
|
||||
return rb.success();
|
||||
}
|
||||
|
||||
public ResultBean updateIsEnable(String sid, String isEnable) {
|
||||
ResultBean rb = ResultBean.fireFail();
|
||||
BaseSpecParam wmsGoods = fetchBySid(sid);
|
||||
if (null != wmsGoods) {
|
||||
wmsGoods.setIsEnable(Integer.parseInt(isEnable));
|
||||
baseMapper.updateById(wmsGoods);
|
||||
}
|
||||
return rb.success().setMsg("成功");
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
package com.yxt.goods.biz.base.basespecparam;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @author wangpengfei
|
||||
* @date 2024/4/8 9:34
|
||||
*/
|
||||
@Data
|
||||
public class BaseSpecParamVo {
|
||||
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 categorySid;//商品分类sid
|
||||
private String groupSid;//参数组sid
|
||||
private String paramName;//参数名
|
||||
private String numeric;//是否数字类型 1 true 2false
|
||||
private String unit;//数字类型的单位 非数字行可为空
|
||||
private String generic;//是否sku通用属性1true 2 false
|
||||
private String searching;//是否用于搜索过滤 1true 2 false
|
||||
private String segments;//数值类型参数,如果需要搜索。则添加分段间隔值
|
||||
private String groupName;//参数组名
|
||||
private String categoryName;//分类名
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierBank;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(供应商管理) <br/>
|
||||
* File: BaseSupplierBank.java <br/>
|
||||
* Class: com.yxt.base.api.basesupplierbank.BaseSupplierBank <br/>
|
||||
* Description: 供应商开户行信息. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-18 13:33:13 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商开户行信息", description = "供应商开户行信息")
|
||||
@TableName("base_supplier_bank")
|
||||
public class BaseSupplierBank extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("供应商sid")
|
||||
private String supplierSid; // 供应商sid
|
||||
@ApiModelProperty("开户行")
|
||||
private String bankName; // 开户行
|
||||
@ApiModelProperty("开户行帐号")
|
||||
private String bankAccount; // 开户行帐号
|
||||
@ApiModelProperty("账户名称")
|
||||
private String accountName; // 账户名称
|
||||
@ApiModelProperty("账户类型key")
|
||||
private String dueBankKey; // 账户类型key
|
||||
@ApiModelProperty("账户类型value")
|
||||
private String dueBankValue; // 账户类型value
|
||||
@ApiModelProperty("银行网点")
|
||||
private String bankingOutlets; // 银行网点
|
||||
@ApiModelProperty("开户行地址")
|
||||
private String bankAddress; // 开户行地址
|
||||
@ApiModelProperty("联行号")
|
||||
private String paymentLines; // 联行号
|
||||
@ApiModelProperty("银行代码")
|
||||
private String swiftCode; // 银行代码
|
||||
@ApiModelProperty("币种")
|
||||
private String currency; // 币种
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierBank;
|
||||
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(供应商管理) <br/>
|
||||
* File: BaseSupplierBankVo.java <br/>
|
||||
* Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankVo <br/>
|
||||
* Description: 供应商开户行信息 视图数据对象. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-18 13:33:13 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商开户行信息 视图数据详情", description = "供应商开户行信息 视图数据详情")
|
||||
public class BaseSupplierBankDetailsVo implements Vo {
|
||||
|
||||
private String sid; // sid
|
||||
|
||||
@ApiModelProperty("供应商sid")
|
||||
private String supplierSid; // 供应商sid
|
||||
@ApiModelProperty("开户行")
|
||||
private String bankName; // 开户行
|
||||
@ApiModelProperty("开户行帐号")
|
||||
private String bankAccount; // 开户行帐号
|
||||
@ApiModelProperty("账户名称")
|
||||
private String accountName; // 账户名称
|
||||
@ApiModelProperty("账户类型key")
|
||||
private String dueBankKey; // 账户类型key
|
||||
@ApiModelProperty("账户类型value")
|
||||
private String dueBankValue; // 账户类型value
|
||||
@ApiModelProperty("银行网点")
|
||||
private String bankingOutlets; // 银行网点
|
||||
@ApiModelProperty("开户行地址")
|
||||
private String bankAddress; // 开户行地址
|
||||
@ApiModelProperty("联行号")
|
||||
private String paymentLines; // 联行号
|
||||
@ApiModelProperty("银行代码")
|
||||
private String swiftCode; // 银行代码
|
||||
@ApiModelProperty("币种")
|
||||
private String currency; // 币种
|
||||
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierBank;
|
||||
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(供应商管理) <br/>
|
||||
* File: BaseSupplierBankDto.java <br/>
|
||||
* Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankDto <br/>
|
||||
* Description: 供应商开户行信息 数据传输对象. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-18 13:33:13 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商开户行信息 数据传输对象", description = "供应商开户行信息 数据传输对象")
|
||||
public class BaseSupplierBankDto implements Dto {
|
||||
|
||||
private String sid; // sid
|
||||
|
||||
@ApiModelProperty("供应商sid")
|
||||
private String supplierSid; // 供应商sid
|
||||
@ApiModelProperty("开户行")
|
||||
private String bankName; // 开户行
|
||||
@ApiModelProperty("开户行帐号")
|
||||
private String bankAccount; // 开户行帐号
|
||||
@ApiModelProperty("账户名称")
|
||||
private String accountName; // 账户名称
|
||||
@ApiModelProperty("账户类型key")
|
||||
private String dueBankKey; // 账户类型key
|
||||
@ApiModelProperty("账户类型value")
|
||||
private String dueBankValue; // 账户类型value
|
||||
@ApiModelProperty("银行网点")
|
||||
private String bankingOutlets; // 银行网点
|
||||
@ApiModelProperty("开户行地址")
|
||||
private String bankAddress; // 开户行地址
|
||||
@ApiModelProperty("联行号")
|
||||
private String paymentLines; // 联行号
|
||||
@ApiModelProperty("银行代码")
|
||||
private String swiftCode; // 银行代码
|
||||
@ApiModelProperty("币种")
|
||||
private String currency; // 币种
|
||||
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierBank;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Delete;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(供应商管理) <br/>
|
||||
* File: BaseSupplierBankMapper.java <br/>
|
||||
* Class: com.yxt.base.biz.basesupplierbank.BaseSupplierBankMapper <br/>
|
||||
* Description: 供应商开户行信息. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-18 13:33:13 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseSupplierBankMapper extends BaseMapper<BaseSupplierBank> {
|
||||
|
||||
IPage<BaseSupplierBankVo> selectPageVo(IPage<BaseSupplierBank> page, @Param(Constants.WRAPPER) Wrapper<BaseSupplierBank> qw);
|
||||
|
||||
List<BaseSupplierBankVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<BaseSupplierBank> qw);
|
||||
|
||||
@Select("select * from base_supplier_bank")
|
||||
List<BaseSupplierBankVo> selectListVo();
|
||||
|
||||
@Delete("delete from base_supplier_bank where supplierSid = #{supplierSid}")
|
||||
int deleteBySupplierSid(String supplierSid);
|
||||
|
||||
@Select("select * from base_supplier_bank where supplierSid = #{supplierSid}")
|
||||
List<BaseSupplierBankDetailsVo> selectBySupplierSid(String supplierSid);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basesupplierBank.BaseSupplierBankMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
<select id="selectPageVo" resultType="com.yxt.goods.biz.base.basesupplierBank.BaseSupplierBankVo">
|
||||
SELECT * FROM base_supplier_bank <where> ${ew.sqlSegment} </where>
|
||||
</select>
|
||||
|
||||
<select id="selectListAllVo" resultType="com.yxt.goods.biz.base.basesupplierBank.BaseSupplierBankVo">
|
||||
SELECT * FROM base_supplier_bank <where> ${ew.sqlSegment} </where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,74 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierBank;
|
||||
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(供应商管理) <br/>
|
||||
* File: BaseSupplierBankQuery.java <br/>
|
||||
* Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankQuery <br/>
|
||||
* Description: 供应商开户行信息 查询条件. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-18 13:33:13 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商开户行信息 查询条件", description = "供应商开户行信息 查询条件")
|
||||
public class BaseSupplierBankQuery implements Query {
|
||||
|
||||
@ApiModelProperty("供应商sid")
|
||||
private String supplierSid; // 供应商sid
|
||||
@ApiModelProperty("开户行")
|
||||
private String bankName; // 开户行
|
||||
@ApiModelProperty("开户行帐号")
|
||||
private String bankAccount; // 开户行帐号
|
||||
@ApiModelProperty("账户名称")
|
||||
private String accountName; // 账户名称
|
||||
@ApiModelProperty("账户类型key")
|
||||
private String dueBankKey; // 账户类型key
|
||||
@ApiModelProperty("账户类型value")
|
||||
private String dueBankValue; // 账户类型value
|
||||
@ApiModelProperty("银行网点")
|
||||
private String bankingOutlets; // 银行网点
|
||||
@ApiModelProperty("开户行地址")
|
||||
private String bankAddress; // 开户行地址
|
||||
@ApiModelProperty("联行号")
|
||||
private String paymentLines; // 联行号
|
||||
@ApiModelProperty("银行代码")
|
||||
private String swiftCode; // 银行代码
|
||||
@ApiModelProperty("币种")
|
||||
private String currency; // 币种
|
||||
|
||||
}
|
||||
@@ -1,104 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierBank;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(供应商管理) <br/>
|
||||
* File: BaseSupplierBankService.java <br/>
|
||||
* Class: com.yxt.base.biz.basesupplierbank.BaseSupplierBankService <br/>
|
||||
* Description: 供应商开户行信息 业务逻辑. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-18 13:33:13 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Service
|
||||
public class BaseSupplierBankService extends MybatisBaseService<BaseSupplierBankMapper, BaseSupplierBank> {
|
||||
|
||||
public PagerVo<BaseSupplierBankVo> listPageVo(PagerQuery<BaseSupplierBankQuery> pq) {
|
||||
BaseSupplierBankQuery query = pq.getParams();
|
||||
QueryWrapper<BaseSupplierBank> qw = new QueryWrapper<>();
|
||||
IPage<BaseSupplierBank> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseSupplierBankVo> pagging = baseMapper.selectPageVo(page, qw);
|
||||
PagerVo<BaseSupplierBankVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return p;
|
||||
}
|
||||
|
||||
public void saveOrUpdateDto(BaseSupplierBankDto dto){
|
||||
String dtoSid = dto.getSid();
|
||||
if (StringUtils.isBlank(dtoSid)) {
|
||||
this.insertByDto(dto);
|
||||
return;
|
||||
}
|
||||
this.updateByDto(dto);
|
||||
}
|
||||
|
||||
public void insertByDto(BaseSupplierBankDto dto){
|
||||
BaseSupplierBank entity = new BaseSupplierBank();
|
||||
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
public void updateByDto(BaseSupplierBankDto dto){
|
||||
String dtoSid = dto.getSid();
|
||||
if (StringUtils.isBlank(dtoSid)) {
|
||||
return;
|
||||
}
|
||||
BaseSupplierBank entity = fetchBySid(dtoSid);
|
||||
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
||||
baseMapper.updateById(entity);
|
||||
}
|
||||
|
||||
public BaseSupplierBankDetailsVo fetchDetailsVoBySid(String sid){
|
||||
BaseSupplierBank entity = fetchBySid(sid);
|
||||
BaseSupplierBankDetailsVo vo = new BaseSupplierBankDetailsVo();
|
||||
BeanUtil.copyProperties(entity, vo);
|
||||
return vo;
|
||||
}
|
||||
|
||||
public int deleteBySupplierSid(String supplierSid) {
|
||||
return baseMapper.deleteBySupplierSid(supplierSid);
|
||||
}
|
||||
|
||||
public List<BaseSupplierBankDetailsVo> selectBySupplierSid(String supplierSid) {
|
||||
return baseMapper.selectBySupplierSid(supplierSid);
|
||||
}
|
||||
}
|
||||
@@ -1,76 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierBank;
|
||||
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(供应商管理) <br/>
|
||||
* File: BaseSupplierBankVo.java <br/>
|
||||
* Class: com.yxt.base.api.basesupplierbank.BaseSupplierBankVo <br/>
|
||||
* Description: 供应商开户行信息 视图数据对象. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-18 13:33:13 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商开户行信息 视图数据对象", description = "供应商开户行信息 视图数据对象")
|
||||
public class BaseSupplierBankVo implements Vo {
|
||||
|
||||
private String sid; // sid
|
||||
|
||||
@ApiModelProperty("供应商sid")
|
||||
private String supplierSid; // 供应商sid
|
||||
@ApiModelProperty("开户行")
|
||||
private String bankName; // 开户行
|
||||
@ApiModelProperty("开户行帐号")
|
||||
private String bankAccount; // 开户行帐号
|
||||
@ApiModelProperty("账户名称")
|
||||
private String accountName; // 账户名称
|
||||
@ApiModelProperty("账户类型key")
|
||||
private String dueBankKey; // 账户类型key
|
||||
@ApiModelProperty("账户类型value")
|
||||
private String dueBankValue; // 账户类型value
|
||||
@ApiModelProperty("银行网点")
|
||||
private String bankingOutlets; // 银行网点
|
||||
@ApiModelProperty("开户行地址")
|
||||
private String bankAddress; // 开户行地址
|
||||
@ApiModelProperty("联行号")
|
||||
private String paymentLines; // 联行号
|
||||
@ApiModelProperty("银行代码")
|
||||
private String swiftCode; // 银行代码
|
||||
@ApiModelProperty("币种")
|
||||
private String currency; // 币种
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierfile;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(仓储基础信息供应商) <br/>
|
||||
* File: BaseSupplierFile.java <br/>
|
||||
* Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFile <br/>
|
||||
* Description: 供应商附件. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-13 16:51:56 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商附件", description = "供应商附件")
|
||||
@TableName("base_supplier_file")
|
||||
public class BaseSupplierFile extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName; // 文件名
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType; // 文件类型
|
||||
@ApiModelProperty("关联业务对象sid")
|
||||
private String linkSid; // 关联业务对象sid
|
||||
@ApiModelProperty("附件类型")
|
||||
private String attachType; // 附件类型
|
||||
@ApiModelProperty("文件大小")
|
||||
private String fileSize; // 文件大小
|
||||
@ApiModelProperty("文件的路径")
|
||||
private String filePath; // 文件的路径
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierfile;
|
||||
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(仓储基础信息供应商) <br/>
|
||||
* File: BaseSupplierFileVo.java <br/>
|
||||
* Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFileVo <br/>
|
||||
* Description: 供应商附件 视图数据对象. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-13 16:51:56 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商附件 视图数据详情", description = "供应商附件 视图数据详情")
|
||||
public class BaseSupplierFileDetailsVo implements Vo {
|
||||
|
||||
private String sid; // sid
|
||||
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName; // 文件名
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType; // 文件类型
|
||||
@ApiModelProperty("关联业务对象sid")
|
||||
private String linkSid; // 关联业务对象sid
|
||||
@ApiModelProperty("附件类型")
|
||||
private String attachType; // 附件类型
|
||||
@ApiModelProperty("文件大小")
|
||||
private String fileSize; // 文件大小
|
||||
@ApiModelProperty("文件的路径")
|
||||
private String filePath; // 文件的路径
|
||||
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierfile;
|
||||
|
||||
|
||||
import com.yxt.common.core.dto.Dto;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(仓储基础信息供应商) <br/>
|
||||
* File: BaseSupplierFileDto.java <br/>
|
||||
* Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFileDto <br/>
|
||||
* Description: 供应商附件 数据传输对象. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-13 16:51:56 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商附件 数据传输对象", description = "供应商附件 数据传输对象")
|
||||
public class BaseSupplierFileDto implements Dto {
|
||||
|
||||
private String sid; // sid
|
||||
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName; // 文件名
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType; // 文件类型
|
||||
@ApiModelProperty("关联业务对象sid")
|
||||
private String linkSid; // 关联业务对象sid
|
||||
@ApiModelProperty("附件类型")
|
||||
private String attachType; // 附件类型
|
||||
@ApiModelProperty("文件大小")
|
||||
private String fileSize; // 文件大小
|
||||
@ApiModelProperty("文件的路径")
|
||||
private String filePath; // 文件的路径
|
||||
|
||||
}
|
||||
@@ -1,60 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierfile;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Constants;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(仓储基础信息供应商) <br/>
|
||||
* File: BaseSupplierFileMapper.java <br/>
|
||||
* Class: com.yxt.anrui.as.biz.basesupplierfile.BaseSupplierFileMapper <br/>
|
||||
* Description: 供应商附件. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-13 16:51:56 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Mapper
|
||||
public interface BaseSupplierFileMapper extends BaseMapper<BaseSupplierFile> {
|
||||
|
||||
IPage<BaseSupplierFileVo> selectPageVo(IPage<BaseSupplierFile> page, @Param(Constants.WRAPPER) Wrapper<BaseSupplierFile> qw);
|
||||
|
||||
List<BaseSupplierFileVo> selectListAllVo(@Param(Constants.WRAPPER) Wrapper<BaseSupplierFile> qw);
|
||||
|
||||
@Select("select * from base_supplier_file")
|
||||
List<BaseSupplierFileVo> selectListVo();
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.yxt.goods.biz.base.basesupplierfile.BaseSupplierFileMapper">
|
||||
<!-- <where> ${ew.sqlSegment} </where>-->
|
||||
<!-- ${ew.customSqlSegment} -->
|
||||
<select id="selectPageVo" resultType="com.yxt.goods.biz.base.basesupplierfile.BaseSupplierFileVo">
|
||||
SELECT * FROM base_supplier_file <where> ${ew.sqlSegment} </where>
|
||||
</select>
|
||||
|
||||
<select id="selectListAllVo" resultType="com.yxt.goods.biz.base.basesupplierfile.BaseSupplierFileVo">
|
||||
SELECT * FROM base_supplier_file <where> ${ew.sqlSegment} </where>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -1,64 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierfile;
|
||||
|
||||
|
||||
import com.yxt.common.core.query.Query;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(仓储基础信息供应商) <br/>
|
||||
* File: BaseSupplierFileQuery.java <br/>
|
||||
* Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFileQuery <br/>
|
||||
* Description: 供应商附件 查询条件. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-13 16:51:56 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商附件 查询条件", description = "供应商附件 查询条件")
|
||||
public class BaseSupplierFileQuery implements Query {
|
||||
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName; // 文件名
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType; // 文件类型
|
||||
@ApiModelProperty("关联业务对象sid")
|
||||
private String linkSid; // 关联业务对象sid
|
||||
@ApiModelProperty("附件类型")
|
||||
private String attachType; // 附件类型
|
||||
@ApiModelProperty("文件大小")
|
||||
private String fileSize; // 文件大小
|
||||
@ApiModelProperty("文件的路径")
|
||||
private String filePath; // 文件的路径
|
||||
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierfile;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.yxt.common.base.service.MybatisBaseService;
|
||||
import com.yxt.common.base.utils.PagerUtil;
|
||||
import com.yxt.common.core.query.PagerQuery;
|
||||
import com.yxt.common.core.vo.PagerVo;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(仓储基础信息供应商) <br/>
|
||||
* File: BaseSupplierFileService.java <br/>
|
||||
* Class: com.yxt.anrui.as.biz.basesupplierfile.BaseSupplierFileService <br/>
|
||||
* Description: 供应商附件 业务逻辑. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-13 16:51:56 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Service
|
||||
public class BaseSupplierFileService extends MybatisBaseService<BaseSupplierFileMapper, BaseSupplierFile> {
|
||||
|
||||
public PagerVo<BaseSupplierFileVo> listPageVo(PagerQuery<BaseSupplierFileQuery> pq) {
|
||||
BaseSupplierFileQuery query = pq.getParams();
|
||||
QueryWrapper<BaseSupplierFile> qw = new QueryWrapper<>();
|
||||
IPage<BaseSupplierFile> page = PagerUtil.queryToPage(pq);
|
||||
IPage<BaseSupplierFileVo> pagging = baseMapper.selectPageVo(page, qw);
|
||||
PagerVo<BaseSupplierFileVo> p = PagerUtil.pageToVo(pagging, null);
|
||||
return p;
|
||||
}
|
||||
|
||||
public void saveOrUpdateDto(BaseSupplierFileDto dto){
|
||||
String dtoSid = dto.getSid();
|
||||
if (StringUtils.isBlank(dtoSid)) {
|
||||
this.insertByDto(dto);
|
||||
return;
|
||||
}
|
||||
this.updateByDto(dto);
|
||||
}
|
||||
|
||||
public void insertByDto(BaseSupplierFileDto dto){
|
||||
BaseSupplierFile entity = new BaseSupplierFile();
|
||||
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
||||
baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
public void updateByDto(BaseSupplierFileDto dto){
|
||||
String dtoSid = dto.getSid();
|
||||
if (StringUtils.isBlank(dtoSid)) {
|
||||
return;
|
||||
}
|
||||
BaseSupplierFile entity = fetchBySid(dtoSid);
|
||||
BeanUtil.copyProperties(dto, entity, "id", "sid");
|
||||
baseMapper.updateById(entity);
|
||||
}
|
||||
|
||||
public BaseSupplierFileDetailsVo fetchDetailsVoBySid(String sid){
|
||||
BaseSupplierFile entity = fetchBySid(sid);
|
||||
BaseSupplierFileDetailsVo vo = new BaseSupplierFileDetailsVo();
|
||||
BeanUtil.copyProperties(entity, vo);
|
||||
return vo;
|
||||
}
|
||||
}
|
||||
@@ -1,66 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierfile;
|
||||
|
||||
|
||||
import com.yxt.common.core.vo.Vo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(仓储基础信息供应商) <br/>
|
||||
* File: BaseSupplierFileVo.java <br/>
|
||||
* Class: com.yxt.anrui.as.api.basesupplierfile.BaseSupplierFileVo <br/>
|
||||
* Description: 供应商附件 视图数据对象. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-13 16:51:56 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商附件 视图数据对象", description = "供应商附件 视图数据对象")
|
||||
public class BaseSupplierFileVo implements Vo {
|
||||
|
||||
private String sid; // sid
|
||||
|
||||
@ApiModelProperty("文件名")
|
||||
private String fileName; // 文件名
|
||||
@ApiModelProperty("文件类型")
|
||||
private String fileType; // 文件类型
|
||||
@ApiModelProperty("关联业务对象sid")
|
||||
private String linkSid; // 关联业务对象sid
|
||||
@ApiModelProperty("附件类型")
|
||||
private String attachType; // 附件类型
|
||||
@ApiModelProperty("文件大小")
|
||||
private String fileSize; // 文件大小
|
||||
@ApiModelProperty("文件的路径")
|
||||
private String filePath; // 文件的路径
|
||||
|
||||
}
|
||||
@@ -1,112 +0,0 @@
|
||||
/*********************************************************
|
||||
*********************************************************
|
||||
******************** *******************
|
||||
************* ************
|
||||
******* _oo0oo_ *******
|
||||
*** o8888888o ***
|
||||
* 88" . "88 *
|
||||
* (| -_- |) *
|
||||
* 0\ = /0 *
|
||||
* ___/`---'\___ *
|
||||
* .' \\| |// '. *
|
||||
* / \\||| : |||// \ *
|
||||
* / _||||| -:- |||||- \ *
|
||||
* | | \\\ - /// | | *
|
||||
* | \_| ''\---/'' |_/ | *
|
||||
* \ .-\__ '-' ___/-. / *
|
||||
* ___'. .' /--.--\ `. .'___ *
|
||||
* ."" '< `.___\_<|>_/___.' >' "". *
|
||||
* | | : `- \`.;`\ _ /`;.`/ - ` : | | *
|
||||
* \ \ `_. \_ __\ /__ _/ .-` / / *
|
||||
* =====`-.____`.___ \_____/___.-`___.-'===== *
|
||||
* `=---=' *
|
||||
* ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
|
||||
*********__佛祖保佑__永无BUG__验收通过__钞票多多__*********
|
||||
*********************************************************/
|
||||
package com.yxt.goods.biz.base.basesupplierinfo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.yxt.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* Project: yxt-base(供应商管理) <br/>
|
||||
* File: BaseSupplierInfo.java <br/>
|
||||
* Class: com.yxt.base.api.basesupplierinfo.BaseSupplierInfo <br/>
|
||||
* Description: 供应商信息. <br/>
|
||||
* Copyright: Copyright (c) 2011 <br/>
|
||||
* Company: https://gitee.com/liuzp315 <br/>
|
||||
* Makedate: 2024-03-18 13:33:13 <br/>
|
||||
*
|
||||
* @author liupopo
|
||||
* @version 1.0
|
||||
* @since 1.0
|
||||
*/
|
||||
@Data
|
||||
@ApiModel(value = "供应商信息", description = "供应商信息")
|
||||
@TableName("base_supplier_info")
|
||||
public class BaseSupplierInfo extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty("编码")
|
||||
private String supplierCode; // 编码
|
||||
@ApiModelProperty("供应商名称")
|
||||
private String supplierName; // 供应商名称
|
||||
@ApiModelProperty("供应商名称拼音")
|
||||
private String supplierPY; // 供应商名称拼音
|
||||
@ApiModelProperty("供应商类型sid")
|
||||
private String supplierTypeSid; // 供应商类型sid
|
||||
@ApiModelProperty("供应商类型")
|
||||
private String supplierTypeName; // 供应商类型
|
||||
@ApiModelProperty("省sid")
|
||||
private String provinceSid; // 省sid
|
||||
@ApiModelProperty("province")
|
||||
private String province; //
|
||||
@ApiModelProperty("市sid")
|
||||
private String citySid; // 市sid
|
||||
@ApiModelProperty("city")
|
||||
private String city; //
|
||||
@ApiModelProperty("收货县区sid")
|
||||
private String countySid; // 收货县区sid
|
||||
@ApiModelProperty("county")
|
||||
private String county; //
|
||||
@ApiModelProperty("详细地址")
|
||||
private String address; // 详细地址
|
||||
@ApiModelProperty("手机")
|
||||
private String contactMobile; // 手机
|
||||
@ApiModelProperty("电话")
|
||||
private String contactTelePhone; // 电话
|
||||
@ApiModelProperty("联系人")
|
||||
private String contactName; // 联系人
|
||||
@ApiModelProperty("传真")
|
||||
private String fax; // 传真
|
||||
@ApiModelProperty("邮编")
|
||||
private String zipCode; // 邮编
|
||||
@ApiModelProperty("电子邮件")
|
||||
private String email; // 电子邮件
|
||||
@ApiModelProperty("网址")
|
||||
private String website; // 网址
|
||||
@ApiModelProperty("开票公司名称")
|
||||
private String billingCompanyName; // 开票公司名称
|
||||
@ApiModelProperty("税号")
|
||||
private String registNum; // 税号
|
||||
@ApiModelProperty("法人")
|
||||
private String legalName; // 法人
|
||||
@ApiModelProperty("采购员")
|
||||
private String purchaser; // 采购员
|
||||
@ApiModelProperty("排序")
|
||||
private Integer sortNo; // 排序
|
||||
@ApiModelProperty("开票类型key")
|
||||
private String billingTypeKey; // 开票类型key
|
||||
@ApiModelProperty("开票类型value")
|
||||
private String billingTypeValue; // 开票类型value
|
||||
@ApiModelProperty("使用组织sid")
|
||||
private String useOrgSid; // 使用组织sid
|
||||
@ApiModelProperty("创建组织名称")
|
||||
private String createOrgName; // 创建组织名称
|
||||
@ApiModelProperty("创建组织sid")
|
||||
private String createOrgSid; // 创建组织sid
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user