提交 21335d64 作者: panda

Merge branch 'develop'

...@@ -73,7 +73,7 @@ jobs: ...@@ -73,7 +73,7 @@ jobs:
# 2.2 (Optional) Build and push image ACR EE # 2.2 (Optional) Build and push image ACR EE
- name: Build and push image to ACR EE - name: Build and push image to ACR EE
run: | run: |
mvn clean package mvn clean package -DskipTests
docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" . docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" .
docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG"
......
...@@ -75,7 +75,7 @@ jobs: ...@@ -75,7 +75,7 @@ jobs:
# 2.2 (Optional) Build and push image ACR EE # 2.2 (Optional) Build and push image ACR EE
- name: Build and push image to ACR EE - name: Build and push image to ACR EE
run: | run: |
mvn clean package mvn clean package -DskipTests
docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" . docker build -t "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" .
docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG" docker push "$ACR_EE_REGISTRY/$ACR_EE_NAMESPACE/$ACR_EE_IMAGE:$TAG"
......
# application.yaml
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: pms-application
namespace: argocd
spec:
project: default # 项目名
source:
repoURL: http://git.mmcuav.cn/iuav/pms.git
targetRevision: HEAD #develop master # 分支名
path: kustomization/overlays/dev # 资源文件路径
destination:
server: https://kubernetes.default.svc # API Server 地址
namespace: dev # 部署应用的命名空间
# 默认情况下每 3 分钟会检测 Git 仓库一次
syncPolicy:
syncOptions:
- CreateNamespace=true
automated:
selfHeal: true
prune: true
apiVersion: v1
kind: Service
metadata:
name: mysql #此名字随便起
namespace: default #在固定的命名空间下
spec:
type: ExternalName
externalName: rm-wz9dd796t4j1giz6t.mysql.rds.aliyuncs.com
ports:
- port: 3306
### ExternalName类型的服务创建后,pod可以通过my-mysql-external.default.svc.cluster.local域名连接到外部服务,
#### 或者通过my-mysql-external。当需要指向其他外部服务时,只需要修改spec.externalName的值即可。
\ No newline at end of file
...@@ -18,4 +18,4 @@ patches: ...@@ -18,4 +18,4 @@ patches:
images: images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG - name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag: 4e0d17cc7a55f85a01edacf741e04cf2d303e9b1 newTag: 506594e8af493b698ecb2e75c3f5b291e2f83181
package com.mmc.pms.auth;
import org.springframework.beans.factory.config.YamlPropertiesFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.support.PropertySourcesPlaceholderConfigurer;
import org.springframework.core.io.ClassPathResource;
import java.util.Objects;
/**
* Author: geDuo
* Date: 2022/6/2 17:26
*/
@Configuration
public class DataFilterYml {
@Bean
public static PropertySourcesPlaceholderConfigurer loadYml() {
PropertySourcesPlaceholderConfigurer configurer = new PropertySourcesPlaceholderConfigurer();
YamlPropertiesFactoryBean yaml = new YamlPropertiesFactoryBean();
yaml.setResources(new ClassPathResource("not-check.yml"));
configurer.setProperties(Objects.requireNonNull(yaml.getObject()));
return configurer;
}
}
package com.mmc.pms.auth;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @author: zj
* @Date: 2023/5/28 10:52
*/
@Configuration
public class MvcConfiguration implements WebMvcConfigurer {
@Autowired
private TokenCheckHandleInterceptor tokenCheckHandleInterceptor;
@Override
public void addInterceptors(InterceptorRegistry registry) {
registry.addInterceptor(tokenCheckHandleInterceptor);
WebMvcConfigurer.super.addInterceptors(registry);
}
}
package com.mmc.pms.auth;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import java.util.List;
/**
* @author: zj
* @Date: 2023/5/28 13:54
*/
@Data
@Configuration
@ConfigurationProperties(prefix = "data-filter", ignoreUnknownFields = false)
@PropertySource("classpath:not-check.yml")
public class NotCheckUriConfig {
// 不需要验证token的请求地址
private List<String> notAuthPath;
// 不需要验证token的请求地址;// 不需要验证token的请求地址
private List<String> uploadPath;
}
package com.mmc.pms.auth;
import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum;
import com.mmc.pms.util.PathUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
/**
* @author: zj
* @Date: 2023/5/28 10:46
*/
@Slf4j
@Component
public class TokenCheckHandleInterceptor implements HandlerInterceptor {
@Autowired
private StringRedisTemplate stringRedisTemplate;
@Autowired
private NotCheckUriConfig notCheckUriConfig;
@Override
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
String requestURI = request.getRequestURI();
// //根据uri确认是否要拦截
if (!shouldFilter(requestURI)) {
return true;
}
String token = request.getHeader("token");
if (StringUtils.isBlank(token)) {
exceptionProcess(response);
return false;
}
String tokenJson = stringRedisTemplate.opsForValue().get(token);
if (StringUtils.isBlank(tokenJson)) {
exceptionProcess(response);
return false;
}
//
// String serverName = request.getServerName();
// String remoteHost = request.getRemoteHost();
// log.info("hostName: {}", hostName);
// log.info("serverName: {}", serverName);
// log.info("remoteHost: {}", remoteHost);
// log.info("forwardedFor: {}", forwardedFor);
// log.info("forwardedHost: {}", forwardedHost);
// if (hostName.equals("iuav.mmcuav.cn") || hostName.equals("test.iuav.mmcuav.cn") || hostName.equals("www.iuav.shop") || hostName.equals("test.iuav.shop")){
// String token = request.getHeader("token");
// if (StringUtils.isBlank(token)){
// exceptionProcess(response);
// return false;
// }
// String tokenJson = stringRedisTemplate.opsForValue().get(token);
// if (StringUtils.isBlank(tokenJson)){
// exceptionProcess(response);
// return false;
// }
// return true;
// }
//测试-打印请求信息
return true;
}
@Override
public void postHandle(HttpServletRequest request, HttpServletResponse response, Object handler, ModelAndView modelAndView) throws Exception {
}
@Override
public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
}
public void exceptionProcess(HttpServletResponse response) throws Exception {
response.setContentType("application/json;charset=utf-8");
PrintWriter writer = response.getWriter();
writer.write(ResultBody.error(ResultEnum.LOGIN_ACCOUNT_STATUS_ERROR).toString());
writer.close();
}
private boolean shouldFilter(String path) {
// 路径与配置的相匹配,则执行过滤
for (String pathPattern : notCheckUriConfig.getNotAuthPath()) {
if (PathUtil.isPathMatch(pathPattern, path)) {
// 如果匹配
return false;
}
}
return true;
}
}
package com.mmc.pms.auth.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author 作者 geDuo
* @version 创建时间:2021年8月31日 下午8:06:14
* @explain 类说明
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LoginSuccessDTO implements Serializable {
private static final long serialVersionUID = -1200834589953161925L;
private String token;
private Integer userAccountId;
private String accountNo;
private Integer portType;
private String uid;
private String phoneNum;
private String userName;
private String nickName;
// private RoleInfoDTO roleInfo;
}
package com.mmc.pms.controller; package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.dto.BrandInfoDTO; import com.mmc.pms.model.sale.dto.BrandInfoDTO;
import com.mmc.pms.service.BrandManageService; import com.mmc.pms.service.BrandManageService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -17,7 +17,7 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@RestController @RestController
@RequestMapping("/brand") @RequestMapping("/brand")
@Api(tags = {"品牌管理-相关接口"}) @Api(tags = {"后台-品牌管理-相关接口"})
public class BackstageBrandManageController { public class BackstageBrandManageController {
@Autowired @Autowired
...@@ -37,12 +37,12 @@ public class BackstageBrandManageController { ...@@ -37,12 +37,12 @@ public class BackstageBrandManageController {
return ResultBody.success(brandManageService.listBrandInfo(pageNo, pageSize)); return ResultBody.success(brandManageService.listBrandInfo(pageNo, pageSize));
} }
// @ApiOperation(value = "删除品牌") @ApiOperation(value = "删除品牌")
// @GetMapping("deleteBrandInfo") @GetMapping("deleteBrandInfo")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
// public ResultBody deleteBrandInfo(Integer id) { public ResultBody deleteBrandInfo(Integer id) {
// return brandManageService.deleteBrandInfo(id); return brandManageService.deleteBrandInfo(id);
// } }
@ApiOperation(value = "编辑品牌") @ApiOperation(value = "编辑品牌")
@GetMapping("editBrandInfo") @GetMapping("editBrandInfo")
......
package com.mmc.pms.controller; package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.dto.ClassifyDetailsDTO; import com.mmc.pms.entity.Categories;
import com.mmc.pms.model.dto.ClassifyInfoDTO; import com.mmc.pms.model.categories.dto.ClassifyDetailsDTO;
import com.mmc.pms.model.vo.*; import com.mmc.pms.model.categories.dto.ClassifyInfoDTO;
import com.mmc.pms.model.categories.vo.CategoriesInfoVO;
import com.mmc.pms.model.categories.vo.ClassifyInfoVO;
import com.mmc.pms.model.categories.vo.DirectoryInfoVO;
import com.mmc.pms.model.categories.vo.RelevantBusinessVO;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Update;
import com.mmc.pms.model.sale.vo.QueryClassifyVO;
import com.mmc.pms.service.CategoriesService; import com.mmc.pms.service.CategoriesService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.validation.constraints.Min;
import java.util.List;
/** /**
* @Author lw @Date 2023/5/15 13:24 @Version 1.0 * @Author lw @Date 2023/5/15 13:24 @Version 1.0
...@@ -30,8 +41,8 @@ public class BackstageCategoriesController { ...@@ -30,8 +41,8 @@ public class BackstageCategoriesController {
@ApiOperation(value = "目录列表") @ApiOperation(value = "目录列表")
@GetMapping("directoryList") @GetMapping("directoryList")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = DirectoryInfoVO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = DirectoryInfoVO.class)})
public ResultBody directoryList(@RequestParam Integer pageNo, @RequestParam Integer pageSize) { public ResultBody directoryList(@RequestParam Integer pageNo, @RequestParam Integer pageSize, @RequestParam(required = false) Integer type) {
return ResultBody.success(categoriesService.directoryList(pageNo, pageSize)); return ResultBody.success(categoriesService.directoryList(pageNo, pageSize, type));
} }
@ApiOperation(value = "删除目录") @ApiOperation(value = "删除目录")
...@@ -64,6 +75,7 @@ public class BackstageCategoriesController { ...@@ -64,6 +75,7 @@ public class BackstageCategoriesController {
return categoriesService.exchangeSortType(firstId, secondId); return categoriesService.exchangeSortType(firstId, secondId);
} }
@ApiOperation(value = "分类信息-列表") @ApiOperation(value = "分类信息-列表")
@PostMapping("getClassificationList") @PostMapping("getClassificationList")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClassifyInfoDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ClassifyInfoDTO.class)})
...@@ -78,4 +90,27 @@ public class BackstageCategoriesController { ...@@ -78,4 +90,27 @@ public class BackstageCategoriesController {
public ResultBody getClassifyDetails(@ApiParam(value = "分类id", required = true) @RequestParam(value = "id") Integer id) { public ResultBody getClassifyDetails(@ApiParam(value = "分类id", required = true) @RequestParam(value = "id") Integer id) {
return categoriesService.getClassifyDetails(id); return categoriesService.getClassifyDetails(id);
} }
@ApiOperation(value = "分类详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RelevantBusinessVO.class)})
@GetMapping("queryRelevantBusiness")
public ResultBody queryRelevantBusiness(@ApiParam(value = "分类id", required = true) @RequestParam(value = "id") Integer id,
@ApiParam(value = "业务类型", required = true) @Min(value = 0) @RequestParam(value = "type") Integer type) {
return categoriesService.queryRelevantBusiness(id, type);
}
@ApiOperation(value = "分类删除")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RelevantBusinessVO.class)})
@GetMapping("deleteRelevantBusiness")
public ResultBody deleteRelevantBusiness(@ApiParam(value = "分类id", required = true) @Min(value = 1) @RequestParam(value = "id") Integer id) {
return categoriesService.deleteRelevantBusiness(id);
}
@ApiOperation(value = "目录列表不含分页")
@GetMapping("getDirectoryList")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = DirectoryInfoVO.class)})
public ResultBody getDirectoryList(Integer type) {
return categoriesService.getDirectoryList(type);
}
} }
package com.mmc.pms.controller; package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.vo.Create; import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.vo.GoodsAddVO; import com.mmc.pms.model.group.Update;
import com.mmc.pms.model.vo.Update; import com.mmc.pms.model.order.dto.OrderGoodsIndstDTO;
import com.mmc.pms.model.order.dto.OrderGoodsProdDTO;
import com.mmc.pms.model.qo.MallOrderGoodsInfoQO;
import com.mmc.pms.model.qo.ProductSpecPriceQO;
import com.mmc.pms.model.sale.dto.*;
import com.mmc.pms.model.sale.vo.GoodsAddVO;
import com.mmc.pms.service.GoodsInfoService; import com.mmc.pms.service.GoodsInfoService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestBody; import springfox.documentation.annotations.ApiIgnore;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.util.List;
/** /**
* @Author LW * @Author LW
...@@ -21,7 +25,7 @@ import javax.annotation.Resource; ...@@ -21,7 +25,7 @@ import javax.annotation.Resource;
*/ */
@RestController @RestController
@RequestMapping("/goods") @RequestMapping("/goods")
@Api(tags = {"商品管理-相关接口"}) @Api(tags = {"后台-商品管理-相关接口"})
public class BackstageGoodsManageController { public class BackstageGoodsManageController {
@Resource @Resource
private GoodsInfoService goodsInfoService; private GoodsInfoService goodsInfoService;
...@@ -39,4 +43,55 @@ public class BackstageGoodsManageController { ...@@ -39,4 +43,55 @@ public class BackstageGoodsManageController {
public ResultBody editGoodsInfo(@ApiParam("商品信息VO") @Validated(Update.class) @RequestBody GoodsAddVO goodsAddVO) { public ResultBody editGoodsInfo(@ApiParam("商品信息VO") @Validated(Update.class) @RequestBody GoodsAddVO goodsAddVO) {
return goodsInfoService.editGoodsInfo(goodsAddVO); return goodsInfoService.editGoodsInfo(goodsAddVO);
} }
@ApiOperation(value = "PC端-商品详情")
@GetMapping("getGoodsInfoDetail")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallGoodsDetailDTO.class)})
public ResultBody getGoodsInfoDetail(@ApiParam("商品id") @RequestParam Integer goodsInfoId) {
return goodsInfoService.getGoodsInfoDetail(goodsInfoId);
}
@ApiOperation(value = "单位信息")
@GetMapping("getSkuUnit")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = SkuUnitDTO.class)})
public ResultBody getSkuUnit() {
return goodsInfoService.getSkuUnit();
}
@ApiOperation(value = "feign根据购物车信息填充未知信息", hidden = true)
@PostMapping("fillGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = MallGoodsShopCarDTO.class)})
public List<MallGoodsShopCarDTO> fillGoodsInfo(@RequestBody List<MallGoodsShopCarDTO> param) {
return goodsInfoService.fillGoodsInfo(param);
}
@ApiOperation(value = "feign根据渠道等级和产品规格id获取对应价格", hidden = true)
@PostMapping("feignListProductSpecPrice")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public List<MallProductSpecPriceDTO> feignListProductSpecPrice(@RequestBody ProductSpecPriceQO productSpecPriceQO) {
return goodsInfoService.feignListProductSpecPrice(productSpecPriceQO);
}
@ApiOperation(value = "feign根据渠道等级获取单价信息", hidden = true)
@GetMapping("feignGetUnitPriceByTag")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductSpecPriceDTO.class)})
public ProductSpecPriceDTO feignGetUnitPriceByTag(@RequestParam(value = "specId") Integer specId,
@RequestParam(value = "tagId") Integer tagId) {
return goodsInfoService.feignGetUnitPriceByTag(specId, tagId);
}
@ApiOperation(value = "feign根据商品的产品规格id查询商品信息", hidden = true)
@PostMapping("feignListProdGoodsSkuInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderGoodsProdDTO.class)})
public List<OrderGoodsProdDTO> feignListProdGoodsSkuInfo(@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO) {
return goodsInfoService.feignListProdGoodsSkuInfo(mallOrderGoodsInfoQO);
}
@ApiOperation(value = "feign根据商品的行业规格id查询商品清单信息", hidden = true)
@PostMapping("feignListIndstGoodsSkuInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = OrderGoodsProdDTO.class)})
public List<OrderGoodsIndstDTO> feignListIndstGoodsSkuInfo(@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO) {
return goodsInfoService.feignListIndstGoodsSkuInfo(mallOrderGoodsInfoQO);
}
} }
package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Update;
import com.mmc.pms.model.qo.IndustrySkuQO;
import com.mmc.pms.model.sale.dto.*;
import com.mmc.pms.model.sale.vo.IndustrySkuVO;
import com.mmc.pms.model.sale.vo.IndustrySpecVO;
import com.mmc.pms.service.IndustrySpecService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
/**
* @Author LW
* @date 2022/10/8 10:57
* 概要:
*/
@RestController
@RequestMapping("/industry/spec/")
@Api(tags = {"后台-行业管理-相关接口"})
public class BackstageIndustrySpecController {
@Autowired
IndustrySpecService industrySpecService;
@ApiOperation(value = "新增行业sku")
@PostMapping("addIndustrySku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addIndustrySku(@Validated(Create.class) @ApiParam("行业skuVO") @RequestBody IndustrySkuVO param) {
return industrySpecService.addIndustrySku(param);
}
@ApiOperation(value = "行业sku详情")
@GetMapping("getIndustrySkuDetail")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySkuVO.class)})
public ResultBody getIndustrySkuDetail(@ApiParam("id") @RequestParam(value = "id") Integer id) {
return industrySpecService.getIndustrySkuDetail(id);
}
@ApiOperation(value = "行业sku管理---编辑行业sku")
@PostMapping("editIndustrySku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody editIndustrySku(@Validated(Update.class) @ApiParam("行业skuVO") @RequestBody IndustrySkuVO param) {
return industrySpecService.editIndustrySku(param);
}
@ApiOperation(value = "行业sku管理---分页列表")
@PostMapping("listPageIndustrySku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySkuDTO.class)})
public ResultBody listPageIndustrySku(@ApiParam("条件参数") @RequestBody IndustrySkuQO param) {
return industrySpecService.listPageIndustrySku(param);
}
@ApiOperation(value = "新增方案规格")
@PostMapping("addIndustrySpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addIndustrySpec(@Validated(Create.class) @ApiParam("条件参数") @RequestBody IndustrySpecVO param) {
return industrySpecService.addIndustrySpec(param);
}
@ApiOperation(value = "方案规格回显")
@GetMapping("getIndustrySpecDetail")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySpecDTO.class)})
public ResultBody getIndustrySpecDetail(@ApiParam("行业规格id") @RequestParam(value = "industrySpecId") Integer industrySpecId) {
return industrySpecService.getIndustrySpecDetail(industrySpecId);
}
@ApiOperation(value = "编辑方案规格")
@PostMapping("editIndustrySpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody editIndustrySpec(@Validated(Update.class) @ApiParam("行业skuVO") @RequestBody IndustrySpecVO param) {
return industrySpecService.editIndustrySpec(param);
}
@ApiOperation(value = "行业sku管理---方案规格管理---分页列表")
@GetMapping("listPageIndustrySpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySpecDTO.class)})
public ResultBody listPageIndustrySpec(@ApiParam(value = "页码") @RequestParam(value = "pageNo") Integer pageNo,
@ApiParam(value = "每页显示数") @RequestParam(value = "pageSize") Integer pageSize,
@ApiParam(value = "产品skuId") @RequestParam(value = "productSkuId") Integer industrySkuId,
@ApiParam(value = "关键字") @RequestParam(value = "keyword", required = false) String keyword) {
return industrySpecService.listPageIndustrySpec(pageNo, pageSize, industrySkuId, keyword);
}
@ApiOperation(value = "行业方案规格-价格配置")
@PostMapping("industrySpecCPQ")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody industrySpecCPQ(@RequestBody IndustrySpecCPQVO industrySpecCPQQ) {
return industrySpecService.industrySpecCPQ(industrySpecCPQQ);
}
@ApiOperation(value = "行业方案规格管理-价格配置信息的修改")
@PostMapping("updateIndustrySpecCPQ")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody updateIndustrySpecCPQ(@RequestBody IndustrySpecCPQVO industrySpecCPQQ) {
return industrySpecService.updateIndustrySpecCPQ(industrySpecCPQQ);
}
@ApiOperation(value = "行业sku管理---方案规格管理---获取价格配置信息")
@PostMapping("getIndustrySpecCPQ")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustrySpecPriceDTO.class)})
public ResultBody getIndustrySpecCPQ(@RequestBody IndustrySpecCPQVO industrySpecCPQQ) {
return industrySpecService.getIndustrySpecCPQ(industrySpecCPQQ);
}
@ApiOperation(value = "行业sku管理---删除行业sku")
@GetMapping("removeIndustrySku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody removeIndustrySku(@ApiParam("id") @RequestParam(value = "id") Integer id) {
return industrySpecService.removeIndustrySku(id);
}
@ApiOperation(value = "行业sku管理---方案规格管理---删除行业规格")
@GetMapping("removeIndustrySpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RemoveSkuDTO.class)})
public ResultBody removeIndustrySpec(@ApiParam("id") @RequestParam(value = "id") Integer id) {
return industrySpecService.removeIndustrySpec(id);
}
}
\ No newline at end of file
package com.mmc.pms.controller; package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.dto.*; import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Update;
import com.mmc.pms.model.lease.vo.PriceAcquisition;
import com.mmc.pms.model.qo.ProductSkuQO; import com.mmc.pms.model.qo.ProductSkuQO;
import com.mmc.pms.model.vo.Create; import com.mmc.pms.model.sale.dto.*;
import com.mmc.pms.model.vo.ProductSpecCPQVO; import com.mmc.pms.model.sale.vo.ProductSpecCPQVO;
import com.mmc.pms.model.vo.Update;
import com.mmc.pms.service.ProductSkuService; import com.mmc.pms.service.ProductSkuService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal;
/** /**
* @Author LW * @Author LW
* @date 2022/9/22 10:28 * @date 2022/9/22 10:28
...@@ -52,13 +55,13 @@ public class BackstageProductSpecController { ...@@ -52,13 +55,13 @@ public class BackstageProductSpecController {
return productSkuService.listPageProductSku(productSkuQO); return productSkuService.listPageProductSku(productSkuQO);
} }
// @ApiOperation(value = "产品sku管理---删除产品sku") @ApiOperation(value = "删除产品sku")
// @GetMapping("removeProductSku") @GetMapping("removeProductSku")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
// public ResultBody removeProductSku(@ApiParam("id") @RequestParam(value = "id") Integer id) { public ResultBody removeProductSku(@ApiParam("id") @RequestParam(value = "id") Integer id) {
// return productSpecService.removeProductSku(id); return productSkuService.removeProductSku(id);
// } }
//
@ApiOperation(value = "新增or修改产品规格") @ApiOperation(value = "新增or修改产品规格")
@PostMapping("addOrEditProductSpec") @PostMapping("addOrEditProductSpec")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
...@@ -112,12 +115,12 @@ public class BackstageProductSpecController { ...@@ -112,12 +115,12 @@ public class BackstageProductSpecController {
// return productSpecService.getDefaultSettings(productSpecId); // return productSpecService.getDefaultSettings(productSpecId);
// } // }
// //
// @ApiOperation(value = "产品规格管理---删除规格") @ApiOperation(value = "产品规格管理---删除规格")
// @GetMapping("removeProductSpec") @GetMapping("removeProductSpec")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RemoveSkuDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = RemoveSkuDTO.class)})
// public ResultBody removeProductSpec(@ApiParam("id") @RequestParam(value = "id") Integer id) { public ResultBody removeProductSpec(@ApiParam("id") @RequestParam(value = "id") Integer id) {
// return productSpecService.removeProductSpec(id); return productSkuService.removeProductSpec(id);
// } }
// //
// @ApiOperation(value = "feign根据渠道等级获取单价信息") // @ApiOperation(value = "feign根据渠道等级获取单价信息")
// @GetMapping("feignGetUnitPriceByTag") // @GetMapping("feignGetUnitPriceByTag")
...@@ -127,4 +130,11 @@ public class BackstageProductSpecController { ...@@ -127,4 +130,11 @@ public class BackstageProductSpecController {
// @RequestParam(value = "tagId")Integer tagId) { // @RequestParam(value = "tagId")Integer tagId) {
// return productSpecService.feignGetUnitPriceByTag(specId,tagId); // return productSpecService.feignGetUnitPriceByTag(specId,tagId);
// } // }
@ApiOperation(value = "feign根据渠道等级获取单价信息")
@PostMapping("feignGetSpecLeaseUnitPrice")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public BigDecimal feignGetUnitPriceByTag(@RequestBody PriceAcquisition priceAcquisition) {
return productSkuService.feignGetUnitPriceByTag(priceAcquisition);
}
} }
package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Update;
import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO;
import com.mmc.pms.model.work.vo.ServiceVO;
import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.BackstageTaskService;
import io.swagger.annotations.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
/**
* @Author LW
* @date 2023/6/6 10:41
* 概要:
*/
@Api(tags = {"后台-服务管理-模块"})
@RestController
@RequestMapping("/backstage/work")
public class BackstageTaskServiceController extends BaseController {
@Resource
private BackstageTaskService backstageTaskService;
@ApiOperation(value = "新增作业服务")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("addWorkService")
public ResultBody addWorkService(@Validated(Create.class) @RequestBody ServiceVO param, HttpServletRequest request) {
return backstageTaskService.addWorkService(param, this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
@ApiOperation(value = "修改作业服务")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("updateWorkService")
public ResultBody updateWorkService(@Validated(Update.class) @RequestBody ServiceVO param) {
return backstageTaskService.updateById(param);
}
@ApiOperation(value = "删除作业服务")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("deleteWorkService")
public ResultBody deleteWorkService(@ApiParam("作业服务id") @RequestParam(value = "id") Integer id) {
return backstageTaskService.deleteById(id);
}
@ApiOperation(value = "查询作业服务")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceDTO.class)})
@GetMapping("queryWorkService")
public ResultBody queryWorkService(@ApiParam("作业服务id") @RequestParam(value = "id") Integer id) {
return backstageTaskService.queryById(id);
}
@ApiOperation(value = "查询工作服务列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceDTO.class)})
@PostMapping("queryWorkServiceList")
public PageResult queryWorkServiceList(@Validated(Create.class) @RequestBody ServiceQO param, HttpServletRequest request) {
return backstageTaskService.queryWorkServiceList(param, this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
}
package com.mmc.pms.controller;
import com.alibaba.fastjson.JSONObject;
import com.mmc.pms.auth.dto.LoginSuccessDTO;
import com.mmc.pms.common.ResultEnum;
import com.mmc.pms.util.BizException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import javax.servlet.http.HttpServletRequest;
/**
* @author: zj
* @Date: 2023/5/25 18:11
*/
public abstract class BaseController {
@Autowired
private StringRedisTemplate stringRedisTemplate;
/**
* 解析token,获取用户信息
* @param request
* @return
*/
// public BaseAccountDTO getUserLoginInfo(HttpServletRequest request) {
// String token = request.getHeader("token");
// try {
// Claims claims = JwtUtil.parseJwt(token);
// String userId = claims.get(JwtConstant.USER_ACCOUNT_ID).toString();
//// String roleId = claims.get("").toString();
// String tokenType = claims.get(JwtConstant.TOKEN_TYPE).toString();
// return BaseAccountDTO.builder().id(Integer.parseInt(userId)).tokenPort(tokenType).build();
// }catch (Exception e){
// throw new BizException("Invalid token");
// }
// }
/**
* 使用token从redis获取用户信息
*
* @param request
* @return
*/
public LoginSuccessDTO getUserLoginInfoFromRedis(HttpServletRequest request) {
String token = request.getHeader("token");
if (StringUtils.isBlank(token)) {
throw new BizException(ResultEnum.LOGIN_ACCOUNT_STATUS_ERROR);
}
String json = stringRedisTemplate.opsForValue().get(token);
if (StringUtils.isBlank(json)) {
throw new BizException(ResultEnum.LOGIN_ACCOUNT_STATUS_ERROR);
}
LoginSuccessDTO loginSuccessDTO = JSONObject.parseObject(json, LoginSuccessDTO.class);
return loginSuccessDTO;
}
}
package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.entity.Categories;
import com.mmc.pms.model.categories.dto.CategoriesDTO;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO;
import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.CategoriesService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.stream.Collectors;
/**
* <p>
* 前端控制器
* </p>
*
* @author Pika
* @since 2023-06-08
*/
@Api(tags = {"后台-目录管理-接口"})
@RestController
@RequestMapping("/directory")
public class DirectoryController {
private final String DIRECTORY_NAME_APPLICATION = "应用";
private final String DIRECTORY_NAME_INDUSTRY = "行业";
@Autowired
private CategoriesService categoriesService;
@ApiOperation(value = "获取应用类型列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CategoriesDTO.class)})
@PostMapping("getApplicationList")
public ResultBody getApplicationList() {
return categoriesService.getApplicationList(DIRECTORY_NAME_APPLICATION);
}
@ApiOperation(value = "获取对应行业列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CategoriesDTO.class)})
@PostMapping("getIndustryList")
public ResultBody getIndustryList() {
return categoriesService.getApplicationList(DIRECTORY_NAME_INDUSTRY);
}
}
...@@ -2,9 +2,15 @@ package com.mmc.pms.controller; ...@@ -2,9 +2,15 @@ package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum; import com.mmc.pms.common.ResultEnum;
import com.mmc.pms.model.dto.*; import com.mmc.pms.model.lease.dto.BrandDTO;
import com.mmc.pms.model.lease.dto.DeviceCategoryDTO;
import com.mmc.pms.model.lease.dto.WareInfoDTO;
import com.mmc.pms.model.lease.dto.WareInfoItemDTO;
import com.mmc.pms.model.lease.vo.LeaseVo;
import com.mmc.pms.model.other.dto.DistrictInfoDTO;
import com.mmc.pms.model.other.dto.ModelDTO;
import com.mmc.pms.model.qo.WareInfoQO; import com.mmc.pms.model.qo.WareInfoQO;
import com.mmc.pms.model.vo.LeaseVo; import com.mmc.pms.model.sale.dto.SkuInfoDTO;
import com.mmc.pms.page.Page; import com.mmc.pms.page.Page;
import com.mmc.pms.service.WebDeviceService; import com.mmc.pms.service.WebDeviceService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -22,63 +28,64 @@ import org.springframework.web.bind.annotation.*; ...@@ -22,63 +28,64 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping("/appDevice") @RequestMapping("/appDevice")
public class MiniProgramDeviceController { public class MiniProgramDeviceController {
@Autowired private WebDeviceService webDeviceService; @Autowired
private WebDeviceService webDeviceService;
@ApiOperation(value = "地域") @ApiOperation(value = "地域")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("/getSecondDistrictInfo") @GetMapping("/getSecondDistrictInfo")
public ResultBody<DistrictInfoDTO> getSecondDistrictInfo() { public ResultBody<DistrictInfoDTO> getSecondDistrictInfo() {
return webDeviceService.listSecondDistrict(); return webDeviceService.listSecondDistrict();
} }
@ApiOperation("设备类目") @ApiOperation("设备类目")
@GetMapping("/category") @GetMapping("/category")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = DeviceCategoryDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = DeviceCategoryDTO.class)})
public ResultBody<DeviceCategoryDTO> category() { public ResultBody<DeviceCategoryDTO> category() {
return webDeviceService.category(); return webDeviceService.category();
} }
@ApiOperation("品牌") @ApiOperation("品牌")
@GetMapping("/brand") @GetMapping("/brand")
public ResultBody<BrandDTO> brand() { public ResultBody<BrandDTO> brand() {
return webDeviceService.brand(); return webDeviceService.brand();
} }
@ApiOperation("型号") @ApiOperation("型号")
@GetMapping("/model") @GetMapping("/model")
public ResultBody<ModelDTO> model() { public ResultBody<ModelDTO> model() {
return webDeviceService.model(); return webDeviceService.model();
} }
@ApiOperation(value = "设备列表筛选") @ApiOperation(value = "设备列表筛选")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = WareInfoItemDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = WareInfoItemDTO.class)})
@PostMapping("/deviceList") @PostMapping("/deviceList")
public ResultBody<WareInfoItemDTO> listWareInfoPage( public ResultBody<WareInfoItemDTO> listWareInfoPage(
@RequestBody @Validated(Page.class) WareInfoQO param) { @RequestBody @Validated(Page.class) WareInfoQO param) {
return webDeviceService.listWareInfoPage(param); return webDeviceService.listWareInfoPage(param);
} }
@ApiOperation(value = "设备详情") @ApiOperation(value = "设备详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("/detail") @GetMapping("/detail")
public ResultBody<WareInfoDTO> detail(@RequestParam(value = "id", required = true) Integer id) { public ResultBody<WareInfoDTO> detail(@RequestParam(value = "id", required = true) Integer id) {
WareInfoDTO wareInfoDTO = webDeviceService.getWareInfoById(id); WareInfoDTO wareInfoDTO = webDeviceService.getWareInfoById(id);
return wareInfoDTO == null return wareInfoDTO == null
? ResultBody.error(ResultEnum.NOT_FOUND) ? ResultBody.error(ResultEnum.NOT_FOUND)
: ResultBody.success(wareInfoDTO); : ResultBody.success(wareInfoDTO);
} }
@ApiOperation(value = "立即租赁") @ApiOperation(value = "立即租赁")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("/update") @PostMapping("/update")
public ResultBody update(@RequestBody LeaseVo param) { public ResultBody update(@RequestBody LeaseVo param) {
return webDeviceService.update(param); return webDeviceService.update(param);
} }
@ApiOperation(value = "获取设备sku") @ApiOperation(value = "获取设备sku")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = SkuInfoDTO.class) }) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = SkuInfoDTO.class)})
@GetMapping("listWareSkuById") @GetMapping("listWareSkuById")
public ResultBody<SkuInfoDTO> listWareSkuById(@RequestParam Integer id) { public ResultBody<SkuInfoDTO> listWareSkuById(@RequestParam Integer id) {
return ResultBody.success(webDeviceService.listWareSkuById(id)); return ResultBody.success(webDeviceService.listWareSkuById(id));
} }
} }
package com.mmc.pms.controller; package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.dto.AppGoodsInfoDetailDTO;
import com.mmc.pms.model.dto.GoodsInfoListDTO;
import com.mmc.pms.model.qo.GoodsInfoQO; import com.mmc.pms.model.qo.GoodsInfoQO;
import com.mmc.pms.model.sale.dto.AppGoodsInfoDetailDTO;
import com.mmc.pms.model.sale.dto.GoodsInfoListDTO;
import com.mmc.pms.service.MiniProgramProductMallService; import com.mmc.pms.service.MiniProgramProductMallService;
import com.mmc.pms.service.WebProductMallService; import com.mmc.pms.service.WebProductMallService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
...@@ -18,22 +18,24 @@ import org.springframework.web.bind.annotation.*; ...@@ -18,22 +18,24 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping("/AppProductMall/") @RequestMapping("/AppProductMall/")
public class MiniProgramProductMallController { public class MiniProgramProductMallController {
@Autowired private WebProductMallService webProductMallService; @Autowired
private WebProductMallService webProductMallService;
@Autowired private MiniProgramProductMallService miniProgramProductMallService; @Autowired
private MiniProgramProductMallService miniProgramProductMallService;
@ApiOperation(value = "小程序-商品信息-分页") @ApiOperation(value = "小程序-商品信息-分页")
@PostMapping("listPageGoodsInfo") @PostMapping("listPageGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsInfoListDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsInfoListDTO.class)})
public ResultBody<GoodsInfoListDTO> listPageGoodsInfo( public ResultBody<GoodsInfoListDTO> listPageGoodsInfo(
@ApiParam("商品查询条件QO") @RequestBody GoodsInfoQO param) { @ApiParam("商品查询条件QO") @RequestBody GoodsInfoQO param) {
return ResultBody.success(webProductMallService.listPageGoodsInfo(param)); return ResultBody.success(webProductMallService.listPageGoodsInfo(param));
} }
@ApiOperation(value = "小程序端-获取商品详细信息--共多少种选择") @ApiOperation(value = "小程序端-获取商品详细信息--共多少种选择")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppGoodsInfoDetailDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppGoodsInfoDetailDTO.class)})
@GetMapping("getAppGoodsInfoDetail") @GetMapping("getAppGoodsInfoDetail")
public ResultBody<AppGoodsInfoDetailDTO> getAppGoodsInfoDetail(@RequestParam Integer id) { public ResultBody<AppGoodsInfoDetailDTO> getAppGoodsInfoDetail(@RequestParam Integer id) {
return miniProgramProductMallService.getAppGoodsInfoDetail(id); return miniProgramProductMallService.getAppGoodsInfoDetail(id);
} }
} }
package com.mmc.pms.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Author LW
* @date 2023/6/7 13:33
* 概要:
*/
@Api(tags = {"分类信息"})
@RestController
@RequestMapping("/category")
public class WebAndMiniProgramCategoryController {
// @ApiOperation(value = "web-分类信息")
// @PostMapping("queryCategoryByType")
// @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsInfoListDTO.class)})
// public ResultBody<GoodsInfoListDTO> listPageGoodsInfo(
// @ApiParam("商品查询条件QO") @RequestBody GoodsInfoQO param) {
// return ResultBody.success(webProductMallService.listPageGoodsInfo(param));
// }
}
...@@ -2,9 +2,15 @@ package com.mmc.pms.controller; ...@@ -2,9 +2,15 @@ package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum; import com.mmc.pms.common.ResultEnum;
import com.mmc.pms.model.dto.*; import com.mmc.pms.model.lease.dto.BrandDTO;
import com.mmc.pms.model.lease.dto.DeviceCategoryDTO;
import com.mmc.pms.model.lease.dto.WareInfoDTO;
import com.mmc.pms.model.lease.dto.WareInfoItemDTO;
import com.mmc.pms.model.lease.vo.LeaseVo;
import com.mmc.pms.model.other.dto.AdDTO;
import com.mmc.pms.model.other.dto.DistrictInfoDTO;
import com.mmc.pms.model.other.dto.ModelDTO;
import com.mmc.pms.model.qo.WareInfoQO; import com.mmc.pms.model.qo.WareInfoQO;
import com.mmc.pms.model.vo.LeaseVo;
import com.mmc.pms.page.Page; import com.mmc.pms.page.Page;
import com.mmc.pms.service.WebDeviceService; import com.mmc.pms.service.WebDeviceService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -23,74 +29,75 @@ import org.springframework.web.bind.annotation.*; ...@@ -23,74 +29,75 @@ import org.springframework.web.bind.annotation.*;
@RequestMapping("/webDevice") @RequestMapping("/webDevice")
public class WebDeviceController { public class WebDeviceController {
@Autowired private WebDeviceService webDeviceService; @Autowired
private WebDeviceService webDeviceService;
@ApiOperation(value = "地域") @ApiOperation(value = "地域")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("/getSecondDistrictInfo") @GetMapping("/getSecondDistrictInfo")
public ResultBody<DistrictInfoDTO> getSecondDistrictInfo() { public ResultBody<DistrictInfoDTO> getSecondDistrictInfo() {
return webDeviceService.listSecondDistrict(); return webDeviceService.listSecondDistrict();
} }
@ApiOperation("设备类目") @ApiOperation("设备类目")
@GetMapping("/category") @GetMapping("/category")
public ResultBody<DeviceCategoryDTO> category() { public ResultBody<DeviceCategoryDTO> category() {
return webDeviceService.category(); return webDeviceService.category();
} }
@ApiOperation("品牌") @ApiOperation("品牌")
@GetMapping("/brand") @GetMapping("/brand")
public ResultBody<BrandDTO> brand() { public ResultBody<BrandDTO> brand() {
return webDeviceService.brand(); return webDeviceService.brand();
} }
@ApiOperation("型号") @ApiOperation("型号")
@GetMapping("/model") @GetMapping("/model")
public ResultBody<ModelDTO> model() { public ResultBody<ModelDTO> model() {
return webDeviceService.model(); return webDeviceService.model();
} }
@ApiOperation("设备品牌") @ApiOperation("设备品牌")
@GetMapping("/deviceBrand") @GetMapping("/deviceBrand")
public ResultBody<BrandDTO> deviceBrand() { public ResultBody<BrandDTO> deviceBrand() {
return webDeviceService.deviceBrand(); return webDeviceService.deviceBrand();
} }
@ApiOperation("设备型号") @ApiOperation("设备型号")
@GetMapping("/deviceModel") @GetMapping("/deviceModel")
public ResultBody<ModelDTO> deviceModel() { public ResultBody<ModelDTO> deviceModel() {
return webDeviceService.deviceModel(); return webDeviceService.deviceModel();
} }
@ApiOperation(value = "设备详情") @ApiOperation(value = "设备详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("/detail") @GetMapping("/detail")
public ResultBody<WareInfoDTO> detail(@RequestParam(value = "id", required = true) Integer id) { public ResultBody<WareInfoDTO> detail(@RequestParam(value = "id", required = true) Integer id) {
WareInfoDTO wareInfoDTO = webDeviceService.getWareInfoById(id); WareInfoDTO wareInfoDTO = webDeviceService.getWareInfoById(id);
return wareInfoDTO == null return wareInfoDTO == null
? ResultBody.error(ResultEnum.NOT_FOUND) ? ResultBody.error(ResultEnum.NOT_FOUND)
: ResultBody.success(wareInfoDTO); : ResultBody.success(wareInfoDTO);
} }
@ApiOperation(value = "立即租赁") @ApiOperation(value = "立即租赁")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("/update") @PostMapping("/update")
public ResultBody update(@RequestBody LeaseVo param) { public ResultBody update(@RequestBody LeaseVo param) {
return webDeviceService.update(param); return webDeviceService.update(param);
} }
@ApiOperation("设备广告位") @ApiOperation("设备广告位")
@GetMapping("/ad") @GetMapping("/ad")
public ResultBody<AdDTO> ad() { public ResultBody<AdDTO> ad() {
return webDeviceService.ad(); return webDeviceService.ad();
} }
@ApiOperation(value = "设备列表筛选") @ApiOperation(value = "设备列表筛选")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = WareInfoItemDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = WareInfoItemDTO.class)})
@PostMapping("/deviceList") @PostMapping("/deviceList")
public ResultBody<WareInfoItemDTO> listWareInfoPage( public ResultBody<WareInfoItemDTO> listWareInfoPage(
@RequestBody @Validated(Page.class) WareInfoQO param) { @RequestBody @Validated(Page.class) WareInfoQO param) {
return webDeviceService.listWareInfoPage(param); return webDeviceService.listWareInfoPage(param);
} }
} }
package com.mmc.pms.controller; package com.mmc.pms.controller;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.dto.AdDTO; import com.mmc.pms.model.other.dto.AdDTO;
import com.mmc.pms.model.dto.AppGoodsInfoDetailDTO; import com.mmc.pms.model.sale.dto.ProductCategoryDTO;
import com.mmc.pms.model.dto.GoodsInfoListDTO;
import com.mmc.pms.model.dto.ProductCategoryDTO;
import com.mmc.pms.model.qo.GoodsInfoQO; import com.mmc.pms.model.qo.GoodsInfoQO;
import com.mmc.pms.model.sale.dto.AppGoodsInfoDetailDTO;
import com.mmc.pms.model.sale.dto.GoodsInfoListDTO;
import com.mmc.pms.service.MiniProgramProductMallService; import com.mmc.pms.service.MiniProgramProductMallService;
import com.mmc.pms.service.WebProductMallService; import com.mmc.pms.service.WebProductMallService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
...@@ -19,46 +19,48 @@ import org.springframework.web.bind.annotation.*; ...@@ -19,46 +19,48 @@ import org.springframework.web.bind.annotation.*;
@RestController @RestController
@RequestMapping("/webProductMall") @RequestMapping("/webProductMall")
public class WebProductMallController { public class WebProductMallController {
@Autowired private WebProductMallService webProductMallService; @Autowired
private WebProductMallService webProductMallService;
@Autowired private MiniProgramProductMallService miniProgramProductMallService; @Autowired
private MiniProgramProductMallService miniProgramProductMallService;
@ApiOperation("产品类目") @ApiOperation("产品类目")
@GetMapping("/category") @GetMapping("/category")
public ResultBody<ProductCategoryDTO> productCategory() { public ResultBody<ProductCategoryDTO> productCategory() {
return webProductMallService.productCategory(); return webProductMallService.productCategory();
} }
@ApiOperation("产品部件") @ApiOperation("产品部件")
@GetMapping("/parts") @GetMapping("/parts")
public ResultBody<ProductCategoryDTO> productParts() { public ResultBody<ProductCategoryDTO> productParts() {
return webProductMallService.productParts(); return webProductMallService.productParts();
} }
@ApiOperation("产品成色") @ApiOperation("产品成色")
@GetMapping("/quality") @GetMapping("/quality")
public ResultBody<ProductCategoryDTO> productQuality() { public ResultBody<ProductCategoryDTO> productQuality() {
return webProductMallService.productQuality(); return webProductMallService.productQuality();
} }
@ApiOperation(value = "web-商品信息-分页") @ApiOperation(value = "web-商品信息-分页")
@PostMapping("listPageGoodsInfo") @PostMapping("listPageGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsInfoListDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsInfoListDTO.class)})
public ResultBody<GoodsInfoListDTO> listPageGoodsInfo( public ResultBody<GoodsInfoListDTO> listPageGoodsInfo(
@ApiParam("商品查询条件QO") @RequestBody GoodsInfoQO param) { @ApiParam("商品查询条件QO") @RequestBody GoodsInfoQO param) {
return ResultBody.success(webProductMallService.listPageGoodsInfo(param)); return ResultBody.success(webProductMallService.listPageGoodsInfo(param));
} }
@ApiOperation(value = "web-获取商品详细信息--共多少种选择") @ApiOperation(value = "web-获取商品详细信息--共多少种选择")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppGoodsInfoDetailDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppGoodsInfoDetailDTO.class)})
@GetMapping("getAppGoodsInfoDetail") @GetMapping("getAppGoodsInfoDetail")
public ResultBody<AppGoodsInfoDetailDTO> getAppGoodsInfoDetail(@RequestParam Integer id) { public ResultBody<AppGoodsInfoDetailDTO> getAppGoodsInfoDetail(@RequestParam Integer id) {
return miniProgramProductMallService.getAppGoodsInfoDetail(id); return miniProgramProductMallService.getAppGoodsInfoDetail(id);
} }
@ApiOperation("产品商城广告位") @ApiOperation("产品商城广告位")
@GetMapping("/ad") @GetMapping("/ad")
public ResultBody<AdDTO> ad() { public ResultBody<AdDTO> ad() {
return webProductMallService.ad(); return webProductMallService.ad();
} }
} }
package com.mmc.pms.controller.web;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Author LW
* @date 2023/6/8 15:19
* 概要:
*/
@RestController
@RequestMapping("/lease/goods")
@Api(tags = {"web端-设备租赁-相关接口"})
public class WebLeaseGoodsController {
}
package com.mmc.pms.dao;
import com.mmc.pms.entity.ServiceDO;
import com.mmc.pms.model.qo.ServiceQO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @Author LW
* @date 2023/6/6 10:48
* 概要:
*/
@Mapper
public interface BackstageTaskServiceDao {
Integer insert(ServiceDO serviceDO);
Integer update(ServiceDO serviceDO);
Integer deleteById(Integer id);
ServiceDO queryById(Integer id);
List<ServiceDO> queryAllByLimit(ServiceQO param);
Integer count(ServiceQO param);
}
package com.mmc.pms.dao; package com.mmc.pms.dao;
import com.mmc.pms.entity.Categories; import com.mmc.pms.entity.Categories;
import com.mmc.pms.entity.Directory; import com.mmc.pms.entity.DirectoryDO;
import com.mmc.pms.model.vo.ClassifyInfoVO; import com.mmc.pms.model.categories.vo.ClassifyInfoVO;
import com.mmc.pms.model.vo.DirectoryInfoVO; import com.mmc.pms.model.categories.vo.DirectoryInfoVO;
import com.mmc.pms.model.vo.QueryClassifyVO; import com.mmc.pms.model.sale.vo.QueryClassifyVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* @author 23214 * @author 23214
...@@ -20,13 +22,13 @@ public interface CategoriesDao { ...@@ -20,13 +22,13 @@ public interface CategoriesDao {
int countUpdateDirectoryName(DirectoryInfoVO param); int countUpdateDirectoryName(DirectoryInfoVO param);
void insertDirectory(Directory directory); void insertDirectory(DirectoryDO directory);
void updateDirectory(Directory directory); void updateDirectory(DirectoryDO directory);
int countDirectoryList(); int countDirectoryList();
List<Directory> directoryList(int i, Integer pageSize); List<DirectoryDO> directoryList(int pageNo, Integer pageSize, Integer type);
int countDirectory(Integer id); int countDirectory(Integer id);
...@@ -42,11 +44,21 @@ public interface CategoriesDao { ...@@ -42,11 +44,21 @@ public interface CategoriesDao {
Categories getGoodsGroupById(Integer id); Categories getGoodsGroupById(Integer id);
int updateTypeSort(Integer firstId, Integer sort); int updateTypeSort(Integer id, Integer sort);
List<Categories> selectAllClassification(QueryClassifyVO queryClassifyVO); List<Categories> selectAllClassification(QueryClassifyVO queryClassifyVO);
int countListClassification(QueryClassifyVO queryClassifyVO); int countListClassification(QueryClassifyVO queryClassifyVO);
int selectDirectoryById(Integer id);
int deleteById(Integer id);
List<DirectoryDO> getDirectoryList(Integer type);
List<Categories> getCategoriesByDirectoryId(Integer directoryId);
List<Categories> getCategoriesListByIds(@Param("ids") Set<Integer> ids);
} }
......
package com.mmc.pms.dao;
import com.mmc.pms.entity.DirectoryDO;
import org.apache.ibatis.annotations.Mapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author Pika
* @since 2023-06-08
*/
@Mapper
public interface DirectoryDao {
DirectoryDO getDirectoryByName(String directoryName);
}
package com.mmc.pms.dao; package com.mmc.pms.dao;
import com.mmc.pms.entity.*; import com.mmc.pms.entity.*;
import com.mmc.pms.model.vo.GoodsAddVO; import com.mmc.pms.model.sale.vo.GoodsAddVO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List; import java.util.List;
import java.util.Set;
/** /**
* @author 23214 * @author 23214
...@@ -42,6 +44,54 @@ public interface GoodsInfoDao { ...@@ -42,6 +44,54 @@ public interface GoodsInfoDao {
void deleteGoodsVideoById(Integer id); void deleteGoodsVideoById(Integer id);
void deleteGoodsServiceByGoodsId(Integer id); void deleteGoodsServiceByGoodsId(Integer id);
void insertMallIndustrySkuInfo(MallIndustrySkuInfoDO mallIndustrySkuInfoDO);
void insertMallIndustrySkuInfoSpec(MallIndustrySkuInfoSpecDO mallIndustrySkuInfoSpecDO);
List<MallProdInfoDO> getMallProSkuInfo(Integer id);
void batchUpdateMallProductSku(List<Integer> delIds);
void batchUpdateMallProdSkuInfo(List<MallProdInfoDO> mallProdSkuInfoList);
List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer id);
GoodsInfo getGoodsSimpleInfo(Integer goodsInfoId);
GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsInfoId);
List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsInfoId);
List<SkuUnitDO> getSkuUnit();
List<GoodsInfo> listSimpleGoodsInfoByIds(@Param("ids") Set<Integer> ids);
void insertMallProdSkuInfo(MallProdInfoDO mallProdSkuInfoDO);
void insertMallProdSkuInfoSpec(MallProdSkuInfoSpecDO mallProdSkuInfoSpecDO);
void batchUpdateMallProSpec(@Param("list") List<Integer> list, @Param("id") Integer id);
List<MallProdSkuInfoSpecDO> listMallProdSpecInfo(List<Integer> mallSkuIds);
void batchUpdateMallProdSpec(List<Integer> delSpecId);
List<MallGoodsSpecInfoDO> listProdSpecInfo(@Param("prodIds") Set<Integer> prodIds);
List<MallGoodsSpecInfoDO> listIndstSpecInfo(@Param("indstIds") Set<Integer> indstIds);
List<GoodsServiceDO> listGoodsService(List<Integer> goodsIds);
List<MallGoodsInfoSimpleDO> listMallGoodsIndstSimpleInfo(@Param("indstSkuSpecIds") Set<Integer> indstSkuSpecIds);
List<Integer> listIndustrySpecIds(Set<Integer> mallIndstSkuSpecIds);
List<MallGoodsProductDO> listIndustryProductList(List<Integer> industrySpecIds);
List<GoodsInfo> ListGoodsInfoByCategoryId(Integer id);
List<MallProdSkuInfoSpecDO> getMallProSkuInfoSpec(Integer goodsInfoId);
} }
......
package com.mmc.pms.dao;
import com.mmc.pms.entity.*;
import com.mmc.pms.model.qo.IndustrySkuQO;
import com.mmc.pms.model.sale.dto.IndustrySpecCPQVO;
import com.mmc.pms.model.sale.vo.IndustrySkuVO;
import com.mmc.pms.model.sale.vo.IndustrySpecVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Set;
/**
* @Author LW
* @date 2022/10/8 10:58
* 概要:
*/
@Mapper
public interface IndustrySpecDao {
int countSkuName(IndustrySkuVO param);
int insertIndustrySku(IndustrySku industrySku);
int countIndustrySkuById(Integer id);
IndustrySku getIndustrySkuById(Integer id);
int updateIndustrySku(IndustrySku industrySku);
int countListPageIndustrySku(IndustrySkuQO param);
List<IndustrySku> listPageIndustrySku(IndustrySkuQO param);
int countSpecName(IndustrySpecVO param);
int insertIndustrySpec(IndustrySpecDO industrySpecDO);
void insertIndustryProductInventory(IndustryProductInventoryDO industryProductInventoryDO);
void insertInventorySpec(InventorySpecDO inventorySpecDO);
int countIndustrySpec(Integer industrySpecId);
IndustrySpecDO getIndustrySpecById(Integer industrySpecId);
List<IndustryProductInventoryDO> getIndustryProductInventory(Integer industrySpecId);
int updateIndustrySpec(IndustrySpecDO industrySpecDO);
void batchDeleteInventorySpec(List<Integer> industryProductInventoryIds);
void deleteIndustryProductInventory(Integer id);
int countListPageIndustrySpec(Integer id, String keyword);
List<IndustrySpecDO> listPageIndustrySpec(int pageNo, Integer pageSize, Integer industrySkuId, String keyword);
int batchInsertSpecPrice(List<IndustrySpecPriceDO> list);
void removeIndustrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
void batchInsertLeaseSpecPrice(List<IndustrySpecPriceDO> list);
List<IndustrySpecPriceDO> getIndustrySpecCPQ(IndustrySpecCPQVO industrySpecCPQQ);
void batchUpdateMallIndustrySpec(@Param("list") List<Integer> list, @Param("id") Integer id);
void batchUpdateMallIndustrySku(@Param("list") List<Integer> list);
void batchUpdateMallIndustrySkuInfo(List<MallIndustrySkuInfoDO> mallIndustrySkuInfoList);
List<MallIndustrySkuInfoSpecDO> listMallIndustrySpecInfo(List<Integer> mallSkuIds);
void batchUpdateMallIndustSpec(@Param("list") List<Integer> list, @Param("id") Integer id);
List<IndustryProductInventoryDO> listIndustryProdInventory(Set<Integer> inventoryIds);
List<IndustrySpecDO> listIndustrySpec(Set<Integer> industrySpecIds);
int countIndustrySpecBySkuId(Integer id);
void removeIndustrySku(Integer id);
List<MallIndustrySkuInfoSpecDO> listMallIndustrySpec(Integer id);
void removeIndustryProductInventory(List<Integer> collect);
List<InventorySpecDO> listInventorySpec(List<Integer> ids);
void removeInventorySpec(List<Integer> ids);
void removeIndustrySpec(Integer id);
List<MallIndustrySkuInfoSpecDO> getIndustrySkuInfoSpec(Integer goodsInfoId);
List<IndustrySpecPriceDO> listIndustrySpecPrice(Integer tagInfoId, List<Integer> industrySpecIds);
List<IndustrySpecPriceDO> getIndustrySpecPriceList(List<Integer> specIds);
}
...@@ -2,7 +2,6 @@ package com.mmc.pms.dao; ...@@ -2,7 +2,6 @@ package com.mmc.pms.dao;
import com.mmc.pms.entity.*; import com.mmc.pms.entity.*;
import com.mmc.pms.model.qo.GoodsInfoQO; import com.mmc.pms.model.qo.GoodsInfoQO;
import com.mmc.pms.service.Impl.IndustryProductInventoryDO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
...@@ -12,37 +11,37 @@ import java.util.List; ...@@ -12,37 +11,37 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface MiniProgramProductMallDao { public interface MiniProgramProductMallDao {
GoodsInfoDO getGoodsInfoByGoodsId(Integer goodsId); GoodsInfoDO getGoodsInfoByGoodsId(Integer goodsId);
List<GoodsImgDO> listGoodsInfoByGoodsId(Integer goodsId); List<GoodsImgDO> listGoodsInfoByGoodsId(Integer goodsId);
GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsId); GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsId);
List<GoodsQaDO> listGoodsQaInfoByGoodsId(Integer goodsId); List<GoodsQaDO> listGoodsQaInfoByGoodsId(Integer goodsId);
List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsId); List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsId);
List<MallProdSkuInfoDO> getMallProdInfoByGoodsId(Integer goodsId); List<MallProdInfoDO> getMallProdInfoByGoodsId(Integer goodsId);
List<MallProdSkuInfoSpecDO> listMallProdSkuInfoSpec(Integer goodsId); List<MallProdSkuInfoSpecDO> listMallProdSkuInfoSpec(Integer goodsId);
List<ProductSpecDO> listProductSpecInfo(List<Integer> collect); List<ProductSpecDO> listProductSpecInfo(List<Integer> collect);
List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer goodsInfoId); List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer goodsInfoId);
List<MallIndustrySkuInfoSpecDO> getIndustrySkuInfoSpec(Integer goodsInfoId); List<MallIndustrySkuInfoSpecDO> getIndustrySkuInfoSpec(Integer goodsInfoId);
int countListGoodsByQO(GoodsInfoQO param); int countListGoodsByQO(GoodsInfoQO param);
List<GoodsInfoDO> listGoodsByQO(GoodsInfoQO param); List<GoodsInfoDO> listGoodsByQO(GoodsInfoQO param);
List<GoodsTypeDO> listIndustryIdBySort(); List<GoodsTypeDO> listIndustryIdBySort();
List<IndustryProductInventoryDO> getIndustryProductInventory(Integer industrySpecId); List<IndustryProductInventoryDO> getIndustryProductInventory(Integer industrySpecId);
List<InventorySpecDO> listInventorySpec(List<Integer> collect); List<InventorySpecDO> listInventorySpec(List<Integer> collect);
ProductSpecDO getProductSpecDetail(Integer productSpecId); ProductSpecDO getProductSpecDetail(Integer productSpecId);
ProductSkuDO getProductSkuDetail(Integer productSkuId); ProductSkuDO getProductSkuDetail(Integer productSkuId);
} }
package com.mmc.pms.dao;
import com.mmc.pms.entity.*;
import com.mmc.pms.model.lease.vo.PriceAcquisition;
import com.mmc.pms.model.order.dto.OrderGoodsProdDTO;
import com.mmc.pms.model.qo.MallOrderGoodsInfoQO;
import com.mmc.pms.model.qo.ProductSkuQO;
import com.mmc.pms.model.sale.dto.ProductSkuVO;
import com.mmc.pms.model.sale.dto.ProductSpecPriceDTO;
import com.mmc.pms.model.sale.dto.ProductSpecVO;
import com.mmc.pms.model.sale.vo.ProductSpecCPQVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.math.BigDecimal;
import java.util.List;
import java.util.Set;
/**
* @author 23214
* @description 针对表【product_sku(产品sku表)】的数据库操作Mapper
* @createDate 2023-05-25 14:55:56
* @Entity com.mmc.pms.entity.ProductSku
*/
@Mapper
public interface ProductDao {
int countSkuName(ProductSkuVO param);
int insertProductSku(ProductSkuDO productSkuDO);
int countSkuIsExist(Integer id);
ProductSkuDO getProductSkuDetail(Integer id);
int updateProductSku(ProductSkuDO productSkuDO);
int countListPageProductSku(ProductSkuQO productSkuQO);
List<ProductSkuDO> listPageProductSku(ProductSkuQO productSkuQO);
int countSpecName(ProductSpecVO param);
int insertProductSpec(ProductSpecDO productSpecDO);
int updateProductSpec(ProductSpecDO productSpecDO);
int countSpecIsExist(Integer id);
ProductSpecDO getProductSpecDetail(Integer id);
int countListPageProductSpec(Integer productSkuId);
List<ProductSpecDO> listPageProductSpec(int pageNo, Integer pageSize, Integer productSkuId);
int batchInsertSpecPrice(List<ProductSpecPriceDO> list);
void batchInsertLeaseSpecPrice(List<ProductSpecPriceDO> list);
void removeProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPrice(ProductSpecCPQVO productSpecCPQVO);
void insertMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
List<ProductSpecDO> listProductSpec(Integer id);
List<ProductSkuDO> listProductSkuDO(List<Integer> productSkuId);
List<InventorySpecDO> listInventorySpecInfo(List<Integer> industryProductInventoryIds);
List<ProductSpecDO> listProductSpecInfo(List<Integer> productSpecIds);
void batchUpdateMallProdSpec(List<Integer> delProductSpecId);
int countProductSpecByBrandId(Integer id);
int countSpecByProdSkuId(Integer id);
void removeProductSku(Integer id);
List<MallProdInfoDO> listMallProdInfo(String id);
void removeProductSpec(Integer id);
List<IndustrySpecDO> listIndustrySpec(@Param("industrySpecIds") Set<Integer> industrySpecIds);
List<InventorySpecDO> listInventorySpec(Integer id);
BigDecimal feignGetUnitPriceByTag(PriceAcquisition priceAcquisition);
List<MallGoodsSpecInfoDO> listProdSpecInfo(@Param("prodIds") Set<Integer> prodIds);
/**
* 根据渠道等级、商品specId获取price信息
*
* @param tagInfoId
* @param prodSkuSpecIds
* @return
*/
List<ProductSpecPriceDO> listProductSpecPrice(Integer tagInfoId, Set<Integer> prodSkuSpecIds);
ProductSpecPriceDTO feignGetUnitPrice(Integer id, Integer tagId);
List<ProductSpecDO> getProductSpecList(List<Integer> productSkuIds);
List<MallProdSkuInfoSpecDO> getProductSpecByIds(List<Integer> delProductSpecId);
Set<Integer> listProductSpecIds(@Param("mallProdSkuSpecIds") Set<Integer> mallProdSkuSpecIds);
List<OrderGoodsProdDTO> listProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
List<MallProdSkuInfoSpecDO> listMallProductSpec(Integer id);
}
package com.mmc.pms.dao;
import com.mmc.pms.entity.MallProdSkuInfoDO;
import com.mmc.pms.entity.ProductSkuDO;
import com.mmc.pms.entity.ProductSpecDO;
import com.mmc.pms.entity.ProductSpecPriceDO;
import com.mmc.pms.model.dto.ProductSkuVO;
import com.mmc.pms.model.dto.ProductSpecVO;
import com.mmc.pms.model.qo.ProductSkuQO;
import com.mmc.pms.model.vo.ProductSpecCPQVO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author 23214
* @description 针对表【product_sku(产品sku表)】的数据库操作Mapper
* @createDate 2023-05-25 14:55:56
* @Entity com.mmc.pms.entity.ProductSku
*/
@Mapper
public interface ProductSkuDao {
int countSkuName(ProductSkuVO param);
int insertProductSku(ProductSkuDO productSkuDO);
int countSkuIsExist(Integer id);
ProductSkuDO getProductSkuDetail(Integer id);
int updateProductSku(ProductSkuDO productSkuDO);
int countListPageProductSku(ProductSkuQO productSkuQO);
List<ProductSkuDO> listPageProductSku(ProductSkuQO productSkuQO);
int countSpecName(ProductSpecVO param);
int insertProductSpec(ProductSpecDO productSpecDO);
int updateProductSpec(ProductSpecDO productSpecDO);
int countSpecIsExist(Integer id);
ProductSpecDO getProductSpecDetail(Integer id);
int countListPageProductSpec(Integer productSkuId);
List<ProductSpecDO> listPageProductSpec(int i, Integer pageSize, Integer productSkuId);
int batchInsertSpecPrice(List<ProductSpecPriceDO> list);
void batchInsertLeaseSpecPrice(List<ProductSpecPriceDO> list);
void removeProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPrice(ProductSpecCPQVO productSpecCPQVO);
void insertMallProdSkuInfo(MallProdSkuInfoDO mallProdSkuInfoDO);
}
package com.mmc.pms.dao;
/**
* @Author LW
* @date 2023/6/7 13:52
* 概要:
*/
public interface WebAndMiniProgramCategoryDao {
}
package com.mmc.pms.dao; package com.mmc.pms.dao;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.entity.*; import com.mmc.pms.entity.*;
import com.mmc.pms.model.dto.AdDTO; import com.mmc.pms.model.lease.vo.LeaseVo;
import com.mmc.pms.model.qo.WareInfoQO; import com.mmc.pms.model.qo.WareInfoQO;
import com.mmc.pms.model.vo.LeaseVo;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import java.util.List; import java.util.List;
...@@ -14,36 +12,36 @@ import java.util.List; ...@@ -14,36 +12,36 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface WebDeviceDao { public interface WebDeviceDao {
List<DistrictDO> listSecondDistrict(); List<DistrictDO> listSecondDistrict();
List<DeviceCategory> category(); List<DeviceCategory> category();
List<Brand> brand(); List<Brand> brand();
List<Brand> deviceBrand(); List<Brand> deviceBrand();
List<Model> model(); List<Model> model();
List<Model> deviceModel(); List<Model> deviceModel();
List<DeviceListDO> deviceList( List<DeviceListDO> deviceList(
Integer districtId, Integer categoryId, Integer brandId, Integer modelId); Integer districtId, Integer categoryId, Integer brandId, Integer modelId);
int update(LeaseVo param); int update(LeaseVo param);
InventoryDO findInventory(Integer inventoryId); InventoryDO findInventory(Integer inventoryId);
List<WareInfoDO> detail(Integer id); List<WareInfoDO> detail(Integer id);
int countListWareInfoPage(WareInfoQO param); int countListWareInfoPage(WareInfoQO param);
List<WareInfoDO> listWareInfoPage(WareInfoQO param); List<WareInfoDO> listWareInfoPage(WareInfoQO param);
WareInfoDO getWareInfoById(Integer id); WareInfoDO getWareInfoById(Integer id);
WareDetailDO getWareDetailById(Integer id); WareDetailDO getWareDetailById(Integer id);
List<AdDO> ad(); List<AdDO> ad();
List<SkuInfoDO> listSkuInfo(Integer id); List<SkuInfoDO> listSkuInfo(Integer id);
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.AdDTO; import com.mmc.pms.model.other.dto.AdDTO;
import com.mmc.pms.model.dto.DeviceCategoryDTO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
...@@ -16,21 +16,21 @@ import java.time.LocalDateTime; ...@@ -16,21 +16,21 @@ import java.time.LocalDateTime;
*/ */
@Data @Data
public class BaseEntity implements Serializable { public class BaseEntity implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@TableId(value = "id", type = IdType.AUTO) @TableId(value = "id", type = IdType.AUTO)
private Integer id; private Integer id;
@ApiModelProperty("添加时间") @ApiModelProperty("添加时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime addtime; private LocalDateTime addtime;
@ApiModelProperty("最近一次编辑时间") @ApiModelProperty("最近一次编辑时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updatetime; private LocalDateTime updatetime;
@ApiModelProperty("1删除") @ApiModelProperty("1删除")
@JsonProperty(access = JsonProperty.Access.WRITE_ONLY) @JsonProperty(access = JsonProperty.Access.WRITE_ONLY)
@TableLogic @TableLogic
private Integer deleted; private Integer deleted;
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.mmc.pms.model.dto.BrandDTO; import com.mmc.pms.model.lease.dto.BrandDTO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -13,13 +13,13 @@ import lombok.Data; ...@@ -13,13 +13,13 @@ import lombok.Data;
@ApiModel("品牌") @ApiModel("品牌")
@TableName("brand") @TableName("brand")
public class Brand extends BaseEntity { public class Brand extends BaseEntity {
@ApiModelProperty("1") @ApiModelProperty("1")
private Integer id; private Integer id;
@ApiModelProperty("名称") @ApiModelProperty("名称")
private String name; private String name;
public BrandDTO brandDTO() { public BrandDTO brandDTO() {
return BrandDTO.builder().id(this.id).name(this.name).build(); return BrandDTO.builder().id(this.id).name(this.name).build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.BrandInfoDTO; import com.mmc.pms.model.sale.dto.BrandInfoDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.ClassifyDetailsDTO; import com.mmc.pms.model.categories.dto.ClassifyDetailsDTO;
import com.mmc.pms.model.dto.ClassifyInfoDTO; import com.mmc.pms.model.categories.dto.ClassifyInfoDTO;
import com.mmc.pms.model.vo.ClassifyInfoVO; import com.mmc.pms.model.categories.vo.ClassifyInfoVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.DeviceCategoryDTO; import com.mmc.pms.model.lease.dto.DeviceCategoryDTO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
...@@ -9,13 +9,13 @@ import lombok.Data; ...@@ -9,13 +9,13 @@ import lombok.Data;
*/ */
@Data @Data
public class DeviceCategory extends BaseEntity { public class DeviceCategory extends BaseEntity {
@ApiModelProperty(name = "id", value = "类目id", example = "1") @ApiModelProperty(name = "id", value = "类目id", example = "1")
private Integer id; private Integer id;
@ApiModelProperty(name = "id", value = "类目名称", example = "无人机") @ApiModelProperty(name = "id", value = "类目名称", example = "无人机")
private String name; private String name;
public DeviceCategoryDTO deviceCategory() { public DeviceCategoryDTO deviceCategory() {
return DeviceCategoryDTO.builder().id(this.id).name(this.name).build(); return DeviceCategoryDTO.builder().id(this.id).name(this.name).build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.DeviceListDTO; import com.mmc.pms.model.lease.dto.DeviceListDTO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
...@@ -10,31 +10,31 @@ import lombok.Data; ...@@ -10,31 +10,31 @@ import lombok.Data;
@Data @Data
@ApiModel("设备列表") @ApiModel("设备列表")
public class DeviceListDO { public class DeviceListDO {
private Integer id; private Integer id;
private String deviceName; private String deviceName;
private String imageUrl; private String imageUrl;
private String price; private String price;
private String brandName; private String brandName;
private String sysDistrictName; private String sysDistrictName;
private String modelName; private String modelName;
private String deviceCategoryName; private String deviceCategoryName;
private Integer residueCount; private Integer residueCount;
private Integer inventoryId; private Integer inventoryId;
private String appraise; private String appraise;
public DeviceListDTO deviceListDTO() { public DeviceListDTO deviceListDTO() {
return DeviceListDTO.builder() return DeviceListDTO.builder()
.id(this.id) .id(this.id)
.deviceName(this.deviceName) .deviceName(this.deviceName)
.imageUrl(this.imageUrl) .imageUrl(this.imageUrl)
.price(this.price) .price(this.price)
.brandName(this.brandName) .brandName(this.brandName)
.sysDistrictName(this.sysDistrictName) .sysDistrictName(this.sysDistrictName)
.modelName(this.modelName) .modelName(this.modelName)
.deviceCategoryName(this.deviceCategoryName) .deviceCategoryName(this.deviceCategoryName)
.residueCount(this.residueCount) .residueCount(this.residueCount)
.inventoryId(this.inventoryId) .inventoryId(this.inventoryId)
.appraise(this.appraise) .appraise(this.appraise)
.build(); .build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.vo.DirectoryInfoVO; import com.mmc.pms.model.categories.vo.DirectoryInfoVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -17,7 +17,7 @@ import java.util.Date; ...@@ -17,7 +17,7 @@ import java.util.Date;
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class Directory implements Serializable { public class DirectoryDO implements Serializable {
private static final long serialVersionUID = 713939370607409336L; private static final long serialVersionUID = 713939370607409336L;
/** /**
* 主键id * 主键id
...@@ -30,7 +30,7 @@ public class Directory implements Serializable { ...@@ -30,7 +30,7 @@ public class Directory implements Serializable {
/** /**
* 其他目录关联id * 其他目录关联id
*/ */
private Integer relevance; private Integer pid;
/** /**
* 类型:(0:通用目录 1:作业服务目录 2:设备目录 3:飞手目录 4:商城目录) * 类型:(0:通用目录 1:作业服务目录 2:设备目录 3:飞手目录 4:商城目录)
*/ */
...@@ -48,15 +48,17 @@ public class Directory implements Serializable { ...@@ -48,15 +48,17 @@ public class Directory implements Serializable {
*/ */
private Integer deleted; private Integer deleted;
public Directory(DirectoryInfoVO param) { private String relevanceName;
public DirectoryDO(DirectoryInfoVO param) {
this.id = param.getId(); this.id = param.getId();
this.directoryName = param.getDirectoryName(); this.directoryName = param.getDirectoryName();
this.relevance = param.getRelevance(); this.pid = param.getPid();
this.type = param.getType(); this.type = param.getType();
} }
public DirectoryInfoVO buildDirectoryInfoVO() { public DirectoryInfoVO buildDirectoryInfoVO() {
return DirectoryInfoVO.builder().id(id).directoryName(directoryName).relevance(relevance).type(type).build(); return DirectoryInfoVO.builder().id(id).directoryName(directoryName).pid(pid).relevanceName(relevanceName).type(type).build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.DistrictInfoDTO; import com.mmc.pms.model.other.dto.DistrictInfoDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.GoodsDetailInfoDTO; import com.mmc.pms.model.sale.dto.GoodsDetailInfoDTO;
import com.mmc.pms.model.vo.GoodsDetailVO; import com.mmc.pms.model.sale.vo.GoodsDetailVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -20,26 +20,26 @@ import java.util.Date; ...@@ -20,26 +20,26 @@ import java.util.Date;
@Builder @Builder
@Accessors(chain = true) @Accessors(chain = true)
public class GoodsDetailDO implements Serializable { public class GoodsDetailDO implements Serializable {
private Integer id; private Integer id;
private Integer goodsInfoId; private Integer goodsInfoId;
private String goodsDesc; private String goodsDesc;
private String content; private String content;
private String remark; private String remark;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
public GoodsDetailDO(GoodsDetailVO goodsDetailVO) { public GoodsDetailDO(GoodsDetailVO goodsDetailVO) {
this.goodsDesc = goodsDetailVO.getGoodsDesc(); this.goodsDesc = goodsDetailVO.getGoodsDesc();
this.content = goodsDetailVO.getProductDesc(); this.content = goodsDetailVO.getProductDesc();
this.remark = goodsDetailVO.getRemark(); this.remark = goodsDetailVO.getRemark();
} }
public GoodsDetailInfoDTO buildGoodsDetailInfoDTO() { public GoodsDetailInfoDTO buildGoodsDetailInfoDTO() {
return GoodsDetailInfoDTO.builder() return GoodsDetailInfoDTO.builder()
.id(this.id) .id(this.id)
.goodsDesc(this.goodsDesc) .goodsDesc(this.goodsDesc)
.content(this.content) .content(this.content)
.remark(this.remark) .remark(this.remark)
.build(); .build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.GoodsImgDTO; import com.mmc.pms.model.sale.dto.GoodsImgDTO;
import com.mmc.pms.model.vo.GoodsImgVO; import com.mmc.pms.model.sale.vo.GoodsImgVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -19,19 +19,19 @@ import java.util.Date; ...@@ -19,19 +19,19 @@ import java.util.Date;
@Builder @Builder
public class GoodsImgDO implements Serializable { public class GoodsImgDO implements Serializable {
private Integer id; private Integer id;
private Integer goodsInfoId; private Integer goodsInfoId;
private String imgUrl; private String imgUrl;
private Integer imgType; private Integer imgType;
private Integer deleted; private Integer deleted;
private Date createTime; private Date createTime;
public GoodsImgDO(GoodsImgVO d) { public GoodsImgDO(GoodsImgVO d) {
this.imgUrl = d.getImgUrl(); this.imgUrl = d.getImgUrl();
this.imgType = d.getImgType(); this.imgType = d.getImgType();
} }
public GoodsImgDTO buildGoodsImgDTO() { public GoodsImgDTO buildGoodsImgDTO() {
return GoodsImgDTO.builder().id(this.id).imgUrl(this.imgUrl).imgType(this.imgType).build(); return GoodsImgDTO.builder().id(this.id).imgUrl(this.imgUrl).imgType(this.imgType).build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.vo.GoodsAddVO; import com.mmc.pms.model.categories.vo.RelevanceGoodsInfoVO;
import com.mmc.pms.model.sale.vo.GoodsAddVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -48,6 +49,12 @@ public class GoodsInfo implements Serializable { ...@@ -48,6 +49,12 @@ public class GoodsInfo implements Serializable {
private Integer deleted; private Integer deleted;
private Integer goodsVideoId;
private String videoUrl;
private String mainImg;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
public GoodsInfo(GoodsAddVO goodsAddVO) { public GoodsInfo(GoodsAddVO goodsAddVO) {
...@@ -60,4 +67,12 @@ public class GoodsInfo implements Serializable { ...@@ -60,4 +67,12 @@ public class GoodsInfo implements Serializable {
this.ecoLabel = goodsAddVO.getTag(); this.ecoLabel = goodsAddVO.getTag();
this.goodsType = goodsAddVO.getGoodsType(); this.goodsType = goodsAddVO.getGoodsType();
} }
public GoodsInfo(Integer id) {
this.id = id;
}
public RelevanceGoodsInfoVO buildRelevanceGoodsInfoVO() {
return RelevanceGoodsInfoVO.builder().id(id).goodsName(goodsName).shelf(shelfStatus).mainImage(mainImg).build();
}
} }
\ No newline at end of file
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.AppGoodsInfoDTO; import com.mmc.pms.model.sale.dto.AppGoodsInfoDTO;
import com.mmc.pms.model.dto.GoodsInfoListDTO; import com.mmc.pms.model.sale.dto.GoodsInfoListDTO;
import com.mmc.pms.model.vo.CategoryParamAndValueVO; import com.mmc.pms.model.categories.vo.CategoryParamAndValueVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -22,73 +22,75 @@ import java.util.List; ...@@ -22,73 +22,75 @@ import java.util.List;
@Builder @Builder
@Accessors(chain = true) @Accessors(chain = true)
public class GoodsInfoDO implements Serializable { public class GoodsInfoDO implements Serializable {
private static final long serialVersionUID = -1329342381196659417L; private static final long serialVersionUID = -1329342381196659417L;
private Integer id; private Integer id;
private Integer pid; private Integer pid;
private String goodsNo; private String goodsNo;
private String goodsName; private String goodsName;
private Integer masterTypeId; private Integer masterTypeId;
private Integer slaveTypeId; private Integer slaveTypeId;
private Integer shelfStatus; private Integer shelfStatus;
private Integer skuNum; private Integer skuNum;
private Integer deleted; private Integer deleted;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
private Integer goodsAttr; private Integer goodsAttr;
private String ecoLabel; private String ecoLabel;
private Integer goodsCategoryId; private Integer goodsCategoryId;
private Integer repoId; private Integer repoId;
private Integer shareFlyServiceId; private Integer shareFlyServiceId;
private Integer goodsType; private Integer goodsType;
private Integer sort; private Integer sort;
private Integer showCode; private Integer showCode;
private Integer standardProduct; private Integer standardProduct;
private String tag; private String tag;
/** 辅助字段-start */ /**
private String videoUrl; * 辅助字段-start
*/
private String videoUrl;
private Integer goodsVideoId; private Integer goodsVideoId;
private String goodsDesc; private String goodsDesc;
private GoodsVideoDO goodsVideoDO; private GoodsVideoDO goodsVideoDO;
private String mainImg; // 主图 private String mainImg; // 主图
private GoodsTypeDO goodsMasterType; private GoodsTypeDO goodsMasterType;
private GoodsTypeDO goodsSlaveType; private GoodsTypeDO goodsSlaveType;
private String remark; // 底部备注 private String remark; // 底部备注
private Integer sortTypeId; private Integer sortTypeId;
private List<CategoryParamAndValueVO> paramAndValue; private List<CategoryParamAndValueVO> paramAndValue;
private GoodsConfigExportDO goodsConfigExport; // 功能清单 private GoodsConfigExportDO goodsConfigExport; // 功能清单
private Integer buyNum; // 购买数量 private Integer buyNum; // 购买数量
private String directoryName; private String directoryName;
private Integer isCoupons; private Integer isCoupons;
public GoodsInfoListDTO buildGoodsInfoListDTO() { public GoodsInfoListDTO buildGoodsInfoListDTO() {
return GoodsInfoListDTO.builder() return GoodsInfoListDTO.builder()
.id(this.id) .id(this.id)
.goodsName(this.goodsName) .goodsName(this.goodsName)
.status(this.shelfStatus) .status(this.shelfStatus)
.createTime(this.createTime) .createTime(this.createTime)
.imgUrl(this.mainImg) .imgUrl(this.mainImg)
.directoryId(this.sortTypeId) .directoryId(this.sortTypeId)
.directoryName(this.directoryName) .directoryName(this.directoryName)
.goodsDesc(this.goodsDesc) .goodsDesc(this.goodsDesc)
.goodsOneLevelTypeName(this.goodsMasterType.getTypeName()) .goodsOneLevelTypeName(this.goodsMasterType.getTypeName())
.goodsTwoLevelTypeName(this.goodsSlaveType.getTypeName()) .goodsTwoLevelTypeName(this.goodsSlaveType.getTypeName())
.isCoupons(this.isCoupons) .isCoupons(this.isCoupons)
.build(); .build();
} }
public AppGoodsInfoDTO buildAppGoodsInfoDTO() { public AppGoodsInfoDTO buildAppGoodsInfoDTO() {
return AppGoodsInfoDTO.builder() return AppGoodsInfoDTO.builder()
.id(this.id) .id(this.id)
.goodsName(this.goodsName) .goodsName(this.goodsName)
.mainImg(this.mainImg) .mainImg(this.mainImg)
.goodsDesc(this.goodsDesc) .goodsDesc(this.goodsDesc)
.shelfStatus(this.shelfStatus) .shelfStatus(this.shelfStatus)
.goodsAttr(this.goodsAttr) .goodsAttr(this.goodsAttr)
.ecoLabel(this.tag) .ecoLabel(this.tag)
.showCode(this.showCode) .showCode(this.showCode)
.sort(this.sort) .sort(this.sort)
.build(); .build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.GoodsQaDTO;
import com.mmc.pms.model.vo.GoodsQaVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -18,20 +16,11 @@ import java.util.Date; ...@@ -18,20 +16,11 @@ import java.util.Date;
@Data @Data
@Builder @Builder
public class GoodsQaDO implements Serializable { public class GoodsQaDO implements Serializable {
private Integer id; private Integer id;
private Integer goodsInfoId; private Integer goodsInfoId;
private String question; private String question;
private String answer; private String answer;
private Integer deleted; private Integer deleted;
private Date updateTime; private Date updateTime;
private Date createTime; private Date createTime;
public GoodsQaDO(GoodsQaVO goodsQaVO) {
this.question = goodsQaVO.getQuestion();
this.answer = goodsQaVO.getAnswer();
}
public GoodsQaDTO buildGoodsQaDTO() {
return GoodsQaDTO.builder().id(this.id).answer(this.answer).question(this.question).build();
}
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.GoodsOtherServiceDTO; import com.mmc.pms.model.sale.dto.GoodsOtherServiceDTO;
import com.mmc.pms.model.dto.GoodsServiceDTO; import com.mmc.pms.model.sale.dto.GoodsServiceDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -18,32 +18,37 @@ import java.util.Date; ...@@ -18,32 +18,37 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@Builder @Builder
public class GoodsServiceDO implements Serializable { public class GoodsServiceDO implements Serializable {
private static final long serialVersionUID = -2612831712612727210L; private static final long serialVersionUID = -2612831712612727210L;
private Integer id; private Integer id;
private Integer goodsInfoId; private Integer goodsInfoId;
private Integer saleServiceId; private Integer saleServiceId;
private Date createTime; private Date createTime;
/** 辅助字段-start */ /**
private String serviceName; * 辅助字段-start
*/
private String serviceName;
private String remark; private String remark;
/** 辅助字段-end */
public GoodsServiceDTO buildGoodsServiceDTO() {
return GoodsServiceDTO.builder()
.id(this.id)
.saleServiceId(this.saleServiceId)
.goodsInfoId(goodsInfoId)
.serviceName(serviceName)
.remark(remark)
.build();
}
public GoodsOtherServiceDTO buildGoodsOtherServiceDTO() { /**
return GoodsOtherServiceDTO.builder() * 辅助字段-end
.id(this.id) */
.saleServiceId(this.saleServiceId) public GoodsServiceDTO buildGoodsServiceDTO() {
.serviceName(this.serviceName) return GoodsServiceDTO.builder()
.build(); .id(this.id)
} .saleServiceId(this.saleServiceId)
.goodsInfoId(goodsInfoId)
.serviceName(serviceName)
.remark(remark)
.build();
}
public GoodsOtherServiceDTO buildGoodsOtherServiceDTO() {
return GoodsOtherServiceDTO.builder()
.id(this.id)
.saleServiceId(this.saleServiceId)
.serviceName(this.serviceName)
.build();
}
} }
package com.mmc.pms.service.Impl; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.ProductInventoryVO; import com.mmc.pms.model.sale.dto.ProductInventoryVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -15,17 +15,17 @@ import java.util.Date; ...@@ -15,17 +15,17 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class IndustryProductInventoryDO implements Serializable { public class IndustryProductInventoryDO implements Serializable {
private static final long serialVersionUID = -3586673158091288317L; private static final long serialVersionUID = -3586673158091288317L;
private Integer id; private Integer id;
private Integer industrySpecId; private Integer industrySpecId;
private Integer productSkuId; private Integer productSkuId;
private Integer selected; private Integer selected;
private Integer deleted; private Integer deleted;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
public IndustryProductInventoryDO(ProductInventoryVO d) { public IndustryProductInventoryDO(ProductInventoryVO d) {
this.productSkuId = d.getProductSku().getId(); this.productSkuId = d.getProductSku().getId();
this.selected = d.getSelect(); this.selected = d.getSelect();
} }
} }
package com.mmc.pms.entity;
import com.mmc.pms.model.sale.dto.IndustrySkuDTO;
import com.mmc.pms.model.sale.vo.IndustrySkuVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* 行业sku表(IndustrySku)实体类
*
* @author makejava
* @since 2023-05-30 15:01:54
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IndustrySku implements Serializable {
private static final long serialVersionUID = 165189738203335092L;
private Integer id;
private String solutionName;
private Integer categoriesId;
private String description;
private Date createTime;
private Date updateTime;
private Integer deleted;
private String typeName;
public IndustrySku(IndustrySkuVO param) {
this.id = param.getId();
this.solutionName = param.getSolutionName();
this.categoriesId = param.getCategoryId();
this.description = param.getDescription();
}
public IndustrySkuVO buildIndustrySku() {
return IndustrySkuVO.builder().id(this.id).description(this.description)
.categoryId(this.categoriesId).categoryName(typeName).solutionName(this.solutionName).build();
}
public IndustrySkuDTO buildIndustrySkuDTO() {
return IndustrySkuDTO.builder().id(this.id).description(this.description)
.createTime(this.createTime).categoryId(this.categoriesId)
.categoryName(this.typeName).solutionName(this.solutionName).build();
}
}
package com.mmc.pms.entity;
import java.io.Serializable;
import java.util.Date;
/**
* 行业规格表
* (IndustrySpec)实体类
*
* @author makejava
* @since 2023-05-30 15:02:08
*/
public class IndustrySpec implements Serializable {
private static final long serialVersionUID = -87945230737895634L;
private Integer id;
/**
* 行业sku id
*/
private Integer industrySkuId;
/**
* 规格名称
*/
private String specName;
/**
* 规格图片
*/
private String specImage;
private Date createTime;
private Date updateTime;
private Integer isDeleted;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public Integer getIndustrySkuId() {
return industrySkuId;
}
public void setIndustrySkuId(Integer industrySkuId) {
this.industrySkuId = industrySkuId;
}
public String getSpecName() {
return specName;
}
public void setSpecName(String specName) {
this.specName = specName;
}
public String getSpecImage() {
return specImage;
}
public void setSpecImage(String specImage) {
this.specImage = specImage;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getIsDeleted() {
return isDeleted;
}
public void setIsDeleted(Integer isDeleted) {
this.isDeleted = isDeleted;
}
}
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.MallIndustrySpecDTO; import com.mmc.pms.model.sale.dto.IndustrySpecDTO;
import com.mmc.pms.model.vo.IndustrySpecVO; import com.mmc.pms.model.sale.dto.MallIndustrySpecDTO;
import com.mmc.pms.model.sale.vo.IndustrySpecVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -16,40 +17,40 @@ import java.util.Date; ...@@ -16,40 +17,40 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class IndustrySpecDO implements Serializable { public class IndustrySpecDO implements Serializable {
private static final long serialVersionUID = 8701065950780976397L; private static final long serialVersionUID = 8701065950780976397L;
private Integer id; private Integer id;
private Integer industrySkuId; private Integer industrySkuId;
private String specName; private String specName;
private String specImage; private String specImage;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
private Integer deleted; private Integer deleted;
private String solutionName; private String solutionName;
public IndustrySpecDO(IndustrySpecVO param) { public IndustrySpecDO(IndustrySpecVO param) {
this.id = param.getId(); this.id = param.getId();
this.industrySkuId = param.getIndustrySkuId(); this.industrySkuId = param.getIndustrySkuId();
this.specName = param.getSpecName(); this.specName = param.getSpecName();
this.specImage = param.getSpecImage(); this.specImage = param.getSpecImage();
} }
/* public IndustrySpecDTO buildIndustrySpecDTO() { public IndustrySpecDTO buildIndustrySpecDTO() {
return IndustrySpecDTO.builder() return IndustrySpecDTO.builder()
.id(this.id) .id(this.id)
.industrySkuId(this.industrySkuId) .industrySkuId(this.industrySkuId)
.specImage(this.specImage) .specImage(this.specImage)
.specName(this.specName) .specName(this.specName)
.createTime(this.createTime) .createTime(this.createTime)
.build(); .build();
}*/ }
public MallIndustrySpecDTO buildMallIndustrySpecDTO() { public MallIndustrySpecDTO buildMallIndustrySpecDTO() {
return MallIndustrySpecDTO.builder() return MallIndustrySpecDTO.builder()
.industrySpecId(this.id) .industrySpecId(this.id)
.industrySkuId(this.industrySkuId) .industrySkuId(this.industrySkuId)
.specImage(this.specImage) .specImage(this.specImage)
.specName(this.specName) .specName(this.specName)
.build(); .build();
} }
} }
package com.mmc.pms.entity;
import com.mmc.pms.model.sale.dto.IndustrySpecPriceDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @Author LW
* @date 2022/10/13 16:10
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class IndustrySpecPriceDO implements Serializable {
private static final long serialVersionUID = -6424007941913778680L;
private Integer id;
private Integer industrySpecId;
private Integer cooperationTag;
private BigDecimal price;
private Date createTime;
private Date updateTime;
private Integer deleted;
private Integer type;
private Integer leaseTerm;
public IndustrySpecPriceDTO buildIndustrySpecPriceDTO() {
return IndustrySpecPriceDTO.builder().id(this.id).industrySpecId(this.industrySpecId)
.cooperationTag(this.cooperationTag).leaseTerm(leaseTerm).price(this.price).createTime(this.createTime).build();
}
}
package com.mmc.pms.entity;
import com.mmc.pms.model.order.dto.OrderGoodsIndstDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
import java.util.stream.Collectors;
/**
* author:zhenjie
* Date:2022/10/20
* time:16:50
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MallGoodsInfoSimpleDO implements Serializable {
private static final long serialVersionUID = -9183566814152128414L;
@ApiModelProperty(value = "商品id")
private Integer id;
@ApiModelProperty(value = "商品所属类型")
private Integer directoryId;
@ApiModelProperty(value = "商品编号")
private String goodsNo;
@ApiModelProperty(value = "商品名称")
private String goodsName;
@ApiModelProperty(value = "商品主图")
private String mainImg;
@ApiModelProperty(value = "状态 0:下架 1:上架")
private Integer shelfStatus;
@ApiModelProperty(value = "是否删除")
private Integer deleted;
@ApiModelProperty(value = "商品规格信息")
private List<MallGoodsSpecSimpleDO> mallGoodsSpecSimpleDOS;
public OrderGoodsIndstDTO buildOrderGoodsIndstDTO() {
return OrderGoodsIndstDTO.builder().goodsInfoId(this.id).goodsName(this.goodsName).directoryId(this.directoryId).goodsNo(this.goodsNo).mainImg(this.mainImg).valid(this.deleted.equals(0) && this.shelfStatus.equals(1) ? true : false)
.orderGoodsIndstDetailDTOS(mallGoodsSpecSimpleDOS == null ? null : this.mallGoodsSpecSimpleDOS.stream().map(d -> d.buildOrderGoodsIndstDetailDTO()).collect(Collectors.toList())).build();
}
}
package com.mmc.pms.entity;
import com.mmc.pms.model.order.dto.OrderGoodsIndstProdListDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2022/10/20
* time:16:57
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MallGoodsProductDO implements Serializable {
private static final long serialVersionUID = -8801235084545192790L;
@ApiModelProperty(value = "行业规格id")
private Integer industrySpecId;
@ApiModelProperty(value = "产品规格id")
private Integer productSpecId;
@ApiModelProperty(value = "产品规格名称")
private String specName;
@ApiModelProperty(value = "产品规格图片")
private String prodSkuSpecImage;
@ApiModelProperty(value = "料号")
private String partNo;
@ApiModelProperty(value = "版本描述")
private String versionDesc;
@ApiModelProperty(value = "商品产品类型名称")
private String goodsTypeName;
@ApiModelProperty(value = "产品名称")
private String productName;
@ApiModelProperty(value = "型号")
private String model;
@ApiModelProperty(value = "品牌")
private String productBrand;
public OrderGoodsIndstProdListDTO buildOrderGoodsIndstProdListDTO() {
return OrderGoodsIndstProdListDTO.builder().productSpecId(this.productSpecId).prodSkuSpecName(this.specName).prodSkuSpecImage(this.prodSkuSpecImage)
.partNo(this.partNo).versionDesc(this.versionDesc).goodsTypeName(this.goodsTypeName).productName(this.productName).model(this.model).productBrand(this.productBrand).build();
}
}
package com.mmc.pms.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* author:zhenjie
* Date:2022/10/15
* time:20:52
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MallGoodsSpecInfoDO implements Serializable {
private static final long serialVersionUID = -7264365143820916901L;
private Integer id;
private Integer directoryId;
private List<SkuSpecDO> skuSpecDOList;
}
package com.mmc.pms.entity;
import com.mmc.pms.model.order.dto.OrderGoodsIndstDetailDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;
/**
* author:zhenjie
* Date:2022/10/20
* time:16:47
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MallGoodsSpecSimpleDO implements Serializable {
private static final long serialVersionUID = 1452073707519053399L;
private Integer mallIndustrySkuInfoSpecId;
private Integer industrySpecId;
private String specName;
private String specImage;
private BigDecimal unitPrice;
private Integer skuInfoDeleted;
private Integer skuSpecDeleted;
private Integer specDeleted;
private String unitName;
private List<MallGoodsProductDO> mallGoodsProductDOS;
public OrderGoodsIndstDetailDTO buildOrderGoodsIndstDetailDTO() {
return OrderGoodsIndstDetailDTO.builder().mallIndstSkuInfoSpecId(this.mallIndustrySkuInfoSpecId).industrySpecId(this.industrySpecId).industrySkuSpecName(this.specName)
.industrySkuSpecImage(this.specImage).unitPrice(this.unitPrice).valid(this.skuInfoDeleted.equals(0) && this.skuSpecDeleted.equals(0) && this.specDeleted.equals(0) ? true : false)
.orderGoodsIndstProdListDTOS(mallGoodsProductDOS == null ? null : mallGoodsProductDOS.stream().map(d -> d.buildOrderGoodsIndstProdListDTO()).collect(Collectors.toList()))
.unitName(this.unitName).build();
}
}
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.GoodsSpecDTO; import com.mmc.pms.model.sale.dto.GoodsSpecDTO;
import com.mmc.pms.model.vo.GoodsSpecVO; import com.mmc.pms.model.sale.vo.GoodsProdSpecVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -18,47 +18,51 @@ import java.util.Date; ...@@ -18,47 +18,51 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
public class MallIndustrySkuInfoDO implements Serializable { public class MallIndustrySkuInfoDO implements Serializable {
private static final long serialVersionUID = 1492322282696261487L; private static final long serialVersionUID = 1492322282696261487L;
private Integer id; private Integer id;
private Integer goodsInfoId; private Integer goodsInfoId;
private Integer industrySkuId; private Integer industrySkuId;
private String industrySkuSpecName; private String industrySkuSpecName;
private Integer goodsTypeId; private Integer categoriesId;
private Integer chooseType; private Integer chooseType;
private Integer must; private Integer must;
private Integer skuUnitId; private Integer skuUnitId;
private Integer deleted; private Integer deleted;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
/** 辅助字段start */ /**
private String typeName; * 辅助字段start
*/
private String typeName;
private String unitName; private String unitName;
private String industrySkuName; private String industrySkuName;
/** 辅助字段end */ /**
public MallIndustrySkuInfoDO(GoodsSpecVO goodsSpecVO) { * 辅助字段end
this.industrySkuId = goodsSpecVO.getSkuId(); */
this.chooseType = goodsSpecVO.getChooseType(); public MallIndustrySkuInfoDO(GoodsProdSpecVO goodsSpecVO) {
this.industrySkuSpecName = goodsSpecVO.getGoodsSpecName(); this.industrySkuId = goodsSpecVO.getSkuId();
this.skuUnitId = goodsSpecVO.getSkuUnitId(); this.chooseType = goodsSpecVO.getChooseType();
this.goodsTypeId = goodsSpecVO.getGoodsTypeId(); this.industrySkuSpecName = goodsSpecVO.getGoodsSpecName();
this.must = goodsSpecVO.getMust(); this.skuUnitId = goodsSpecVO.getSkuUnitId();
} this.categoriesId = goodsSpecVO.getCategoryId();
this.must = goodsSpecVO.getMust();
}
public GoodsSpecDTO buildGoodsSpecDTO() { public GoodsSpecDTO buildGoodsSpecDTO() {
return GoodsSpecDTO.builder() return GoodsSpecDTO.builder()
.id(this.id) .id(this.id)
.goodsSpecName(this.industrySkuSpecName) .goodsSpecName(this.industrySkuSpecName)
.goodsTypeId(this.goodsTypeId) .categoryId(this.categoriesId)
.chooseType(this.chooseType) .chooseType(this.chooseType)
.skuUnitId(skuUnitId) .skuUnitId(skuUnitId)
.unitName(this.unitName) .unitName(this.unitName)
.skuId(this.industrySkuId) .skuId(this.industrySkuId)
.typeName(this.typeName) .typeName(this.typeName)
.skuName(this.industrySkuName) .skuName(this.industrySkuName)
.must(must) .must(must)
.build(); .build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.GoodsSpecDTO; import com.mmc.pms.model.sale.dto.GoodsSpecDTO;
import com.mmc.pms.model.vo.GoodsSpecVO; import com.mmc.pms.model.sale.vo.GoodsProdSpecVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -17,13 +17,13 @@ import java.util.Date; ...@@ -17,13 +17,13 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
public class MallProdSkuInfoDO implements Serializable { public class MallProdInfoDO implements Serializable {
private static final long serialVersionUID = 3667714765929443857L; private static final long serialVersionUID = 3667714765929443857L;
private Integer id; private Integer id;
private Integer goodsInfoId; private Integer goodsInfoId;
private Integer prodSkuId; private Integer prodSkuId;
private String prodSkuSpecName; private String prodSkuSpecName;
private Integer categoryId; private Integer categoriesId;
private Integer chooseType; private Integer chooseType;
private Integer must; private Integer must;
private Integer skuUnitId; private Integer skuUnitId;
...@@ -37,7 +37,7 @@ public class MallProdSkuInfoDO implements Serializable { ...@@ -37,7 +37,7 @@ public class MallProdSkuInfoDO implements Serializable {
* 辅助字段 start * 辅助字段 start
*/ */
private String typeName; private String typeName;
private String goodsName;
private String unitName; private String unitName;
private String productSkuName; private String productSkuName;
private Integer brandInfoId; private Integer brandInfoId;
...@@ -45,8 +45,8 @@ public class MallProdSkuInfoDO implements Serializable { ...@@ -45,8 +45,8 @@ public class MallProdSkuInfoDO implements Serializable {
/** /**
* 辅助字段 end * 辅助字段 end
*/ */
public MallProdSkuInfoDO(GoodsSpecVO goodsSpecVO) { public MallProdInfoDO(GoodsProdSpecVO goodsSpecVO) {
this.categoryId = goodsSpecVO.getGoodsTypeId(); this.categoriesId = goodsSpecVO.getCategoryId();
this.prodSkuSpecName = goodsSpecVO.getGoodsSpecName(); this.prodSkuSpecName = goodsSpecVO.getGoodsSpecName();
this.chooseType = goodsSpecVO.getChooseType(); this.chooseType = goodsSpecVO.getChooseType();
this.skuUnitId = goodsSpecVO.getSkuUnitId(); this.skuUnitId = goodsSpecVO.getSkuUnitId();
...@@ -58,7 +58,7 @@ public class MallProdSkuInfoDO implements Serializable { ...@@ -58,7 +58,7 @@ public class MallProdSkuInfoDO implements Serializable {
return GoodsSpecDTO.builder() return GoodsSpecDTO.builder()
.id(this.id) .id(this.id)
.goodsSpecName(this.prodSkuSpecName) .goodsSpecName(this.prodSkuSpecName)
.goodsTypeId(this.categoryId) .categoryId(this.categoriesId)
.chooseType(this.chooseType) .chooseType(this.chooseType)
.skuUnitId(skuUnitId) .skuUnitId(skuUnitId)
.unitName(this.unitName) .unitName(this.unitName)
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.mmc.pms.model.dto.ModelDTO; import com.mmc.pms.model.other.dto.ModelDTO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.OrderInfoDTO; import com.mmc.pms.model.order.dto.OrderInfoDTO;
import com.mmc.pms.model.vo.LeaseOrderVO; import com.mmc.pms.model.order.vo.LeaseOrderVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -17,111 +17,111 @@ import java.util.Date; ...@@ -17,111 +17,111 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class OrderInfoDO implements Serializable { public class OrderInfoDO implements Serializable {
private static final long serialVersionUID = 6544149196885009444L; private static final long serialVersionUID = 6544149196885009444L;
private Integer id; private Integer id;
private String orderNo; private String orderNo;
private Integer wareInfoId; private Integer wareInfoId;
private String wareNo; private String wareNo;
private String wareTitle; private String wareTitle;
private String wareImg; private String wareImg;
private Integer skuInfoId; private Integer skuInfoId;
private String skuTitle; private String skuTitle;
private Integer repoAccountId; private Integer repoAccountId;
private String uid; private String uid;
private String buyerName; private String buyerName;
private String buyerPhone; private String buyerPhone;
private BigDecimal unitPrice; private BigDecimal unitPrice;
private Integer wareNum; private Integer wareNum;
private BigDecimal shouldPay; private BigDecimal shouldPay;
private BigDecimal actualPay; private BigDecimal actualPay;
private Integer orderType; private Integer orderType;
private BigDecimal deposit; private BigDecimal deposit;
private BigDecimal rentPrice; private BigDecimal rentPrice;
private Date startDate; private Date startDate;
private Date endDate; private Date endDate;
private Integer payDay; private Integer payDay;
private String tranStatus; private String tranStatus;
private Integer exWare; private Integer exWare;
private String remark; private String remark;
private String pfRemark; private String pfRemark;
private String shutReason; private String shutReason;
private String payNo; private String payNo;
private Date payTime; private Date payTime;
private Date sendWareTime; private Date sendWareTime;
private Integer rcdCompanyId; private Integer rcdCompanyId;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
/** /**
* 辅助字段 * 辅助字段
* *
* @return * @return
*/ */
private OrderReceiptDO receipt; private OrderReceiptDO receipt;
public OrderInfoDTO buildOrderInfoDTO() { public OrderInfoDTO buildOrderInfoDTO() {
return OrderInfoDTO.builder() return OrderInfoDTO.builder()
.id(this.id) .id(this.id)
.orderNo(this.orderNo) .orderNo(this.orderNo)
.wareInfoId(this.wareInfoId) .wareInfoId(this.wareInfoId)
.wareNo(this.wareNo) .wareNo(this.wareNo)
.wareTitle(this.wareTitle) .wareTitle(this.wareTitle)
.skuInfoId(this.skuInfoId) .skuInfoId(this.skuInfoId)
.skuTitle(this.skuTitle) .skuTitle(this.skuTitle)
.repoAccountId(this.repoAccountId) .repoAccountId(this.repoAccountId)
.uid(this.uid) .uid(this.uid)
.buyerName(this.buyerName) .buyerName(this.buyerName)
.buyerPhone(this.buyerPhone) .buyerPhone(this.buyerPhone)
.unitPrice(this.unitPrice) .unitPrice(this.unitPrice)
.wareNum(this.wareNum) .wareNum(this.wareNum)
.shouldPay(this.shouldPay) .shouldPay(this.shouldPay)
.actualPay(this.actualPay) .actualPay(this.actualPay)
.orderType(this.orderType) .orderType(this.orderType)
.deposit(this.deposit) .deposit(this.deposit)
.rentPrice(this.rentPrice) .rentPrice(this.rentPrice)
.startDate(this.startDate) .startDate(this.startDate)
.endDate(this.endDate) .endDate(this.endDate)
.payDay(this.payDay) .payDay(this.payDay)
.tranStatus(this.tranStatus) .tranStatus(this.tranStatus)
.createTime(this.createTime) .createTime(this.createTime)
.payTime(this.payTime) .payTime(this.payTime)
.payNo(this.payNo) .payNo(this.payNo)
.wareImg(this.wareImg) .wareImg(this.wareImg)
.pfRemark(this.pfRemark) .pfRemark(this.pfRemark)
.shutReason(this.shutReason) .shutReason(this.shutReason)
.remark(this.remark) .remark(this.remark)
.receipt(this.receipt == null ? null : receipt.buildOrderReceiptDTO()) .receipt(this.receipt == null ? null : receipt.buildOrderReceiptDTO())
.exWare(this.exWare) .exWare(this.exWare)
.sendWareTime(this.sendWareTime) .sendWareTime(this.sendWareTime)
.build(); .build();
} }
public OrderInfoDO(LeaseOrderVO lease) { public OrderInfoDO(LeaseOrderVO lease) {
this.orderNo = lease.getOrderNo(); this.orderNo = lease.getOrderNo();
this.wareInfoId = lease.getWareInfoId(); this.wareInfoId = lease.getWareInfoId();
this.wareNo = lease.getWareNo(); this.wareNo = lease.getWareNo();
this.wareTitle = lease.getWareTitle(); this.wareTitle = lease.getWareTitle();
this.wareImg = lease.getMainImg(); this.wareImg = lease.getMainImg();
this.skuInfoId = lease.getSkuInfoId(); this.skuInfoId = lease.getSkuInfoId();
this.skuTitle = lease.getSkuTitle(); this.skuTitle = lease.getSkuTitle();
this.repoAccountId = lease.getRepoAccountId(); this.repoAccountId = lease.getRepoAccountId();
this.uid = lease.getUid(); this.uid = lease.getUid();
this.buyerName = lease.getBuyerName(); this.buyerName = lease.getBuyerName();
this.buyerPhone = lease.getBuyerPhone(); this.buyerPhone = lease.getBuyerPhone();
this.unitPrice = lease.getUnitPrice(); this.unitPrice = lease.getUnitPrice();
this.wareNum = lease.getWareNum(); this.wareNum = lease.getWareNum();
this.shouldPay = lease.getShouldPay(); this.shouldPay = lease.getShouldPay();
this.actualPay = lease.getActualPay(); this.actualPay = lease.getActualPay();
this.orderType = lease.getOrderType(); this.orderType = lease.getOrderType();
this.deposit = lease.getDeposit(); this.deposit = lease.getDeposit();
this.rentPrice = lease.getRentPrice(); this.rentPrice = lease.getRentPrice();
this.startDate = lease.getStartDate(); this.startDate = lease.getStartDate();
this.endDate = lease.getEndDate(); this.endDate = lease.getEndDate();
this.payDay = lease.getPayDay(); this.payDay = lease.getPayDay();
this.exWare = lease.getExWare(); this.exWare = lease.getExWare();
this.tranStatus = lease.getTranStatus(); this.tranStatus = lease.getTranStatus();
this.remark = lease.getRemark(); this.remark = lease.getRemark();
this.createTime = lease.getCreateTime(); this.createTime = lease.getCreateTime();
this.rcdCompanyId = lease.getRcdCompanyId(); this.rcdCompanyId = lease.getRcdCompanyId();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.OrderReceiptDTO; import com.mmc.pms.model.order.dto.OrderReceiptDTO;
import com.mmc.pms.model.vo.OrderReceiptVO; import com.mmc.pms.model.order.vo.OrderReceiptVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
...@@ -18,69 +18,69 @@ import java.util.Date; ...@@ -18,69 +18,69 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class OrderReceiptDO implements Serializable { public class OrderReceiptDO implements Serializable {
private static final long serialVersionUID = 7590192330910329668L; private static final long serialVersionUID = 7590192330910329668L;
private Integer id; private Integer id;
private Integer orderInfoId; private Integer orderInfoId;
private Integer receiptMethod; private Integer receiptMethod;
private String takeName; private String takeName;
private String takePhone; private String takePhone;
private String region; private String region;
private String detailAddress; private String detailAddress;
private String repoName; private String repoName;
private String repoAddress; private String repoAddress;
private String bookPhone; private String bookPhone;
private String sendExCode; private String sendExCode;
private String sendExNo; private String sendExNo;
private String sendAddress; private String sendAddress;
private Integer renMethod; private Integer renMethod;
private String renPhone; private String renPhone;
private String renName; private String renName;
private String renExCode; private String renExCode;
private String renExNo; private String renExNo;
private String renAddress; private String renAddress;
private String exName; private String exName;
private String renRepoName; private String renRepoName;
private String renRepoAddr; private String renRepoAddr;
private String renRepoPhone; private String renRepoPhone;
private Date createTime; private Date createTime;
public OrderReceiptDO(OrderReceiptVO d) { public OrderReceiptDO(OrderReceiptVO d) {
this.orderInfoId = d.getOrderInfoId(); this.orderInfoId = d.getOrderInfoId();
this.receiptMethod = d.getReceiptMethod(); this.receiptMethod = d.getReceiptMethod();
this.takeName = d.getTakeName(); this.takeName = d.getTakeName();
this.takePhone = d.getTakePhone(); this.takePhone = d.getTakePhone();
this.region = d.getRegion(); this.region = d.getRegion();
this.detailAddress = d.getDetailAddress(); this.detailAddress = d.getDetailAddress();
this.repoName = d.getRepoName(); this.repoName = d.getRepoName();
this.repoAddress = d.getRepoAddress(); this.repoAddress = d.getRepoAddress();
this.bookPhone = d.getBookPhone(); this.bookPhone = d.getBookPhone();
} }
public OrderReceiptDTO buildOrderReceiptDTO() { public OrderReceiptDTO buildOrderReceiptDTO() {
return OrderReceiptDTO.builder() return OrderReceiptDTO.builder()
.id(this.id) .id(this.id)
.receiptMethod(this.receiptMethod) .receiptMethod(this.receiptMethod)
.takeName(this.takeName) .takeName(this.takeName)
.takePhone(this.takePhone) .takePhone(this.takePhone)
.region(this.region) .region(this.region)
.detailAddress(this.detailAddress) .detailAddress(this.detailAddress)
.repoName(this.repoName) .repoName(this.repoName)
.repoAddress(this.repoAddress) .repoAddress(this.repoAddress)
.bookPhone(this.bookPhone) .bookPhone(this.bookPhone)
.sendExCode(this.sendExCode) .sendExCode(this.sendExCode)
.sendExNo(this.sendExNo) .sendExNo(this.sendExNo)
.sendAddress(this.sendAddress) .sendAddress(this.sendAddress)
.renMethod(this.renMethod) .renMethod(this.renMethod)
.renPhone(this.renPhone) .renPhone(this.renPhone)
.renName(this.renName) .renName(this.renName)
.renExCode(this.renExCode) .renExCode(this.renExCode)
.renExNo(this.renExNo) .renExNo(this.renExNo)
.renAddress(this.renAddress) .renAddress(this.renAddress)
.renRepoName(this.renRepoName) .renRepoName(this.renRepoName)
.renRepoAddr(this.renRepoAddr) .renRepoAddr(this.renRepoAddr)
.renRepoPhone(this.renRepoPhone) .renRepoPhone(this.renRepoPhone)
.build(); .build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.ProductCategoryDTO; import com.mmc.pms.model.sale.dto.ProductCategoryDTO;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.ProductSkuDTO; import com.mmc.pms.model.sale.dto.ProductSkuDTO;
import com.mmc.pms.model.dto.ProductSkuVO; import com.mmc.pms.model.sale.dto.ProductSkuVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -58,6 +58,9 @@ public class ProductSkuDO implements Serializable { ...@@ -58,6 +58,9 @@ public class ProductSkuDO implements Serializable {
.model(this.model) .model(this.model)
.productBrand(this.brandName) .productBrand(this.brandName)
.createTime(this.createTime) .createTime(this.createTime)
.categoriesId(categoriesId)
.productBrandId(brandInfoId)
.directoryId(directoryId)
.categoryName(this.categoryName) .categoryName(this.categoryName)
.directoryName(directoryName) .directoryName(directoryName)
.build(); .build();
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.MallProductSpecDTO; import com.mmc.pms.model.sale.dto.ProductSpecDTO;
import com.mmc.pms.model.dto.ProductSpecDTO; import com.mmc.pms.model.sale.dto.ProductSpecVO;
import com.mmc.pms.model.dto.ProductSpecVO; import com.mmc.pms.model.sale.dto.MallProductSpecDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.ProductSpecPriceDTO; import com.mmc.pms.model.sale.dto.ProductSpecPriceDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.RepoCashDTO; import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.mmc.pms.model.other.dto.RepoCashDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder; import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import org.apache.commons.lang.StringUtils;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -20,53 +20,53 @@ import java.util.Date; ...@@ -20,53 +20,53 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class RepoCashDO implements Serializable { public class RepoCashDO implements Serializable {
private static final long serialVersionUID = -7930603317037474755L; private static final long serialVersionUID = -7930603317037474755L;
private Integer id; private Integer id;
private Integer repoAccountId; private Integer repoAccountId;
private String uid; private String uid;
private String accountName; private String accountName;
private Integer orderInfoId; private Integer orderInfoId;
private String orderNo; private String orderNo;
private Integer skuInfoId; private Integer skuInfoId;
private String skuTitle; private String skuTitle;
private Integer wareInfoId; private Integer wareInfoId;
private String wareNo; private String wareNo;
private String wareTitle; private String wareTitle;
private String payNo; private String payNo;
private Integer payMethod; private Integer payMethod;
private BigDecimal amtPaid; private BigDecimal amtPaid;
private BigDecimal cashAmt; private BigDecimal cashAmt;
private Date payTime; private Date payTime;
private String refundNo; private String refundNo;
private String voucher; private String voucher;
private String remark; private String remark;
private Integer createUser; private Integer createUser;
private Date createTime; private Date createTime;
private Integer updateUser; private Integer updateUser;
private Date updateTime; private Date updateTime;
public RepoCashDTO buildRepoCashDTO() { public RepoCashDTO buildRepoCashDTO() {
return RepoCashDTO.builder() return RepoCashDTO.builder()
.id(this.id) .id(this.id)
.repoAccountId(this.repoAccountId) .repoAccountId(this.repoAccountId)
.uid(this.uid) .uid(this.uid)
.accountName(this.accountName) .accountName(this.accountName)
.orderInfoId(this.orderInfoId) .orderInfoId(this.orderInfoId)
.orderNo(this.orderNo) .orderNo(this.orderNo)
.skuInfoId(this.skuInfoId) .skuInfoId(this.skuInfoId)
.skuTitle(this.skuTitle) .skuTitle(this.skuTitle)
.wareInfoId(this.wareInfoId) .wareInfoId(this.wareInfoId)
.wareNo(this.wareNo) .wareNo(this.wareNo)
.wareTitle(this.wareTitle) .wareTitle(this.wareTitle)
.payNo(this.payNo) .payNo(this.payNo)
.payMethod(this.payMethod) .payMethod(this.payMethod)
.amtPaid(this.amtPaid) .amtPaid(this.amtPaid)
.refundNo(this.refundNo) .refundNo(this.refundNo)
.createUser(this.createUser) .createUser(this.createUser)
.voucher(StringUtils.isBlank(this.voucher) ? null : Arrays.asList(this.voucher.split(","))) .voucher(StringUtils.isBlank(this.voucher) ? null : Arrays.asList(this.voucher.split(",")))
.cashAmt(this.cashAmt) .cashAmt(this.cashAmt)
.payTime(this.payTime) .payTime(this.payTime)
.remark(this.remark) .remark(this.remark)
.build(); .build();
} }
} }
package com.mmc.pms.entity;
import com.mmc.pms.model.work.vo.ServiceVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Author LW
* @date 2023/6/8 10:33
* 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ServiceDO implements Serializable {
private static final long serialVersionUID = 1L;
private Integer id;
@ApiModelProperty(value = "服务名称")
private String serviceName;
@ApiModelProperty(value = "应用")
private Integer applicationId;
@ApiModelProperty(value = "行业")
private Integer industryId;
@ApiModelProperty(value = "展示状态")
private Integer displayState;
@ApiModelProperty(value = "封面图")
private String coverPlan;
@ApiModelProperty(value = "分享卡片")
private String shareCard;
@ApiModelProperty(value = "视频")
private String video;
@ApiModelProperty(value = "服务介绍")
private String serviceIntroduction;
@ApiModelProperty(value = "创建人id")
private Integer accountId;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "修改时间")
private Date updateTime;
@ApiModelProperty(value = "逻辑删除字段")
private Integer isDeleted;
public ServiceDO(ServiceVO param, Integer accountId) {
this.id = param.getId();
this.serviceName = param.getServiceName();
this.applicationId = param.getApplicationId();
this.industryId = param.getIndustryId();
this.displayState = param.getDisplayState();
this.coverPlan = param.getCoverPlan();
this.shareCard = param.getShareCard();
this.video = param.getVideo();
this.serviceIntroduction = param.getServiceIntroduction();
this.accountId = accountId;
}
public ServiceDO(ServiceVO param) {
this.id = param.getId();
this.serviceName = param.getServiceName();
this.applicationId = param.getApplicationId();
this.industryId = param.getIndustryId();
this.displayState = param.getDisplayState();
this.coverPlan = param.getCoverPlan();
this.shareCard = param.getShareCard();
this.video = param.getVideo();
this.serviceIntroduction = param.getServiceIntroduction();
}
public ServiceDO(Integer id, Integer accountId) {
this.id = id;
this.accountId = accountId;
}
}
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.SkuInfoDTO; import com.mmc.pms.model.lease.vo.WareSkuInfoVO;
import com.mmc.pms.model.vo.WareSkuInfoVO; import com.mmc.pms.model.sale.dto.SkuInfoDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -54,10 +54,10 @@ public class SkuInfoDO implements Serializable { ...@@ -54,10 +54,10 @@ public class SkuInfoDO implements Serializable {
this.stockNum = d.getStockNum(); this.stockNum = d.getStockNum();
} }
public SkuInfoDTO buildSkuInfoDTO(){ public SkuInfoDTO buildSkuInfoDTO() {
return SkuInfoDTO.builder().id(this.id).wareInfoId(this.wareInfoId).skuTitle(this.skuTitle).rentPrice(this.rentPrice).rentDeposit(this.rentDeposit) return SkuInfoDTO.builder().id(this.id).wareInfoId(this.wareInfoId).skuTitle(this.skuTitle).rentPrice(this.rentPrice).rentDeposit(this.rentDeposit)
.stockNum(this.stockNum).saleNum(this.saleNum).createTime(this.createTime).updateTime(this.updateTime) .stockNum(this.stockNum).saleNum(this.saleNum).createTime(this.createTime).updateTime(this.updateTime)
.skuPriceDTOList(CollectionUtils.isEmpty(this.skuPriceDOList) ? null : this.skuPriceDOList.stream().map(d->{ .skuPriceDTOList(CollectionUtils.isEmpty(this.skuPriceDOList) ? null : this.skuPriceDOList.stream().map(d -> {
return d.buildSkuPriceDTO(); return d.buildSkuPriceDTO();
}).collect(Collectors.toList())).build(); }).collect(Collectors.toList())).build();
} }
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.SkuPriceDTO; import com.mmc.pms.model.lease.vo.WareSkuPriceVO;
import com.mmc.pms.model.vo.WareSkuPriceVO; import com.mmc.pms.model.sale.dto.SkuPriceDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -35,7 +35,7 @@ public class SkuPriceDO implements Serializable { ...@@ -35,7 +35,7 @@ public class SkuPriceDO implements Serializable {
this.maxDay = dd.getMaxDay(); this.maxDay = dd.getMaxDay();
} }
public SkuPriceDTO buildSkuPriceDTO(){ public SkuPriceDTO buildSkuPriceDTO() {
return SkuPriceDTO.builder().id(this.id).wareInfoId(this.wareInfoId).skuInfoId(this.skuInfoId).rentPrice(this.rentPrice).minDay(this.minDay) return SkuPriceDTO.builder().id(this.id).wareInfoId(this.wareInfoId).skuInfoId(this.skuInfoId).rentPrice(this.rentPrice).minDay(this.minDay)
.maxDay(this.maxDay).createTime(this.createTime).build(); .maxDay(this.maxDay).createTime(this.createTime).build();
} }
......
package com.mmc.pms.entity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* author:zhenjie
* Date:2022/10/15
* time:20:55
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class SkuSpecDO implements Serializable {
private static final long serialVersionUID = -7601558723724855293L;
private Integer id;
private Integer specDeleted;
private Integer skuSpecDeleted;
private String specName;
}
package com.mmc.pms.entity;
import com.mmc.pms.model.sale.dto.SkuUnitDTO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @Author LW
* @date 2022/10/27 16:00
* 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class SkuUnitDO implements Serializable {
private static final long serialVersionUID = 4353340603217315101L;
private Integer id;
private String unitName;
private Integer deleted;
private Date createTime;
private Date updateTime;
public SkuUnitDTO buildSkuUnitDTO() {
return SkuUnitDTO.builder().id(this.id).unitName(this.unitName).createTime(this.createTime).build();
}
}
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.WareDetailDTO; import com.mmc.pms.model.lease.dto.WareDetailDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
......
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.WareImgDTO; import com.mmc.pms.model.lease.dto.WareImgDTO;
import com.mmc.pms.model.vo.WareImgVO; import com.mmc.pms.model.lease.vo.WareImgVO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -16,26 +16,26 @@ import java.util.Date; ...@@ -16,26 +16,26 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class WareImgDO implements Serializable { public class WareImgDO implements Serializable {
private static final long serialVersionUID = -1711990559893951800L; private static final long serialVersionUID = -1711990559893951800L;
private Integer id; private Integer id;
private Integer wareInfoId; private Integer wareInfoId;
private String imgUrl; private String imgUrl;
private Integer imgType; private Integer imgType;
private Integer deleted; private Integer deleted;
private Date createTime; private Date createTime;
public WareImgDTO buildWareImgDTO() { public WareImgDTO buildWareImgDTO() {
return WareImgDTO.builder() return WareImgDTO.builder()
.id(this.id) .id(this.id)
.wareInfoId(this.wareInfoId) .wareInfoId(this.wareInfoId)
.imgType(this.imgType) .imgType(this.imgType)
.imgUrl(this.imgUrl) .imgUrl(this.imgUrl)
.build(); .build();
} }
public WareImgDO(WareImgVO d) { public WareImgDO(WareImgVO d) {
this.id = d.getId(); this.id = d.getId();
this.imgUrl = d.getImgUrl(); this.imgUrl = d.getImgUrl();
this.imgType = d.getImgType(); this.imgType = d.getImgType();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.AppletWareInfoDTO; import com.mmc.pms.model.lease.dto.WareInfoDTO;
import com.mmc.pms.model.dto.WareInfoDTO; import com.mmc.pms.model.lease.dto.WareInfoItemDTO;
import com.mmc.pms.model.dto.WareInfoItemDTO; import com.mmc.pms.model.lease.dto.AppletWareInfoDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -23,114 +23,118 @@ import java.util.stream.Collectors; ...@@ -23,114 +23,118 @@ import java.util.stream.Collectors;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class WareInfoDO implements Serializable { public class WareInfoDO implements Serializable {
private static final long serialVersionUID = 5530961803742843304L; private static final long serialVersionUID = 5530961803742843304L;
private Integer id; private Integer id;
private String wareNo; private String wareNo;
private String wareTitle; private String wareTitle;
private Integer wareTypeId; private Integer wareTypeId;
private Integer wareStatus; private Integer wareStatus;
private Integer payStatus; private Integer payStatus;
private BigDecimal minDeposit; private BigDecimal minDeposit;
private BigDecimal maxDeposit; private BigDecimal maxDeposit;
private BigDecimal minRent; private BigDecimal minRent;
private BigDecimal maxRent; private BigDecimal maxRent;
private Integer totalStock; private Integer totalStock;
private Integer totalSale; private Integer totalSale;
private Integer skuNum; private Integer skuNum;
private String tags; private String tags;
private Integer deleted; private Integer deleted;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
private Integer pid; private Integer pid;
/** 辅助字段-start */ /**
private List<WareImgDO> wareImgs; * 辅助字段-start
// private List<WareVideoDO> wareVideos; */
private WarePropDO warePropDO; private List<WareImgDO> wareImgs;
private String wareDetailContent; // private List<WareVideoDO> wareVideos;
// private WareDetailDO wareDetailDO; private WarePropDO warePropDO;
// private List<SkuInfoDO> skuInfoDOList; private String wareDetailContent;
// private WareDetailDO wareDetailDO;
// private List<SkuInfoDO> skuInfoDOList;
/** 辅助字段-end */ /**
public WareInfoDTO buildWareInfoDTO() { * 辅助字段-end
return WareInfoDTO.builder() */
.id(this.id) public WareInfoDTO buildWareInfoDTO() {
.wareNo(this.wareNo) return WareInfoDTO.builder()
.wareTitle(this.wareTitle) .id(this.id)
.wareTypeId(this.wareTypeId) .wareNo(this.wareNo)
.wareStatus(this.wareStatus) .wareTitle(this.wareTitle)
.payStatus(this.payStatus) .wareTypeId(this.wareTypeId)
.minDeposit(this.minDeposit) .wareStatus(this.wareStatus)
.maxDeposit(this.maxDeposit) .payStatus(this.payStatus)
.minRent(this.minRent) .minDeposit(this.minDeposit)
.maxRent(this.maxRent) .maxDeposit(this.maxDeposit)
.totalStock(this.totalStock) .minRent(this.minRent)
.totalSale(this.totalSale) .maxRent(this.maxRent)
.skuNum(this.skuNum) .totalStock(this.totalStock)
.tags(StringUtils.isEmpty(this.tags) ? null : Arrays.asList(this.tags.split(","))) .totalSale(this.totalSale)
.wareImgs( .skuNum(this.skuNum)
CollectionUtils.isEmpty(this.wareImgs) .tags(StringUtils.isEmpty(this.tags) ? null : Arrays.asList(this.tags.split(",")))
? null .wareImgs(
: this.wareImgs.stream() CollectionUtils.isEmpty(this.wareImgs)
.map( ? null
d -> { : this.wareImgs.stream()
return d.buildWareImgDTO(); .map(
}) d -> {
.collect(Collectors.toList())) return d.buildWareImgDTO();
.warePropDTO(this.warePropDO == null ? null : warePropDO.buildWarePropDTO()) })
.wareDetailContent(this.wareDetailContent) .collect(Collectors.toList()))
.build(); .warePropDTO(this.warePropDO == null ? null : warePropDO.buildWarePropDTO())
} .wareDetailContent(this.wareDetailContent)
.build();
}
public WareInfoItemDTO buildWareInfoItemDTO() { public WareInfoItemDTO buildWareInfoItemDTO() {
return WareInfoItemDTO.builder() return WareInfoItemDTO.builder()
.id(this.id) .id(this.id)
.wareNo(this.wareNo) .wareNo(this.wareNo)
.wareTitle(this.wareTitle) .wareTitle(this.wareTitle)
.wareTypeId(this.wareTypeId) .wareTypeId(this.wareTypeId)
.wareStatus(this.wareStatus) .wareStatus(this.wareStatus)
.minDeposit(this.minDeposit) .minDeposit(this.minDeposit)
.minRent(this.minRent) .minRent(this.minRent)
.totalStock(this.totalStock) .totalStock(this.totalStock)
.totalSale(this.totalSale) .totalSale(this.totalSale)
.tags(StringUtils.isEmpty(this.tags) ? null : Arrays.asList(this.tags.split(","))) .tags(StringUtils.isEmpty(this.tags) ? null : Arrays.asList(this.tags.split(",")))
.wareImgs( .wareImgs(
CollectionUtils.isEmpty(this.wareImgs) CollectionUtils.isEmpty(this.wareImgs)
? null ? null
: this.wareImgs.stream() : this.wareImgs.stream()
.map( .map(
d -> { d -> {
return d.buildWareImgDTO(); return d.buildWareImgDTO();
}) })
.collect(Collectors.toList())) .collect(Collectors.toList()))
.propInfoId(this.warePropDO.getPropInfoId()) .propInfoId(this.warePropDO.getPropInfoId())
.createTime(this.createTime) .createTime(this.createTime)
.build(); .build();
} }
public AppletWareInfoDTO buildAppletWareInfoDTO() { public AppletWareInfoDTO buildAppletWareInfoDTO() {
return AppletWareInfoDTO.builder() return AppletWareInfoDTO.builder()
.id(this.id) .id(this.id)
.wareNo(this.wareNo) .wareNo(this.wareNo)
.wareTitle(this.wareTitle) .wareTitle(this.wareTitle)
.wareTypeId(this.wareTypeId) .wareTypeId(this.wareTypeId)
.wareStatus(this.wareStatus) .wareStatus(this.wareStatus)
.payStatus(this.payStatus) .payStatus(this.payStatus)
.minDeposit(this.minDeposit) .minDeposit(this.minDeposit)
.minRent(this.minRent) .minRent(this.minRent)
.totalStock(this.totalStock) .totalStock(this.totalStock)
.totalSale(this.totalSale) .totalSale(this.totalSale)
.skuNum(this.skuNum) .skuNum(this.skuNum)
.tags(StringUtils.isEmpty(this.tags) ? null : Arrays.asList(this.tags.split(","))) .tags(StringUtils.isEmpty(this.tags) ? null : Arrays.asList(this.tags.split(",")))
.wareImgs( .wareImgs(
CollectionUtils.isEmpty(this.wareImgs) CollectionUtils.isEmpty(this.wareImgs)
? null ? null
: this.wareImgs.stream() : this.wareImgs.stream()
.map( .map(
d -> { d -> {
return d.buildWareImgDTO(); return d.buildWareImgDTO();
}) })
.collect(Collectors.toList())) .collect(Collectors.toList()))
.build(); .build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.dto.WarePropDTO; import com.mmc.pms.model.lease.dto.WarePropDTO;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
......
...@@ -13,107 +13,107 @@ import java.util.List; ...@@ -13,107 +13,107 @@ import java.util.List;
*/ */
public class JsonUtil { public class JsonUtil {
public static void main(String[] args) { public static void main(String[] args) {
String array = "[1,24,23]"; String array = "[1,24,23]";
List<Integer> list = JSONArray.parseArray(array, Integer.class); List<Integer> list = JSONArray.parseArray(array, Integer.class);
System.out.println(list.get(2)); System.out.println(list.get(2));
} }
/** /**
* 把Java对象转换成json字符串 * 把Java对象转换成json字符串
* *
* @param object 待转化为JSON字符串的Java对象 * @param object 待转化为JSON字符串的Java对象
* @return json 串 or null * @return json 串 or null
*/ */
public static String parseObjToJson(Object object) { public static String parseObjToJson(Object object) {
String string = null; String string = null;
try { try {
string = JSONObject.toJSONString(object); string = JSONObject.toJSONString(object);
} catch (Exception e) { } catch (Exception e) {
// LOGGER.error(e.getMessage()); // LOGGER.error(e.getMessage());
}
return string;
} }
return string;
}
/** /**
* 将Json字符串信息转换成对应的Java对象 * 将Json字符串信息转换成对应的Java对象
* *
* @param json json字符串对象 * @param json json字符串对象
* @param c 对应的类型 * @param c 对应的类型
*/ */
public static <T> T parseJsonToObj(String json, Class<T> c) { public static <T> T parseJsonToObj(String json, Class<T> c) {
try { try {
JSONObject jsonObject = JSON.parseObject(json); JSONObject jsonObject = JSON.parseObject(json);
return JSON.toJavaObject(jsonObject, c); return JSON.toJavaObject(jsonObject, c);
} catch (Exception e) { } catch (Exception e) {
// LOGGER.error(e.getMessage()); // LOGGER.error(e.getMessage());
}
return null;
} }
return null;
}
/** /**
* 读取json文件 * 读取json文件
* *
* @param fileName * @param fileName
* @return * @return
*/ */
public static String readJsonFile(String fileName) { public static String readJsonFile(String fileName) {
String jsonStr = ""; String jsonStr = "";
try { try {
File jsonFile = new File(fileName); File jsonFile = new File(fileName);
FileReader fileReader = new FileReader(jsonFile); FileReader fileReader = new FileReader(jsonFile);
Reader reader = new InputStreamReader(new FileInputStream(jsonFile), "utf-8"); Reader reader = new InputStreamReader(new FileInputStream(jsonFile), "utf-8");
int ch = 0; int ch = 0;
StringBuffer sb = new StringBuffer(); StringBuffer sb = new StringBuffer();
while ((ch = reader.read()) != -1) { while ((ch = reader.read()) != -1) {
sb.append((char) ch); sb.append((char) ch);
} }
fileReader.close(); fileReader.close();
reader.close(); reader.close();
jsonStr = sb.toString(); jsonStr = sb.toString();
return jsonStr; return jsonStr;
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
return null; return null;
}
} }
}
/** /**
* 将JSON数据格式化并保存到文件中 * 将JSON数据格式化并保存到文件中
* *
* @param jsonData 需要输出的json数 * @param jsonData 需要输出的json数
* @param filePath 输出的文件地址 * @param filePath 输出的文件地址
* @return * @return
*/ */
public static boolean createJsonFile(Object jsonData, String filePath) { public static boolean createJsonFile(Object jsonData, String filePath) {
String content = String content =
JSON.toJSONString( JSON.toJSONString(
jsonData, jsonData,
SerializerFeature.PrettyFormat, SerializerFeature.PrettyFormat,
SerializerFeature.WriteMapNullValue, SerializerFeature.WriteMapNullValue,
SerializerFeature.WriteDateUseDateFormat); SerializerFeature.WriteDateUseDateFormat);
// 标记文件生成是否成功 // 标记文件生成是否成功
boolean flag = true; boolean flag = true;
// 生成json格式文件 // 生成json格式文件
try { try {
// 保证创建一个新文件 // 保证创建一个新文件
File file = new File(filePath); File file = new File(filePath);
if (!file.getParentFile().exists()) { // 如果父目录不存在,创建父目录 if (!file.getParentFile().exists()) { // 如果父目录不存在,创建父目录
file.getParentFile().mkdirs(); file.getParentFile().mkdirs();
} }
if (file.exists()) { // 如果已存在,删除旧文件 if (file.exists()) { // 如果已存在,删除旧文件
file.delete(); file.delete();
} }
file.createNewFile(); file.createNewFile();
// 将格式化后的字符串写入文件 // 将格式化后的字符串写入文件
Writer write = new OutputStreamWriter(new FileOutputStream(file), "UTF-8"); Writer write = new OutputStreamWriter(new FileOutputStream(file), "UTF-8");
write.write(content); write.write(content);
write.flush(); write.flush();
write.close(); write.close();
} catch (Exception e) { } catch (Exception e) {
flag = false; flag = false;
e.printStackTrace(); e.printStackTrace();
}
return flag;
} }
return flag;
}
} }
package com.mmc.pms.model.categories.dto;
import com.mmc.pms.entity.Categories;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @author lw
* @TableName categories
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CategoriesDTO implements Serializable {
private Integer id;
@ApiModelProperty(value = "分类名称")
private String name;
@ApiModelProperty(value = "分类类型")
private Integer type;
public CategoriesDTO(Categories categories) {
this.id = categories.getId();
this.name = categories.getName();
this.type = categories.getType();
}
}
\ No newline at end of file
package com.mmc.pms.model.dto; package com.mmc.pms.model.categories.dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
package com.mmc.pms.model.dto; package com.mmc.pms.model.categories.dto;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
......
package com.mmc.pms.model.vo; package com.mmc.pms.model.categories.vo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
......
package com.mmc.pms.model.vo; package com.mmc.pms.model.categories.vo;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
......
package com.mmc.pms.model.vo; package com.mmc.pms.model.categories.vo;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Update;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import java.io.Serializable; import java.io.Serializable;
...@@ -18,6 +22,7 @@ import java.io.Serializable; ...@@ -18,6 +22,7 @@ import java.io.Serializable;
public class ClassifyInfoVO implements Serializable { public class ClassifyInfoVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class}) @NotNull(message = "id不能为空", groups = {Update.class})
@Min(value = 1, groups = {Update.class})
private Integer id; private Integer id;
@ApiModelProperty(value = "所属目录id") @ApiModelProperty(value = "所属目录id")
...@@ -26,7 +31,7 @@ public class ClassifyInfoVO implements Serializable { ...@@ -26,7 +31,7 @@ public class ClassifyInfoVO implements Serializable {
@ApiModelProperty(value = "分类名称", required = true) @ApiModelProperty(value = "分类名称", required = true)
@Size(max = 15, message = "分类名称不能超过15个字", groups = {Update.class, Create.class}) @Size(max = 15, message = "分类名称不能超过15个字", groups = {Update.class, Create.class})
@NotNull(message = "分类名称不能为空", groups = {Update.class, Create.class}) @NotBlank(message = "分类名称不能为空或空字符", groups = {Update.class, Create.class})
private String classifyName; private String classifyName;
@ApiModelProperty(value = "pid:一级分类的pid是0 二级分类pid是一级分类id", required = true) @ApiModelProperty(value = "pid:一级分类的pid是0 二级分类pid是一级分类id", required = true)
......
package com.mmc.pms.model.vo; package com.mmc.pms.model.categories.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -22,7 +22,9 @@ public class DirectoryInfoVO { ...@@ -22,7 +22,9 @@ public class DirectoryInfoVO {
@ApiModelProperty(value = "目录名称") @ApiModelProperty(value = "目录名称")
private String directoryName; private String directoryName;
@ApiModelProperty(value = "关联目录的id") @ApiModelProperty(value = "关联目录的id")
private Integer relevance; private Integer pid;
@ApiModelProperty(value = "关联目录名称")
private String relevanceName;
@ApiModelProperty(value = "分类模块:(0:通用分类 1:作业服务分类 2:设备分类 3:飞手分类 4:商城分类)") @ApiModelProperty(value = "分类模块:(0:通用分类 1:作业服务分类 2:设备分类 3:飞手分类 4:商城分类)")
private Integer type; private Integer type;
} }
package com.mmc.pms.model.vo; package com.mmc.pms.model.categories.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -8,19 +8,21 @@ import lombok.NoArgsConstructor; ...@@ -8,19 +8,21 @@ import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @Author small @Date 2023/5/16 15:23 @Version 1.0 * @Author LW
* @date 2023/6/7 16:14
* 概要:
*/ */
@Data @Data
@AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.vo.GoodsQaVO", description = "新增/修改参数类") @AllArgsConstructor
public class GoodsQaVO implements Serializable { public class RelevanceCurriculumVO implements Serializable {
@ApiModelProperty(value = "id")
private Integer id; @ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "问题") @ApiModelProperty(value = "课程名称")
private String question; private String curriculumName;
// 课程图片
// 状态
@ApiModelProperty(value = "回答")
private String answer;
} }
package com.mmc.pms.model.dto; package com.mmc.pms.model.categories.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -9,20 +9,21 @@ import lombok.NoArgsConstructor; ...@@ -9,20 +9,21 @@ import lombok.NoArgsConstructor;
import java.io.Serializable; import java.io.Serializable;
/** /**
* @Author small @Date 2023/5/16 15:02 @Version 1.0 * @Author LW
* @date 2023/6/7 16:03
* 概要:
*/ */
@Builder
@Data @Data
@AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.mall.dto.GoodsQaDTO", description = "常见问题DTO") @AllArgsConstructor
public class GoodsQaDTO implements Serializable { @Builder
@ApiModelProperty(value = "id") public class RelevanceGoodsInfoVO implements Serializable {
private Integer id; @ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "问题") @ApiModelProperty(value = "商品名称")
private String question; private String goodsName;
@ApiModelProperty(value = "主图")
@ApiModelProperty(value = "回答") private String mainImage;
private String answer; @ApiModelProperty(value = "状态 上架0 下架1")
private Integer shelf;
} }
package com.mmc.pms.model.categories.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author LW
* @date 2023/6/7 16:08
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RelevanceServiceInfoVO implements Serializable {
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "服务编号")
private String number;
@ApiModelProperty(value = "服务名称")
private String name;
@ApiModelProperty(value = "视频")
private String videoUrl;
@ApiModelProperty(value = "状态 上架0 下架1")
private Integer shelf;
}
package com.mmc.pms.model.categories.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author LW
* @date 2023/6/7 16:54
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class RelevantBusinessVO {
private List<RelevanceCurriculumVO> relevanceCurriculumVOs;
private List<RelevanceGoodsInfoVO> relevanceGoodsInfoVOs;
private List<RelevanceServiceInfoVO> relevanceServiceInfoVOs;
}
package com.mmc.pms.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small @Date 2023/5/25 9:55 @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.dto.BaseAccountDTO", description = "登录信息DTO")
public class BaseAccountDTO implements Serializable {
private static final long serialVersionUID = -2979712090903806216L;
private Integer id;
private String uid;
private String accountPhone;
private String accountNo;
private String accountName;
private String tokenPort;
@ApiModelProperty(value = "角色ID")
private Integer roleId;
@ApiModelProperty(value = "是否为管理角色:0否 1是")
private Integer admin; // 是否为管理角色
@ApiModelProperty(value = "是否为运营角色:0否 1是")
private Integer operate;
@ApiModelProperty(value = "是否PMC发货专员:0否 1是")
private Integer pmc;
@ApiModelProperty(value = "单位信息")
private CompanyCacheDTO companyInfo; // 单位信息
public BaseAccountDTO(UserAccountDTO user) {
this.id = user.getId();
this.accountNo = user.getAccountNo();
this.accountName = user.getUserName();
this.roleId = user.getRoleInfo() == null ? null : user.getRoleInfo().getId();
this.admin = user.getRoleInfo() == null ? null : user.getRoleInfo().getAdmin();
this.operate = user.getRoleInfo() == null ? null : user.getRoleInfo().getOperate();
this.pmc = user.getRoleInfo() == null ? null : user.getRoleInfo().getPmc();
}
public BaseAccountDTO(RepoAccountDTO account) {
this.id = account.getId();
this.accountName = account.getAccountName();
this.uid = account.getUid();
this.accountPhone = account.getPhoneNum();
}
public BaseAccountDTO(MallUserDTO account) {
this.id = account.getId();
this.accountName = account.getNickName();
this.uid = account.getUid();
this.accountPhone = account.getPhoneNum();
}
public BaseAccountDTO(FlyerAccountDTO account) {
this.id = account.getId();
this.accountName = account.getAccountName();
this.uid = account.getUid();
this.accountPhone = account.getPhoneNum();
}
/**
* 是否为科比特超级管理员单位(是:无单位资源限制 否:只能看当前和下级单位的资源)
*
* @return
*/
public boolean isManage() {
if (this.getCompanyInfo() == null) {
return false;
}
if (this.getCompanyInfo().getManage() == null) {
return false;
}
return this.getCompanyInfo().getManage() == 1;
}
/**
* 判断是否已授权
*
* @return
*/
// public boolean authorized() {
// if (StringUtils.isBlank(this.accountName) || StringUtils.isBlank(this.accountPhone)) {
// return false;
// }
// return true;
// }
}
package com.mmc.pms.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @Author small @Date 2023/5/25 9:56 @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.sharefly.dto.CompanySimpleDTO", description = "单位信息DTO")
public class CompanySimpleDTO implements Serializable {
private static final long serialVersionUID = 2541404541696571857L;
@ApiModelProperty(value = "单位ID")
private Integer id;
@ApiModelProperty(value = "单位名称")
private String company;
@ApiModelProperty(value = "账号类型:0合伙人 1员工")
private Integer userType;
@ApiModelProperty(value = "是否为管理单位:0否 1是", hidden = true)
private Integer manage;
@ApiModelProperty(value = "当前单位ID+子级单位ID的集合", hidden = true)
private List<Integer> companys;
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论