提交 1ce64aa7 作者: zhenjie

Merge branch 'develop'

......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag: 5ba310b088b2e89e0a2898c5754568921095446d
newTag: ca19a936c153a8b533fbfe359cd6ae36e37ad991
package com.mmc.pms.auth.dto;
import com.mmc.pms.model.group.Insert;
import com.mmc.pms.model.group.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
......@@ -20,27 +22,27 @@ import javax.validation.constraints.NotNull;
public class CompanyInfoVO {
private static final long serialVersionUID = 3247519744829926132L;
@ApiModelProperty(value = "id")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "单位类型,0科比特,1加盟公司", example = "0")
@NotNull(message = "单位类型不能为空", groups = {Insert.class})
private Integer companyType;
@ApiModelProperty(value = "单位名称", example = "科比特")
@NotNull(message = "单位名称不能为空", groups = {Insert.class})
private String companyName;
@ApiModelProperty(value = "单位全称", example = "浙江科比特创新科技有限公司")
private String fullName;
@ApiModelProperty(value = "省份名称", example = "广东省")
@ApiModelProperty(value = "省份名称", example = "广东省", hidden = true)
@NotNull(message = "省份名称不能为空")
private String province;
@ApiModelProperty(value = "城市名称", example = "深圳市")
@ApiModelProperty(value = "城市名称", example = "深圳市", hidden = true)
@NotNull(message = "城市名称不能为空")
private String city;
@ApiModelProperty(value = "县区名称", example = "南山区")
@ApiModelProperty(value = "县区名称", example = "南山区", hidden = true)
@NotNull(message = "县区名称不能为空")
private String district;
@ApiModelProperty(value = "详细地址", example = "西丽街道万科云城国际创新谷6栋")
@NotNull(message = "详细地址不能为空", groups = {Insert.class})
private String address;
@ApiModelProperty(value = "联系人", example = "lx")
private String companyUserName;
......@@ -48,4 +50,32 @@ public class CompanyInfoVO {
private String phoneNum;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "小程序用户id")
private Integer userAccountId;
@ApiModelProperty(value = "后台用户id")
private Integer backUserAccountId;
@ApiModelProperty(value = "纬度")
private Double lat;
@ApiModelProperty(value = "经度")
private Double lon;
@ApiModelProperty(value = "社会信用代码")
private String creditCode;
@ApiModelProperty(value = "营业执照")
private String licenseImg;
@ApiModelProperty(value = "品牌名称", example = "科比特")
private String brandName;
@ApiModelProperty(value = "品牌logo", example = "http://")
private String brandLogo;
@ApiModelProperty(value = "管理员标识")
private Integer leader;
@ApiModelProperty(value = "服务资质信息", example = "5星店铺")
private String content;
@ApiModelProperty(value = "评分", example = "*****")
private Integer score;
@ApiModelProperty(value = "背景图", example = "http://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/3505c402-cbf9-41a5-9d6f-bdb350625bea.jpg")
private String backImg;
@ApiModelProperty(value = "当前距离")
private Double distance;
}
......@@ -346,7 +346,9 @@ public enum ResultEnum implements BaseErrorInfoInterface {
GOODS_NOT_EXIST_OR_ALREADY_DOWN_SHELF("30913", "商品不存在或已下架"),
GOODS_NAME_IS_NOT_NULL("30914", "商品名称不能为空或名字长度不能大于60"),
GOODS_DELETE_FAIL("30915", "批量删除商品失败,商品已被其他商品绑定"),
BRAND_DELETE_FAIL("30916", "删除失败,产品管理中有产品绑定该品牌名称"),
BRAND_DELETE_FAIL("30916", "删除失败,有产品绑定该品牌"),
TYPE_DELETE_FAIL("30917", "删除失败,有产品绑定该类型"),
DEVICE_MODE_DELETE_FAIL("30918", "删除失败,有产品绑定该型号"),
// 返祖
RETURN_SHARE_ORDER_ERROR("40000", "设备返祖订单相关信息找不到,请重新输入订单号"),
RETURN_SHARE_ORDER_NOT_FINISH_ERROR("40001", "此设备的订单未完成,请添加其他设备"),
......@@ -411,7 +413,9 @@ public enum ResultEnum implements BaseErrorInfoInterface {
THE_NAME_OF_A_CLASS_MUST_BE_UNIQUE("3002", "一级分类名称重复"),
THE_CURRENT_CATEGORY_IS_ASSOCIATED_WITH_GOODS("3004", "当前分类已经关联商品请先删除商品"),
THE_NAME_OF_THE_SECONDARY_CLASS_MUST_BE_UNIQUE("3003", "同一级分类下面二级分类不能重复"),
NAME_DUPLICATION_ERROR("3005", "名称重复");
NAME_DUPLICATION_ERROR("3005", "名称重复"),
UNBINDING_ERROR("3006", "有关联下级,删除失败"),
UNBINDING_ERROR_1("3007", "当前分类已经关联服务请先删除服务");
/**
* 错误码
*
......
......@@ -36,7 +36,7 @@ public class BrandManageController {
return ResultBody.success(brandManageService.listBrandInfo(pageNo, pageSize));
}
@ApiOperation(value = "删除品牌---待与运营沟通")
@ApiOperation(value = "删除品牌")
@GetMapping("deleteBrandInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody deleteBrandInfo(Integer id) {
......@@ -71,5 +71,10 @@ public class BrandManageController {
return brandManageService.editMode(param);
}
@ApiOperation(value = "删除型号")
@GetMapping("deleteMode")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody deleteMode(Integer id) {
return brandManageService.deleteMode(id);
}
}
......@@ -3,6 +3,7 @@ package com.mmc.pms.controller.inspection;
import com.mmc.pms.common.Page;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.controller.BaseController;
import com.mmc.pms.model.inspection.dto.AppCompanyInspectionDTO;
import com.mmc.pms.model.inspection.dto.CompanyInspectionDTO;
import com.mmc.pms.model.inspection.dto.IndustryTypeDTO;
import com.mmc.pms.model.inspection.dto.InspectionDTO;
......@@ -19,6 +20,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @author: zj
......@@ -56,7 +58,7 @@ public class CompanyInspectionController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CompanyInspectionDTO.class)})
@GetMapping("getCompanyInspectionById")
public ResultBody<CompanyInspectionDTO> getCompanyInspectionById(@RequestParam Integer id, HttpServletRequest request){
return companyInspectionService.getCompanyInspectionById(id, this.getUserLoginInfoFromRedis(request));
return companyInspectionService.getCompanyInspectionById(id);
}
@ApiOperation(value = "pc-单位服务列表")
......@@ -86,7 +88,14 @@ public class CompanyInspectionController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = CompanyInspectionDTO.class)})
@PostMapping("listAPPCompanyInspectionPage")
public ResultBody<IndustryTypeDTO> listAPPCompanyInspectionPage(@Validated(value = {Page.class})
@RequestBody CompanyInspectionQO companyInspectionQO, HttpServletRequest request){
return companyInspectionService.listAPPCompanyInspectionPage(companyInspectionQO, this.getUserLoginInfoFromRedis(request));
@RequestBody CompanyInspectionQO companyInspectionQO){
return companyInspectionService.listAPPCompanyInspectionPage(companyInspectionQO);
}
@ApiOperation(value = "批量-根据公司id查询服务")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = AppCompanyInspectionDTO.class)})
@PostMapping("listAPPCompanyInspectionPageByCompanyId")
public ResultBody<AppCompanyInspectionDTO> listAPPCompanyInspectionPageByCompanyId(@RequestBody List<Integer> companyInfoIds){
return companyInspectionService.listAPPCompanyInspectionPageByCompanyId(companyInfoIds);
}
}
......@@ -14,6 +14,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import java.util.List;
/**
* @author: zj
* @Date: 2023/8/3 17:58
......@@ -59,4 +61,18 @@ public class IndustryTypeController {
public ResultBody<IndustryTypeDTO> listInspectionsByIndustryTypeId(@RequestParam Integer id){
return industryTypeService.listInspectionsByIndustryTypeId(id);
}
@ApiOperation(value = "一级行业详情-全部")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = IndustryTypeDTO.class)})
@GetMapping("getIndustryTypeById")
public ResultBody<IndustryTypeDTO> getIndustryTypeById(@RequestParam Integer id){
return industryTypeService.getIndustryTypeById(id);
}
@ApiOperation(value = "一级行业列表-全部")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = List.class)})
@PostMapping("listIndustry")
public List<IndustryTypeDTO> listIndustry(@Validated(value = {Page.class}) @RequestBody IndustryTypeQO industryTypeQO){
return industryTypeService.listIndustry(industryTypeQO);
}
}
package com.mmc.pms.controller.inspection;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.inspection.dto.InspectionDTO;
import com.mmc.pms.model.inspection.vo.InspectionVO;
import com.mmc.pms.service.inspection.InspectionService;
import io.swagger.annotations.Api;
......@@ -41,4 +42,11 @@ public class InspectionController {
public ResultBody remove(@RequestParam Integer id){
return inspectionService.remove(id);
}
@ApiOperation(value = "服务详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = InspectionDTO.class)})
@GetMapping("detail")
public ResultBody<InspectionDTO> detail(@RequestParam Integer id){
return inspectionService.detail(id);
}
}
package com.mmc.pms.controller.lease;
/**
* @Author LW
* @date 2023/8/4 10:35
* 概要:
*/
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.controller.BaseController;
import com.mmc.pms.model.lease.qo.LeaseGoodsQO;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import com.mmc.pms.service.lease.LeaseGoodsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
/**
* @Author LW
* @date 2023/7/24 16:56 概要:
*/
@RestController
@RequestMapping("/app/lease/")
@Api(tags = {"V1.0.3-小程序-租赁商品-相关接口"})
public class AppGoodsController extends BaseController {
@Resource
LeaseGoodsService leaseGoodsService;
@ApiOperation(value = "租赁商品详情")
@GetMapping("leaseGoodsDetails")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = LeaseGoodsVO.class)})
public ResultBody<LeaseGoodsVO> leaseGoodsDetails(@RequestParam Integer id) {
return leaseGoodsService.leaseGoodsDetails(id);
}
@ApiOperation(value = "租赁商品列表")
@PostMapping("leaseGoodsList")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = LeaseGoodsVO.class)})
public ResultBody leaseGoodsList(@RequestBody LeaseGoodsQO param) {
return leaseGoodsService.leaseGoodsList(param, null);
}
}
......@@ -8,19 +8,20 @@ package com.mmc.pms.controller.lease;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.controller.BaseController;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Update;
import com.mmc.pms.model.lease.qo.LeaseGoodsQO;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import com.mmc.pms.model.sale.vo.BatchShelfVO;
import com.mmc.pms.service.lease.LeaseGoodsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
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 io.swagger.annotations.*;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import springfox.documentation.annotations.ApiIgnore;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
/**
* @Author LW
......@@ -33,11 +34,62 @@ public class LeaseGoodsController extends BaseController {
@Resource
LeaseGoodsService leaseGoodsService;
@ApiOperation(value = "新增商城商品")
@ApiOperation(value = "新增租赁商品")
@PostMapping("addLeaseGoods")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addLeaseGoods(@RequestBody MallGoodsVO mallGoodsVO, HttpServletRequest request) {
return null;
// return leaseGoodsService.addLeaseGoods(mallGoodsVO, this.getUserLoginInfoFromRedis(request).getUserAccountId());
public ResultBody addLeaseGoods(@Validated(value = {Create.class}) @RequestBody LeaseGoodsVO leaseGoodsVO, HttpServletRequest request) {
return leaseGoodsService.addLeaseGoods(leaseGoodsVO, this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
@ApiOperation(value = "获取租期信息")
@PostMapping("getLeaseTermInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody getLeaseTermInfo() {
return leaseGoodsService.getLeaseTermInfo();
}
@ApiOperation(value = "租赁商品详情")
@GetMapping("leaseGoodsDetails")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = LeaseGoodsVO.class)})
public ResultBody<LeaseGoodsVO> leaseGoodsDetails(@RequestParam Integer id) {
return leaseGoodsService.leaseGoodsDetails(id);
}
@ApiOperation(value = "编辑租赁商品")
@PostMapping("editLeaseGoods")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody editLeaseGoods(@Validated(value = {Update.class}) @RequestBody LeaseGoodsVO leaseGoodsVO, HttpServletRequest request) {
return leaseGoodsService.editLeaseGoods(leaseGoodsVO, this.getUserLoginInfoFromRedis(request).getUserAccountId());
}
@ApiOperation(value = "租赁商品列表")
@PostMapping("leaseGoodsList")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = LeaseGoodsVO.class)})
public ResultBody leaseGoodsList(@RequestBody LeaseGoodsQO param, HttpServletRequest request) {
return leaseGoodsService.leaseGoodsList(param, this.getUserLoginInfoFromRedis(request));
}
@ApiOperation(value = "租赁商品批量上下架")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("batchOnShelfOrTakeDown")
public ResultBody batchOnShelfOrTakeDown(@ApiParam(value = "商品上下架参数", required = true)
@RequestBody BatchShelfVO batchOnShelfVO) {
return leaseGoodsService.batchOnShelfOrTakeDown(batchOnShelfVO.getGoodsIds(), batchOnShelfVO.getStatus());
}
@ApiOperation(value = "租赁商品批量删除")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("batchRemoveWareInfo")
public ResultBody batchRemoveWareInfo(
@ApiParam(value = "商品id数组", required = true) @RequestBody List<Integer> list) {
return leaseGoodsService.batchRemoveWareInfo(list);
}
@ApiOperation(value = "feign-根据地址id查询是否有商品绑定")
@GetMapping("feignLeaseGoodsInfoByAddressId")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = LeaseGoodsVO.class)})
@ApiIgnore
public Integer feignLeaseGoodsInfoByAddressId(@RequestParam Integer id) {
return leaseGoodsService.feignLeaseGoodsInfoByAddressId(id);
}
}
......@@ -2,6 +2,7 @@ package com.mmc.pms.controller.mall;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.controller.BaseController;
import com.mmc.pms.model.mall.GoodsListVO;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.service.mall.AppMallGoodsService;
import com.mmc.pms.service.mall.MallGoodsService;
......@@ -48,4 +49,11 @@ public class AppMallGoodsController extends BaseController {
public ResultBody<MallGoodsVO> queryGoodsInfoByCategorySub(@RequestBody List<Integer> categorySubIds) {
return appMallGoodsService.queryGoodsInfoByCategorySub(categorySubIds);
}
@ApiOperation(value = "品牌店铺列表")
@PostMapping("brandStoreList")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = GoodsListVO.class)})
public ResultBody<GoodsListVO> brandStoreList(@RequestBody List<Integer> userAccountIds) {
return appMallGoodsService.brandStoreList(userAccountIds);
}
}
......@@ -85,7 +85,7 @@ public class MallGoodsController extends BaseController {
@ApiOperation(value = "删除用户时对应的商品也删除", hidden = true)
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("feignRemoveGoodsByBackUserAccountId")
public ResultBody feignRemoveGoodsByUserAccountId(@RequestParam(value = "id") Integer id) {
return mallGoodsService.feignRemoveGoodsByBackUserAccountId(id);
public ResultBody feignRemoveGoodsByUserAccountId(@RequestParam(value = "id") Integer id, @RequestParam(value = "companyInfoId") Integer companyInfoId) {
return mallGoodsService.feignRemoveGoodsByBackUserAccountId(id, companyInfoId);
}
}
......@@ -77,6 +77,8 @@ public interface BrandManageDao {
int countModeInfoByName(ModeInfoVO param);
int countLeaseGoodsByDeviceModeId(Integer id);
void insertModeInfo(DeviceModeDO modeInfoDO);
int countModeInfo(ModeInfoQO param);
......@@ -86,4 +88,6 @@ public interface BrandManageDao {
void updateModeInfo(DeviceModeDO modeInfoDO);
List<DeviceModeDO> listDeviceModeByBrandId(List<Integer> ids);
void removeModeInfoById(Integer id);
}
......@@ -24,103 +24,103 @@ import java.util.Set;
@Mapper
public interface ProductDao {
int countSkuName(ProductSkuVO param);
int countSkuName(ProductSkuVO param);
int insertProductSku(ProductDO productDO);
int insertProductSku(ProductDO productDO);
int countProductIsExist(Integer id);
int countProductIsExist(Integer id);
ProductDO getProductDetail(Integer id);
ProductDO getProductDetail(Integer id);
int updateProductSku(ProductDO productDO);
int updateProductSku(ProductDO productDO);
int countListPageProductSku(ProductSkuQO productSkuQO);
int countListPageProductSku(ProductSkuQO productSkuQO);
List<ProductDO> listPageProductSku(ProductSkuQO productSkuQO);
List<ProductDO> listPageProductSku(ProductSkuQO productSkuQO);
int countSpecName(ProductSpecVO param);
int countSpecName(ProductSpecVO param);
int insertProductSpec(ProductSpecDO productSpecDO);
int insertProductSpec(ProductSpecDO productSpecDO);
int updateProductSpec(ProductSpecDO productSpecDO);
int updateProductSpec(ProductSpecDO productSpecDO);
int countSpecIsExist(Integer id);
int countSpecIsExist(Integer id);
ProductSpecDO getProductSpecDetail(Integer id);
ProductSpecDO getProductSpecDetail(Integer id);
int countListPageProductSpec(@Param("id") Integer id, @Param("keyword") String keyword);
int countListPageProductSpec(@Param("id") Integer id, @Param("keyword") String keyword);
List<ProductSpecDO> listPageProductSpec(
@Param(value = "pageNo") Integer pageNo,
@Param(value = "pageSize") Integer pageSize,
@Param(value = "productId") Integer productId,
@Param(value = "keyword") String keyword);
List<ProductSpecDO> listPageProductSpec(
@Param(value = "pageNo") Integer pageNo,
@Param(value = "pageSize") Integer pageSize,
@Param(value = "productId") Integer productId,
@Param(value = "keyword") String keyword);
int batchInsertSpecPrice(List<ProductSpecPriceDO> list);
int batchInsertSpecPrice(List<ProductSpecPriceDO> list);
void batchInsertLeaseSpecPrice(List<ProductSpecPriceDO> list);
void batchInsertLeaseSpecPrice(List<ProductSpecPriceDO> list);
void removeProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
void removeProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPrice(ProductSpecCPQVO productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPrice(ProductSpecCPQVO productSpecCPQVO);
void insertMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
void insertMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
List<ProductSpecDO> listProductSpec(Integer id);
List<ProductSpecDO> listProductSpec(Integer id);
List<ProductDO> listProductSkuDO(List<Integer> productId);
List<ProductDO> listProductSkuDO(List<Integer> productId);
List<InventorySpecDO> listInventorySpecInfo(List<Integer> industryProductInventoryIds);
List<InventorySpecDO> listInventorySpecInfo(List<Integer> industryProductInventoryIds);
List<ProductSpecDO> listProductSpecInfo(List<Integer> productSpecIds);
List<ProductSpecDO> listProductSpecInfo(List<Integer> productSpecIds);
void batchUpdateMallProdSpec(List<Integer> delProductSpecId);
void batchUpdateMallProdSpec(List<Integer> delProductSpecId);
int countProductSpecByBrandId(Integer id);
void removeProductSku(Integer id);
void removeProductSku(Integer id);
void removeProductSpec(Integer id);
void removeProductSpec(Integer id);
List<IndustrySpecDO> listIndustrySpec(@Param("industrySpecIds") Set<Integer> industrySpecIds);
List<IndustrySpecDO> listIndustrySpec(@Param("industrySpecIds") Set<Integer> industrySpecIds);
List<InventorySpecDO> listInventorySpec(Integer id);
List<InventorySpecDO> listInventorySpec(Integer id);
List<BigDecimal> feignGetUnitPriceByTag(PriceAcquisition priceAcquisition);
List<BigDecimal> feignGetUnitPriceByTag(PriceAcquisition priceAcquisition);
List<MallGoodsSpecInfoDO> listProdSpecInfo(@Param("prodIds") Set<Integer> prodIds);
List<MallGoodsSpecInfoDO> listProdSpecInfo(@Param("prodIds") Set<Integer> prodIds);
/**
* 根据渠道等级、商品specId获取price信息
*
* @param tagInfoId
* @param prodSkuSpecIds
* @return
*/
List<ProductSpecPriceDO> listProductSpecPrice(Integer tagInfoId, Set<Integer> prodSkuSpecIds);
/**
* 根据渠道等级、商品specId获取price信息
*
* @param tagInfoId
* @param prodSkuSpecIds
* @return
*/
List<ProductSpecPriceDO> listProductSpecPrice(Integer tagInfoId, Set<Integer> prodSkuSpecIds);
ProductSpecPriceDTO feignGetUnitPrice(Integer id, Integer tagId);
ProductSpecPriceDTO feignGetUnitPrice(Integer id, Integer tagId);
List<ProductSpecDO> getProductSpecList(List<Integer> productIds);
List<ProductSpecDO> getProductSpecList(List<Integer> productIds);
List<MallProdSkuInfoSpecDO> getProductSpecByIds(List<Integer> delProductSpecId);
List<MallProdSkuInfoSpecDO> getProductSpecByIds(List<Integer> delProductSpecId);
Set<Integer> listProductSpecIds(@Param("mallProdSkuSpecIds") Set<Integer> mallProdSkuSpecIds);
Set<Integer> listProductSpecIds(@Param("mallProdSkuSpecIds") Set<Integer> mallProdSkuSpecIds);
List<OrderGoodsProdDTO> listProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
List<OrderGoodsProdDTO> listProdGoodsSkuInfo(MallOrderGoodsInfoQO mallOrderGoodsInfoQO);
List<MallProdSkuInfoSpecDO> listMallProductSpec(Integer id);
List<MallProdSkuInfoSpecDO> listMallProductSpec(Integer id);
List<ProductSpecPriceDO> getProductSpecPriceList(List<Integer> specIds);
List<ProductSpecPriceDO> getProductSpecPriceList(List<Integer> specIds);
ProductSpecPriceDO getProductSpecPriceById(Integer id);
ProductSpecPriceDO getProductSpecPriceById(Integer id);
List<DirectoryDO> productDirectoryList();
List<DirectoryDO> productDirectoryList();
List<ProductSpecPriceDO> listAllProductSpecPriceByType(
@Param("prodSkuSpecIds") Set<Integer> prodSkuSpecIds);
List<ProductSpecPriceDO> listAllProductSpecPriceByType(
@Param("prodSkuSpecIds") Set<Integer> prodSkuSpecIds);
int countSpecByProdSkuId(Integer id);
int countSpecByProdSkuId(Integer id);
BigDecimal getMarketplacePrice(PriceAcquisition priceAcquisition);
BigDecimal getMarketplacePrice(PriceAcquisition priceAcquisition);
int countLeaseGoodsByBrandId(Integer id);
}
......@@ -30,4 +30,7 @@ public interface ProductAttributeDao {
int updateProductAttribute(Integer id, Date createTime);
int countLeaseGoodsByTypeId(Integer id);
int countDeviceMode(Integer id);
}
......@@ -32,4 +32,10 @@ public interface CompanyInspectionDao {
int countListAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO);
List<CompanyInspectionDO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO);
void batchDeleteFile(List<Integer> list);
void removeByCompanyInfoId(Integer companyInfoId);
List<CompanyInspectionDO> listAPPCompanyInspectionPageByCompanyId(List<Integer> list);
}
......@@ -25,5 +25,9 @@ public interface IndustryTypeDao {
List<IndustryTypeDO> listPages(IndustryTypeQO industryTypeQO);
List<IndustryTypeDO> listIndustry(IndustryTypeQO industryTypeQO);
List<InspectionDO> listInspectionsByIndustryTypeIdId(Integer industryTypeId);
IndustryTypeDO getIndustryTypeById(Integer id);
}
......@@ -16,4 +16,6 @@ public interface InspectionDao {
void update(InspectionDO inspectionDO);
void remove(Integer id);
InspectionDO getInspectionById(Integer id);
}
......@@ -11,7 +11,7 @@ import java.util.List;
*/
@Mapper
public interface InspectionTagDao {
int countSameName(String tagName);
int countSameName(Integer id, String tagName, Integer inspectionId);
void insert(InspectionTagDO inspectionTagDO);
......
package com.mmc.pms.dao.lease;
import com.mmc.pms.entity.lease.*;
import com.mmc.pms.entity.mall.MallGoodsResourcesDO;
import com.mmc.pms.entity.mall.SpecAttrDO;
import com.mmc.pms.entity.mall.SpecAttrValueDO;
import com.mmc.pms.model.lease.qo.LeaseGoodsQO;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import com.mmc.pms.model.mall.SpecAttrVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* @Author LW
......@@ -9,4 +19,57 @@ import org.apache.ibatis.annotations.Mapper;
*/
@Mapper
public interface LeaseGoodsDao {
int countLeaseGoodsByName(@Param("leaseGoodsVO") LeaseGoodsVO leaseGoodsVO, @Param("userAccountId") Integer userAccountId);
int countLeaseGoodsByUserAccountId(Integer userAccountId);
void insertLeaseGoodsBaseInfo(LeaseGoodsDO leaseGoodsDO);
void batchInsertLeaseGoodsResources(List<MallGoodsResourcesDO> mallGoodsResourcesList);
void insertSpecAttr(SpecAttrDO specAttrDO);
void batchInsertSpecAttr(List<SpecAttrValueDO> list);
void batchInsertPriceStock(List<LeasePriceStockDO> list);
void batchInsertLeaseParts(List<LeasePartsListDO> list);
List<LeaseTermInfoDO> getLeaseTermInfo();
LeaseGoodsDO getLeaseGoodsBaseInfo(Integer id);
List<LeaseGoodsResourcesDO> getLeaseGoodsResources(Integer id);
List<LeaseSpecAttrDO> listSpecAttr(Integer id);
List<LeasePriceStockDO> listPriceStock(Integer id);
List<LeasePartsListDO> listLeasePartsListDO(Integer id);
void updateLeaseGoodsBaseInfo(LeaseGoodsDO leaseGoodsDO);
void deleteLeaseGoodsResources(Integer id);
void deleteLeasePartsList(Integer id);
void deleteSpecAttr(List<Integer> list);
void deleteLeasePriceStock(Integer id);
List<LeaseSpecAttrDO> getLeaseSpecAttr(List<Integer> ids);
void updateSpecAttr(SpecAttrVO specAttrVO);
void deleteSpecAttrValue(List<Integer> delValueIds);
int countLeaseGoods(LeaseGoodsQO param);
List<LeaseGoodsDO> listLeaseGoods(LeaseGoodsQO param);
void batchOnShelfOrTakeDown(@Param("list") List<Integer> list, @Param("status") Integer status);
void removeWareInfo(List<Integer> list);
Integer feignLeaseGoodsInfoByAddressId(Integer id);
}
......@@ -14,4 +14,7 @@ import java.util.List;
@Mapper
public interface AppMallGoodsDao {
List<MallGoodsDO> queryGoodsInfo(@Param("userAccountId") Integer userAccountId, @Param("categorySubIds") List<Integer> categorySubIds);
List<MallGoodsDO> brandStoreList(List<Integer> list);
}
......@@ -2,6 +2,7 @@ package com.mmc.pms.entity.inspection;
import com.mmc.pms.model.inspection.dto.CompanyInspectionDTO;
import com.mmc.pms.model.inspection.vo.CompanyInspectionVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
......@@ -65,6 +66,7 @@ public class CompanyInspectionDO implements Serializable {
private String remark;
private Date createTime;
IndustryTypeDO industryTypeDO;
InspectionDO inspectionDO;
InspectionTagDO inspectionTagDO;
......
......@@ -72,7 +72,7 @@ public class InspectionDO implements Serializable {
public InspectionDTO buildInspectionDTO(){
return InspectionDTO.builder().id(this.id).industryTypeId(this.industryTypeId).inspectionNo(this.inspectionNo)
.inspectionName(this.inspectionName).inspectionDescription(this.inspectionDescription).inspectionImg(this.inspectionImg)
.saleState(this.saleState).caseImg(this.caseImg).caseVideo(this.caseVideo).build();
.saleState(this.saleState).caseImg(this.caseImg).caseVideo(this.caseVideo).createTime(this.createTime).build();
}
}
package com.mmc.pms.entity.lease;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 租赁商品信息(LeaseGoodsDO)实体类
*
* @author makejava
* @since 2023-08-11 14:53:01
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LeaseGoodsDO implements Serializable {
private static final long serialVersionUID = -99441568098401769L;
private Integer id;
/**
* 商品名称
*/
private String tradeName;
/**
* 商品卖点
*/
private String sellingPoint;
/**
* 商品成新
*/
private Integer level;
/**
* 状态:0: 下架 1:上架
*/
private Integer shelfStatus;
/**
* 商品类型
*/
private Integer productTypeId;
/**
* 品牌id
*/
private Integer brandInfoId;
/**
* 型号id
*/
private Integer deviceModeId;
/**
* 商品参数
*/
private String productParam;
/**
* 商品详情
*/
private String productDetails;
/**
* 最短租期
*/
private Integer minLeaseTerm;
/**
* 最长租期
*/
private Integer maxLeaseTerm;
/**
* 发货地址
*/
private Integer shipAddress;
/**
* 归还地址
*/
private Integer returnAddress;
/**
* 寄出物流
*/
private String logisticsCompany;
/**
* 配送方式
*/
private Integer modeOfDelivery;
/**
* 上架店铺id
*/
private Integer userAccountId;
private BigDecimal showPrice;
private Date createTime;
private Date updateTime;
private Integer sort;
private String districtCode;
/**
* 辅助字段 begin
*/
// 图片
private List<LeaseGoodsResourcesDO> leaseGoodsResources;
// 规格排列组合
private List<LeasePriceStockDO> priceStockList;
private String modeOfDeliveryInfo;
private String brandName;
private String productTypeName;
private String deviceModeName;
/**
* 辅助字段end
*/
public LeaseGoodsDO(LeaseGoodsVO leaseGoodsVO) {
this.id = leaseGoodsVO.getId();
this.tradeName = leaseGoodsVO.getTradeName();
this.sellingPoint = leaseGoodsVO.getSellingPoint();
this.level = leaseGoodsVO.getLevel();
this.shelfStatus = leaseGoodsVO.getShelfStatus();
this.productTypeId = leaseGoodsVO.getProductTypeId();
this.brandInfoId = leaseGoodsVO.getBrandInfoId();
this.deviceModeId = leaseGoodsVO.getDeviceModeId();
this.productParam = leaseGoodsVO.getProductParam();
this.productDetails = leaseGoodsVO.getProductDetails();
this.minLeaseTerm = leaseGoodsVO.getMinLeaseTerm();
this.maxLeaseTerm = leaseGoodsVO.getMaxLeaseTerm();
this.showPrice = leaseGoodsVO.getShowPrice();
this.shipAddress = leaseGoodsVO.getShipAddress();
this.returnAddress = leaseGoodsVO.getReturnAddress();
this.logisticsCompany = leaseGoodsVO.getLogisticsCompany();
this.modeOfDelivery = leaseGoodsVO.getModeOfDelivery();
this.districtCode = leaseGoodsVO.getDistrictCode();
}
public LeaseGoodsVO buildLeaseGoodsVO() {
return LeaseGoodsVO.builder().id(id).tradeName(tradeName).showPrice(showPrice).deviceModeName(deviceModeName)
.sellingPoint(sellingPoint).level(level).shelfStatus(shelfStatus).modeOfDeliveryInfo(modeOfDeliveryInfo)
.productTypeId(productTypeId).brandInfoId(brandInfoId).deviceModeId(deviceModeId).brandName(brandName)
.productParam(productParam).productDetails(productDetails).minLeaseTerm(minLeaseTerm).productTypeName(productTypeName)
.maxLeaseTerm(maxLeaseTerm).shipAddress(shipAddress).returnAddress(returnAddress)
.logisticsCompany(logisticsCompany).modeOfDelivery(modeOfDelivery).createTime(createTime)
.userAccountId(userAccountId).resourcesList(CollectionUtils.isEmpty(leaseGoodsResources)
? null : leaseGoodsResources.stream().map(LeaseGoodsResourcesDO::buildGoodsResourcesVO).collect(Collectors.toList()))
.priceStock(CollectionUtils.isEmpty(priceStockList)
? null : priceStockList.stream().map(LeasePriceStockDO::buildPriceStockVO).collect(Collectors.toList()))
.build();
}
}
package com.mmc.pms.entity.lease;
import com.mmc.pms.model.mall.GoodsResourcesVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* (LeaseGoodsResourcesDO)实体类
*
* @author makejava
* @since 2023-08-11 14:53:12
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LeaseGoodsResourcesDO implements Serializable {
private static final long serialVersionUID = 184452413040400338L;
private Integer id;
private Integer mallGoodsId;
/**
* 资源url
*/
private String url;
/**
* 类型:0主图 1副图 2视频
*/
private Integer type;
private Date createTime;
private Date updateTime;
public GoodsResourcesVO buildGoodsResourcesVO() {
return GoodsResourcesVO.builder().id(id).url(url).type(type).build();
}
}
package com.mmc.pms.entity.lease;
import com.mmc.pms.model.lease.vo.LeasePartsListVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* (LeasePartsListDO)实体类
*
* @author makejava
* @since 2023-08-11 14:53:22
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LeasePartsListDO implements Serializable {
private static final long serialVersionUID = 474304471357903661L;
private Integer id;
private Integer leaseGoodsId;
private String name;
private Integer number;
private BigDecimal price;
public LeasePartsListDO(LeasePartsListVO param) {
this.id = param.getId();
this.number = param.getNumber();
this.name = param.getName();
this.price = param.getPrice();
}
public LeasePartsListVO buildLeasePartsListVO() {
return LeasePartsListVO.builder().id(id).name(name).number(number).price(price).build();
}
}
package com.mmc.pms.entity.lease;
import com.mmc.pms.model.lease.vo.LeasePriceStockVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 价格库存表(LeasePriceStockDO)实体类
*
* @author makejava
* @since 2023-08-11 14:55:42
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LeasePriceStockDO implements Serializable {
private static final long serialVersionUID = 909783790755484524L;
private Integer id;
/**
* 租赁商品id
*/
private Integer leaseGoodsId;
/**
* 商品规格
*/
private String productSpec;
/**
* sku图片
*/
private String skuImage;
/**
* 押金
*/
private BigDecimal cashPledge;
/**
* 3天租金
*/
private BigDecimal threeDaysRental;
/**
* 7天租金
*/
private BigDecimal sevenDaysRental;
/**
* 30天租金
*/
private BigDecimal thirtyDaysRental;
/**
* 90天租金
*/
private BigDecimal ninetyDaysRental;
/**
* 180天租金
*/
private BigDecimal maxDaysRental;
/**
* 库存
*/
private Integer stock;
/**
* 0:否 1:是
*/
private Integer stockOut;
private Date createTime;
private Date updateTime;
public LeasePriceStockDO(LeasePriceStockVO param, Integer id) {
this.leaseGoodsId = id;
this.productSpec = param.getProductSpec();
this.cashPledge = param.getCashPledge();
this.skuImage = param.getSkuImage();
this.stock = param.getStock();
this.threeDaysRental = param.getThreeDaysRental();
this.sevenDaysRental = param.getSevenDaysRental();
this.thirtyDaysRental = param.getThirtyDaysRental();
this.ninetyDaysRental = param.getNinetyDaysRental();
this.maxDaysRental = param.getMaxDaysRental();
this.stockOut = param.getStockOut();
}
public LeasePriceStockVO buildPriceStockVO() {
return LeasePriceStockVO.builder().id(id).productSpec(productSpec)
.cashPledge(cashPledge).threeDaysRental(threeDaysRental)
.sevenDaysRental(sevenDaysRental).thirtyDaysRental(thirtyDaysRental)
.ninetyDaysRental(ninetyDaysRental).maxDaysRental(maxDaysRental)
.skuImage(skuImage).stock(stock).stockOut(stockOut).build();
}
}
package com.mmc.pms.entity.lease;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* (LeaseServiceDO)实体类
*
* @author makejava
* @since 2023-08-11 14:56:08
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LeaseServiceDO implements Serializable {
private static final long serialVersionUID = -10400818294747116L;
private Integer id;
private Integer goodsInfoId;
private Integer saleServiceId;
private Date createTime;
}
package com.mmc.pms.entity.lease;
import com.mmc.pms.model.mall.SpecAttrVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.collections4.CollectionUtils;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
* 规格属性表(LeaseSpecAttrDO)实体类
*
* @author makejava
* @since 2023-08-11 14:56:29
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LeaseSpecAttrDO implements Serializable {
private static final long serialVersionUID = -71136469129605718L;
private Integer id;
/**
* 商品id
*/
private Integer mallGoodsId;
/**
* 规格名称
*/
private String specName;
private Date createTime;
private Date updateTime;
private List<LeaseSpecAttrValueDO> leaseSpecAttrValues;
public SpecAttrVO buildSpecAttrVO() {
return SpecAttrVO.builder().id(id).specName(specName)
.specValuesList(CollectionUtils.isEmpty(leaseSpecAttrValues) ? null
: this.leaseSpecAttrValues.stream().map(LeaseSpecAttrValueDO::buildSpecAttr).collect(Collectors.toList())).build();
}
}
package com.mmc.pms.entity.lease;
import com.mmc.pms.model.mall.SpecAttrVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* 规格属性表(LeaseSpecAttrValueDO)实体类
*
* @author makejava
* @since 2023-08-11 14:56:41
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LeaseSpecAttrValueDO implements Serializable {
private static final long serialVersionUID = -96267116189395775L;
private Integer id;
private Integer specAttrId;
/**
* 规格值名称
*/
private String specValueName;
private Date createTime;
public SpecAttrVO buildSpecAttr() {
return SpecAttrVO.builder().id(id).specName(specValueName).build();
}
}
package com.mmc.pms.entity.lease;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* (LeaseTermInfoDO)实体类
*
* @author makejava
* @since 2023-08-11 14:56:52
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class LeaseTermInfoDO implements Serializable {
private static final long serialVersionUID = 273133269479111689L;
private Integer id;
private String leaseDate;
}
......@@ -78,6 +78,7 @@ public class MallGoodsDO implements Serializable {
private String url;
private Integer type;
private Integer imgId;
private List<MallGoodsDO> mallGoodsDOList;
public MallGoodsDO(MallGoodsVO mallGoodsVO) {
this.id = mallGoodsVO.getId();
......
package com.mmc.pms.enums;
/**
* @author: zj
* @Date: 2023/8/14 16:52
*/
public enum UserTypeEnums {
PC(0, "后台用户"), APP(100, "小程序用户");
UserTypeEnums(Integer type, String typeName) {
this.type = type;
this.typeName = typeName;
}
public Integer getType() {
return type;
}
public String getTypeName() {
return typeName;
}
private Integer type;
private String typeName;
}
......@@ -87,4 +87,7 @@ public interface UserAppApi {
@PostMapping("/userapp/company/listCompanyInfoByIds")
List<CompanyInfoVO> feignListCompanyInfoByIds(@RequestBody List<Integer> ids, @RequestHeader("token") String token);
@PostMapping("/userapp/company/listCompanyInfoByBUIds")
List<CompanyInfoVO> listCompanyInfoByBUIds(@RequestBody List<Integer> backUserAccountIds);
}
......@@ -59,4 +59,10 @@ public class UserAppApiHystrix implements UserAppApi {
log.error("熔断:feignListCompanyInfoByIds:{}", ids);
return null;
}
@Override
public List<CompanyInfoVO> listCompanyInfoByBUIds(List<Integer> backUserAccountIds) {
log.error("熔断:listCompanyInfoByBUIds:{}", backUserAccountIds);
return null;
}
}
package com.mmc.pms.model;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.model.other.dto.RoleInfoDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Email;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/21 17:32
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BackUserAccountVO implements Serializable {
private static final long serialVersionUID = -9128622882856324055L;
@ApiModelProperty(value = "用户id")
private Integer id;
@ApiModelProperty(value = "用户uid")
private Integer uid;
@ApiModelProperty(value = "用户账号")
private String accountNo;
@ApiModelProperty(value = "手机号")
private String phoneNum;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "用户昵称")
private String nickName;
@ApiModelProperty(value = "用户头像")
private String userImg;
@ApiModelProperty(value = "用户性别:0未知、1男、2女")
private Integer userSex;
@ApiModelProperty(value = "用户邮箱")
@Email
private String email;
@ApiModelProperty(value = "用户可用状态:0禁用、1可用")
private Integer accountStatus;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "注册时间")
private Date createTime;
@ApiModelProperty(value = "企业认证状态, 0未通过,1通过")
private Integer companyAuthStatus;
@ApiModelProperty(value = "合作标签id")
private Integer cooperationTagId;
@ApiModelProperty(value = "企业名称")
private String companyName;
@ApiModelProperty(value = "合作标签名称")
private String tagName;
@ApiModelProperty(value = "地址")
private String address;
@ApiModelProperty(value = "禁用状态")
private Integer disable;
@ApiModelProperty(value = "单位信息")
private CompanyInfoVO companyInfoVO;
@ApiModelProperty(value = "角色信息")
private RoleInfoDTO roleInfoDTO;
}
package com.mmc.pms.model.inspection.dto;
import com.mmc.pms.model.inspection.dto.CompanyInspectionDTO;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.List;
/**
* @author: zj
* @Date: 2023/8/18 18:17
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AppCompanyInspectionDTO implements Serializable {
private static final long serialVersionUID = 4264333277454048626L;
private Integer companyInfoId;
private List<CompanyInspectionDTO> companyInspectionList;
}
......@@ -7,6 +7,7 @@ import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
......@@ -37,6 +38,8 @@ public class InspectionDTO implements Serializable {
private String caseImg;
@ApiModelProperty(value = "案例视频")
private String caseVideo;
@ApiModelProperty(value = "创建时间")
private Date createTime;
@ApiModelProperty(value = "团队服务列表")
List<CompanyInspectionDTO> companyInspectionDTOS;
}
package com.mmc.pms.model.lease.qo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.domain.Page;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @Author LW
* @date 2023/8/15 10:47
* 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class LeaseGoodsQO implements Serializable {
private static final long serialVersionUID = -3779375235771767532L;
@ApiModelProperty(value = "上架状态 0下架 1上架")
private Integer shelfStatus;
@ApiModelProperty(value = "商品标题", example = "商品标题")
private String tradeName;
@ApiModelProperty(value = "商品类型id", example = "1")
private Integer productTypeId;
@ApiModelProperty(value = "品牌id", example = "2")
private Integer brandInfoId;
@ApiModelProperty(value = "用户id", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "发货地")
private String districtCode;
@ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true)
@NotNull(message = "每页显示数不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
}
package com.mmc.pms.model.lease.vo;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Update;
import com.mmc.pms.model.mall.GoodsResourcesVO;
import com.mmc.pms.model.mall.SpecAttrVO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
/**
* @Author LW
* @date 2023/7/24 17:44
* 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class LeaseGoodsVO implements Serializable {
private static final long serialVersionUID = -3147170430919703826L;
@ApiModelProperty(value = "id", example = "1")
@NotNull(message = "id不能为空", groups = {Update.class})
private Integer id;
@ApiModelProperty(value = "商品标题", example = "商品标题", required = true)
@NotEmpty(message = "商品标题不能为空", groups = {Update.class, Create.class})
private String tradeName;
@ApiModelProperty(value = "商品卖点", example = "商品卖点")
private String sellingPoint;
@ApiModelProperty(value = "商品成新", example = "1", required = true)
private Integer level;
@ApiModelProperty(value = "商品状态 :0下架 1上架", example = "1", required = true)
@NotNull(message = "商品状态不能为空", groups = {Update.class, Create.class})
private Integer shelfStatus;
@ApiModelProperty(value = "商品类型id", example = "1", required = true)
@NotNull(message = "商品类型id不能为空", groups = {Update.class, Create.class})
private Integer productTypeId;
@ApiModelProperty(value = "品牌id", example = "2", required = true)
@NotNull(message = "品牌id不能为空", groups = {Update.class, Create.class})
private Integer brandInfoId;
@ApiModelProperty(value = "型号id", example = "2", required = true)
@NotNull(message = "型号id不能为空", groups = {Update.class, Create.class})
private Integer deviceModeId;
@ApiModelProperty(value = "商品参数", example = "示例:[{\"起飞重量\":\"595g\"}]")
private String productParam;
@ApiModelProperty(value = "商品资源:图片or视频及其他")
@NotEmpty(message = "图片不能为空")
private List<GoodsResourcesVO> resourcesList;
@ApiModelProperty(value = "规格")
@NotEmpty(message = "规格不能为空", groups = {Update.class, Create.class})
private List<SpecAttrVO> specAttrList;
@ApiModelProperty(value = "价格库存排列组合表信息")
private List<LeasePriceStockVO> priceStock;
@ApiModelProperty(value = "商品详情 富文本")
private String productDetails;
@ApiModelProperty(value = "最短租期")
private Integer minLeaseTerm;
@ApiModelProperty(value = "最长租期")
private Integer maxLeaseTerm;
@ApiModelProperty(value = "配件清单")
private List<LeasePartsListVO> leasePartsList;
@ApiModelProperty(value = "发货地址")
private Integer shipAddress;
@ApiModelProperty(value = "归还地址")
private Integer returnAddress;
@ApiModelProperty(value = "寄出物流")
private String logisticsCompany;
@ApiModelProperty(value = "配送方式")
private Integer modeOfDelivery;
@ApiModelProperty(value = "展示最低价", example = "1")
private BigDecimal showPrice;
@ApiModelProperty(value = "创建时间 用作列表回显", hidden = true)
private Date createTime;
@ApiModelProperty(value = "店铺id 小程序用", hidden = true)
private Integer userAccountId;
@ApiModelProperty(value = "押金范围", hidden = true)
private String cashPledgeRange;
@ApiModelProperty(value = "租金范围", hidden = true)
private String rentalRange;
@ApiModelProperty(value = "库存", hidden = true)
private Integer stock;
@ApiModelProperty(value = "市code编码")
private String districtCode;
@ApiModelProperty(value = "类型名称", hidden = true)
private String productTypeName;
@ApiModelProperty(value = "品牌名称", hidden = true)
private String brandName;
@ApiModelProperty(value = "型号名称", hidden = true)
private String deviceModeName;
@ApiModelProperty(value = "配送方式信息", hidden = true)
private String modeOfDeliveryInfo;
@ApiModelProperty(value = "企业名称",hidden = true)
private String companyName;
}
package com.mmc.pms.model.lease.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
/**
* @Author LW
* @date 2023/8/11 14:43
* 概要:
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class LeasePartsListVO {
private Integer id;
private String name;
private Integer number;
private BigDecimal price;
}
package com.mmc.pms.model.lease.vo;
import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Max;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;
import java.math.BigDecimal;
/**
* @Author LW
* @date 2023/8/8 10:48
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class LeasePriceStockVO implements Serializable {
private static final long serialVersionUID = 1011141620995647903L;
@ApiModelProperty(value = "id", example = "1")
private Integer id;
@ApiModelProperty(value = "商品规格", example = "示例:{\"颜色\":\"蓝色\",\"尺寸\":\"1寸\",\"大小\":\"小\"} 或 [\"颜色\":\"蓝色\",\"尺寸\":\"1寸\",\"大小\":\"小\"] 或 你怎么方便怎么来")
@NotEmpty(message = "商品规格不能为空", groups = {Update.class, Create.class})
private String productSpec;
@ApiModelProperty(value = "押金", example = "1")
private BigDecimal cashPledge;
@ApiModelProperty(value = "3天租金", example = "1")
private BigDecimal threeDaysRental;
@ApiModelProperty(value = "7天租金", example = "1")
private BigDecimal sevenDaysRental;
@ApiModelProperty(value = "30天租金", example = "1")
private BigDecimal thirtyDaysRental;
@ApiModelProperty(value = "90天租金", example = "1")
private BigDecimal ninetyDaysRental;
@ApiModelProperty(value = "180天租金", example = "1")
private BigDecimal maxDaysRental;
@ApiModelProperty(value = "sku图片", example = "https://pad-video-x.oss-cn-shenzhen.aliyuncs.com/file/35bbd044-7cd7-4c85-ba27-69776e03dbb2.jpg")
private String skuImage;
@ApiModelProperty(value = "库存", example = "10")
@Max(message = "最大不能超过9999", groups = {Update.class, Create.class}, value = 9999)
private Integer stock;
@ApiModelProperty(value = "是否缺货 0:否 1:是")
private Integer stockOut;
}
package com.mmc.pms.model.mall;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.List;
/**
* @Author LW
* @date 2023/8/18 16:33
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class GoodsListVO {
@ApiModelProperty(value = "店铺id")
private Integer userAccountId;
@ApiModelProperty(value = "商品信息")
List<MallGoodsVO> mallGoodsVOList;
}
......@@ -30,6 +30,8 @@ public class CompanyInspectionQO implements Serializable {
private Integer inspectionId;
@ApiModelProperty(value = "作业团队id")
private Integer companyInfoId;
@ApiModelProperty(value = "标签id")
private Integer inspectionTagId;
@ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
......
......@@ -54,4 +54,6 @@ public interface BrandManageService {
PageResult modeList(ModeInfoQO param);
ResultBody editMode(ModeInfoVO param);
ResultBody deleteMode(Integer id);
}
......@@ -47,6 +47,12 @@ public class ProductAttributeServiceImpl implements ProductAttributeService {
@Override
public ResultBody removeType(Integer id) {
// 判断该类型是否绑定产品信息
int count = productAttributeDao.countLeaseGoodsByTypeId(id);
int deviceModeCount = productAttributeDao.countDeviceMode(id);
if (count > 0 || deviceModeCount > 0) {
return ResultBody.error(ResultEnum.TYPE_DELETE_FAIL);
}
productAttributeDao.removeType(id);
return ResultBody.success();
}
......
......@@ -86,7 +86,7 @@ public class BrandManageServiceImpl implements BrandManageService {
@Override
public ResultBody deleteBrandInfo(Integer id) {
// 判断该品牌是否绑定产品信息
int count = productDao.countProductSpecByBrandId(id);
int count = productDao.countLeaseGoodsByBrandId(id);
if (count > 0) {
return ResultBody.error(ResultEnum.BRAND_DELETE_FAIL);
}
......@@ -142,5 +142,14 @@ public class BrandManageServiceImpl implements BrandManageService {
return ResultBody.success();
}
@Override
public ResultBody deleteMode(Integer id) {
// 判断该品牌是否绑定产品信息
int count = brandManageDao.countLeaseGoodsByDeviceModeId(id);
if (count > 0) {
return ResultBody.error(ResultEnum.DEVICE_MODE_DELETE_FAIL);
}
brandManageDao.removeModeInfoById(id);
return ResultBody.success();
}
}
......@@ -2,11 +2,14 @@ package com.mmc.pms.service.inspection;
import com.mmc.pms.auth.dto.LoginSuccessDTO;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.inspection.dto.AppCompanyInspectionDTO;
import com.mmc.pms.model.inspection.dto.CompanyInspectionDTO;
import com.mmc.pms.model.inspection.dto.IndustryTypeDTO;
import com.mmc.pms.model.inspection.vo.CompanyInspectionVO;
import com.mmc.pms.model.qo.CompanyInspectionQO;
import java.util.List;
/**
* @author: zj
* @Date: 2023/8/7 14:31
......@@ -18,7 +21,7 @@ public interface CompanyInspectionService {
ResultBody remove(Integer id);
ResultBody<CompanyInspectionDTO> getCompanyInspectionById(Integer id, LoginSuccessDTO loginSuccessDTO);
ResultBody<CompanyInspectionDTO> getCompanyInspectionById(Integer id);
ResultBody<CompanyInspectionDTO> listCompanyInspectionPage(CompanyInspectionQO companyInspectionQO, LoginSuccessDTO loginSuccessDTO);
......@@ -26,5 +29,9 @@ public interface CompanyInspectionService {
ResultBody listInspectionPriceUnit();
ResultBody<IndustryTypeDTO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO, LoginSuccessDTO loginSuccessDTO);
ResultBody<IndustryTypeDTO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO);
void removeCompanyInspectionByCompanyInfoId(Integer companyInfoId);
ResultBody<AppCompanyInspectionDTO> listAPPCompanyInspectionPageByCompanyId(List<Integer> companyInfoIds);
}
......@@ -5,6 +5,8 @@ import com.mmc.pms.model.inspection.dto.IndustryTypeDTO;
import com.mmc.pms.model.inspection.vo.IndustryTypeVO;
import com.mmc.pms.model.qo.IndustryTypeQO;
import java.util.List;
/**
* @author: zj
* @Date: 2023/8/3 18:00
......@@ -19,4 +21,8 @@ public interface IndustryTypeService {
ResultBody listPages(IndustryTypeQO industryTypeQO);
ResultBody<IndustryTypeDTO> listInspectionsByIndustryTypeId(Integer id);
ResultBody<IndustryTypeDTO> getIndustryTypeById(Integer id);
List<IndustryTypeDTO> listIndustry(IndustryTypeQO industryTypeQO);
}
package com.mmc.pms.service.inspection;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.inspection.dto.InspectionDTO;
import com.mmc.pms.model.inspection.vo.InspectionVO;
/**
......@@ -13,4 +14,6 @@ public interface InspectionService {
ResultBody update(InspectionVO inspectionVO);
ResultBody remove(Integer id);
ResultBody<InspectionDTO> detail(Integer id);
}
package com.mmc.pms.service.inspection.impl;
import com.alibaba.fastjson2.JSONObject;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.auth.dto.LoginSuccessDTO;
import com.mmc.pms.common.ResultBody;
......@@ -8,9 +9,13 @@ import com.mmc.pms.entity.inspection.CompanyInspectionDO;
import com.mmc.pms.enums.CompanyTypeEnums;
import com.mmc.pms.enums.InspectionPriceUnitEnums;
import com.mmc.pms.feign.UserAppApi;
import com.mmc.pms.model.inspection.dto.AppCompanyInspectionDTO;
import com.mmc.pms.model.inspection.dto.CompanyInspectionDTO;
import com.mmc.pms.model.inspection.dto.IndustryTypeDTO;
import com.mmc.pms.model.inspection.vo.CompanyInspectionFileVO;
import com.mmc.pms.model.inspection.vo.CompanyInspectionVO;
import com.mmc.pms.model.mall.GoodsListVO;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.model.qo.CompanyInspectionQO;
import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.inspection.CompanyInspectionService;
......@@ -23,6 +28,7 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @author: zj
......@@ -52,7 +58,24 @@ public class CompanyInspectionServiceImpl implements CompanyInspectionService {
public ResultBody update(CompanyInspectionVO companyInspectionVO) {
CompanyInspectionDO companyInspectionDO = new CompanyInspectionDO(companyInspectionVO);
companyInspectionDao.update(companyInspectionDO);
CompanyInspectionDO companyInspectionDO1 = companyInspectionDao.getCompanyInspectionById(companyInspectionVO.getId());
// 修改插入图片、视频
if (CollectionUtils.isNotEmpty(companyInspectionVO.getCompanyInspectionFiles())) {
// 要新增的
List<CompanyInspectionFileVO> collect = companyInspectionVO.getCompanyInspectionFiles().stream().filter(item -> item.getId() == null).collect(Collectors.toList());
if (CollectionUtils.isNotEmpty(collect)) {
collect.stream().forEach(i -> i.setCompanyInspectionId(companyInspectionVO.getId()));
companyInspectionDao.batchInsertCompanyInspectionFile(collect);
}
// 要删除的
List<Integer> retainIds = companyInspectionVO.getCompanyInspectionFiles().stream().filter(item -> item.getId() != null).map(item -> item.getId()).collect(Collectors.toList());
List<Integer> originIds = companyInspectionDO1.getInspectionFileDOS().stream().map(item -> item.getId()).collect(Collectors.toList());
// 移除保留的
originIds.removeAll(retainIds);
if (CollectionUtils.isNotEmpty(originIds)){
companyInspectionDao.batchDeleteFile(originIds);
}
}
return ResultBody.success();
}
......@@ -63,11 +86,11 @@ public class CompanyInspectionServiceImpl implements CompanyInspectionService {
}
@Override
public ResultBody<CompanyInspectionDTO> getCompanyInspectionById(Integer id, LoginSuccessDTO loginSuccessDTO) {
public ResultBody<CompanyInspectionDTO> getCompanyInspectionById(Integer id) {
CompanyInspectionDO companyInspectionDO = companyInspectionDao.getCompanyInspectionById(id);
if (companyInspectionDO != null) {
CompanyInspectionDTO companyInspectionDTO = companyInspectionDO.buildCompanyInspectionDTO();
ResultBody<CompanyInfoVO> res = userAppApi.getCompanyInfoById(companyInspectionDO.getCompanyInfoId(), loginSuccessDTO.getToken());
ResultBody<CompanyInfoVO> res = userAppApi.getCompanyInfoById(companyInspectionDO.getCompanyInfoId(), null);
if (res.getResult() != null) {
companyInspectionDTO.setCompanyName(res.getResult().getCompanyName());
}
......@@ -90,7 +113,7 @@ public class CompanyInspectionServiceImpl implements CompanyInspectionService {
List<CompanyInspectionDO> companyInspectionDOS = companyInspectionDao.listCompanyInspectionPage(companyInspectionQO);
List<CompanyInspectionDTO> companyInspectionDTOS = companyInspectionDOS.stream().map(CompanyInspectionDO::buildCompanyInspectionDTO).collect(Collectors.toList());
// 设置单位名称
setCompanyName(companyInspectionDTOS, loginSuccessDTO.getToken());
setCompanyName(companyInspectionDTOS);
return ResultBody.success(PageResult.buildPage(pageNo, companyInspectionQO.getPageSize(), count, companyInspectionDTOS));
}
......@@ -113,7 +136,7 @@ public class CompanyInspectionServiceImpl implements CompanyInspectionService {
}
@Override
public ResultBody<IndustryTypeDTO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO, LoginSuccessDTO loginSuccessDTO) {
public ResultBody<IndustryTypeDTO> listAPPCompanyInspectionPage(CompanyInspectionQO companyInspectionQO) {
int count = companyInspectionDao.countListAPPCompanyInspectionPage(companyInspectionQO);
if (count == 0) {
return ResultBody.success(PageResult.buildPage(companyInspectionQO.getPageNo(), companyInspectionQO.getPageSize(), count));
......@@ -122,14 +145,36 @@ public class CompanyInspectionServiceImpl implements CompanyInspectionService {
companyInspectionQO.buildCurrentPage();
List<CompanyInspectionDO> companyInspectionDOS = companyInspectionDao.listAPPCompanyInspectionPage(companyInspectionQO);
List<CompanyInspectionDTO> companyInspectionDTOS = companyInspectionDOS.stream().map(CompanyInspectionDO::buildCompanyInspectionDTO).collect(Collectors.toList());
setCompanyName(companyInspectionDTOS, loginSuccessDTO.getToken());
setCompanyName(companyInspectionDTOS);
return ResultBody.success(PageResult.buildPage(pageNo, companyInspectionQO.getPageSize(), count, companyInspectionDTOS));
}
public void setCompanyName(List<CompanyInspectionDTO> companyInspectionDTOS, String token){
@Override
public void removeCompanyInspectionByCompanyInfoId(Integer companyInfoId) {
companyInspectionDao.removeByCompanyInfoId(companyInfoId);
}
@Override
public ResultBody<AppCompanyInspectionDTO> listAPPCompanyInspectionPageByCompanyId(List<Integer> companyInfoIds) {
List<AppCompanyInspectionDTO> companyInspectionDTOS = new ArrayList<AppCompanyInspectionDTO>();
List<CompanyInspectionDO> companyInspectionDOS = companyInspectionDao.listAPPCompanyInspectionPageByCompanyId(companyInfoIds);
if (CollectionUtils.isNotEmpty(companyInspectionDOS)) {
List<CompanyInspectionDTO> collect = companyInspectionDOS.stream().map(CompanyInspectionDO::buildCompanyInspectionDTO).collect(Collectors.toList());
Map<Integer, List<CompanyInspectionDTO>> integerListMap = collect.stream().collect(Collectors.groupingBy(item -> item.getCompanyInfoId()));
for (Map.Entry<Integer, List<CompanyInspectionDTO>> entry : integerListMap.entrySet()) {
AppCompanyInspectionDTO appCompanyInspectionDTO = new AppCompanyInspectionDTO();
appCompanyInspectionDTO.setCompanyInfoId(entry.getKey());
appCompanyInspectionDTO.setCompanyInspectionList(entry.getValue());
companyInspectionDTOS.add(appCompanyInspectionDTO);
}
}
return ResultBody.success(companyInspectionDTOS);
}
public void setCompanyName(List<CompanyInspectionDTO> companyInspectionDTOS){
// 单位名称查询
List<Integer> companyInfoIds = companyInspectionDTOS.stream().map(i -> i.getCompanyInfoId()).collect(Collectors.toList());
List<CompanyInfoVO> companyInfoVOS = userAppApi.feignListCompanyInfoByIds(companyInfoIds, token);
List<CompanyInfoVO> companyInfoVOS = userAppApi.feignListCompanyInfoByIds(companyInfoIds, null);
if (CollectionUtils.isNotEmpty(companyInfoVOS)){
Map<Integer, String> collect = companyInfoVOS.stream().collect(Collectors.toMap(CompanyInfoVO::getId, CompanyInfoVO::getCompanyName));
companyInspectionDTOS.stream().forEach(i -> i.setCompanyName(collect.get(i.getCompanyInfoId())));
......
......@@ -52,6 +52,10 @@ public class IndustryTypeServiceImpl implements IndustryTypeService {
@Override
public ResultBody remove(Integer id) {
// 有绑定则不能删除
List<InspectionDO> inspectionDOS = industryTypeDao.listInspectionsByIndustryTypeIdId(id);
if (CollectionUtils.isNotEmpty(inspectionDOS)) {
return ResultBody.error(ResultEnum.UNBINDING_ERROR);
}
industryTypeDao.remove(id);
return ResultBody.success();
}
......@@ -78,4 +82,23 @@ public class IndustryTypeServiceImpl implements IndustryTypeService {
}
return ResultBody.success();
}
@Override
public ResultBody<IndustryTypeDTO> getIndustryTypeById(Integer id) {
IndustryTypeDO industryTypeDO = industryTypeDao.getIndustryTypeById(id);
if (industryTypeDO == null) {
return ResultBody.success();
}
return ResultBody.success(industryTypeDO.buildIndustryTypeDTO());
}
@Override
public List<IndustryTypeDTO> listIndustry(IndustryTypeQO industryTypeQO) {
List<IndustryTypeDO> industryTypeDOS = industryTypeDao.listIndustry(industryTypeQO);
if (CollectionUtils.isNotEmpty(industryTypeDOS)) {
List<IndustryTypeDTO> industryTypeDTOS = industryTypeDOS.stream().map(IndustryTypeDO::buildIndustryTypeDTO).collect(Collectors.toList());
return industryTypeDTOS;
}
return null;
}
}
......@@ -2,9 +2,13 @@ package com.mmc.pms.service.inspection.impl;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum;
import com.mmc.pms.dao.inspection.CompanyInspectionDao;
import com.mmc.pms.dao.inspection.InspectionDao;
import com.mmc.pms.entity.inspection.InspectionDO;
import com.mmc.pms.model.inspection.dto.InspectionDTO;
import com.mmc.pms.model.inspection.vo.InspectionVO;
import com.mmc.pms.model.qo.CompanyInspectionQO;
import com.mmc.pms.service.inspection.CompanyInspectionService;
import com.mmc.pms.service.inspection.InspectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
......@@ -18,6 +22,9 @@ public class InspectionServiceImpl implements InspectionService {
@Autowired
private InspectionDao inspectionDao;
@Autowired
private CompanyInspectionDao companyInspectionDao;
@Override
public ResultBody insert(InspectionVO inspectionVO) {
InspectionDO inspectionDO = new InspectionDO(inspectionVO);
......@@ -42,7 +49,23 @@ public class InspectionServiceImpl implements InspectionService {
@Override
public ResultBody remove(Integer id) {
// 有绑定则不能删除
CompanyInspectionQO companyInspectionQO = new CompanyInspectionQO();
companyInspectionQO.setInspectionId(id);
int count = companyInspectionDao.countListCompanyInspectionPage(companyInspectionQO);
if (count > 0) {
return ResultBody.error(ResultEnum.UNBINDING_ERROR_1);
}
inspectionDao.remove(id);
return ResultBody.success();
}
@Override
public ResultBody<InspectionDTO> detail(Integer id) {
InspectionDO inspectionDO = inspectionDao.getInspectionById(id);
if (inspectionDO == null) {
return ResultBody.success();
}
return ResultBody.success(inspectionDO.buildInspectionDTO());
}
}
......@@ -2,10 +2,12 @@ package com.mmc.pms.service.inspection.impl;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum;
import com.mmc.pms.dao.inspection.CompanyInspectionDao;
import com.mmc.pms.dao.inspection.InspectionTagDao;
import com.mmc.pms.entity.inspection.InspectionTagDO;
import com.mmc.pms.model.inspection.dto.InspectionTagDTO;
import com.mmc.pms.model.inspection.vo.InspectionTagVO;
import com.mmc.pms.model.qo.CompanyInspectionQO;
import com.mmc.pms.service.inspection.InspectionTagService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -23,9 +25,12 @@ public class InspectionTagServiceImpl implements InspectionTagService {
@Autowired
private InspectionTagDao inspectionTagDao;
@Autowired
private CompanyInspectionDao companyInspectionDao;
@Override
public ResultBody insert(InspectionTagVO inspectionTagVO) {
int count = inspectionTagDao.countSameName(inspectionTagVO.getTagName());
int count = inspectionTagDao.countSameName(inspectionTagVO.getId(), inspectionTagVO.getTagName(), inspectionTagVO.getInspectionId());
if (count > 0) {
return ResultBody.error(ResultEnum.NAME_DUPLICATION_ERROR);
}
......@@ -36,7 +41,7 @@ public class InspectionTagServiceImpl implements InspectionTagService {
@Override
public ResultBody update(InspectionTagVO inspectionTagVO) {
int count = inspectionTagDao.countSameName(inspectionTagVO.getTagName());
int count = inspectionTagDao.countSameName(inspectionTagVO.getId(), inspectionTagVO.getTagName(), inspectionTagVO.getInspectionId());
if (count > 0) {
return ResultBody.error(ResultEnum.NAME_DUPLICATION_ERROR);
}
......@@ -47,6 +52,13 @@ public class InspectionTagServiceImpl implements InspectionTagService {
@Override
public ResultBody delete(Integer id) {
// 有绑定则不能删除
CompanyInspectionQO companyInspectionQO = new CompanyInspectionQO();
companyInspectionQO.setInspectionTagId(id);
int count = companyInspectionDao.countListCompanyInspectionPage(companyInspectionQO);
if (count > 0) {
return ResultBody.error(ResultEnum.UNBINDING_ERROR_1);
}
inspectionTagDao.delete(id);
return ResultBody.success();
}
......
package com.mmc.pms.service.lease;
import com.mmc.pms.auth.dto.LoginSuccessDTO;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.lease.qo.LeaseGoodsQO;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import java.util.List;
/**
* @Author LW
* @date 2023/8/4 10:37
* 概要:
*/
public interface LeaseGoodsService {
ResultBody addLeaseGoods(LeaseGoodsVO leaseGoodsVO, Integer userAccountId);
ResultBody getLeaseTermInfo();
ResultBody leaseGoodsDetails(Integer id);
ResultBody editLeaseGoods(LeaseGoodsVO leaseGoodsVO, Integer userAccountId);
ResultBody leaseGoodsList(LeaseGoodsQO param, LoginSuccessDTO loginSuccessDTO);
ResultBody batchOnShelfOrTakeDown(List<Integer> goodsIds, Integer status);
ResultBody batchRemoveWareInfo(List<Integer> list);
Integer feignLeaseGoodsInfoByAddressId(Integer id);
}
package com.mmc.pms.service.lease.impl;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.auth.dto.LoginSuccessDTO;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.dao.lease.LeaseGoodsDao;
import com.mmc.pms.entity.lease.*;
import com.mmc.pms.feign.UserAppApi;
import com.mmc.pms.model.lease.qo.LeaseGoodsQO;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import com.mmc.pms.model.lease.vo.LeasePartsListVO;
import com.mmc.pms.model.lease.vo.LeasePriceStockVO;
import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.lease.LeaseGoodsService;
import com.mmc.pms.service.mall.MallGoodsService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
import java.util.Comparator;
import java.util.List;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;
/**
* @Author LW
......@@ -10,4 +32,165 @@ import org.springframework.stereotype.Service;
*/
@Service
public class LeaseGoodsServiceImpl implements LeaseGoodsService {
@Resource
MallGoodsService mallGoodsService;
@Resource
LeaseGoodsDao leaseGoodsDao;
@Resource
UserAppApi userAppApi;
@Override
public ResultBody addLeaseGoods(LeaseGoodsVO leaseGoodsVO, Integer userAccountId) {
ResultBody resultError = mallGoodsService.checkInformation(leaseGoodsVO, null, userAccountId);
if (resultError != null) return resultError;
int count = leaseGoodsDao.countLeaseGoodsByUserAccountId(userAccountId);
LeaseGoodsDO leaseGoodsDO = new LeaseGoodsDO(leaseGoodsVO);
leaseGoodsDO.setUserAccountId(userAccountId);
leaseGoodsDO.setSort(count + 1);
// 将租赁商品基本信息存储入数据库
leaseGoodsDao.insertLeaseGoodsBaseInfo(leaseGoodsDO);
// 将商品图片等资源存入数据库中
mallGoodsService.insertMallGoodsResources(leaseGoodsVO, null, leaseGoodsDO.getId());
// 将商品规格存入数据库
mallGoodsService.addMallGoodsSpec(leaseGoodsVO.getSpecAttrList(), leaseGoodsDO.getId(), null, leaseGoodsVO.getPriceStock(), 1);
// 将商品清单入库
insertLeasePartsList(leaseGoodsVO.getLeasePartsList(), leaseGoodsDO.getId());
return ResultBody.success();
}
@Transactional(rollbackFor = Exception.class)
public void insertLeasePartsList(List<LeasePartsListVO> leasePartsList, Integer id) {
if (CollectionUtils.isNotEmpty(leasePartsList)) {
List<LeasePartsListDO> list = leasePartsList.stream().map(d -> {
LeasePartsListDO leasePartsListDO = new LeasePartsListDO(d);
leasePartsListDO.setLeaseGoodsId(id);
return leasePartsListDO;
}).collect(Collectors.toList());
leaseGoodsDao.batchInsertLeaseParts(list);
}
}
@Override
public ResultBody getLeaseTermInfo() {
return ResultBody.success(leaseGoodsDao.getLeaseTermInfo());
}
@Override
public ResultBody leaseGoodsDetails(Integer id) {
LeaseGoodsDO leaseGoodsDO = leaseGoodsDao.getLeaseGoodsBaseInfo(id);
if (leaseGoodsDO == null) {
return ResultBody.error("商品不存在或已删除!");
}
LeaseGoodsVO leaseGoodsVO = leaseGoodsDO.buildLeaseGoodsVO();
// 获取图片及其他资源信息
List<LeaseGoodsResourcesDO> leaseGoodsResourcesList = leaseGoodsDao.getLeaseGoodsResources(id);
leaseGoodsVO.setResourcesList(leaseGoodsResourcesList.stream()
.map(LeaseGoodsResourcesDO::buildGoodsResourcesVO).collect(Collectors.toList()));
// 获取规格及规格值
List<LeaseSpecAttrDO> specAttrDOList = leaseGoodsDao.listSpecAttr(id);
leaseGoodsVO.setSpecAttrList(specAttrDOList.stream().map(LeaseSpecAttrDO::buildSpecAttrVO).collect(Collectors.toList()));
// 获取价格库存排列组合
List<LeasePriceStockDO> priceStockDOList = leaseGoodsDao.listPriceStock(id);
leaseGoodsVO.setPriceStock(priceStockDOList.stream().map(LeasePriceStockDO::buildPriceStockVO).collect(Collectors.toList()));
// 获取商品清单信息
List<LeasePartsListDO> leasePartsDOList = leaseGoodsDao.listLeasePartsListDO(id);
leaseGoodsVO.setLeasePartsList(CollectionUtils.isEmpty(leasePartsDOList) ? null :
leasePartsDOList.stream().map(LeasePartsListDO::buildLeasePartsListVO).collect(Collectors.toList()));
return ResultBody.success(leaseGoodsVO);
}
@Override
public ResultBody editLeaseGoods(LeaseGoodsVO leaseGoodsVO, Integer userAccountId) {
ResultBody resultError = mallGoodsService.checkInformation(leaseGoodsVO, null, userAccountId);
if (resultError != null) return resultError;
LeaseGoodsDO leaseGoodsDO = new LeaseGoodsDO(leaseGoodsVO);
// 修改商品基本信息
leaseGoodsDao.updateLeaseGoodsBaseInfo(leaseGoodsDO);
// 修改商城商品的图片等资源信息,先删除后新增
leaseGoodsDao.deleteLeaseGoodsResources(leaseGoodsVO.getId());
mallGoodsService.insertMallGoodsResources(leaseGoodsVO, null, leaseGoodsVO.getId());
// 修改商品清单
leaseGoodsDao.deleteLeasePartsList(leaseGoodsVO.getId());
if (CollectionUtils.isNotEmpty(leaseGoodsVO.getLeasePartsList())) {
this.insertLeasePartsList(leaseGoodsVO.getLeasePartsList(), leaseGoodsVO.getId());
}
// 修改规格
mallGoodsService.updateSpecInfo(null, leaseGoodsVO);
return ResultBody.success();
}
@Override
public ResultBody leaseGoodsList(LeaseGoodsQO param, LoginSuccessDTO loginSuccessDTO) {
if (loginSuccessDTO == null || loginSuccessDTO.getRoleInfo().getSuperAdmin().equals(1)) {
// 小程序和超级管理员获取所有商品信息
return ResultBody.success(getLeaseGoodsInfo(param));
} else {
// 非超级管理员获取自家的商品信息
param.setUserAccountId(loginSuccessDTO.getUserAccountId());
return ResultBody.success(getLeaseGoodsInfo(param));
}
}
private PageResult getLeaseGoodsInfo(LeaseGoodsQO param) {
int count = leaseGoodsDao.countLeaseGoods(param);
if (count == 0) {
return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count);
}
Integer pageNo = param.getPageNo();
param.buildCurrentPage();
List<LeaseGoodsDO> leaseGoodsDOList = leaseGoodsDao.listLeaseGoods(param);
// 转成vo
List<LeaseGoodsVO> leaseGoodsVOList = leaseGoodsDOList.stream().map(LeaseGoodsDO::buildLeaseGoodsVO)
.skip(param.getPageNo()).limit(param.getPageSize()).collect(Collectors.toList());
// 获取公司
List<Integer> userIds = leaseGoodsVOList.stream().map(LeaseGoodsVO::getUserAccountId).collect(Collectors.toList());
List<CompanyInfoVO> companyInfoVOS = userAppApi.listCompanyInfoByBUIds(userIds);
leaseGoodsVOList = leaseGoodsVOList.stream().peek(d -> {
for (CompanyInfoVO companyInfoVO : companyInfoVOS) {
if (companyInfoVO.getBackUserAccountId().equals(d.getUserAccountId())){
d.setCompanyName(companyInfoVO.getCompanyName());
break;
}
}
// 获取最低押金及最高押金
List<LeasePriceStockVO> list = d.getPriceStock().stream().sorted(Comparator.comparing(LeasePriceStockVO::getCashPledge)).collect(Collectors.toList());
LeasePriceStockVO lastElement = list.get(list.size() - 1);
LeasePriceStockVO firstElement = list.get(0);
d.setCashPledgeRange("¥" + firstElement.getCashPledge() + "~" + "¥" + lastElement.getCashPledge());
// 获取最低租金
BigDecimal minPrice = list.stream()
.map(o -> Stream.of(o.getThreeDaysRental(), o.getSevenDaysRental(), o.getThirtyDaysRental(), o.getNinetyDaysRental(), o.getMaxDaysRental())
.filter(Objects::nonNull)
.min(BigDecimal::compareTo)
.orElse(BigDecimal.ZERO))
.min(Comparator.naturalOrder()).get();
// 获取最高租金
BigDecimal maxPrice = list.stream()
.map(o -> Stream.of(o.getThreeDaysRental(), o.getSevenDaysRental(), o.getThirtyDaysRental(), o.getNinetyDaysRental(), o.getMaxDaysRental())
.filter(Objects::nonNull)
.max(BigDecimal::compareTo)
.orElse(BigDecimal.ZERO))
.max(Comparator.naturalOrder()).get();
d.setRentalRange("¥" + minPrice + "~" + "¥" + maxPrice);
d.setStock(list.stream().mapToInt(o -> o.getStock() == null ? 0 : o.getStock()).sum());
}).collect(Collectors.toList());
return PageResult.buildPage(pageNo, param.getPageSize(), count, leaseGoodsVOList);
}
@Override
public ResultBody batchOnShelfOrTakeDown(List<Integer> goodsIds, Integer status) {
leaseGoodsDao.batchOnShelfOrTakeDown(goodsIds, status);
return ResultBody.success();
}
@Override
public ResultBody batchRemoveWareInfo(List<Integer> list) {
leaseGoodsDao.removeWareInfo(list);
return ResultBody.success();
}
@Override
public Integer feignLeaseGoodsInfoByAddressId(Integer id) {
return leaseGoodsDao.feignLeaseGoodsInfoByAddressId(id);
}
}
package com.mmc.pms.service.mall;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.mall.GoodsListVO;
import com.mmc.pms.model.mall.MallGoodsVO;
import java.util.List;
......@@ -14,4 +15,6 @@ public interface AppMallGoodsService {
ResultBody<MallGoodsVO> queryBrandGoods(Integer userAccountId);
ResultBody<MallGoodsVO> queryGoodsInfoByCategorySub(List<Integer> categorySubIds);
ResultBody<GoodsListVO> brandStoreList(List<Integer> userAccountIds);
}
......@@ -2,10 +2,16 @@ package com.mmc.pms.service.mall;
import com.mmc.pms.auth.dto.LoginSuccessDTO;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import com.mmc.pms.model.lease.vo.LeasePriceStockVO;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.model.mall.PriceStockVO;
import com.mmc.pms.model.mall.SpecAttrVO;
import com.mmc.pms.model.sale.qo.MallGoodsInfoQO;
import com.mmc.pms.page.PageResult;
import java.util.List;
/**
* @Author LW
* @date 2023/7/24 17:37 概要:
......@@ -27,5 +33,13 @@ public interface MallGoodsService {
ResultBody removeMallGoods(Integer id);
ResultBody feignRemoveGoodsByBackUserAccountId(Integer id);
ResultBody feignRemoveGoodsByBackUserAccountId(Integer id, Integer companyInfoId);
ResultBody checkInformation(LeaseGoodsVO leaseGoodsVO, MallGoodsVO mallGoodsVO, Integer userAccountId);
void insertMallGoodsResources(LeaseGoodsVO leaseGoodsVO, MallGoodsVO mallGoodsVO, Integer id);
void addMallGoodsSpec(List<SpecAttrVO> specAttrList, Integer id, List<PriceStockVO> priceStock, List<LeasePriceStockVO> leasePriceStockVO, Integer flag);
void updateSpecInfo(MallGoodsVO mallGoodsVO, LeaseGoodsVO leaseGoodsVO);
}
......@@ -3,13 +3,16 @@ package com.mmc.pms.service.mall.impl;
import com.mmc.pms.common.ResultBody;
import com.mmc.pms.dao.mall.AppMallGoodsDao;
import com.mmc.pms.entity.mall.MallGoodsDO;
import com.mmc.pms.model.mall.GoodsListVO;
import com.mmc.pms.model.mall.MallGoodsVO;
import com.mmc.pms.service.mall.AppMallGoodsService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
/**
......@@ -41,4 +44,22 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
}
return ResultBody.success();
}
@Override
public ResultBody<GoodsListVO> brandStoreList(List<Integer> userAccountIds) {
List<GoodsListVO> goodsList = new ArrayList<>();
if (CollectionUtils.isNotEmpty(userAccountIds)){
List<MallGoodsDO> mallGoodsDOList = appMallGoodsDao.brandStoreList(userAccountIds);
List<MallGoodsVO> list = mallGoodsDOList.stream().map(MallGoodsDO::buildListMallGoodsVO).collect(Collectors.toList());
Map<Integer, List<MallGoodsVO>> map = list.
stream().collect(Collectors.groupingBy(MallGoodsVO::getUserAccountId));
for (Map.Entry<Integer, List<MallGoodsVO>> entry : map.entrySet()) {
GoodsListVO goodsListVO = new GoodsListVO();
goodsListVO.setUserAccountId(entry.getKey());
goodsListVO.setMallGoodsVOList(entry.getValue());
goodsList.add(goodsListVO);
}
}
return ResultBody.success(goodsList);
}
}
......@@ -34,6 +34,11 @@
tag = #{tag}
where id = #{id}
</update>
<delete id="removeModeInfoById">
delete
from device_mode
where id = #{id}
</delete>
<select id="countBrandInfoByName" resultType="java.lang.Integer">
select count(*)
......@@ -114,4 +119,10 @@
#{item}
</foreach>)
</select>
<select id="countLeaseGoodsByDeviceModeId" resultType="java.lang.Integer">
select count(*)
from lease_goods
where device_mode_id = #{id}
</select>
</mapper>
\ No newline at end of file
......@@ -5,8 +5,8 @@
<mapper namespace="com.mmc.pms.dao.ProductDao">
<insert id="insertProductSku" parameterType="com.mmc.pms.entity.ProductDO"
useGeneratedKeys="true" keyProperty="id">
insert into product (product_name, model, brand_info_id, customize,`type`)
values (#{productName}, #{model}, #{brandInfoId}, #{customize},#{type})
insert into product (product_name, model, brand_info_id, customize, `type`)
values (#{productName}, #{model}, #{brandInfoId}, #{customize}, #{type})
</insert>
<insert id="insertProductSpec" keyProperty="id" useGeneratedKeys="true"
parameterType="com.mmc.pms.entity.ProductSpecDO">
......@@ -192,15 +192,14 @@
</select>
<select id="getProductSpecPrice" resultType="com.mmc.pms.entity.ProductSpecPriceDO">
select id,
product_spec_id productSpecId,
cooperation_tag cooperationTag,
price,
create_time createTime,
lease_term
product_spec_id productSpecId,
cooperation_tag cooperationTag,
price,
create_time createTime,
lease_term
from product_spec_price
where
product_spec_id = #{productSpecId}
and `type` =#{type}
where product_spec_id = #{productSpecId}
and `type` = #{type}
</select>
<select id="listProductSpec" resultType="com.mmc.pms.entity.ProductSpecDO">
select id,
......@@ -263,12 +262,6 @@
#{item}
</foreach>
</select>
<select id="countProductSpecByBrandId" resultType="java.lang.Integer">
select count(*)
from product
where brand_info_id = #{id}
and is_deleted = 0
</select>
<select id="countSpecByproductId" resultType="java.lang.Integer">
select count(*)
from product_spec
......@@ -523,7 +516,7 @@
where `type` = 1
and lease_term = #{day}
and cooperation_tag = 0
and product_spec_id = #{specsId}
and product_spec_id = #{specsId}
</select>
<select id="feignGetUnitPriceByTag" resultType="java.math.BigDecimal">
select price
......@@ -532,9 +525,15 @@
product_spec_id = #{specsId}
and `type` = 1
and lease_term = #{day}
<foreach collection="channelLevelId" index="index" separator="," open="and cooperation_tag in(" close=")" item="d">
<foreach collection="channelLevelId" index="index" separator="," open="and cooperation_tag in(" close=")"
item="d">
#{d}
</foreach>
</where>
</select>
<select id="countLeaseGoodsByBrandId" resultType="java.lang.Integer">
select count(*)
from lease_goods
where brand_info_id = #{id}
</select>
</mapper>
......@@ -53,4 +53,12 @@
order by create_time desc
limit #{pageNo}, #{pageSize}
</select>
<select id="countLeaseGoodsByTypeId" resultType="java.lang.Integer">
select count(*)
from lease_goods
where product_type_id = #{id}
</select>
<select id="countDeviceMode" resultType="java.lang.Integer">
select count(*) from device_mode where product_type_id = #{id}
</select>
</mapper>
\ No newline at end of file
......@@ -19,7 +19,7 @@
<select id="listInspectionsByIndustryTypeIdId" resultType="com.mmc.pms.entity.inspection.InspectionDO">
select ins.id , ins.inspection_no, ins.inspection_name, ins.industry_type_id, ins.inspection_img,
ins.inspection_description, ins.sale_state as ins_sale_state, ins.case_img, ins.case_video
ins.inspection_description, ins.sale_state as ins_sale_state, ins.case_img, ins.case_video, ins.create_time
from inspection ins
where ins.is_deleted = 0 and ins.industry_type_id = #{industryTypeId} order by ins.id desc
</select>
......@@ -88,4 +88,23 @@
order by it.id DESC
limit #{pageNo},#{pageSize}
</select>
<select id="listIndustry" resultType="com.mmc.pms.entity.inspection.IndustryTypeDO">
select it.id, it.type_name, it.type_img, it.description, it.sale_state, it.is_deleted, it.create_time
from industry_type it
where 1 = 1
<if test="id != null">
and it.id = #{id}
</if>
<if test="typeName != null">
and it.type_name like concat('%',#{typeName},'%')
</if>
order by it.id DESC
</select>
<select id="getIndustryTypeById" resultType="com.mmc.pms.entity.inspection.IndustryTypeDO">
select it.id, it.type_name, it.type_img, it.description, it.sale_state, it.is_deleted, it.create_time
from industry_type it
where it.id = #{id}
</select>
</mapper>
\ No newline at end of file
......@@ -52,4 +52,11 @@
</if>
</where>
</select>
<select id="getInspectionById" resultType="com.mmc.pms.entity.inspection.InspectionDO">
select ins.id , ins.inspection_no, ins.inspection_name, ins.industry_type_id, ins.inspection_img,
ins.inspection_description, ins.sale_state as ins_sale_state, ins.case_img, ins.case_video, ins.create_time
from inspection ins
where ins.is_deleted = 0 and ins.id = #{id}
</select>
</mapper>
\ No newline at end of file
......@@ -22,6 +22,9 @@
<if test="id != null">
and id != #{id}
</if>
<if test="inspectionId != null">
and inspection_id = #{inspectionId}
</if>
</select>
<select id="listByInspectionId" resultType="com.mmc.pms.entity.inspection.InspectionTagDO">
......
......@@ -36,4 +36,33 @@
ORDER BY
mg.sort DESC,mg.create_time DESC
</select>
<select id="brandStoreList" resultType="com.mmc.pms.entity.mall.MallGoodsDO">
SELECT
mg.id,
mg.trade_name,
mg.shelf_status,
mg.create_time,
mg.description,
mg.category_primary_id,
mg.user_account_id,
mg.goods_label,
mg.label_show,
mg.category_sub_id,
img.id as imgId, img.url,
img.type
FROM
(
SELECT
*,
ROW_NUMBER() OVER ( PARTITION BY user_account_id ORDER BY id ) AS row_num
FROM
mall_goods
WHERE
user_account_id IN ( <foreach collection="list" separator="," item="item">
#{item}
</foreach> )
) mg INNER JOIN mall_goods_resources img ON mg.id = img.mall_goods_id and img.type = 0
WHERE
row_num &lt;= 6
</select>
</mapper>
\ No newline at end of file
......@@ -22,4 +22,16 @@ data-filter:
- /pms/category/appCategoryInfo
- /pms/app/goods/queryBrandGoods
- /pms/app/goods/queryGoodsInfoByCategorySub
- /pms/mall/goods/feignRemoveGoodsByBackUserAccountId
\ No newline at end of file
- /pms/mall/goods/feignRemoveGoodsByBackUserAccountId
- /pms/app/lease/leaseGoodsDetails
- /pms/app/lease/leaseGoodsList
- /pms/industry/listPages
- /pms/industry/listInspectionsByIndustryTypeId
- /pms/industry/getIndustryTypeById
- /pms/inspection/detail
- /pms/inspection-tag/listByInspectionId
- /pms/company-inspection/listInspectionPriceUnit
- /pms/company-inspection/listAPPCompanyInspectionPage
- /pms/company-inspection/getCompanyInspectionById
- /pms/company-inspection/listInspectionPriceUnit
- /pms/lease/goods/feignLeaseGoodsInfoByAddressId
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论