提交 70cf8533 作者: 余乾开

Merge branch 'develop'

...@@ -103,20 +103,11 @@ jobs: ...@@ -103,20 +103,11 @@ jobs:
git config user.name "Chuck" git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com" git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL" git remote set-url origin "$GITLAB_URL"
git commit -am "Generated Image New Tag" git commit -am "Update Image Tag"
git push origin develop git push origin develop
- name: Send Error Notification by WeChat #- name: Commit files
if: ${{ failure() }} # run: |
run: | # git config --local user.email "Chuck@users.noreply.github.com"
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16' -H 'Content-Type: application/json' -d ' # git config --local user.name "Chuck"
{ # git commit -am "Image Update"
"msgtype": "markdown",
"markdown": {
"content": "### GitHub构建并推送镜像失败 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n 请修复错误后重新提交...
"
}'
...@@ -108,21 +108,11 @@ jobs: ...@@ -108,21 +108,11 @@ jobs:
git config user.name "Chuck" git config user.name "Chuck"
git config user.email "Chuck@users.noreply.github.com" git config user.email "Chuck@users.noreply.github.com"
git remote set-url origin "$GITLAB_URL" git remote set-url origin "$GITLAB_URL"
git add . git commit -am "Update Image Tag"
git commit -m "Generated Image New Tag"
git push origin master git push origin master
- name: Send Error Notification by WeChat #- name: Commit files
if: ${{ failure() }} # run: |
run: | # git config --local user.email "Chuck@users.noreply.github.com"
curl 'https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=9be1b073-1760-442d-8e3d-faa0fd32ea16' -H 'Content-Type: application/json' -d ' # git config --local user.name "Chuck"
{ # git commit -am "Image Update"
"msgtype": "markdown",
"markdown": {
"content": "### GitHub构建并推送镜像失败 \n
> - 提交人: ${{github.actor}} \n
> - 提交信息: ${{github.event.head_commit.message}} \n
> - 提交到仓库: ${{github.repository}} \n
> - 提交到分支: ${{github.ref}} \n 请修复错误后重新提交...
"
}'
...@@ -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: 0617f51e1eeecaa013d138ccfee8d9a085e3c6e7 newTag: 757f0a2dc9e893e41007e7f05972b846146bb4f9
package com.mmc.pms.auth.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
/**
* @Author small
* @Date 2023/7/4 10:55
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompanyInfoDTO {
private static final long serialVersionUID = 3247519744829926132L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "单位类型,0科比特,1加盟公司", example = "0")
private Integer companyType;
@ApiModelProperty(value = "单位名称", example = "科比特")
private String companyName;
@ApiModelProperty(value = "单位全称", example = "浙江科比特创新科技有限公司")
private String fullName;
@ApiModelProperty(value = "省份名称", example = "广东省")
private String province;
@ApiModelProperty(value = "城市名称", example = "深圳市")
private String city;
@ApiModelProperty(value = "县区名称", example = "南山区")
private String district;
@ApiModelProperty(value = "详细地址", example = "西丽街道万科云城国际创新谷6栋")
private String address;
@ApiModelProperty(value = "联系人", example = "lx")
private String companyUserName;
@ApiModelProperty(value = "联系电话", example = "13925255742")
private String phoneNum;
@ApiModelProperty(value = "备注")
private String remark;
}
package com.mmc.pms.auth.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/7/4 10:04
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompanyInfoVO {
private static final long serialVersionUID = 3247519744829926132L;
@ApiModelProperty(value = "id")
private Integer id;
@ApiModelProperty(value = "单位类型,0科比特,1加盟公司", example = "0")
private Integer companyType;
@ApiModelProperty(value = "单位名称", example = "科比特")
private String companyName;
@ApiModelProperty(value = "单位全称", example = "浙江科比特创新科技有限公司")
private String fullName;
@ApiModelProperty(value = "省份名称", example = "广东省")
private String province;
@ApiModelProperty(value = "城市名称", example = "深圳市")
private String city;
@ApiModelProperty(value = "县区名称", example = "南山区")
private String district;
@ApiModelProperty(value = "详细地址", example = "西丽街道万科云城国际创新谷6栋")
private String address;
@ApiModelProperty(value = "联系人", example = "lx")
private String companyUserName;
@ApiModelProperty(value = "联系电话", example = "13925255742")
private String phoneNum;
@ApiModelProperty(value = "备注")
private String remark;
}
...@@ -26,5 +26,6 @@ public class LoginSuccessDTO implements Serializable { ...@@ -26,5 +26,6 @@ public class LoginSuccessDTO implements Serializable {
private String phoneNum; private String phoneNum;
private String userName; private String userName;
private String nickName; private String nickName;
private CompanyInfoVO companyInfoVO;
// private RoleInfoDTO roleInfo; // private RoleInfoDTO roleInfo;
} }
...@@ -381,10 +381,10 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -381,10 +381,10 @@ public enum ResultEnum implements BaseErrorInfoInterface {
DIRECTORY_NAME_HAS_BEEN_EXIST("40168", "目录名称已存在"), DIRECTORY_NAME_HAS_BEEN_EXIST("40168", "目录名称已存在"),
FAILED_TO_ADD_DATA("40169", "数据新增失败,请稍后重试"), FAILED_TO_ADD_DATA("40169", "数据新增失败,请稍后重试"),
FAILED_TO_EDIT_DATA("40170", "数据修改失败,请稍后重试"), FAILED_TO_EDIT_DATA("40170", "数据修改失败,请稍后重试"),
SKU_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED("40171", "sku不存在或已删除,请刷新后重试!"), PRODUCT_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED("40171", "产品不存在或已删除,请刷新后重试!"),
SPEC_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED("40172", "规格不存在或已删除,请刷新后重试!"), SPEC_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED("40172", "规格不存在或已删除,请刷新后重试!"),
SKU_ALREADY_EXIST_IN_THIS_INDUSTRY("40173", "该所属行业下已经存在sku,请检查后重试!"), SKU_ALREADY_EXIST_IN_THIS_INDUSTRY("40173", "该所属行业下已经存在sku,请检查后重试!"),
SPEC_EXIST_UNDER_THE_SKU("40174", "该sku下有规格存在,无法删除!"), SPEC_EXIST_UNDER_THE_SKU("40174", "该产品下有规格存在,无法删除!"),
SPEC_NOT_CONFIG_PRICE("40175", "存在规格没有配置价格,请联系客服获取报价!"), SPEC_NOT_CONFIG_PRICE("40175", "存在规格没有配置价格,请联系客服获取报价!"),
SHOP_CAR_SIZE_MORE_2("40176", "行业购物车下单数量仅限一个"), SHOP_CAR_SIZE_MORE_2("40176", "行业购物车下单数量仅限一个"),
CONTRACT_TEMPLATE_NOT_EXIST_OR_DELETED("40177", "合同模板不存在或已删除!"), CONTRACT_TEMPLATE_NOT_EXIST_OR_DELETED("40177", "合同模板不存在或已删除!"),
......
...@@ -100,9 +100,11 @@ public class BackstageCategoriesController { ...@@ -100,9 +100,11 @@ public class BackstageCategoriesController {
@GetMapping("queryRelevantBusiness") @GetMapping("queryRelevantBusiness")
public ResultBody queryRelevantBusiness( public ResultBody queryRelevantBusiness(
@ApiParam(value = "分类id", required = true) @RequestParam(value = "id") Integer id, @ApiParam(value = "分类id", required = true) @RequestParam(value = "id") Integer id,
@ApiParam(value = "业务类型", required = true) @Min(value = 0) @RequestParam(value = "type") @ApiParam(value = "业务类型: 0、商城商品列表 1、租赁商品列表 2、服务列表 3、课程列表", required = true) @Min(value = 0)
Integer type) { @RequestParam(value = "type") Integer type,
return categoriesService.queryRelevantBusiness(id, type); @RequestParam Integer pageNo,
@RequestParam Integer pageSize) {
return ResultBody.success(categoriesService.queryRelevantBusiness(id, type,pageNo,pageSize));
} }
@ApiOperation(value = "分类删除") @ApiOperation(value = "分类删除")
......
...@@ -17,6 +17,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -17,6 +17,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.List; import java.util.List;
/** /**
...@@ -27,15 +28,17 @@ import java.util.List; ...@@ -27,15 +28,17 @@ import java.util.List;
@RestController @RestController
@RequestMapping("/goods") @RequestMapping("/goods")
@Api(tags = {"后台-商品管理-相关接口"}) @Api(tags = {"后台-商品管理-相关接口"})
public class BackstageGoodsManageController { public class BackstageGoodsManageController extends BaseController {
@Resource private GoodsInfoService goodsInfoService; @Resource private GoodsInfoService goodsInfoService;
@ApiOperation(value = "新增(租赁/销售)商品") @ApiOperation(value = "新增(租赁/销售)商品")
@PostMapping("addGoodsInfo") @PostMapping("addGoodsInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addGoods( public ResultBody addGoods(
@ApiParam("商品信息VO") @Validated(Create.class) @RequestBody GoodsAddVO goodsAddVO) { @ApiParam("商品信息VO") @Validated(Create.class) @RequestBody GoodsAddVO goodsAddVO,
return goodsInfoService.addGoods(goodsAddVO); HttpServletRequest request) {
return goodsInfoService.addGoods(
goodsAddVO, this.getUserLoginInfoFromRedis(request).getUserAccountId());
} }
@ApiOperation(value = "修改(租赁/销售)商品") @ApiOperation(value = "修改(租赁/销售)商品")
...@@ -134,4 +137,12 @@ public class BackstageGoodsManageController { ...@@ -134,4 +137,12 @@ public class BackstageGoodsManageController {
@RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO) { @RequestBody MallOrderGoodsInfoQO mallOrderGoodsInfoQO) {
return goodsInfoService.feignListIndstGoodsSkuInfo(mallOrderGoodsInfoQO); return goodsInfoService.feignListIndstGoodsSkuInfo(mallOrderGoodsInfoQO);
} }
@ApiOperation(value = "商品列表-排序")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("exchangeGoodsInfo")
public ResultBody exchangeGoodsInfo(@ApiParam(value = "第一个参数id", required = true) @RequestParam(value = "firstId") Integer firstId,
@ApiParam(value = "第二个参数id", required = true) @RequestParam(value = "secondId") Integer secondId) {
return goodsInfoService.exchangeGoodsInfo(firstId, secondId);
}
} }
...@@ -15,6 +15,7 @@ import org.springframework.validation.annotation.Validated; ...@@ -15,6 +15,7 @@ import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.List;
/** /**
* @Author LW * @Author LW
...@@ -27,7 +28,7 @@ import java.math.BigDecimal; ...@@ -27,7 +28,7 @@ import java.math.BigDecimal;
public class BackstageProductSpecController { public class BackstageProductSpecController {
@Autowired private ProductSkuService productSkuService; @Autowired private ProductSkuService productSkuService;
@ApiOperation(value = "新增产品sku") @ApiOperation(value = "新增产品")
@PostMapping("addProductSku") @PostMapping("addProductSku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody addProductSku( public ResultBody addProductSku(
...@@ -35,14 +36,14 @@ public class BackstageProductSpecController { ...@@ -35,14 +36,14 @@ public class BackstageProductSpecController {
return productSkuService.addProductSku(param); return productSkuService.addProductSku(param);
} }
@ApiOperation(value = "产品sku详情") @ApiOperation(value = "产品详情")
@GetMapping("getProductSkuDetail") @GetMapping("getProductSkuDetail")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductSkuDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductSkuDTO.class)})
public ResultBody getProductSkuDetail(@ApiParam("id") @RequestParam(value = "id") Integer id) { public ResultBody getProductSkuDetail(@ApiParam("id") @RequestParam(value = "id") Integer id) {
return productSkuService.getProductSkuDetail(id); return productSkuService.getProductSkuDetail(id);
} }
@ApiOperation(value = "编辑产品sku") @ApiOperation(value = "编辑产品")
@PostMapping("editProductSku") @PostMapping("editProductSku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody editProductSku( public ResultBody editProductSku(
...@@ -57,7 +58,7 @@ public class BackstageProductSpecController { ...@@ -57,7 +58,7 @@ public class BackstageProductSpecController {
return productSkuService.productDirectoryList(); return productSkuService.productDirectoryList();
} }
@ApiOperation(value = "产品sku分页列表") @ApiOperation(value = "产品分页列表")
@PostMapping("listPageProductSku") @PostMapping("listPageProductSku")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductSkuDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ProductSkuDTO.class)})
public ResultBody listPageProductSku(@ApiParam("条件参数") @RequestBody ProductSkuQO productSkuQO) { public ResultBody listPageProductSku(@ApiParam("条件参数") @RequestBody ProductSkuQO productSkuQO) {
...@@ -101,14 +102,14 @@ public class BackstageProductSpecController { ...@@ -101,14 +102,14 @@ public class BackstageProductSpecController {
@ApiOperation(value = "产品规格管理-价格配置") @ApiOperation(value = "产品规格管理-价格配置")
@PostMapping("productSpecCPQ") @PostMapping("productSpecCPQ")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody productSpecCPQ(@RequestBody ProductSpecCPQVO productSpecCPQVO) { public ResultBody productSpecCPQ(@RequestBody List<ProductSpecCPQVO> productSpecCPQVO) {
return productSkuService.productSpecCPQ(productSpecCPQVO); return productSkuService.productSpecCPQ(productSpecCPQVO);
} }
@ApiOperation(value = "价格配置信息的修改") @ApiOperation(value = "价格配置信息的修改")
@PostMapping("updateProductSpecCPQ") @PostMapping("updateProductSpecCPQ")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody updateProductSpecCPQ(@RequestBody ProductSpecCPQVO productSpecCPQVO) { public ResultBody updateProductSpecCPQ(@RequestBody List<ProductSpecCPQVO> productSpecCPQVO) {
return productSkuService.updateProductSpecCPQ(productSpecCPQVO); return productSkuService.updateProductSpecCPQ(productSpecCPQVO);
} }
......
...@@ -3,6 +3,7 @@ package com.mmc.pms.controller; ...@@ -3,6 +3,7 @@ package com.mmc.pms.controller;
import com.mmc.pms.common.Page; import com.mmc.pms.common.Page;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.group.Create; import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Others;
import com.mmc.pms.model.group.Update; import com.mmc.pms.model.group.Update;
import com.mmc.pms.model.qo.ServiceQO; import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO; import com.mmc.pms.model.work.dto.ServiceDTO;
...@@ -64,10 +65,11 @@ public class BackstageTaskServiceController extends BaseController { ...@@ -64,10 +65,11 @@ public class BackstageTaskServiceController extends BaseController {
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceDTO.class)})
@GetMapping("queryWorkService") @GetMapping("queryWorkService")
public ResultBody<ServiceDTO> queryWorkService( public ResultBody<ServiceDTO> queryWorkService(
@ApiParam("作业服务id") @RequestParam(value = "id") Integer id) { @ApiParam("作业服务id") @RequestParam(value = "id") Integer id,HttpServletRequest request) {
return backstageTaskService.queryById(id); return backstageTaskService.queryById(id,request);
} }
@ApiOperation(value = "查询服务管理列表") @ApiOperation(value = "查询服务管理列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceDTO.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ServiceDTO.class)})
@PostMapping("queryServiceManagerList") @PostMapping("queryServiceManagerList")
...@@ -75,7 +77,7 @@ public class BackstageTaskServiceController extends BaseController { ...@@ -75,7 +77,7 @@ public class BackstageTaskServiceController extends BaseController {
@Validated(Page.class) @RequestBody ServiceQO param, HttpServletRequest request) { @Validated(Page.class) @RequestBody ServiceQO param, HttpServletRequest request) {
return ResultBody.success( return ResultBody.success(
backstageTaskService.queryServiceManagerList( backstageTaskService.queryServiceManagerList(
param, this.getUserLoginInfoFromRedis(request).getUserAccountId())); param, this.getUserLoginInfoFromRedis(request).getUserAccountId(),this.getUserLoginInfoFromRedis(request).getCompanyInfoVO()));
} }
@ApiOperation(value = "远程查询作业服务") @ApiOperation(value = "远程查询作业服务")
...@@ -93,4 +95,22 @@ public class BackstageTaskServiceController extends BaseController { ...@@ -93,4 +95,22 @@ public class BackstageTaskServiceController extends BaseController {
@ApiParam("分类id") @RequestBody List<Integer> categoriesId) { @ApiParam("分类id") @RequestBody List<Integer> categoriesId) {
return backstageTaskService.getWorkServiceCountByCategoriesId(categoriesId); return backstageTaskService.getWorkServiceCountByCategoriesId(categoriesId);
} }
@ApiOperation(value = "查询作业服务数量——用于后台调用")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("queryWorkServiceCount")
public ResultBody queryWorkServiceCount(
@ApiParam("单位id") @RequestParam(value = "companyId") Integer companyId,HttpServletRequest request) {
return backstageTaskService.queryByIdCount(companyId);
}
@ApiOperation(value = "排序交换")
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = ResultBody.class) })
@PostMapping("exchange")
public ResultBody exchangeBannerInfo(@Validated(Others.class) @RequestBody List<ServiceVO> list) {
return backstageTaskService.exchange(list);
}
} }
...@@ -43,4 +43,12 @@ public interface BackstageTaskServiceDao { ...@@ -43,4 +43,12 @@ public interface BackstageTaskServiceDao {
Integer batchUpAndDownWorkService(@Param("param") UpAndDownServiceVO param); Integer batchUpAndDownWorkService(@Param("param") UpAndDownServiceVO param);
Integer getWorkServiceCountByCategoriesId(@Param("categoriesIds") List<Integer> categoriesIds); Integer getWorkServiceCountByCategoriesId(@Param("categoriesIds") List<Integer> categoriesIds);
Integer queryByIdCount(Integer companyId);
void exchange(ServiceDO serviceDO);
void exchangeSort(Integer id,Integer sort);
List<ServiceDO> queryWorkInfoByCategoryId(Integer pageNo , Integer pageSize,Integer id);
} }
...@@ -68,8 +68,6 @@ public interface GoodsInfoDao { ...@@ -68,8 +68,6 @@ public interface GoodsInfoDao {
List<GoodsInfo> listSimpleGoodsInfoByIds(@Param("ids") Set<Integer> ids); List<GoodsInfo> listSimpleGoodsInfoByIds(@Param("ids") Set<Integer> ids);
void insertMallProdSkuInfo(MallProdInfoDO mallProdSkuInfoDO);
void insertMallProdSkuInfoSpec(MallProdSkuInfoSpecDO mallProdSkuInfoSpecDO); void insertMallProdSkuInfoSpec(MallProdSkuInfoSpecDO mallProdSkuInfoSpecDO);
void batchUpdateMallProSpec(@Param("list") List<Integer> list, @Param("id") Integer id); void batchUpdateMallProSpec(@Param("list") List<Integer> list, @Param("id") Integer id);
...@@ -91,7 +89,7 @@ public interface GoodsInfoDao { ...@@ -91,7 +89,7 @@ public interface GoodsInfoDao {
List<MallGoodsProductDO> listIndustryProductList(List<Integer> industrySpecIds); List<MallGoodsProductDO> listIndustryProductList(List<Integer> industrySpecIds);
List<GoodsInfo> ListGoodsInfoByCategoryId(Integer id); List<GoodsInfo> ListGoodsInfoByCategoryId(Integer pageNo,Integer pageSize,Integer id,int type);
List<MallProdSkuInfoSpecDO> getMallProSkuInfoSpec(Integer goodsInfoId); List<MallProdSkuInfoSpecDO> getMallProSkuInfoSpec(Integer goodsInfoId);
...@@ -114,4 +112,8 @@ public interface GoodsInfoDao { ...@@ -114,4 +112,8 @@ public interface GoodsInfoDao {
void updateMallProdSkuInfo(MallProdInfoDO mallProdInfoDO); void updateMallProdSkuInfo(MallProdInfoDO mallProdInfoDO);
List<MallProdInfoDO> getAllMallProSkuInfo(Integer goodsInfoId); List<MallProdInfoDO> getAllMallProSkuInfo(Integer goodsInfoId);
int updateGoodsInfoSort(Integer id, Integer sort);
int countServiceByCategoryId(Integer id);
} }
...@@ -11,37 +11,37 @@ import java.util.List; ...@@ -11,37 +11,37 @@ import java.util.List;
*/ */
@Mapper @Mapper
public interface MiniProgramProductMallDao { public interface MiniProgramProductMallDao {
GoodsInfoDO getGoodsInfoByGoodsId(Integer goodsId); GoodsInfoDO getGoodsInfoByGoodsId(Integer goodsId);
List<GoodsImgDO> listGoodsInfoByGoodsId(Integer goodsId); List<GoodsImgDO> listGoodsInfoByGoodsId(Integer goodsId);
GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsId); GoodsDetailDO getGoodsDetailByGoodsId(Integer goodsId);
List<GoodsQaDO> listGoodsQaInfoByGoodsId(Integer goodsId); List<GoodsQaDO> listGoodsQaInfoByGoodsId(Integer goodsId);
List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsId); List<GoodsServiceDO> listGoodsServiceByGoodsId(Integer goodsId);
List<MallProdInfoDO> getMallProdInfoByGoodsId(Integer goodsId); List<MallProdInfoDO> getMallProdInfoByGoodsId(Integer goodsId);
List<MallProdSkuInfoSpecDO> listMallProdSkuInfoSpec(Integer goodsId); List<MallProdSkuInfoSpecDO> listMallProdSkuInfoSpec(Integer goodsId);
List<ProductSpecDO> listProductSpecInfo(List<Integer> collect); List<ProductSpecDO> listProductSpecInfo(List<Integer> collect);
List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer goodsInfoId); List<MallIndustrySkuInfoDO> getMallIndustrySkuInfo(Integer goodsInfoId);
List<MallIndustrySkuInfoSpecDO> getIndustrySkuInfoSpec(Integer goodsInfoId); List<MallIndustrySkuInfoSpecDO> getIndustrySkuInfoSpec(Integer goodsInfoId);
int countListGoodsByQO(GoodsInfoQO param); int countListGoodsByQO(GoodsInfoQO param);
List<GoodsInfoDO> listGoodsByQO(GoodsInfoQO param); List<GoodsInfoDO> listGoodsByQO(GoodsInfoQO param);
List<GoodsTypeDO> listIndustryIdBySort(); List<GoodsTypeDO> listIndustryIdBySort();
List<IndustryProductInventoryDO> getIndustryProductInventory(Integer industrySpecId); List<IndustryProductInventoryDO> getIndustryProductInventory(Integer industrySpecId);
List<InventorySpecDO> listInventorySpec(List<Integer> collect); List<InventorySpecDO> listInventorySpec(List<Integer> collect);
ProductSpecDO getProductSpecDetail(Integer productSpecId); ProductSpecDO getProductSpecDetail(Integer productSpecId);
ProductSkuDO getProductSkuDetail(Integer productSkuId); ProductDO getProductSkuDetail(Integer productSkuId);
} }
...@@ -26,17 +26,17 @@ public interface ProductDao { ...@@ -26,17 +26,17 @@ public interface ProductDao {
int countSkuName(ProductSkuVO param); int countSkuName(ProductSkuVO param);
int insertProductSku(ProductSkuDO productSkuDO); int insertProductSku(ProductDO productDO);
int countSkuIsExist(Integer id); int countProductIsExist(Integer id);
ProductSkuDO getProductSkuDetail(Integer id); ProductDO getProductDetail(Integer id);
int updateProductSku(ProductSkuDO productSkuDO); int updateProductSku(ProductDO productDO);
int countListPageProductSku(ProductSkuQO productSkuQO); int countListPageProductSku(ProductSkuQO productSkuQO);
List<ProductSkuDO> listPageProductSku(ProductSkuQO productSkuQO); List<ProductDO> listPageProductSku(ProductSkuQO productSkuQO);
int countSpecName(ProductSpecVO param); int countSpecName(ProductSpecVO param);
...@@ -53,7 +53,7 @@ public interface ProductDao { ...@@ -53,7 +53,7 @@ public interface ProductDao {
List<ProductSpecDO> listPageProductSpec( List<ProductSpecDO> listPageProductSpec(
@Param(value = "pageNo") Integer pageNo, @Param(value = "pageNo") Integer pageNo,
@Param(value = "pageSize") Integer pageSize, @Param(value = "pageSize") Integer pageSize,
@Param(value = "productSkuId") Integer productSkuId, @Param(value = "productId") Integer productId,
@Param(value = "keyword") String keyword); @Param(value = "keyword") String keyword);
int batchInsertSpecPrice(List<ProductSpecPriceDO> list); int batchInsertSpecPrice(List<ProductSpecPriceDO> list);
...@@ -68,7 +68,7 @@ public interface ProductDao { ...@@ -68,7 +68,7 @@ public interface ProductDao {
List<ProductSpecDO> listProductSpec(Integer id); List<ProductSpecDO> listProductSpec(Integer id);
List<ProductSkuDO> listProductSkuDO(List<Integer> productSkuId); List<ProductDO> listProductSkuDO(List<Integer> productId);
List<InventorySpecDO> listInventorySpecInfo(List<Integer> industryProductInventoryIds); List<InventorySpecDO> listInventorySpecInfo(List<Integer> industryProductInventoryIds);
...@@ -78,8 +78,6 @@ public interface ProductDao { ...@@ -78,8 +78,6 @@ public interface ProductDao {
int countProductSpecByBrandId(Integer id); int countProductSpecByBrandId(Integer id);
int countSpecByProdSkuId(Integer id);
void removeProductSku(Integer id); void removeProductSku(Integer id);
void removeProductSpec(Integer id); void removeProductSpec(Integer id);
...@@ -88,7 +86,7 @@ public interface ProductDao { ...@@ -88,7 +86,7 @@ public interface ProductDao {
List<InventorySpecDO> listInventorySpec(Integer id); List<InventorySpecDO> listInventorySpec(Integer id);
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);
...@@ -103,7 +101,7 @@ public interface ProductDao { ...@@ -103,7 +101,7 @@ public interface ProductDao {
ProductSpecPriceDTO feignGetUnitPrice(Integer id, Integer tagId); ProductSpecPriceDTO feignGetUnitPrice(Integer id, Integer tagId);
List<ProductSpecDO> getProductSpecList(List<Integer> productSkuIds); List<ProductSpecDO> getProductSpecList(List<Integer> productIds);
List<MallProdSkuInfoSpecDO> getProductSpecByIds(List<Integer> delProductSpecId); List<MallProdSkuInfoSpecDO> getProductSpecByIds(List<Integer> delProductSpecId);
...@@ -119,5 +117,10 @@ public interface ProductDao { ...@@ -119,5 +117,10 @@ public interface ProductDao {
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);
BigDecimal getMarketplacePrice(PriceAcquisition priceAcquisition);
} }
...@@ -37,12 +37,14 @@ public interface WebDeviceDao { ...@@ -37,12 +37,14 @@ public interface WebDeviceDao {
int countListWareInfoPage( int countListWareInfoPage(
@Param("categoryIds") List<Integer> categoryIds, @Param("categoryIds") List<Integer> categoryIds,
@Param("userIds") List<Integer> userIds, @Param("userIds") List<Integer> userIds,
@Param("type") Integer type); @Param("type") Integer type,
@Param("goodsName")String goodsName);
List<GoodsInfo> listWareInfoPage( List<GoodsInfo> listWareInfoPage(
@Param("param") WareInfoQO param, @Param("param") WareInfoQO param,
@Param("userIds") List<Integer> userIds, @Param("userIds") List<Integer> userIds,
@Param("type") Integer type); @Param("type") Integer type,
@Param("goodsName")String goodsName);
WareInfoDO getWareInfoById(Integer id); WareInfoDO getWareInfoById(Integer id);
......
...@@ -55,12 +55,10 @@ public class MallIndustrySkuInfoDO implements Serializable { ...@@ -55,12 +55,10 @@ public class MallIndustrySkuInfoDO implements Serializable {
return GoodsSpecDTO.builder() return GoodsSpecDTO.builder()
.id(this.id) .id(this.id)
.goodsSpecName(this.industrySkuSpecName) .goodsSpecName(this.industrySkuSpecName)
.categoryId(this.categoriesId)
.chooseType(this.chooseType) .chooseType(this.chooseType)
.skuUnitId(skuUnitId) .skuUnitId(skuUnitId)
.unitName(this.unitName) .unitName(this.unitName)
.skuId(this.industrySkuId) .skuId(this.industrySkuId)
.typeName(this.typeName)
.skuName(this.industrySkuName) .skuName(this.industrySkuName)
.must(must) .must(must)
.build(); .build();
......
...@@ -21,7 +21,7 @@ public class MallProdInfoDO implements Serializable { ...@@ -21,7 +21,7 @@ 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 productId;
private String prodSkuSpecName; private String prodSkuSpecName;
private Integer categoriesId; private Integer categoriesId;
private Integer chooseType; private Integer chooseType;
...@@ -52,13 +52,11 @@ public class MallProdInfoDO implements Serializable { ...@@ -52,13 +52,11 @@ public class MallProdInfoDO implements Serializable {
public GoodsSpecDTO buildGoodsSpecDTO() { public GoodsSpecDTO buildGoodsSpecDTO() {
return GoodsSpecDTO.builder() return GoodsSpecDTO.builder()
.id(this.id) .id(this.id)
.skuId(this.productId)
.goodsSpecName(this.prodSkuSpecName) .goodsSpecName(this.prodSkuSpecName)
.categoryId(this.categoriesId)
.chooseType(this.chooseType) .chooseType(this.chooseType)
.skuUnitId(skuUnitId) .skuUnitId(skuUnitId)
.unitName(this.unitName) .unitName(this.unitName)
.skuId(this.prodSkuId)
.typeName(this.typeName)
.must(must) .must(must)
.skuName(this.productSkuName) .skuName(this.productSkuName)
.brandInfoId(brandInfoId) .brandInfoId(brandInfoId)
......
...@@ -17,52 +17,39 @@ import java.util.Date; ...@@ -17,52 +17,39 @@ import java.util.Date;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
public class ProductSkuDO implements Serializable { public class ProductDO implements Serializable {
private static final long serialVersionUID = -2830786012593215477L; private static final long serialVersionUID = -2830786012593215477L;
private Integer id; private Integer id;
private String productName; private String productName;
private Integer categoriesId; private String model;
private String model; private Date createTime;
private Date createTime; private Date updateTime;
private Date updateTime; private Integer brandInfoId;
private Integer brandInfoId; private Integer deleted;
private Integer deleted; private Integer customize;
private Integer customize; private Integer type;
private Integer directoryId;
/** 辅助字段 begin */
/** private String brandName;
* 辅助字段 begin
*/ /** 辅助字段 end */
private String categoryName; public ProductDO(ProductSkuVO param) {
this.id = param.getId();
private String directoryName; this.model = param.getModel();
this.productName = param.getProductName();
private String brandName; this.brandInfoId = param.getProductBrandId();
this.type = param.getType();
/** }
* 辅助字段 end
*/ public ProductSkuDTO buildProductSkuDTO() {
public ProductSkuDO(ProductSkuVO param) { return ProductSkuDTO.builder()
this.id = param.getId(); .id(this.id)
this.categoriesId = param.getCategoryId(); .productName(this.productName)
this.model = param.getModel(); .model(this.model)
this.productName = param.getProductName(); .productBrand(this.brandName)
this.brandInfoId = param.getProductBrandId(); .createTime(this.createTime)
this.directoryId = param.getDirectoryId(); .productBrandId(brandInfoId)
} .type(this.type)
.build();
public ProductSkuDTO buildProductSkuDTO() { }
return ProductSkuDTO.builder()
.id(this.id)
.productName(this.productName)
.model(this.model)
.productBrand(this.brandName)
.createTime(this.createTime)
.categoriesId(categoriesId)
.productBrandId(brandInfoId)
.directoryId(directoryId)
.categoryName(this.categoryName)
.directoryName(directoryName)
.build();
}
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.sale.dto.MallProductSpecDTO;
import com.mmc.pms.model.sale.dto.ProductSpecDTO; import com.mmc.pms.model.sale.dto.ProductSpecDTO;
import com.mmc.pms.model.sale.dto.ProductSpecVO; import com.mmc.pms.model.sale.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;
...@@ -19,46 +19,46 @@ import java.util.Date; ...@@ -19,46 +19,46 @@ import java.util.Date;
@AllArgsConstructor @AllArgsConstructor
@Accessors(chain = true) @Accessors(chain = true)
public class ProductSpecDO implements Serializable { public class ProductSpecDO implements Serializable {
private static final long serialVersionUID = -5476701567447257133L; private static final long serialVersionUID = -5476701567447257133L;
private Integer id; private Integer id;
private Integer productSkuId; private Integer productId;
private String specName; private String specName;
private String specImage; private String specImage;
private String partNo; private String partNo;
private String versionDesc; private String versionDesc;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
private Integer deleted; private Integer deleted;
public ProductSpecDO(ProductSpecVO param) { public ProductSpecDO(ProductSpecVO param) {
this.id = param.getId(); this.id = param.getId();
this.productSkuId = param.getProductSkuId(); this.productId = param.getProductSkuId();
this.specName = param.getSpecName(); this.specName = param.getSpecName();
this.specImage = param.getSpecImage(); this.specImage = param.getSpecImage();
this.partNo = param.getPartNo(); this.partNo = param.getPartNo();
this.versionDesc = param.getVersionDesc(); this.versionDesc = param.getVersionDesc();
} }
public ProductSpecDTO buildProductSpecDTO() { public ProductSpecDTO buildProductSpecDTO() {
return ProductSpecDTO.builder() return ProductSpecDTO.builder()
.id(this.id) .id(this.id)
.productSkuId(this.productSkuId) .productSkuId(this.productId)
.specName(this.specName) .specName(this.specName)
.specImage(this.specImage) .specImage(this.specImage)
.partNo(this.partNo) .partNo(this.partNo)
.versionDesc(this.versionDesc) .versionDesc(this.versionDesc)
.createTime(this.createTime) .createTime(this.createTime)
.build(); .build();
} }
public MallProductSpecDTO buildMallProductSpecDTO() { public MallProductSpecDTO buildMallProductSpecDTO() {
return MallProductSpecDTO.builder() return MallProductSpecDTO.builder()
.productSpec(this.id) .productSpec(this.id)
.productSkuId(this.productSkuId) .productSkuId(this.productId)
.specName(this.specName) .specName(this.specName)
.specImage(this.specImage) .specImage(this.specImage)
.partNo(this.partNo) .partNo(this.partNo)
.versionDesc(this.versionDesc) .versionDesc(this.versionDesc)
.build(); .build();
} }
} }
package com.mmc.pms.entity; package com.mmc.pms.entity;
import com.mmc.pms.model.categories.vo.RelevanceServiceInfoVO;
import com.mmc.pms.model.group.Others;
import com.mmc.pms.model.work.vo.ServiceVO; import com.mmc.pms.model.work.vo.ServiceVO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -7,6 +9,7 @@ import lombok.Builder; ...@@ -7,6 +9,7 @@ import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -61,6 +64,14 @@ public class ServiceDO implements Serializable { ...@@ -61,6 +64,14 @@ public class ServiceDO implements Serializable {
@ApiModelProperty(value = "逻辑删除字段") @ApiModelProperty(value = "逻辑删除字段")
private Integer isDeleted; private Integer isDeleted;
@ApiModelProperty(value = "单位id")
private Integer companyId;
@ApiModelProperty(value = "顺序")
@NotNull(message = "sort不能为空", groups = { Others.class})
private Integer sort;
public ServiceDO(ServiceVO param, Integer accountId) { public ServiceDO(ServiceVO param, Integer accountId) {
this(param); this(param);
this.accountId = accountId; this.accountId = accountId;
...@@ -76,10 +87,9 @@ public class ServiceDO implements Serializable { ...@@ -76,10 +87,9 @@ public class ServiceDO implements Serializable {
this.shareCard = param.getShareCard(); this.shareCard = param.getShareCard();
this.video = param.getVideo(); this.video = param.getVideo();
this.serviceIntroduction = param.getServiceIntroduction(); this.serviceIntroduction = param.getServiceIntroduction();
this.companyId=param.getCompanyId();
} }
public RelevanceServiceInfoVO buildRelevanceServiceInfoVO(){
public ServiceDO(Integer id, Integer accountId) { return RelevanceServiceInfoVO.builder().id(id).name(serviceName).shelf(displayState).videoUrl(video).build();
this.id = id;
this.accountId = accountId;
} }
} }
...@@ -17,4 +17,7 @@ import java.util.List; ...@@ -17,4 +17,7 @@ import java.util.List;
public interface ImsAppApi { public interface ImsAppApi {
@GetMapping("/release/curriculum/feignCurriculumInfoList") @GetMapping("/release/curriculum/feignCurriculumInfoList")
List<CurriculumInfoVO> feignCurriculumInfoList(@RequestParam Integer categoriesId); List<CurriculumInfoVO> feignCurriculumInfoList(@RequestParam Integer categoriesId);
@GetMapping("/release/curriculum/feignCountCurriculumInfo")
int feignCountCurriculumInfo(@RequestParam Integer categoriesId);
} }
...@@ -3,8 +3,11 @@ package com.mmc.pms.feign; ...@@ -3,8 +3,11 @@ package com.mmc.pms.feign;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import com.mmc.pms.auth.dto.BUserAccountQO; import com.mmc.pms.auth.dto.BUserAccountQO;
import com.mmc.pms.auth.dto.CompanyInfoDTO;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.auth.dto.UserAccountSimpleDTO; import com.mmc.pms.auth.dto.UserAccountSimpleDTO;
import com.mmc.pms.feign.hystrix.UserAppApiHystrix; import com.mmc.pms.feign.hystrix.UserAppApiHystrix;
import com.mmc.pms.model.qo.CompanyInfoQO;
import com.mmc.pms.model.qo.UserAccountQO; import com.mmc.pms.model.qo.UserAccountQO;
import io.swagger.annotations.ApiParam; import io.swagger.annotations.ApiParam;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
...@@ -67,4 +70,17 @@ public interface UserAppApi { ...@@ -67,4 +70,17 @@ public interface UserAppApi {
*/ */
@PostMapping("/userapp/user-account/feignListAppUserAccount") @PostMapping("/userapp/user-account/feignListAppUserAccount")
List<UserAccountSimpleDTO> feignListAppUserAccount(@ApiParam(value = "账号查询QO", required = true) @RequestBody UserAccountQO userAccountQO, @RequestHeader("token") String token); List<UserAccountSimpleDTO> feignListAppUserAccount(@ApiParam(value = "账号查询QO", required = true) @RequestBody UserAccountQO userAccountQO, @RequestHeader("token") String token);
/**
* 获取单位数据
* @param id
* @param token
* @return
*/
@GetMapping("/userapp/company/getCompanyInfoById")
String getCompanyInfoById(@ApiParam(value = "单位", required = true) @RequestParam Integer id, @RequestHeader("token") String token);
@PostMapping("/userapp/company/listCompanyPageBack")
List<CompanyInfoVO> listCompanyPage(@ApiParam(value = "单位查询QO", required = true) @RequestBody CompanyInfoQO companyInfoQO, @RequestHeader("token") String token);
} }
...@@ -18,4 +18,10 @@ public class ImsApiHystrix implements ImsAppApi { ...@@ -18,4 +18,10 @@ public class ImsApiHystrix implements ImsAppApi {
log.error("熔断:feignCurriculumInfoList:{}", categoriesId); log.error("熔断:feignCurriculumInfoList:{}", categoriesId);
return null; return null;
} }
@Override
public int feignCountCurriculumInfo(Integer categoriesId) {
log.error("熔断:feignCountCurriculumInfo:{}", categoriesId);
return 0;
}
} }
package com.mmc.pms.feign.hystrix; package com.mmc.pms.feign.hystrix;
import com.mmc.pms.auth.dto.BUserAccountQO; import com.mmc.pms.auth.dto.BUserAccountQO;
import com.mmc.pms.auth.dto.CompanyInfoDTO;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.auth.dto.UserAccountSimpleDTO; import com.mmc.pms.auth.dto.UserAccountSimpleDTO;
import com.mmc.pms.feign.UserAppApi; import com.mmc.pms.feign.UserAppApi;
import com.mmc.pms.model.qo.CompanyInfoQO;
import com.mmc.pms.model.qo.UserAccountQO; import com.mmc.pms.model.qo.UserAccountQO;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
...@@ -37,4 +40,16 @@ public class UserAppApiHystrix implements UserAppApi { ...@@ -37,4 +40,16 @@ public class UserAppApiHystrix implements UserAppApi {
log.error("熔断:feignListAppUserAccount:{}", userAccountQO); log.error("熔断:feignListAppUserAccount:{}", userAccountQO);
return null; return null;
} }
@Override
public String getCompanyInfoById(Integer id, String token) {
log.error("熔断:feignListAppUserAccount:{}", id);
return null;
}
@Override
public List<CompanyInfoVO> listCompanyPage(CompanyInfoQO companyInfoQO, String token) {
log.error("熔断:feignListAppUserAccount:{}", companyInfoQO);
return null;
}
} }
...@@ -71,4 +71,8 @@ public class CurriculumInfoVO implements Serializable { ...@@ -71,4 +71,8 @@ public class CurriculumInfoVO implements Serializable {
@ApiModelProperty(value = "课程详情") @ApiModelProperty(value = "课程详情")
private String detailContent; private String detailContent;
public RelevanceCurriculumVO buildRelevanceCurriculumVO(){
return RelevanceCurriculumVO.builder().id(id).curriculumUrl(surfaceUrl).curriculumName(curriculumName).build();
}
} }
...@@ -2,6 +2,7 @@ package com.mmc.pms.model.categories.vo; ...@@ -2,6 +2,7 @@ package com.mmc.pms.model.categories.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -15,6 +16,7 @@ import java.io.Serializable; ...@@ -15,6 +16,7 @@ import java.io.Serializable;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder
public class RelevanceCurriculumVO implements Serializable { public class RelevanceCurriculumVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
...@@ -22,7 +24,10 @@ public class RelevanceCurriculumVO implements Serializable { ...@@ -22,7 +24,10 @@ public class RelevanceCurriculumVO implements Serializable {
@ApiModelProperty(value = "课程名称") @ApiModelProperty(value = "课程名称")
private String curriculumName; private String curriculumName;
// 课程图片
// 状态
@ApiModelProperty(value = "课程图片")
private String curriculumUrl;
@ApiModelProperty(value = "状态")
private String status;
} }
...@@ -2,6 +2,7 @@ package com.mmc.pms.model.categories.vo; ...@@ -2,6 +2,7 @@ package com.mmc.pms.model.categories.vo;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
...@@ -15,11 +16,10 @@ import java.io.Serializable; ...@@ -15,11 +16,10 @@ import java.io.Serializable;
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
@Builder
public class RelevanceServiceInfoVO implements Serializable { public class RelevanceServiceInfoVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Integer id; private Integer id;
@ApiModelProperty(value = "服务编号")
private String number;
@ApiModelProperty(value = "服务名称") @ApiModelProperty(value = "服务名称")
private String name; private String name;
@ApiModelProperty(value = "视频") @ApiModelProperty(value = "视频")
......
package com.mmc.pms.model.group;
/**
* @Author small
* @Date 2023/7/5 16:55
* @Version 1.0
*/
public @interface Others {
}
...@@ -5,6 +5,8 @@ import lombok.AllArgsConstructor; ...@@ -5,6 +5,8 @@ import lombok.AllArgsConstructor;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import java.util.List;
/** /**
* @author 23214 * @author 23214
*/ */
...@@ -12,9 +14,6 @@ import lombok.NoArgsConstructor; ...@@ -12,9 +14,6 @@ import lombok.NoArgsConstructor;
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
public class PriceAcquisition { public class PriceAcquisition {
@ApiModelProperty(value = "用户id")
private Integer userId;
@ApiModelProperty(value = "规格id") @ApiModelProperty(value = "规格id")
private Integer specsId; private Integer specsId;
...@@ -22,6 +21,6 @@ public class PriceAcquisition { ...@@ -22,6 +21,6 @@ public class PriceAcquisition {
private Integer day; private Integer day;
@ApiModelProperty(value = "渠道等级id") @ApiModelProperty(value = "渠道等级id")
private Integer channelLevelId; private List<Integer> channelLevelId;
} }
\ No newline at end of file
package com.mmc.pms.model.qo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.domain.Page;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/7/4 13:37
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CompanyInfoQO {
@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;
}
...@@ -13,30 +13,36 @@ import java.io.Serializable; ...@@ -13,30 +13,36 @@ import java.io.Serializable;
/** /**
* @Author LW * @Author LW
* @date 2022/9/26 11:13 *
* 概要: * @date 2022/9/26 11:13 概要:
*/ */
@Data @Data
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class ProductSkuQO implements Serializable { public class ProductSkuQO implements Serializable {
private static final long serialVersionUID = 7548828456935084794L; private static final long serialVersionUID = 7548828456935084794L;
@ApiModelProperty(value = "产品名称")
private String productName; @ApiModelProperty(value = "产品名称")
@ApiModelProperty(value = "产品类型") private String productName;
private Integer categoryId;
@ApiModelProperty(value = "产品目录") @ApiModelProperty(value = "归属商品 0:商城商品 1:租赁商品")
private Integer directoryId; private Integer type;
@ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = {Page.class, Freeze.class}) @ApiModelProperty(value = "页码", required = true)
@Min(value = 1, groups = Page.class) @NotNull(
private Integer pageNo; message = "页码不能为空",
@ApiModelProperty(value = "每页显示数", required = true) groups = {Page.class, Freeze.class})
@NotNull(message = "每页显示数不能为空", groups = {Page.class, Freeze.class}) @Min(value = 1, groups = Page.class)
@Min(value = 1, groups = Page.class) private Integer pageNo;
private Integer pageSize;
@ApiModelProperty(value = "每页显示数", required = true)
public void buildCurrentPage() { @NotNull(
this.pageNo = (pageNo - 1) * pageSize; message = "每页显示数不能为空",
} groups = {Page.class, Freeze.class})
@Min(value = 1, groups = Page.class)
private Integer pageSize;
public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize;
}
} }
...@@ -65,4 +65,10 @@ public class ServiceQO implements Serializable { ...@@ -65,4 +65,10 @@ public class ServiceQO implements Serializable {
public void buildCurrentPage() { public void buildCurrentPage() {
this.pageNo = (pageNo - 1) * pageSize; this.pageNo = (pageNo - 1) * pageSize;
} }
@ApiModelProperty(value = "部门id", required = true)
private Integer companyId;
@ApiModelProperty(value = "单位类型,0科比特,1加盟公司", required = true)
private Integer companyType;
} }
...@@ -23,6 +23,9 @@ public class WareInfoQO implements Serializable { ...@@ -23,6 +23,9 @@ public class WareInfoQO implements Serializable {
@ApiModelProperty(name = "districtId", value = "地域id", example = "440000") @ApiModelProperty(name = "districtId", value = "地域id", example = "440000")
private Integer provinceId; private Integer provinceId;
@ApiModelProperty(name = "goodsName", value = "商品名称", example = "6")
private String goodsName;
@ApiModelProperty(name = "categoryId", value = "分类id") @ApiModelProperty(name = "categoryId", value = "分类id")
private List<Integer> categoryId; private List<Integer> categoryId;
......
...@@ -27,12 +27,6 @@ public class GoodsSpecDTO implements Serializable { ...@@ -27,12 +27,6 @@ public class GoodsSpecDTO implements Serializable {
@ApiModelProperty(value = "规格名称") @ApiModelProperty(value = "规格名称")
private String goodsSpecName; private String goodsSpecName;
@ApiModelProperty(value = "产品或行业类型")
private Integer categoryId;
@ApiModelProperty(value = "产品或行业类型名称")
private String typeName;
@ApiModelProperty(value = "产品或行业skuId") @ApiModelProperty(value = "产品或行业skuId")
private Integer skuId; private Integer skuId;
......
...@@ -18,38 +18,29 @@ import java.util.List; ...@@ -18,38 +18,29 @@ import java.util.List;
@AllArgsConstructor @AllArgsConstructor
@Builder @Builder
public class ProductSkuDTO implements Serializable { public class ProductSkuDTO implements Serializable {
private static final long serialVersionUID = -2681122778843398310L; private static final long serialVersionUID = -2681122778843398310L;
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Integer id; private Integer id;
@ApiModelProperty(value = "产品名称") @ApiModelProperty(value = "产品名称")
private String productName; private String productName;
@ApiModelProperty(value = "产品类型id") @ApiModelProperty(value = "型号")
private Integer categoriesId; private String model;
@ApiModelProperty(value = "产品类型名称") @ApiModelProperty(value = "产品品牌")
private String categoryName; private String productBrand;
@ApiModelProperty(value = "型号") @ApiModelProperty(value = "产品品牌id")
private String model; private Integer productBrandId;
@ApiModelProperty(value = "产品品牌") @ApiModelProperty(value = "创建时间")
private String productBrand; private Date createTime;
@ApiModelProperty(value = "产品品牌id") @ApiModelProperty(value = "归属商品 0:商城商品 1:租赁商品")
private Integer productBrandId; private Integer type;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "产品规格信息对象")
private Date createTime; private List<ProductSpecDTO> productSpecList;
@ApiModelProperty(value = "目录id")
private Integer directoryId;
@ApiModelProperty(value = "目录名称")
private String directoryName;
@ApiModelProperty(value = "产品规格信息对象")
private List<ProductSpecDTO> productSpecList;
} }
...@@ -17,26 +17,29 @@ import java.io.Serializable; ...@@ -17,26 +17,29 @@ import java.io.Serializable;
@NoArgsConstructor @NoArgsConstructor
@AllArgsConstructor @AllArgsConstructor
public class ProductSkuVO implements Serializable { public class ProductSkuVO implements Serializable {
private static final long serialVersionUID = -2681122778843398310L; private static final long serialVersionUID = -2681122778843398310L;
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
@NotNull(message = "修改时id不能为空", groups = {Update.class}) @NotNull(
private Integer id; message = "修改时id不能为空",
groups = {Update.class})
@NotNull(message = "产品名称不能为空", groups = {Update.class, Create.class}) private Integer id;
@ApiModelProperty(value = "产品名称")
private String productName; @NotNull(
message = "产品名称不能为空",
@NotNull(message = "产品类型id不能为空", groups = {Update.class, Create.class}) groups = {Update.class, Create.class})
@ApiModelProperty(value = "产品类型id") @ApiModelProperty(value = "产品名称")
private Integer categoryId; private String productName;
@ApiModelProperty(value = "型号") @NotNull(
private String model; message = "归属商品不能为空",
groups = {Create.class})
@ApiModelProperty(value = "品牌id") @ApiModelProperty(value = "归属商品")
private Integer productBrandId; private Integer type;
@ApiModelProperty(value = "目录id") @ApiModelProperty(value = "型号")
private Integer directoryId; private String model;
@ApiModelProperty(value = "品牌id")
private Integer productBrandId;
} }
...@@ -25,7 +25,7 @@ public class ProductSpecVO implements Serializable { ...@@ -25,7 +25,7 @@ public class ProductSpecVO implements Serializable {
@ApiModelProperty(value = "id") @ApiModelProperty(value = "id")
private Integer id; private Integer id;
@ApiModelProperty(value = "productSkuId") @ApiModelProperty(value = "产品id")
@NotNull(message = "修改时productSkuId不能为空", groups = {Create.class}) @NotNull(message = "修改时productSkuId不能为空", groups = {Create.class})
private Integer productSkuId; private Integer productSkuId;
......
...@@ -28,9 +28,9 @@ public class GoodsProdSpecVO implements Serializable { ...@@ -28,9 +28,9 @@ public class GoodsProdSpecVO implements Serializable {
@ApiModelProperty(value = "产品类型id") @ApiModelProperty(value = "产品类型id")
private Integer categoryId; private Integer categoryId;
@ApiModelProperty(value = "产品:新增自定义时此字段可不用填写")
@ApiModelProperty(value = "产品:自定义时此字段可不用填写")
private Integer skuId; private Integer skuId;
@ApiModelProperty(value = "规格来源 0:获取 1:自定义") @ApiModelProperty(value = "规格来源 0:获取 1:自定义")
private Integer flag; private Integer flag;
......
...@@ -18,6 +18,4 @@ public class SpecPriceVO implements Serializable { ...@@ -18,6 +18,4 @@ public class SpecPriceVO implements Serializable {
private Integer id; private Integer id;
private Integer cooperationTag; private Integer cooperationTag;
private BigDecimal price; private BigDecimal price;
private Integer productSpecId;
private Integer leaseTerm;
} }
...@@ -2,6 +2,7 @@ package com.mmc.pms.model.work.dto; ...@@ -2,6 +2,7 @@ package com.mmc.pms.model.work.dto;
import com.mmc.pms.entity.InspComtDO; import com.mmc.pms.entity.InspComtDO;
import com.mmc.pms.entity.ServiceDO; import com.mmc.pms.entity.ServiceDO;
import com.mmc.pms.model.group.Others;
import com.mmc.pms.model.work.vo.ServiceVO; import com.mmc.pms.model.work.vo.ServiceVO;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -9,6 +10,7 @@ import lombok.Builder; ...@@ -9,6 +10,7 @@ import lombok.Builder;
import lombok.Data; import lombok.Data;
import lombok.NoArgsConstructor; import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
...@@ -73,6 +75,15 @@ public class ServiceDTO implements Serializable { ...@@ -73,6 +75,15 @@ public class ServiceDTO implements Serializable {
@ApiModelProperty(value = "修改时间") @ApiModelProperty(value = "修改时间")
private Date updateTime; private Date updateTime;
@ApiModelProperty(value = "单位id")
private Integer companyId;
@ApiModelProperty(value = "单位名称")
private String companyName;
@ApiModelProperty(value = "顺序")
private Integer sort;
public ServiceDTO(ServiceVO param, Integer accountId) { public ServiceDTO(ServiceVO param, Integer accountId) {
this.id = param.getId(); this.id = param.getId();
this.serviceName = param.getServiceName(); this.serviceName = param.getServiceName();
...@@ -116,6 +127,25 @@ public class ServiceDTO implements Serializable { ...@@ -116,6 +127,25 @@ public class ServiceDTO implements Serializable {
this.accountId = serviceDO.getAccountId(); this.accountId = serviceDO.getAccountId();
this.createTime = serviceDO.getCreateTime(); this.createTime = serviceDO.getCreateTime();
this.updateTime = serviceDO.getUpdateTime(); this.updateTime = serviceDO.getUpdateTime();
this.companyId=serviceDO.getCompanyId();
this.sort=serviceDO.getSort();
}
public ServiceDTO(ServiceDO serviceDO,String companyName) {
this.id = serviceDO.getId();
this.serviceName = serviceDO.getServiceName();
this.applicationId = serviceDO.getApplicationId();
this.industryId = serviceDO.getIndustryId();
this.displayState = serviceDO.getDisplayState();
this.coverPlan = serviceDO.getCoverPlan();
this.shareCard = serviceDO.getShareCard();
this.video = serviceDO.getVideo();
this.serviceIntroduction = serviceDO.getServiceIntroduction();
this.accountId = serviceDO.getAccountId();
this.createTime = serviceDO.getCreateTime();
this.updateTime = serviceDO.getUpdateTime();
this.companyId=serviceDO.getCompanyId();
this.companyName=companyName;
} }
} }
...@@ -45,12 +45,18 @@ public class WorkServiceDTO implements Serializable { ...@@ -45,12 +45,18 @@ public class WorkServiceDTO implements Serializable {
@ApiModelProperty(value = "服务介绍") @ApiModelProperty(value = "服务介绍")
private String serviceIntroduction; private String serviceIntroduction;
@ApiModelProperty(value = "公司名称") @ApiModelProperty(value = "部门名称")
private String companyName; private String companyName;
@ApiModelProperty(value = "部门id")
private Integer companyId;
@ApiModelProperty(value = "评论列表") @ApiModelProperty(value = "评论列表")
private List<InspComtDO> inspComtList; private List<InspComtDO> inspComtList;
@ApiModelProperty(value = "评论数量") @ApiModelProperty(value = "评论数量")
private Integer inspComtAmount; private Integer inspComtAmount;
@ApiModelProperty(value = "排序")
private Integer sort;
} }
package com.mmc.pms.model.work.vo; package com.mmc.pms.model.work.vo;
import com.mmc.pms.model.group.Create; import com.mmc.pms.model.group.Create;
import com.mmc.pms.model.group.Others;
import com.mmc.pms.model.group.Update; import com.mmc.pms.model.group.Update;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
...@@ -28,7 +29,7 @@ public class ServiceVO implements Serializable { ...@@ -28,7 +29,7 @@ public class ServiceVO implements Serializable {
@NotNull( @NotNull(
message = "修改服务id不能为空", message = "修改服务id不能为空",
groups = {Update.class}) groups = {Update.class, Others.class})
private Integer id; private Integer id;
@ApiModelProperty(value = "服务名称", example = "服务名称") @ApiModelProperty(value = "服务名称", example = "服务名称")
...@@ -67,4 +68,11 @@ public class ServiceVO implements Serializable { ...@@ -67,4 +68,11 @@ public class ServiceVO implements Serializable {
@ApiModelProperty(value = "服务介绍") @ApiModelProperty(value = "服务介绍")
private String serviceIntroduction; private String serviceIntroduction;
@ApiModelProperty(value = "单位id")
private Integer companyId;
@ApiModelProperty(value = "顺序")
@NotNull(message = "sort不能为空", groups = { Others.class})
private Integer sort;
} }
package com.mmc.pms.service; package com.mmc.pms.service;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.model.qo.ServiceQO; import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO; import com.mmc.pms.model.work.dto.ServiceDTO;
...@@ -22,9 +23,9 @@ public interface BackstageTaskService { ...@@ -22,9 +23,9 @@ public interface BackstageTaskService {
ResultBody deleteByIds(List<Integer> ids); ResultBody deleteByIds(List<Integer> ids);
ResultBody<ServiceDTO> queryById(Integer id); ResultBody<ServiceDTO> queryById(Integer id,HttpServletRequest request);
PageResult queryServiceManagerList(ServiceQO param, Integer userAccountId); PageResult queryServiceManagerList(ServiceQO param, Integer userAccountId, CompanyInfoVO companyInfoDTO);
PageResult queryWorkServiceList(ServiceQO param, HttpServletRequest request); PageResult queryWorkServiceList(ServiceQO param, HttpServletRequest request);
...@@ -33,4 +34,8 @@ public interface BackstageTaskService { ...@@ -33,4 +34,8 @@ public interface BackstageTaskService {
ResultBody batchUpAndDownWorkService(UpAndDownServiceVO param); ResultBody batchUpAndDownWorkService(UpAndDownServiceVO param);
Integer getWorkServiceCountByCategoriesId(List<Integer> ids); Integer getWorkServiceCountByCategoriesId(List<Integer> ids);
ResultBody queryByIdCount(Integer id);
ResultBody exchange(List<ServiceVO> list);
} }
...@@ -2,8 +2,6 @@ package com.mmc.pms.service; ...@@ -2,8 +2,6 @@ package com.mmc.pms.service;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.entity.Categories; import com.mmc.pms.entity.Categories;
import com.mmc.pms.entity.DirectoryDO;
import com.mmc.pms.entity.DistrictDO;
import com.mmc.pms.model.categories.dto.AllCategoryDTO; import com.mmc.pms.model.categories.dto.AllCategoryDTO;
import com.mmc.pms.model.categories.vo.ClassifyInfoVO; import com.mmc.pms.model.categories.vo.ClassifyInfoVO;
import com.mmc.pms.model.categories.vo.DirectoryInfoVO; import com.mmc.pms.model.categories.vo.DirectoryInfoVO;
...@@ -11,7 +9,6 @@ import com.mmc.pms.model.sale.vo.QueryClassifyVO; ...@@ -11,7 +9,6 @@ import com.mmc.pms.model.sale.vo.QueryClassifyVO;
import com.mmc.pms.page.PageResult; import com.mmc.pms.page.PageResult;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.Set; import java.util.Set;
/** /**
...@@ -37,7 +34,7 @@ public interface CategoriesService { ...@@ -37,7 +34,7 @@ public interface CategoriesService {
ResultBody getClassifyDetails(Integer id); ResultBody getClassifyDetails(Integer id);
ResultBody queryRelevantBusiness(Integer id, Integer type); PageResult queryRelevantBusiness(Integer id, Integer type,Integer pageNo,Integer pageSize);
ResultBody deleteRelevantBusiness(Integer id); ResultBody deleteRelevantBusiness(Integer id);
......
...@@ -21,7 +21,7 @@ import java.util.List; ...@@ -21,7 +21,7 @@ import java.util.List;
*/ */
public interface GoodsInfoService { public interface GoodsInfoService {
ResultBody addGoods(GoodsAddVO goodsAddVO); ResultBody addGoods(GoodsAddVO goodsAddVO, Integer userAccountId);
ResultBody editGoodsInfo(GoodsAddVO goodsAddVO); ResultBody editGoodsInfo(GoodsAddVO goodsAddVO);
...@@ -46,4 +46,6 @@ public interface GoodsInfoService { ...@@ -46,4 +46,6 @@ public interface GoodsInfoService {
ResultBody batchOnShelfOrTakeDown(List<Integer> goodsIds, Integer status); ResultBody batchOnShelfOrTakeDown(List<Integer> goodsIds, Integer status);
ResultBody batchRemoveWareInfo(List<Integer> ids); ResultBody batchRemoveWareInfo(List<Integer> ids);
ResultBody exchangeGoodsInfo(Integer firstId, Integer secondId);
} }
package com.mmc.pms.service.Impl;
import com.mmc.pms.service.WebAndMiniProgramCategoryService;
import org.springframework.stereotype.Service;
/**
* @Author LW
* @date 2023/6/7 13:51
* 概要:
*/
@Service
public class WebAndMiniProgramCategoryServiceImpl implements WebAndMiniProgramCategoryService {
}
...@@ -34,11 +34,11 @@ public interface ProductSkuService { ...@@ -34,11 +34,11 @@ public interface ProductSkuService {
ResultBody listPageProductSpec( ResultBody listPageProductSpec(
Integer pageNo, Integer pageSize, Integer productSkuId, String keyword); Integer pageNo, Integer pageSize, Integer productSkuId, String keyword);
ResultBody productSpecCPQ(ProductSpecCPQVO productSpecCPQVO); ResultBody productSpecCPQ(List<ProductSpecCPQVO> productSpecCPQVO);
List<ProductSpecPriceDO> getProductSpecPriceDOS(ProductSpecCPQVO productSpecCPQVO); List<ProductSpecPriceDO> getProductSpecPriceDOS(ProductSpecCPQVO productSpecCPQVO);
ResultBody updateProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO); ResultBody updateProductSpecCPQ(List<ProductSpecCPQVO> productSpecCPQVO);
ResultBody getProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO); ResultBody getProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO);
......
package com.mmc.pms.service.Impl; package com.mmc.pms.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.google.common.reflect.TypeToken;
import com.google.gson.Gson;
import com.mmc.pms.auth.dto.CompanyInfoDTO;
import com.mmc.pms.auth.dto.CompanyInfoVO;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.constant.DateConstant; import com.mmc.pms.constant.DateConstant;
import com.mmc.pms.dao.BackstageTaskServiceDao; import com.mmc.pms.dao.BackstageTaskServiceDao;
...@@ -10,6 +15,7 @@ import com.mmc.pms.entity.Categories; ...@@ -10,6 +15,7 @@ import com.mmc.pms.entity.Categories;
import com.mmc.pms.entity.InspComtDO; import com.mmc.pms.entity.InspComtDO;
import com.mmc.pms.entity.ServiceDO; import com.mmc.pms.entity.ServiceDO;
import com.mmc.pms.feign.UserAppApi; import com.mmc.pms.feign.UserAppApi;
import com.mmc.pms.model.qo.CompanyInfoQO;
import com.mmc.pms.model.qo.ServiceQO; import com.mmc.pms.model.qo.ServiceQO;
import com.mmc.pms.model.work.dto.ServiceDTO; import com.mmc.pms.model.work.dto.ServiceDTO;
import com.mmc.pms.model.work.dto.WorkServiceDTO; import com.mmc.pms.model.work.dto.WorkServiceDTO;
...@@ -25,6 +31,7 @@ import org.apache.commons.lang3.time.DateUtils; ...@@ -25,6 +31,7 @@ import org.apache.commons.lang3.time.DateUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -54,7 +61,8 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -54,7 +61,8 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
@Override @Override
public ResultBody addWorkService(ServiceVO param, Integer userAccountId) { public ResultBody addWorkService(ServiceVO param, Integer userAccountId) {
ServiceDO serviceDO = new ServiceDO(param, userAccountId); ServiceDO serviceDO = new ServiceDO(param, userAccountId);
backstageTaskServiceDao.insert(serviceDO); Integer insert = backstageTaskServiceDao.insert(serviceDO);
backstageTaskServiceDao.exchangeSort(serviceDO.getId(),serviceDO.getId());
return ResultBody.success(); return ResultBody.success();
} }
...@@ -74,9 +82,16 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -74,9 +82,16 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
} }
@Override @Override
public ResultBody<ServiceDTO> queryById(Integer id) { public ResultBody<ServiceDTO> queryById(Integer id, HttpServletRequest request) {
ServiceDO serviceDO = backstageTaskServiceDao.queryById(id); ServiceDO serviceDO = backstageTaskServiceDao.queryById(id);
ServiceDTO serviceDTO = new ServiceDTO(serviceDO); String token =
userAppApi.getCompanyInfoById(serviceDO.getCompanyId(), request.getHeader("token"));
JSONObject jsonObject = JSONObject.parseObject(token);
CompanyInfoDTO companyInfoDTO =
JSON.parseObject(
String.valueOf((JSONObject) jsonObject.get("result")), CompanyInfoDTO.class);
String companyName = companyInfoDTO.getCompanyName();
ServiceDTO serviceDTO = new ServiceDTO(serviceDO, companyName);
Map<Integer, String> categoriesNameMap = Map<Integer, String> categoriesNameMap =
getCategoriesNameByIds( getCategoriesNameByIds(
Arrays.asList(serviceDTO.getApplicationId(), serviceDTO.getIndustryId())); Arrays.asList(serviceDTO.getApplicationId(), serviceDTO.getIndustryId()));
...@@ -107,7 +122,10 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -107,7 +122,10 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
} }
@Override @Override
public PageResult queryServiceManagerList(ServiceQO param, Integer userAccountId) { public PageResult queryServiceManagerList(
ServiceQO param, Integer userAccountId, CompanyInfoVO companyInfoVO) {
param.setCompanyId(companyInfoVO.getId());
param.setCompanyType(companyInfoVO.getCompanyType());
int count = backstageTaskServiceDao.count(param); int count = backstageTaskServiceDao.count(param);
if (count == 0) { if (count == 0) {
return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count); return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count);
...@@ -140,6 +158,7 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -140,6 +158,7 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
} }
@Override @Override
@Transactional
public PageResult queryWorkServiceList(ServiceQO param, HttpServletRequest request) { public PageResult queryWorkServiceList(ServiceQO param, HttpServletRequest request) {
Integer pageNo = param.getPageNo(); Integer pageNo = param.getPageNo();
param.buildCurrentPage(); param.buildCurrentPage();
...@@ -159,7 +178,7 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -159,7 +178,7 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
List<ServiceDO> pageList = List<ServiceDO> pageList =
backstageTaskServiceDao.queryPageByLimit(param, categoriesIds, userIds); backstageTaskServiceDao.queryPageByLimit(param, categoriesIds, userIds);
List<WorkServiceDTO> workServiceDTOList = getWorkServiceDTOS(pageList); List<WorkServiceDTO> workServiceDTOList = getWorkServiceDTOS(pageList, request);
return PageResult.buildPage(pageNo, param.getPageSize(), count, workServiceDTOList); return PageResult.buildPage(pageNo, param.getPageSize(), count, workServiceDTOList);
} }
...@@ -184,24 +203,53 @@ public class BackstageTaskServiceImpl implements BackstageTaskService { ...@@ -184,24 +203,53 @@ public class BackstageTaskServiceImpl implements BackstageTaskService {
return backstageTaskServiceDao.getWorkServiceCountByCategoriesId(ids); return backstageTaskServiceDao.getWorkServiceCountByCategoriesId(ids);
} }
private List<WorkServiceDTO> getWorkServiceDTOS(List<ServiceDO> pageList) { @Override
// 用户暂时无关联公司数据,先用假数据展示 public ResultBody queryByIdCount(Integer companyId) {
String companyName = "浙江科比特创新科技有限公司"; return ResultBody.success(backstageTaskServiceDao.queryByIdCount(companyId));
}
@Transactional
@Override
public ResultBody exchange(List<ServiceVO> list) {
Integer sort = list.get(0).getSort();
ServiceDO serviceDO = new ServiceDO();
serviceDO.setId(list.get(0).getId());
serviceDO.setSort(list.get(1).getSort());
backstageTaskServiceDao.exchange(serviceDO);
ServiceDO serviceDO1 = new ServiceDO();
serviceDO1.setId(list.get(1).getId());
serviceDO1.setSort(sort);
backstageTaskServiceDao.exchange(serviceDO1);
return ResultBody.success();
}
private List<WorkServiceDTO> getWorkServiceDTOS(List<ServiceDO> pageList,HttpServletRequest request) {
List<CompanyInfoVO> companyInfoList = userAppApi.listCompanyPage(new CompanyInfoQO(1, 100000), request.getHeader("token"));
String companyName = "";
List<WorkServiceDTO> workServiceDTOList = new ArrayList<>(); List<WorkServiceDTO> workServiceDTOList = new ArrayList<>();
for (ServiceDO item : pageList) { for (ServiceDO item : pageList) {
for (CompanyInfoVO companyInfoVO : companyInfoList) {
if (item.getCompanyId().equals(companyInfoVO.getId())){
companyName=companyInfoVO.getCompanyName();
break;
}
}
List<InspComtDO> inspComtDOS = generateComments(item); List<InspComtDO> inspComtDOS = generateComments(item);
WorkServiceDTO workServiceDTO = WorkServiceDTO workServiceDTO =
WorkServiceDTO.builder() WorkServiceDTO.builder()
.id(item.getId()) .id(item.getId())
.serviceName(item.getServiceName()) .serviceName(item.getServiceName())
.companyName(companyName) .companyId(item.getCompanyId())
.coverPlan(item.getCoverPlan()) .companyName(companyName)
.serviceIntroduction(item.getServiceIntroduction()) .sort(item.getSort())
.video(item.getVideo()) .coverPlan(item.getCoverPlan())
.shareCard(item.getShareCard()) .serviceIntroduction(item.getServiceIntroduction())
.inspComtList(inspComtDOS) .video(item.getVideo())
.inspComtAmount(inspComtDOS.size()) .shareCard(item.getShareCard())
.build(); .inspComtList(inspComtDOS)
.inspComtAmount(inspComtDOS.size())
.build();
workServiceDTOList.add(workServiceDTO); workServiceDTOList.add(workServiceDTO);
} }
return workServiceDTOList; return workServiceDTOList;
......
package com.mmc.pms.service.Impl; package com.mmc.pms.service.impl;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum; import com.mmc.pms.common.ResultEnum;
...@@ -17,82 +17,78 @@ import java.util.stream.Collectors; ...@@ -17,82 +17,78 @@ import java.util.stream.Collectors;
/** /**
* @Author LW * @Author LW
* @date 2023/3/14 13:27 *
* 概要: * @date 2023/3/14 13:27 概要:
*/ */
@Service @Service
public class BrandManageServiceImpl implements BrandManageService { public class BrandManageServiceImpl implements BrandManageService {
@Autowired @Autowired private BrandManageDao brandManageDao;
private BrandManageDao brandManageDao; @Resource private ProductDao productDao;
@Resource
private ProductDao productDao;
/**
/** * 添加品牌信息
* 添加品牌信息 *
* * @param brandName 品牌名称
* @param brandName 品牌名称 * @return {@link ResultBody}
* @return {@link ResultBody} */
*/ @Override
@Override public ResultBody addBrandInfo(String brandName) {
public ResultBody addBrandInfo(String brandName) { // 根据品牌名称判断是否存在
// 根据品牌名称判断是否存在 int count = brandManageDao.countBrandInfoByName(null, brandName);
int count = brandManageDao.countBrandInfoByName(null, brandName); if (count > 0) {
if (count > 0) { return ResultBody.error(ResultEnum.GOODS_CATEGORY_NAME_EXIST_ERROR);
return ResultBody.error(ResultEnum.GOODS_CATEGORY_NAME_EXIST_ERROR);
}
BrandInfoDO brandInfoDO = new BrandInfoDO(brandName);
brandManageDao.insertBrandInfo(brandInfoDO);
return ResultBody.success();
} }
BrandInfoDO brandInfoDO = new BrandInfoDO(brandName);
brandManageDao.insertBrandInfo(brandInfoDO);
return ResultBody.success();
}
/** /**
* 品牌列表信息 * 品牌列表信息
* *
* @return {@link ResultBody} * @return {@link ResultBody}
*/ */
@Override @Override
public PageResult listBrandInfo(Integer pageNo, Integer pageSize) { public PageResult listBrandInfo(Integer pageNo, Integer pageSize) {
int count = brandManageDao.countBrandInfo(); int count = brandManageDao.countBrandInfo();
if (count == 0) { if (count == 0) {
return PageResult.buildPage(pageNo, pageSize, 0); return PageResult.buildPage(pageNo, pageSize, 0);
}
int itemIndex = (pageNo - 1) * pageSize;
List<BrandInfoDO> brandInfo = brandManageDao.listBrandInfo(itemIndex, pageSize);
List<BrandInfoDTO> brandInfoList = brandInfo.stream()
.map(BrandInfoDO::buildBrandInfoDTO)
.collect(Collectors.toList());
return PageResult.buildPage(pageNo, pageSize, count, brandInfoList);
} }
int itemIndex = (pageNo - 1) * pageSize;
List<BrandInfoDO> brandInfo = brandManageDao.listBrandInfo(itemIndex, pageSize);
List<BrandInfoDTO> brandInfoList =
brandInfo.stream().map(BrandInfoDO::buildBrandInfoDTO).collect(Collectors.toList());
return PageResult.buildPage(pageNo, pageSize, count, brandInfoList);
}
/** /**
* 删除品牌信息 * 删除品牌信息
* *
* @param id id * @param id id
* @return {@link ResultBody} * @return {@link ResultBody}
*/ */
@Override @Override
public ResultBody deleteBrandInfo(Integer id) { public ResultBody deleteBrandInfo(Integer id) {
// 判断该品牌是否绑定产品信息 // 判断该品牌是否绑定产品信息
int count = productDao.countProductSpecByBrandId(id); int count = productDao.countProductSpecByBrandId(id);
if (count > 0) { if (count > 0) {
return ResultBody.error(ResultEnum.BRAND_DELETE_FAIL); return ResultBody.error(ResultEnum.BRAND_DELETE_FAIL);
}
brandManageDao.removeBrandInfoById(id);
return ResultBody.success();
} }
brandManageDao.removeBrandInfoById(id);
return ResultBody.success();
}
@Override @Override
public ResultBody editBrandInfo(Integer id, String brandName) { public ResultBody editBrandInfo(Integer id, String brandName) {
// 根据品牌名称判断是否存在 // 根据品牌名称判断是否存在
int count = brandManageDao.countBrandInfoByName(id, brandName); int count = brandManageDao.countBrandInfoByName(id, brandName);
if (count > 0) { if (count > 0) {
return ResultBody.error(ResultEnum.GOODS_CATEGORY_NAME_EXIST_ERROR); return ResultBody.error(ResultEnum.GOODS_CATEGORY_NAME_EXIST_ERROR);
}
BrandInfoDO brandInfoDO = new BrandInfoDO(brandName);
brandInfoDO.setId(id);
brandManageDao.updateBrandInfo(brandInfoDO);
return ResultBody.success();
} }
BrandInfoDO brandInfoDO = new BrandInfoDO(brandName);
brandInfoDO.setId(id);
brandManageDao.updateBrandInfo(brandInfoDO);
return ResultBody.success();
}
} }
package com.mmc.pms.service.Impl; package com.mmc.pms.service.impl;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
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.dao.BackstageTaskServiceDao;
import com.mmc.pms.dao.CategoriesDao; import com.mmc.pms.dao.CategoriesDao;
import com.mmc.pms.dao.DirectoryDao; import com.mmc.pms.dao.DirectoryDao;
import com.mmc.pms.dao.GoodsInfoDao; import com.mmc.pms.dao.GoodsInfoDao;
import com.mmc.pms.entity.Categories; import com.mmc.pms.entity.Categories;
import com.mmc.pms.entity.DirectoryDO; import com.mmc.pms.entity.DirectoryDO;
import com.mmc.pms.entity.GoodsInfo; import com.mmc.pms.entity.GoodsInfo;
import com.mmc.pms.entity.ServiceDO;
import com.mmc.pms.feign.ImsAppApi; import com.mmc.pms.feign.ImsAppApi;
import com.mmc.pms.model.categories.dto.AllCategoryDTO; import com.mmc.pms.model.categories.dto.AllCategoryDTO;
import com.mmc.pms.model.categories.dto.CategoriesDTO; import com.mmc.pms.model.categories.dto.CategoriesDTO;
...@@ -45,7 +47,8 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -45,7 +47,8 @@ public class CategoriesServiceImpl implements CategoriesService {
@Resource private GoodsInfoDao goodsInfoDao; @Resource private GoodsInfoDao goodsInfoDao;
@Autowired private DirectoryDao directoryDao; @Autowired private DirectoryDao directoryDao;
@Autowired private BackstageTaskService backstageTaskService; @Autowired private BackstageTaskService backstageTaskService;
@Autowired private ImsAppApi appApi; @Autowired private BackstageTaskServiceDao backstageTaskServiceDao;
@Autowired private ImsAppApi imsAppApi;
@Override @Override
public ResultBody addOrEditDirectory(DirectoryInfoVO param) { public ResultBody addOrEditDirectory(DirectoryInfoVO param) {
...@@ -191,23 +194,68 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -191,23 +194,68 @@ public class CategoriesServiceImpl implements CategoriesService {
} }
@Override @Override
public ResultBody queryRelevantBusiness(Integer id, Integer type) { public PageResult queryRelevantBusiness(Integer id, Integer type,Integer pageNo,Integer pageSize) {
RelevantBusinessVO relevantBusinessVO = new RelevantBusinessVO(); RelevantBusinessVO relevantBusinessVO = new RelevantBusinessVO();
switch (type) { switch (type) {
case 0: case 0:
List<GoodsInfo> goodsInfo = goodsInfoDao.ListGoodsInfoByCategoryId(id); int count = goodsInfoDao.countGoodsInfoByCategoryId(id);
if (CollectionUtils.isNotEmpty(goodsInfo)) { if (count == 0) {
return PageResult.buildPage(pageNo, pageSize, count);
}
List<GoodsInfo> mallGoodsInfo = goodsInfoDao.ListGoodsInfoByCategoryId((pageNo - 1) * pageSize, pageSize,id,0);
if (CollectionUtils.isNotEmpty(mallGoodsInfo)) {
relevantBusinessVO.setRelevanceGoodsInfoVOs( relevantBusinessVO.setRelevanceGoodsInfoVOs(
goodsInfo.stream() mallGoodsInfo.stream()
.map(GoodsInfo::buildRelevanceGoodsInfoVO) .map(GoodsInfo::buildRelevanceGoodsInfoVO)
.collect(Collectors.toList())); .collect(Collectors.toList()));
return ResultBody.success(relevantBusinessVO); return PageResult.buildPage(pageNo,pageSize,count,relevantBusinessVO);
}
break;
case 1:
int countOne = goodsInfoDao.countGoodsInfoByCategoryId(id);
if (countOne == 0) {
return PageResult.buildPage(pageNo, pageSize, countOne);
}
List<GoodsInfo> leaseTermGoodsInfo = goodsInfoDao.ListGoodsInfoByCategoryId((pageNo - 1) * pageSize, pageSize,id,1);
if (CollectionUtils.isNotEmpty(leaseTermGoodsInfo)) {
relevantBusinessVO.setRelevanceGoodsInfoVOs(
leaseTermGoodsInfo.stream()
.map(GoodsInfo::buildRelevanceGoodsInfoVO)
.collect(Collectors.toList()));
return PageResult.buildPage(pageNo,pageSize,countOne,relevantBusinessVO);
} }
break; break;
case 2:
int countTwo = goodsInfoDao.countServiceByCategoryId(id);
if (countTwo == 0) {
return PageResult.buildPage(pageNo, pageSize, countTwo);
}
List<ServiceDO> serviceList = backstageTaskServiceDao.queryWorkInfoByCategoryId((pageNo - 1) * pageSize,pageSize,id);
if (CollectionUtils.isNotEmpty(serviceList)) {
relevantBusinessVO.setRelevanceServiceInfoVOs(
serviceList.stream().map(ServiceDO :: buildRelevanceServiceInfoVO)
.collect(Collectors.toList()));
return PageResult.buildPage(pageNo,pageSize,countTwo,relevantBusinessVO);
}
break;
case 3 :
int countThree = imsAppApi.feignCountCurriculumInfo(id);
if (countThree == 0){
return PageResult.buildPage(pageNo, pageSize, countThree);
}
List<CurriculumInfoVO> curriculumList = imsAppApi.feignCurriculumInfoList(id);
if(CollectionUtils.isNotEmpty(curriculumList)){
relevantBusinessVO.setRelevanceCurriculumVOs(curriculumList
.stream().skip((pageNo - 1) * pageSize).limit(pageSize)
.map(CurriculumInfoVO::buildRelevanceCurriculumVO)
.collect(Collectors.toList()));
return PageResult.buildPage(pageNo, pageSize, countThree,relevantBusinessVO);
}
break;
default: default:
return ResultBody.error("输入类型有误!"); throw new RuntimeException("输入类型有误!");
} }
return ResultBody.success(); return PageResult.buildPage(pageNo,pageSize,0);
} }
@Override @Override
...@@ -271,7 +319,7 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -271,7 +319,7 @@ public class CategoriesServiceImpl implements CategoriesService {
if (taskCount > 0) { if (taskCount > 0) {
return ResultBody.error(ResultEnum.GROUP_DONT_DELETE); return ResultBody.error(ResultEnum.GROUP_DONT_DELETE);
} }
List<CurriculumInfoVO> curriculumInfo = appApi.feignCurriculumInfoList(id); List<CurriculumInfoVO> curriculumInfo = imsAppApi.feignCurriculumInfoList(id);
if (CollectionUtils.isNotEmpty(curriculumInfo)) { if (CollectionUtils.isNotEmpty(curriculumInfo)) {
return ResultBody.error(ResultEnum.GROUP_DONT_DELETE); return ResultBody.error(ResultEnum.GROUP_DONT_DELETE);
} }
......
package com.mmc.pms.service.Impl; package com.mmc.pms.service.impl;
import com.mmc.pms.dao.InspComtDao; import com.mmc.pms.dao.InspComtDao;
import com.mmc.pms.entity.InspComtDO; import com.mmc.pms.entity.InspComtDO;
...@@ -10,9 +9,7 @@ import org.springframework.stereotype.Service; ...@@ -10,9 +9,7 @@ import org.springframework.stereotype.Service;
import java.util.List; import java.util.List;
/** /**
* <p>
* 评论表 服务实现类 * 评论表 服务实现类
* </p>
* *
* @author Pika * @author Pika
* @since 2023-06-09 * @since 2023-06-09
...@@ -20,11 +17,10 @@ import java.util.List; ...@@ -20,11 +17,10 @@ import java.util.List;
@Service @Service
public class InspComtServiceImpl implements InspComtService { public class InspComtServiceImpl implements InspComtService {
@Autowired @Autowired private InspComtDao inspComtDao;
private InspComtDao inspComtDao;
@Override @Override
public List<InspComtDO> randomGetInspComtList(Integer size) { public List<InspComtDO> randomGetInspComtList(Integer size) {
return inspComtDao.randomGetInspComtList(size); return inspComtDao.randomGetInspComtList(size);
} }
} }
package com.mmc.pms.service.Impl; package com.mmc.pms.service.impl;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum; import com.mmc.pms.common.ResultEnum;
...@@ -100,12 +100,10 @@ public class MiniProgramProductMallServiceImpl implements MiniProgramProductMall ...@@ -100,12 +100,10 @@ public class MiniProgramProductMallServiceImpl implements MiniProgramProductMall
GoodsSpecDTO goodsSpecDTO = new GoodsSpecDTO(); GoodsSpecDTO goodsSpecDTO = new GoodsSpecDTO();
goodsSpecDTO goodsSpecDTO
.setId(d.getId()) .setId(d.getId())
.setSkuId(d.getProdSkuId()) .setSkuId(d.getProductId())
.setGoodsSpecName(d.getProdSkuSpecName()) .setGoodsSpecName(d.getProdSkuSpecName())
.setSkuName(d.getProductSkuName()) .setSkuName(d.getProductSkuName())
.setBrandInfoId(d.getBrandInfoId()) .setBrandInfoId(d.getBrandInfoId())
.setCategoryId(d.getCategoriesId())
.setTypeName(d.getTypeName())
.setChooseType(d.getChooseType()) .setChooseType(d.getChooseType())
.setSkuUnitId(d.getSkuUnitId()) .setSkuUnitId(d.getSkuUnitId())
.setUnitName(d.getUnitName()) .setUnitName(d.getUnitName())
...@@ -190,7 +188,7 @@ public class MiniProgramProductMallServiceImpl implements MiniProgramProductMall ...@@ -190,7 +188,7 @@ public class MiniProgramProductMallServiceImpl implements MiniProgramProductMall
return productSpecVO; return productSpecVO;
}) })
.collect(Collectors.toList()); .collect(Collectors.toList());
ProductSkuDO productSkuDetail = ProductDO productSkuDetail =
goodsInfoDao.getProductSkuDetail(industryProductInventoryDO.getProductSkuId()); goodsInfoDao.getProductSkuDetail(industryProductInventoryDO.getProductSkuId());
GoodsProductSkuVO goodsProductSkuVO = new GoodsProductSkuVO(); GoodsProductSkuVO goodsProductSkuVO = new GoodsProductSkuVO();
BeanUtils.copyProperties(productSkuDetail, goodsProductSkuVO); BeanUtils.copyProperties(productSkuDetail, goodsProductSkuVO);
......
package com.mmc.pms.service.Impl; package com.mmc.pms.service.impl;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.common.ResultEnum; import com.mmc.pms.common.ResultEnum;
...@@ -14,6 +14,7 @@ import com.mmc.pms.service.ProductSkuService; ...@@ -14,6 +14,7 @@ import com.mmc.pms.service.ProductSkuService;
import org.apache.commons.collections4.CollectionUtils; import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -37,7 +38,7 @@ public class ProductServiceImpl implements ProductSkuService { ...@@ -37,7 +38,7 @@ public class ProductServiceImpl implements ProductSkuService {
if (count > 0) { if (count > 0) {
return ResultBody.error(ResultEnum.GOODS_CATEGORY_NAME_EXIST_ERROR); return ResultBody.error(ResultEnum.GOODS_CATEGORY_NAME_EXIST_ERROR);
} }
ProductSkuDO productSkuDO = new ProductSkuDO(param); ProductDO productSkuDO = new ProductDO(param);
productSkuDO.setCustomize(0); productSkuDO.setCustomize(0);
// 新增产品sku // 新增产品sku
int status = productDao.insertProductSku(productSkuDO); int status = productDao.insertProductSku(productSkuDO);
...@@ -50,11 +51,11 @@ public class ProductServiceImpl implements ProductSkuService { ...@@ -50,11 +51,11 @@ public class ProductServiceImpl implements ProductSkuService {
@Override @Override
public ResultBody getProductSkuDetail(Integer id) { public ResultBody getProductSkuDetail(Integer id) {
// 校验此sku是否还存在或已删除 // 校验此sku是否还存在或已删除
int count = productDao.countSkuIsExist(id); int count = productDao.countProductIsExist(id);
if (count <= 0) { if (count <= 0) {
return ResultBody.error(ResultEnum.SKU_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED); return ResultBody.error(ResultEnum.PRODUCT_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED);
} }
ProductSkuDO productSkuDO = productDao.getProductSkuDetail(id); ProductDO productSkuDO = productDao.getProductDetail(id);
return ResultBody.success(productSkuDO.buildProductSkuDTO()); return ResultBody.success(productSkuDO.buildProductSkuDTO());
} }
...@@ -65,7 +66,7 @@ public class ProductServiceImpl implements ProductSkuService { ...@@ -65,7 +66,7 @@ public class ProductServiceImpl implements ProductSkuService {
if (count > 0) { if (count > 0) {
return ResultBody.error(ResultEnum.GOODS_CATEGORY_NAME_EXIST_ERROR); return ResultBody.error(ResultEnum.GOODS_CATEGORY_NAME_EXIST_ERROR);
} }
ProductSkuDO productSkuDO = new ProductSkuDO(param); ProductDO productSkuDO = new ProductDO(param);
int status = productDao.updateProductSku(productSkuDO); int status = productDao.updateProductSku(productSkuDO);
if (status <= 0) { if (status <= 0) {
return ResultBody.error(ResultEnum.FAILED_TO_EDIT_DATA); return ResultBody.error(ResultEnum.FAILED_TO_EDIT_DATA);
...@@ -82,14 +83,14 @@ public class ProductServiceImpl implements ProductSkuService { ...@@ -82,14 +83,14 @@ public class ProductServiceImpl implements ProductSkuService {
} }
Integer pageNo = productSkuQO.getPageNo(); Integer pageNo = productSkuQO.getPageNo();
productSkuQO.buildCurrentPage(); productSkuQO.buildCurrentPage();
List<ProductSkuDO> productSkuList = productDao.listPageProductSku(productSkuQO); List<ProductDO> productSkuList = productDao.listPageProductSku(productSkuQO);
List<Integer> productSkuIds = List<Integer> productSkuIds =
productSkuList.stream().map(ProductSkuDO::getId).collect(Collectors.toList()); productSkuList.stream().map(ProductDO::getId).collect(Collectors.toList());
List<ProductSpecDO> productSpecList = productDao.getProductSpecList(productSkuIds); List<ProductSpecDO> productSpecList = productDao.getProductSpecList(productSkuIds);
Map<Integer, List<ProductSpecDO>> productSpecMap = Map<Integer, List<ProductSpecDO>> productSpecMap =
productSpecList.stream().collect(Collectors.groupingBy(ProductSpecDO::getProductSkuId)); productSpecList.stream().collect(Collectors.groupingBy(ProductSpecDO::getProductId));
List<ProductSkuDTO> list = List<ProductSkuDTO> list =
productSkuList.stream().map(ProductSkuDO::buildProductSkuDTO).collect(Collectors.toList()); productSkuList.stream().map(ProductDO::buildProductSkuDTO).collect(Collectors.toList());
list.stream() list.stream()
.peek( .peek(
d -> { d -> {
...@@ -176,14 +177,21 @@ public class ProductServiceImpl implements ProductSkuService { ...@@ -176,14 +177,21 @@ public class ProductServiceImpl implements ProductSkuService {
} }
@Override @Override
public ResultBody productSpecCPQ(ProductSpecCPQVO productSpecCPQVO) { @Transactional(rollbackFor = Exception.class)
// 判断该规格是否存在 public ResultBody productSpecCPQ(List<ProductSpecCPQVO> productSpecCPQVO) {
int count = productDao.countSpecIsExist(productSpecCPQVO.getProductSpecId()); for (ProductSpecCPQVO d : productSpecCPQVO) {
if (count <= 0) { // 判断该规格是否存在
return ResultBody.error(ResultEnum.SPEC_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED); int count = productDao.countSpecIsExist(d.getProductSpecId());
if (count <= 0) {
return ResultBody.error(ResultEnum.SPEC_DOES_NOT_EXIST_OR_HAS_BEEN_DELETED);
}
if (d.getType().equals(1) && d.getLeaseTerm() == null) {
return ResultBody.error("租赁期限不能为空!");
}
// 插入规格销售或租赁价格
insertSpecPrice(d);
} }
// 批量插入规格销售或租赁价格 return ResultBody.success();
return insertSpecPrice(productSpecCPQVO);
} }
@Override @Override
...@@ -206,19 +214,21 @@ public class ProductServiceImpl implements ProductSkuService { ...@@ -206,19 +214,21 @@ public class ProductServiceImpl implements ProductSkuService {
} }
@Override @Override
public ResultBody updateProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO) { @Transactional(rollbackFor = Exception.class)
// 先删除原来该规格下的所有价格配置信息 public ResultBody updateProductSpecCPQ(List<ProductSpecCPQVO> params) {
productDao.removeProductSpecCPQ(productSpecCPQVO); for (ProductSpecCPQVO productSpecCPQVO : params) {
// 批量插入规格销售或租赁价格 // 先删除原来该规格下的所有价格配置信息
return insertSpecPrice(productSpecCPQVO); productDao.removeProductSpecCPQ(productSpecCPQVO);
// 调用批量插入规格销售或租赁价格
this.productSpecCPQ(params);
}
return ResultBody.success();
} }
@NotNull @NotNull
@Transactional(rollbackFor = Exception.class)
public ResultBody insertSpecPrice(ProductSpecCPQVO productSpecCPQVO) { public ResultBody insertSpecPrice(ProductSpecCPQVO productSpecCPQVO) {
List<ProductSpecPriceDO> list = getProductSpecPriceDOS(productSpecCPQVO); List<ProductSpecPriceDO> list = getProductSpecPriceDOS(productSpecCPQVO);
if (productSpecCPQVO.getType().equals(1) && productSpecCPQVO.getLeaseTerm() == null) {
return ResultBody.error("租赁期限不能为空!");
}
// 批量插入规格销售价格 // 批量插入规格销售价格
if (productSpecCPQVO.getType().equals(0)) { if (productSpecCPQVO.getType().equals(0)) {
productDao.batchInsertSpecPrice(list); productDao.batchInsertSpecPrice(list);
...@@ -231,9 +241,6 @@ public class ProductServiceImpl implements ProductSkuService { ...@@ -231,9 +241,6 @@ public class ProductServiceImpl implements ProductSkuService {
@Override @Override
public ResultBody getProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO) { public ResultBody getProductSpecCPQ(ProductSpecCPQVO productSpecCPQVO) {
if (productSpecCPQVO.getType().equals(1) && productSpecCPQVO.getLeaseTerm() == null) {
return ResultBody.error("租赁期限不能为空!");
}
List<ProductSpecPriceDO> productSpecPriceList = List<ProductSpecPriceDO> productSpecPriceList =
productDao.getProductSpecPrice(productSpecCPQVO); productDao.getProductSpecPrice(productSpecCPQVO);
List<ProductSpecPriceDTO> list = List<ProductSpecPriceDTO> list =
...@@ -306,20 +313,48 @@ public class ProductServiceImpl implements ProductSkuService { ...@@ -306,20 +313,48 @@ public class ProductServiceImpl implements ProductSkuService {
@Override @Override
public BigDecimal feignGetUnitPriceByTag(PriceAcquisition priceAcquisition) { public BigDecimal feignGetUnitPriceByTag(PriceAcquisition priceAcquisition) {
Map<Integer, Integer> dayMap = new HashMap<>(); List<Integer> channelLevelId = priceAcquisition.getChannelLevelId();
dayMap.put(0, 7); if (channelLevelId == null){
dayMap.put(8, 15); return new BigDecimal(0);
dayMap.put(16, 30); }
dayMap.put(31, Integer.MAX_VALUE); // 设置时间区间
int dayRange = getDayRange(priceAcquisition.getDay());
Integer dayRange =
dayMap.entrySet().stream()
.filter(entry -> priceAcquisition.getDay() <= entry.getKey())
.findFirst()
.map(Map.Entry::getValue)
.orElseThrow(() -> new RuntimeException("租赁期限错误错误!"));
priceAcquisition.setDay(dayRange); priceAcquisition.setDay(dayRange);
return productDao.feignGetUnitPriceByTag(priceAcquisition); // 获取市场价
BigDecimal marketplacePrice = productDao.getMarketplacePrice(priceAcquisition);
if (marketplacePrice == null) {
return new BigDecimal(0);
}
// 获取渠道价格
List<BigDecimal> price = productDao.feignGetUnitPriceByTag(priceAcquisition);
if (price.size()==0) {
return marketplacePrice;
}else {
List<BigDecimal> sortedPrice = price.stream()
.sorted(Comparator.naturalOrder())
.collect(Collectors.toList());
BigDecimal bigDecimal = sortedPrice.get(0);
if (bigDecimal.compareTo(marketplacePrice) < 0){
return bigDecimal;
}else if (bigDecimal.compareTo(marketplacePrice) > 0){
return marketplacePrice;
}else {
return marketplacePrice;
}
}
}
public int getDayRange(int day) {
if (between(day, 0 ,7)) return 0;
if (between(day, 8, 15)) return 1;
if (between(day, 16,30)) return 2;
if (day > 30) return 3;
throw new RuntimeException("租期有误!");
}
private boolean between(int num, int start, int end){
return num >= start && num <= end;
} }
@Override @Override
......
package com.mmc.pms.service.Impl; package com.mmc.pms.service.impl;
import com.mmc.pms.auth.dto.UserAccountSimpleDTO; import com.mmc.pms.auth.dto.UserAccountSimpleDTO;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
...@@ -179,14 +179,14 @@ public class WebDeviceServiceImpl implements WebDeviceService { ...@@ -179,14 +179,14 @@ public class WebDeviceServiceImpl implements WebDeviceService {
userIds = Collections.singletonList(-1); userIds = Collections.singletonList(-1);
} }
} }
int count = webDeviceDao.countListWareInfoPage(param.getCategoryId(), userIds, param.getType()); int count = webDeviceDao.countListWareInfoPage(param.getCategoryId(), userIds, param.getType(),param.getGoodsName());
if (count == 0) { if (count == 0) {
return ResultBody.success( return ResultBody.success(
PageResult.buildPage(param.getPageNo(), param.getPageSize(), count)); PageResult.buildPage(param.getPageNo(), param.getPageSize(), count));
} }
int pageNo = param.getPageNo(); int pageNo = param.getPageNo();
param.buildCurrentPage(); param.buildCurrentPage();
List<GoodsInfo> list = webDeviceDao.listWareInfoPage(param, userIds, param.getType()); List<GoodsInfo> list = webDeviceDao.listWareInfoPage(param, userIds, param.getType(),param.getGoodsName());
List<LeaseGoodsInfoDTO> pageList = List<LeaseGoodsInfoDTO> pageList =
list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList()); list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList());
if (StringUtils.isBlank(request.getHeader(TokenConstant.TOKEN))) { if (StringUtils.isBlank(request.getHeader(TokenConstant.TOKEN))) {
......
package com.mmc.pms.service.Impl; package com.mmc.pms.service.impl;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.dao.WebProductMallDao; import com.mmc.pms.dao.WebProductMallDao;
...@@ -8,7 +8,6 @@ import com.mmc.pms.entity.ProductCategory; ...@@ -8,7 +8,6 @@ import com.mmc.pms.entity.ProductCategory;
import com.mmc.pms.model.other.dto.AdDTO; import com.mmc.pms.model.other.dto.AdDTO;
import com.mmc.pms.model.qo.GoodsInfoQO; import com.mmc.pms.model.qo.GoodsInfoQO;
import com.mmc.pms.model.sale.dto.GoodsInfoListDTO; import com.mmc.pms.model.sale.dto.GoodsInfoListDTO;
import com.mmc.pms.model.qo.GoodsInfoQO;
import com.mmc.pms.model.sale.dto.ProductCategoryDTO; import com.mmc.pms.model.sale.dto.ProductCategoryDTO;
import com.mmc.pms.page.PageResult; import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.WebProductMallService; import com.mmc.pms.service.WebProductMallService;
......
...@@ -7,8 +7,7 @@ spring: ...@@ -7,8 +7,7 @@ spring:
password: MMC@2022&MYSQL password: MMC@2022&MYSQL
redis: redis:
database: 1 database: 1
host: r-wz9ke310fs684hacn1pd.redis.rds.aliyuncs.com host: 127.0.0.1
password: MMC@2022&REDIS
port: 6379 port: 6379
#连接池 #连接池
lettuce: lettuce:
......
...@@ -63,13 +63,6 @@ ...@@ -63,13 +63,6 @@
insert into mall_industry_sku_info_spec(mall_industry_sku_info_id, industry_spec_id, goods_info_id) insert into mall_industry_sku_info_spec(mall_industry_sku_info_id, industry_spec_id, goods_info_id)
values (#{mallIndustrySkuInfoId}, #{industrySpecId}, #{goodsInfoId}) values (#{mallIndustrySkuInfoId}, #{industrySpecId}, #{goodsInfoId})
</insert> </insert>
<insert id="insertMallProdSkuInfo" parameterType="com.mmc.pms.entity.MallProdInfoDO" useGeneratedKeys="true"
keyProperty="id">
insert into mall_prod_info (goods_info_id, product_id, prod_spec_name, categories_id, choose_type,
sku_unit_id, is_must, flag)
values (#{goodsInfoId}, #{prodSkuId}, #{prodSkuSpecName}, #{categoriesId}, #{chooseType}, #{skuUnitId}, #{must},
#{flag})
</insert>
<insert id="insertMallProdSkuInfoSpec"> <insert id="insertMallProdSkuInfoSpec">
insert into mall_prod_info_spec (goods_info_id, mall_prod_info_id, product_spec_id) insert into mall_prod_info_spec (goods_info_id, mall_prod_info_id, product_spec_id)
values (#{goodsInfoId}, #{mallProdSkuInfoId}, #{productSpecId}) values (#{goodsInfoId}, #{mallProdSkuInfoId}, #{productSpecId})
...@@ -79,6 +72,7 @@ ...@@ -79,6 +72,7 @@
update goods_info update goods_info
set goods_name = #{goodsName}, set goods_name = #{goodsName},
eco_label = #{ecoLabel}, eco_label = #{ecoLabel},
directory_id = #{directoryId},
category_by_one = #{categoryByOne}, category_by_one = #{categoryByOne},
category_by_two = #{categoryByTwo}, category_by_two = #{categoryByTwo},
shelf_status = #{shelfStatus} shelf_status = #{shelfStatus}
...@@ -114,7 +108,7 @@ ...@@ -114,7 +108,7 @@
<foreach collection="list" item="d" separator=";" index="index"> <foreach collection="list" item="d" separator=";" index="index">
update mall_prod_info update mall_prod_info
<set> <set>
product_id = #{d.prodSkuId}, product_id = #{d.productId},
categories_id = #{d.categoriesId}, categories_id = #{d.categoriesId},
prod_spec_name = #{d.prodSkuSpecName}, prod_spec_name = #{d.prodSkuSpecName},
choose_type = #{d.chooseType}, choose_type = #{d.chooseType},
...@@ -163,7 +157,7 @@ ...@@ -163,7 +157,7 @@
</update> </update>
<update id="updateMallProdSkuInfo"> <update id="updateMallProdSkuInfo">
update mall_prod_info update mall_prod_info
set product_id = #{prodSkuId}, set product_id = #{productId},
categories_id = #{categoriesId}, categories_id = #{categoriesId},
prod_spec_name = #{prodSkuSpecName}, prod_spec_name = #{prodSkuSpecName},
choose_type = #{chooseType}, choose_type = #{chooseType},
...@@ -171,6 +165,9 @@ ...@@ -171,6 +165,9 @@
is_must = #{must} is_must = #{must}
where id = #{id} where id = #{id}
</update> </update>
<update id="updateGoodsInfoSort">
update goods_info set sort = #{sort} where id = #{id}
</update>
<delete id="deleteGoodsServiceByGoodsId"> <delete id="deleteGoodsServiceByGoodsId">
delete delete
from goods_service from goods_service
...@@ -208,25 +205,21 @@ ...@@ -208,25 +205,21 @@
<select id="getMallProSkuInfo" resultType="com.mmc.pms.entity.MallProdInfoDO"> <select id="getMallProSkuInfo" resultType="com.mmc.pms.entity.MallProdInfoDO">
SELECT mi.id, SELECT mi.id,
mi.goods_info_id, mi.goods_info_id,
mi.product_id prodSkuId, mi.product_id productId,
mi.prod_spec_name prodSkuSpecName, mi.prod_spec_name prodSkuSpecName,
mi.categories_id categoriesId,
mi.choose_type chooseType, mi.choose_type chooseType,
mi.sku_unit_id skuUnitId, mi.sku_unit_id skuUnitId,
mi.is_must must, mi.is_must must,
mi.flag flag, mi.flag flag,
mi.create_time createTime, mi.create_time createTime,
c.name typeName,
su.id skuUnitId, su.id skuUnitId,
su.unit_name unitName, su.unit_name unitName,
ps.product_name productSkuName ps.product_name productSkuName
FROM mall_prod_info mi FROM mall_prod_info mi
INNER JOIN categories c ON c.id = mi.categories_id
INNER JOIN sku_unit su ON mi.sku_unit_id = su.id INNER JOIN sku_unit su ON mi.sku_unit_id = su.id
INNER JOIN product ps ON ps.id = mi.product_id INNER JOIN product ps ON ps.id = mi.product_id
WHERE mi.goods_info_id = #{id} WHERE mi.goods_info_id = #{id}
AND mi.is_deleted = 0 AND mi.is_deleted = 0
and flag = 0
</select> </select>
<select id="getMallIndustrySkuInfo" resultType="com.mmc.pms.entity.MallIndustrySkuInfoDO"> <select id="getMallIndustrySkuInfo" resultType="com.mmc.pms.entity.MallIndustrySkuInfoDO">
SELECT mi.id, SELECT mi.id,
...@@ -256,6 +249,7 @@ ...@@ -256,6 +249,7 @@
gi.category_by_two, gi.category_by_two,
gi.shelf_status, gi.shelf_status,
gi.create_time, gi.create_time,
gi.sort,
gv.id goodsVideoId, gv.id goodsVideoId,
gv.video_url videoUrl gv.video_url videoUrl
FROM goods_info gi FROM goods_info gi
...@@ -466,7 +460,8 @@ ...@@ -466,7 +460,8 @@
FROM goods_info gi FROM goods_info gi
INNER JOIN goods_img im ON gi.id = im.goods_info_id INNER JOIN goods_img im ON gi.id = im.goods_info_id
AND im.img_type = 0 AND im.img_type = 0
WHERE gi.category_by_one = #{id} WHERE gi.category_by_one = #{id} and gi.goods_type = #{type} and gi.is_deleted = 0
limit #{pageNo},#{pageSize}
</select> </select>
<resultMap id="resultMallProdSkuInfoSpecMap" type="com.mmc.pms.entity.MallProdSkuInfoSpecDO"> <resultMap id="resultMallProdSkuInfoSpecMap" type="com.mmc.pms.entity.MallProdSkuInfoSpecDO">
<id property="id" column="id"/> <id property="id" column="id"/>
...@@ -576,7 +571,7 @@ ...@@ -576,7 +571,7 @@
</if> </if>
</where> </where>
ORDER BY ORDER BY
gi.shelf_status DESC , gi.create_time asc gi.shelf_status DESC , gi.sort DESC
limit #{pageNo},#{pageSize} limit #{pageNo},#{pageSize}
</select> </select>
...@@ -601,24 +596,24 @@ ...@@ -601,24 +596,24 @@
<select id="getAllMallProSkuInfo" resultType="com.mmc.pms.entity.MallProdInfoDO"> <select id="getAllMallProSkuInfo" resultType="com.mmc.pms.entity.MallProdInfoDO">
SELECT mi.id, SELECT mi.id,
mi.goods_info_id, mi.goods_info_id,
mi.product_id prodSkuId, mi.product_id productId,
mi.prod_spec_name prodSkuSpecName, mi.prod_spec_name prodSkuSpecName,
mi.categories_id categoriesId,
mi.choose_type chooseType, mi.choose_type chooseType,
mi.sku_unit_id skuUnitId, mi.sku_unit_id skuUnitId,
mi.is_must must, mi.is_must must,
mi.flag flag, mi.flag flag,
mi.create_time createTime, mi.create_time createTime,
c.name typeName,
su.id skuUnitId, su.id skuUnitId,
su.unit_name unitName, su.unit_name unitName,
ps.product_name productSkuName ps.product_name productSkuName
FROM mall_prod_info mi FROM mall_prod_info mi
INNER JOIN categories c ON c.id = mi.categories_id
INNER JOIN sku_unit su ON mi.sku_unit_id = su.id INNER JOIN sku_unit su ON mi.sku_unit_id = su.id
INNER JOIN product ps ON ps.id = mi.product_id INNER JOIN product ps ON ps.id = mi.product_id
WHERE mi.goods_info_id = #{id} WHERE mi.goods_info_id = #{goodsInfoId}
AND mi.is_deleted = 0 AND mi.is_deleted = 0
ORDER BY mi.create_time asc ORDER BY mi.create_time asc
</select> </select>
<select id="countServiceByCategoryId" resultType="java.lang.Integer">
select count(*) from service where (application_id = #{id} or industry_id = #{id})
</select>
</mapper> </mapper>
...@@ -346,7 +346,7 @@ ...@@ -346,7 +346,7 @@
where id = #{id} where id = #{id}
</select> </select>
<select id="getProductSkuDetail" resultType="com.mmc.pms.entity.ProductSkuDO"> <select id="getProductSkuDetail" resultType="com.mmc.pms.entity.ProductDO">
SELECT ps.id, SELECT ps.id,
ps.product_name productName, ps.product_name productName,
ps.model, ps.model,
......
...@@ -169,6 +169,9 @@ ...@@ -169,6 +169,9 @@
#{user} #{user}
</foreach> </foreach>
</if> </if>
<if test="goodsName != null and goodsName != ''">
and gi.goods_name like CONCAT('%',#{goodsName},'%')
</if>
</where> </where>
</select> </select>
...@@ -193,8 +196,11 @@ ...@@ -193,8 +196,11 @@
#{user} #{user}
</foreach> </foreach>
</if> </if>
<if test="goodsName != null and goodsName != ''">
and gi.goods_name like CONCAT('%',#{goodsName},'%')
</if>
</where> </where>
order by gi.create_time asc order by gi.sort desc
limit #{param.pageNo},#{param.pageSize} limit #{param.pageNo},#{param.pageSize}
</select> </select>
<select id="getWareInfoById" resultMap="wareInfoResultMap" parameterType="java.lang.Integer"> <select id="getWareInfoById" resultMap="wareInfoResultMap" parameterType="java.lang.Integer">
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/> <result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/> <result property="isDeleted" column="is_deleted" jdbcType="INTEGER"/>
<result property="accountId" column="account_id" jdbcType="INTEGER"/> <result property="accountId" column="account_id" jdbcType="INTEGER"/>
<result property="companyId" column="company_id" jdbcType="INTEGER"/>
<result property="sort" column="sort" jdbcType="INTEGER"/>
</resultMap> </resultMap>
<!--查询所有--> <!--查询所有-->
...@@ -51,8 +53,9 @@ ...@@ -51,8 +53,9 @@
service_introduction, service_introduction,
create_time, create_time,
update_time, update_time,
account_id account_id,
from service company_id
from service
where id = #{id} where id = #{id}
and is_deleted = 0 and is_deleted = 0
</select> </select>
...@@ -61,7 +64,7 @@ ...@@ -61,7 +64,7 @@
<select id="queryAllByLimit" resultMap="ServiceMap" parameterType="com.mmc.pms.model.qo.ServiceQO"> <select id="queryAllByLimit" resultMap="ServiceMap" parameterType="com.mmc.pms.model.qo.ServiceQO">
select select
id, service_name, application_id, industry_id, display_state, cover_plan, share_card, video, id, service_name, application_id, industry_id, display_state, cover_plan, share_card, video,
service_introduction, create_time, update_time, account_id service_introduction, create_time, update_time, account_id,company_id,sort
from service from service
<where> <where>
is_deleted = 0 is_deleted = 0
...@@ -77,8 +80,11 @@ ...@@ -77,8 +80,11 @@
<if test="displayState != null"> <if test="displayState != null">
and display_state = #{displayState} and display_state = #{displayState}
</if> </if>
<if test="companyType==1 and companyId!=null">
and company_id = #{companyId}
</if>
</where> </where>
order by create_time desc order by sort desc
limit #{pageNo}, #{pageSize} limit #{pageNo}, #{pageSize}
</select> </select>
...@@ -100,15 +106,18 @@ ...@@ -100,15 +106,18 @@
<if test="displayState != null"> <if test="displayState != null">
and display_state = #{displayState} and display_state = #{displayState}
</if> </if>
<if test="companyType==1 and companyId!=null">
and company_id = #{companyId}
</if>
</where> </where>
</select> </select>
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="id" useGeneratedKeys="true" parameterType="com.mmc.pms.entity.ServiceDO"> <insert id="insert" keyProperty="id" useGeneratedKeys="true" parameterType="com.mmc.pms.entity.ServiceDO">
insert into service(service_name, application_id, industry_id, display_state, cover_plan, share_card, video, insert into service(service_name, application_id, industry_id, display_state, cover_plan, share_card, video,
service_introduction, account_id) service_introduction, account_id,company_id)
values (#{serviceName}, #{applicationId}, #{industryId}, #{displayState}, #{coverPlan}, #{shareCard}, values (#{serviceName}, #{applicationId}, #{industryId}, #{displayState}, #{coverPlan}, #{shareCard},
#{video}, #{serviceIntroduction}, #{accountId}) #{video}, #{serviceIntroduction}, #{accountId},#{companyId})
</insert> </insert>
<!--通过主键修改数据--> <!--通过主键修改数据-->
...@@ -148,6 +157,9 @@ ...@@ -148,6 +157,9 @@
<if test="accountId != null"> <if test="accountId != null">
account_id = #{accountId}, account_id = #{accountId},
</if> </if>
<if test="companyId != null">
company_id = #{companyId},
</if>
</set> </set>
where id = #{id} where id = #{id}
</update> </update>
...@@ -200,7 +212,7 @@ ...@@ -200,7 +212,7 @@
<select id="queryPageByLimit" resultType="com.mmc.pms.entity.ServiceDO"> <select id="queryPageByLimit" resultType="com.mmc.pms.entity.ServiceDO">
select select
id, service_name, application_id, industry_id, display_state, cover_plan, share_card, video, id, service_name, application_id, industry_id, display_state, cover_plan, share_card, video,
service_introduction, create_time, update_time, account_id service_introduction, create_time, update_time, account_id,company_id,sort
from service from service
<where> <where>
is_deleted = 0 and display_state = 0 is_deleted = 0 and display_state = 0
...@@ -232,9 +244,10 @@ ...@@ -232,9 +244,10 @@
and display_state = #{param.displayState} and display_state = #{param.displayState}
</if> </if>
</where> </where>
order by create_time desc order by sort desc
limit #{param.pageNo}, #{param.pageSize} limit #{param.pageNo}, #{param.pageSize}
</select> </select>
<select id="QueryWorkServiceListById" resultType="com.mmc.pms.model.work.dto.ServiceDTO"> <select id="QueryWorkServiceListById" resultType="com.mmc.pms.model.work.dto.ServiceDTO">
select id, select id,
service_name, service_name,
...@@ -283,4 +296,35 @@ ...@@ -283,4 +296,35 @@
</if> </if>
</where> </where>
</select> </select>
</mapper>
\ No newline at end of file <select id="queryByIdCount" resultType="java.lang.Integer">
select count(1) from service where company_id=#{companyId} and is_deleted=0
</select>
<select id="queryWorkInfoByCategoryId" resultType="com.mmc.pms.entity.ServiceDO">
select id,service_name,display_state,video
from service
where (application_id = #{id} or industry_id = #{id})
limit #{pageNo},#{pageSize}
</select>
<update id="exchange" parameterType="com.mmc.pms.entity.ServiceDO">
update service
<set>
<if test=" sort != null ">
sort = #{sort}
</if>
</set>
where id = #{id}
</update>
<update id="exchangeSort" parameterType="com.mmc.pms.entity.ServiceDO">
update service
<set>
<if test=" sort != null ">
sort = #{sort}
</if>
</set>
where id = #{id}
</update>
</mapper>
...@@ -17,4 +17,4 @@ data-filter: ...@@ -17,4 +17,4 @@ data-filter:
- /pms/backstage/work/feignQueryWorkServiceListById - /pms/backstage/work/feignQueryWorkServiceListById
- /pms/webDevice/getSecondDistrictInfo - /pms/webDevice/getSecondDistrictInfo
- /pms/webDevice/ad - /pms/webDevice/ad
- /pms/actuator/health/readiness - /pms/actuator/health/readiness
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论