提交 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,7 +28,8 @@ import org.springframework.web.bind.annotation.*; ...@@ -22,7 +28,8 @@ 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)})
...@@ -76,7 +83,7 @@ public class MiniProgramDeviceController { ...@@ -76,7 +83,7 @@ public class MiniProgramDeviceController {
} }
@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,9 +18,11 @@ import org.springframework.web.bind.annotation.*; ...@@ -18,9 +18,11 @@ 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")
......
...@@ -32,7 +32,8 @@ import java.util.List; ...@@ -32,7 +32,8 @@ import java.util.List;
@RequestMapping("/partupload") @RequestMapping("/partupload")
public class PartUploadController { public class PartUploadController {
@Autowired private StringRedisTemplate stringRedisTemplate; @Autowired
private StringRedisTemplate stringRedisTemplate;
@ApiOperation(value = "初始化分片上传") @ApiOperation(value = "初始化分片上传")
@GetMapping("/initPartUpload") @GetMapping("/initPartUpload")
......
package com.mmc.pms.controller; package com.mmc.pms.controller;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson2.JSONObject;
import com.aliyun.oss.ClientBuilderConfiguration; import com.aliyun.oss.ClientBuilderConfiguration;
import com.aliyun.oss.OSS; import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClientBuilder; import com.aliyun.oss.OSSClientBuilder;
......
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,7 +29,8 @@ import org.springframework.web.bind.annotation.*; ...@@ -23,7 +29,8 @@ 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)})
......
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,9 +19,11 @@ import org.springframework.web.bind.annotation.*; ...@@ -19,9 +19,11 @@ 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")
......
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;
...@@ -22,7 +21,7 @@ public interface MiniProgramProductMallDao { ...@@ -22,7 +21,7 @@ public interface MiniProgramProductMallDao {
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);
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
......
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;
...@@ -45,7 +45,9 @@ public class GoodsInfoDO implements Serializable { ...@@ -45,7 +45,9 @@ public class GoodsInfoDO implements Serializable {
private Integer standardProduct; private Integer standardProduct;
private String tag; private String tag;
/** 辅助字段-start */ /**
* 辅助字段-start
*/
private String videoUrl; private String videoUrl;
private Integer goodsVideoId; private Integer goodsVideoId;
......
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;
...@@ -25,13 +23,4 @@ public class GoodsQaDO implements Serializable { ...@@ -25,13 +23,4 @@ public class GoodsQaDO implements Serializable {
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;
...@@ -24,11 +24,16 @@ public class GoodsServiceDO implements Serializable { ...@@ -24,11 +24,16 @@ public class GoodsServiceDO implements Serializable {
private Integer saleServiceId; private Integer saleServiceId;
private Date createTime; private Date createTime;
/** 辅助字段-start */ /**
* 辅助字段-start
*/
private String serviceName; private String serviceName;
private String remark; private String remark;
/** 辅助字段-end */
/**
* 辅助字段-end
*/
public GoodsServiceDTO buildGoodsServiceDTO() { public GoodsServiceDTO buildGoodsServiceDTO() {
return GoodsServiceDTO.builder() return GoodsServiceDTO.builder()
.id(this.id) .id(this.id)
......
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;
......
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;
...@@ -34,7 +35,7 @@ public class IndustrySpecDO implements Serializable { ...@@ -34,7 +35,7 @@ public class IndustrySpecDO implements Serializable {
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)
...@@ -42,7 +43,7 @@ public class IndustrySpecDO implements Serializable { ...@@ -42,7 +43,7 @@ public class IndustrySpecDO implements Serializable {
.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()
......
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;
...@@ -23,7 +23,7 @@ public class MallIndustrySkuInfoDO implements Serializable { ...@@ -23,7 +23,7 @@ public class MallIndustrySkuInfoDO implements Serializable {
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;
...@@ -31,19 +31,23 @@ public class MallIndustrySkuInfoDO implements Serializable { ...@@ -31,19 +31,23 @@ public class MallIndustrySkuInfoDO implements Serializable {
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
/** 辅助字段start */ /**
* 辅助字段start
*/
private String typeName; private String typeName;
private String unitName; private String unitName;
private String industrySkuName; private String industrySkuName;
/** 辅助字段end */ /**
public MallIndustrySkuInfoDO(GoodsSpecVO goodsSpecVO) { * 辅助字段end
*/
public MallIndustrySkuInfoDO(GoodsProdSpecVO goodsSpecVO) {
this.industrySkuId = goodsSpecVO.getSkuId(); this.industrySkuId = goodsSpecVO.getSkuId();
this.chooseType = goodsSpecVO.getChooseType(); this.chooseType = goodsSpecVO.getChooseType();
this.industrySkuSpecName = goodsSpecVO.getGoodsSpecName(); this.industrySkuSpecName = goodsSpecVO.getGoodsSpecName();
this.skuUnitId = goodsSpecVO.getSkuUnitId(); this.skuUnitId = goodsSpecVO.getSkuUnitId();
this.goodsTypeId = goodsSpecVO.getGoodsTypeId(); this.categoriesId = goodsSpecVO.getCategoryId();
this.must = goodsSpecVO.getMust(); this.must = goodsSpecVO.getMust();
} }
...@@ -51,7 +55,7 @@ public class MallIndustrySkuInfoDO implements Serializable { ...@@ -51,7 +55,7 @@ public class MallIndustrySkuInfoDO implements Serializable {
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)
......
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;
......
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;
......
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;
......
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;
......
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;
...@@ -43,7 +43,9 @@ public class WareInfoDO implements Serializable { ...@@ -43,7 +43,9 @@ public class WareInfoDO implements Serializable {
private Date updateTime; private Date updateTime;
private Integer pid; private Integer pid;
/** 辅助字段-start */ /**
* 辅助字段-start
*/
private List<WareImgDO> wareImgs; private List<WareImgDO> wareImgs;
// private List<WareVideoDO> wareVideos; // private List<WareVideoDO> wareVideos;
private WarePropDO warePropDO; private WarePropDO warePropDO;
...@@ -51,7 +53,9 @@ public class WareInfoDO implements Serializable { ...@@ -51,7 +53,9 @@ public class WareInfoDO implements Serializable {
// private WareDetailDO wareDetailDO; // private WareDetailDO wareDetailDO;
// private List<SkuInfoDO> skuInfoDOList; // private List<SkuInfoDO> skuInfoDOList;
/** 辅助字段-end */ /**
* 辅助字段-end
*/
public WareInfoDTO buildWareInfoDTO() { public WareInfoDTO buildWareInfoDTO() {
return WareInfoDTO.builder() return WareInfoDTO.builder()
.id(this.id) .id(this.id)
......
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;
......
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") @ApiModelProperty(value = "id")
private Integer 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
public class RelevanceGoodsInfoVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Integer id; private Integer id;
@ApiModelProperty(value = "商品名称")
@ApiModelProperty(value = "问题") private String goodsName;
private String question; @ApiModelProperty(value = "主图")
private String mainImage;
@ApiModelProperty(value = "回答") @ApiModelProperty(value = "状态 上架0 下架1")
private String answer; 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;
}
package com.mmc.pms.model.dto;
import com.mmc.pms.common.FlyerAccountType;
import io.swagger.annotations.ApiModel;
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;
import java.util.List;
import java.util.Set;
/**
* @Author small @Date 2023/5/25 9:58 @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "com.mmc.csf.model.dto.FlyerAccountDTO", description = "飞手端用户DTO")
public class FlyerAccountDTO implements Serializable {
private static final long serialVersionUID = -5663270547201316327L;
@ApiModelProperty(value = "飞手端用户id")
private Integer id;
@ApiModelProperty(value = "飞手端用户uid")
private String uid;
@ApiModelProperty(value = "飞手端用户名称")
private String accountName;
@ApiModelProperty(value = "联系电话")
private String phoneNum;
@ApiModelProperty(value = "飞手端用户类型,(个人飞手,机构)")
private Integer accountType;
@ApiModelProperty(value = "实名认证状态")
private Integer realAuthStatus;
@ApiModelProperty(value = "企业认证状态")
private Integer entAuthStatus;
@ApiModelProperty(value = "工作状态")
private Integer workStatus;
@ApiModelProperty(value = "常驻城市")
private String resAddress;
@ApiModelProperty(value = "openId")
private String openId;
@ApiModelProperty(value = "unionId")
private String unionId;
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "头像url")
private String headerImg;
@ApiModelProperty(value = "经度")
private Double lon;
@ApiModelProperty(value = "纬度")
private Double lat;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "删除状态,0未删除,1删除")
private Integer deleted;
@ApiModelProperty(value = "企业名称")
private String entName;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "有无订单:0无,1有")
private Integer serviceStatus;
@ApiModelProperty(value = "距离订单距离-单位km")
private Double orderDist;
@ApiModelProperty(value = "服务中的订单名称")
private List<String> orderNames;
@ApiModelProperty(value = "飞手认证状态")
private Integer licStatus;
@ApiModelProperty(value = "机构信息")
private FlyerEntInfoDTO entInfo;
@ApiModelProperty(value = "抢单状态-0否-1是")
private Integer applyOrder;
@ApiModelProperty(value = "多端用户,USER_PORT(云享飞)-FLYER_PORT(云飞手)-REPO_PORT(云仓)")
private Set<String> ports;
@ApiModelProperty(value = "推荐人ID")
private Integer rcdFlyerAccountId;
@ApiModelProperty(value = "推荐人昵称")
private String rcdNickName;
@ApiModelProperty(value = "推荐人uid")
private String rcdUid;
@ApiModelProperty(value = "推荐人账号名称")
private String rcdAccountName;
@ApiModelProperty(value = "已推荐用户数")
private Integer rcdUserNumber;
@ApiModelProperty(value = "是否销售")
private Integer sale;
@ApiModelProperty(value = "是否白名单")
private Integer white;
@ApiModelProperty(value = "用户来源:0自然流,1海报,2抖音,3公众号,4社群,5招投标,默认0")
private Integer source;
@ApiModelProperty(value = "订单信息")
private FlyerOrderTaskDTO flyerOrderTask;
@ApiModelProperty(value = "场景认证信息")
private FlyerScenesAuthDTO flyerScenesAuth;
/**
* 是否为飞手机构用户
*
* @return
*/
public boolean checkFlyerEnt() {
return (FlyerAccountType.JG.getCode().toString().equals(this.accountType.toString()));
}
/**
* 是否为飞手个人用户
*
* @return
*/
public boolean checkFlyer() {
return (FlyerAccountType.GR.getCode().toString().equals(this.accountType.toString()));
}
}
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.Date;
/**
* @Author small @Date 2023/5/25 10:00 @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.dto.FlyerEntInfoDTO", description = "飞手机构DTO")
public class FlyerEntInfoDTO implements Serializable {
private static final long serialVersionUID = -3064900348178903673L;
@ApiModelProperty(value = "机构id")
private Integer id;
@ApiModelProperty(value = "飞手端用户id")
private Integer flyerAccountId;
@ApiModelProperty(value = "机构名称")
private String entName;
@ApiModelProperty(value = "机构认证审批状态")
private Integer entCheckStatus;
@ApiModelProperty(value = "机构法人名称")
private String entLegalPerson;
@ApiModelProperty(value = "社会统一信用码")
private String uscCode;
@ApiModelProperty(value = "营业执照url")
private String unLicImg;
@ApiModelProperty(value = "开户银行")
private String bankName;
@ApiModelProperty(value = "账户名称")
private String accountHolder;
@ApiModelProperty(value = "银行账号")
private String bankAccount;
@ApiModelProperty(value = "法人身份证号")
private String idNumber;
@ApiModelProperty(value = "机构备注")
private String remark;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "飞手总数")
private Integer sumOfFlyer;
@ApiModelProperty(value = "认证飞手数")
private Integer countOfAuthFlyer;
@ApiModelProperty(value = "用户uid")
private String uid;
@ApiModelProperty(value = "用户手机号")
private String phoneNum;
@ApiModelProperty(value = "常驻城市")
private String resAddress;
@ApiModelProperty(value = "昵称")
private String nickName;
}
package com.mmc.pms.model.dto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author small @Date 2023/5/25 9:59 @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class FlyerOrderTaskDTO implements Serializable {
private static final long serialVersionUID = 4288411060058354326L;
private Integer id;
private Integer orderId;
private Integer flyerAccountId;
private Integer orderType;
private Integer virtualTeamId;
private String orderName;
private String orderNo;
public FlyerOrderTaskDTO(OrderTaskDTO d) {
this.orderId = d.getId();
this.orderName = d.getOrderName();
this.orderNo = d.getOrderNo();
}
}
package com.mmc.pms.model.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
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:59 @Version 1.0
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class FlyerScenesAuthDTO implements Serializable {
private static final long serialVersionUID = 66032902942031710L;
@ApiModelProperty("飞手id")
private Integer id;
@ApiModelProperty(value = "商务礼仪认证")
private Integer protocolAuth;
@ApiModelProperty(value = "电力巡检认证状态,0未认证,1通过,2未通过")
private Integer electricAuth;
@ApiModelProperty(value = "航空测绘认证状态,0未认证,1通过,2未通过", hidden = true)
@JsonIgnore
private Integer aviationAuth;
@ApiModelProperty(value = "应急保障认证状态,0未认证,1通过,2未通过", hidden = true)
@JsonIgnore
private Integer emergencyAuth;
@ApiModelProperty(value = "value = 监察巡检认证状态,0未认证,1通过,2未通过", hidden = true)
@JsonIgnore
private Integer superviseAuth;
@ApiModelProperty(value = "通用认证状态,0未认证,1通过,2未通过")
private Integer universalAuth;
@ApiModelProperty(value = "油气巡检认证状态,0未认证,1通过,2未通过")
private Integer oilGasAuth;
@ApiModelProperty(value = "演示认证状态,0未认证,1通过,2未通过")
private Integer demoAuth;
@ApiModelProperty(value = "航空测绘外业状态,0未认证,1通过,2未通过")
private Integer aviationOutAuth;
@ApiModelProperty(value = "航空测绘内业状态,0未认证,1通过,2未通过")
private Integer aviationInAuth;
@ApiModelProperty(value = "指挥车认证状态,0未认证,1通过,2未通过")
private Integer commandAuth;
@ApiModelProperty(value = "天目将软件认证状态,0未认证,1通过,2未通过")
private Integer tmjAuth;
}
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.math.BigDecimal;
import java.util.Date;
import java.util.Set;
/**
* @Author small @Date 2023/5/25 9:57 @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.dto.RepoAccountDTO", description = "云仓账号信息DTO")
public class RepoAccountDTO implements Serializable {
private static final long serialVersionUID = 1433562781546856233L;
@ApiModelProperty(value = "用户id")
private Integer id;
@ApiModelProperty(value = "用户uid")
private String uid;
@ApiModelProperty(value = "账号名称")
private String accountName;
@ApiModelProperty(value = "账号类型")
private Integer accountType;
@ApiModelProperty(value = "联系电话")
private String phoneNum;
@ApiModelProperty(value = "实名认证状态")
private Integer realAuthStatus;
@ApiModelProperty(value = "企业认证状态")
private Integer entAuthStatus;
@ApiModelProperty(value = "渠道认证状态")
private Integer channelAuthStatus;
@ApiModelProperty(value = "渠道等级")
private Integer channelClass;
@ApiModelProperty(value = "常驻城市")
private String resAddress;
@ApiModelProperty(value = "昵称")
private String nickName;
@ApiModelProperty(value = "头像url")
private String headerImg;
@ApiModelProperty(value = "经度")
private BigDecimal lon;
@ApiModelProperty(value = "纬度")
private BigDecimal lat;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "删除状态,0未删除,1删除")
private Integer deleted;
@ApiModelProperty(value = "企业名称")
private String entName;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "企业认证时间")
private Date entAuthTime;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "现金余额")
private BigDecimal cashAmt;
private String unionId;
private String openId;
@ApiModelProperty(value = "多端用户,USER_PORT(云享飞)-FLYER_PORT(云飞手)-REPO_PORT(云仓)")
private Set<String> ports;
@ApiModelProperty(value = "用户推荐人数量")
private Integer rcdRepoTeamNum;
@ApiModelProperty(value = "推荐人Uid")
private String rcdUid;
@ApiModelProperty(value = "推荐人账户名称")
private String rcdAccountName;
@ApiModelProperty(value = "推荐人昵称")
private String rcdNickName;
@ApiModelProperty(value = "推荐人id")
private Integer rcdAccountId;
@ApiModelProperty(value = "是否销售")
private Integer sale;
@ApiModelProperty(value = "是否白名单")
private Integer white;
@ApiModelProperty(value = "用户来源:0自然流,1海报,2抖音,3公众号,4社群,5招投标,默认0")
private Integer source;
@ApiModelProperty(value = "推荐单位")
private String company;
@ApiModelProperty(value = "推荐单位ID", hidden = true)
private Integer rcdCompanyId;
}
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.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author small @Date 2023/5/25 10:12 @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.dto.TaskFlyerCostDTO", description = "飞手工资DTO")
public class TaskFlyerCostDTO implements Serializable {
private static final long serialVersionUID = 4411028098471010440L;
@ApiModelProperty(value = "飞手工资id")
private Integer id;
@ApiModelProperty(value = "订单id")
private Integer orderTaskId;
@ApiModelProperty(value = "飞手日薪")
private BigDecimal flyerWag;
@ApiModelProperty(value = "飞手每日补贴")
private BigDecimal flyerSudy;
@ApiModelProperty(value = "每月工资结算日")
private Integer payDay;
@ApiModelProperty(value = "租房补贴")
private BigDecimal rentHouseSudy;
@ApiModelProperty(value = "交通补贴")
private BigDecimal trafficSudy;
@ApiModelProperty(value = "支付比例(例如0.95)")
private BigDecimal payPersent;
@ApiModelProperty(value = "设备信息")
private String deviceInfo;
@ApiModelProperty(value = "生成时间")
private Date createTime;
@ApiModelProperty(value = "更新时间")
private Date updateTime;
@ApiModelProperty(value = "任务编号")
private String orderNo;
@ApiModelProperty(value = "任务名称")
private String orderName;
@ApiModelProperty(value = "飞手数量")
private Integer flyerNum;
@ApiModelProperty(value = "服务类型")
private String inspectionName;
@ApiModelProperty(value = "飞手类型(0个人飞手 1飞手机构)")
private Integer flyerType;
@ApiModelProperty(value = "任务工资信息列表")
private List<WagTermDetailDTO> details;
@ApiModelProperty(value = "任务开始日")
private Date startTime;
@ApiModelProperty(value = "任务结束日")
private Date endTime;
@ApiModelProperty(value = "高温补贴")
private BigDecimal hotSudy;
@ApiModelProperty(value = "预估金额")
private BigDecimal estimateWag;
@ApiModelProperty(value = "补助标签")
private String sudyTag;
public void defaultValue() {
if (this.flyerWag == null) {
this.flyerWag = BigDecimal.ZERO;
}
if (this.flyerSudy == null) {
this.flyerSudy = BigDecimal.ZERO;
}
if (this.rentHouseSudy == null) {
this.rentHouseSudy = BigDecimal.ZERO;
}
if (this.trafficSudy == null) {
this.trafficSudy = BigDecimal.ZERO;
}
if (this.payPersent == null) {
this.payPersent = BigDecimal.ZERO;
}
if (this.hotSudy == null) {
this.hotSudy = BigDecimal.ZERO;
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论