Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
pms-ci-test
Commits
160ba2c3
提交
160ba2c3
authored
10月 07, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
a061c8d8
0b020445
隐藏空白字符变更
内嵌
并排
正在显示
31 个修改的文件
包含
652 行增加
和
193 行删除
+652
-193
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
ProductReportController.java
.../com/mmc/pms/controller/data/ProductReportController.java
+36
-0
AppMallGoodsController.java
...a/com/mmc/pms/controller/mall/AppMallGoodsController.java
+7
-0
ProductReportDao.java
src/main/java/com/mmc/pms/dao/data/ProductReportDao.java
+13
-0
CompanyInspectionDao.java
...java/com/mmc/pms/dao/inspection/CompanyInspectionDao.java
+2
-0
LeaseGoodsDao.java
src/main/java/com/mmc/pms/dao/lease/LeaseGoodsDao.java
+2
-0
AppMallGoodsDao.java
src/main/java/com/mmc/pms/dao/mall/AppMallGoodsDao.java
+2
-0
MallGoodsDao.java
src/main/java/com/mmc/pms/dao/mall/MallGoodsDao.java
+2
-0
MallGoodsDO.java
src/main/java/com/mmc/pms/entity/mall/MallGoodsDO.java
+13
-2
ImsAppApi.java
src/main/java/com/mmc/pms/feign/ImsAppApi.java
+7
-5
UserAppApi.java
src/main/java/com/mmc/pms/feign/UserAppApi.java
+8
-13
ImsApiHystrix.java
src/main/java/com/mmc/pms/feign/hystrix/ImsApiHystrix.java
+16
-11
UserAppApiHystrix.java
...ain/java/com/mmc/pms/feign/hystrix/UserAppApiHystrix.java
+7
-1
ProductReportDTO.java
...ain/java/com/mmc/pms/model/data/dto/ProductReportDTO.java
+39
-0
MallGoodsVO.java
src/main/java/com/mmc/pms/model/mall/MallGoodsVO.java
+3
-0
UavCartDTO.java
src/main/java/com/mmc/pms/model/mall/UavCartDTO.java
+55
-0
PriceStockQO.java
src/main/java/com/mmc/pms/model/qo/mall/PriceStockQO.java
+23
-0
ProductReportService.java
...n/java/com/mmc/pms/service/data/ProductReportService.java
+14
-0
ProductReportServiceImpl.java
...m/mmc/pms/service/data/impl/ProductReportServiceImpl.java
+65
-0
BrandManageServiceImpl.java
...java/com/mmc/pms/service/impl/BrandManageServiceImpl.java
+121
-109
AppMallGoodsService.java
...in/java/com/mmc/pms/service/mall/AppMallGoodsService.java
+4
-0
AppMallGoodsServiceImpl.java
...om/mmc/pms/service/mall/impl/AppMallGoodsServiceImpl.java
+25
-1
BrandManageDao.xml
src/main/resources/mapper/BrandManageDao.xml
+6
-1
ProductReportDao.xml
src/main/resources/mapper/data/ProductReportDao.xml
+8
-0
CompanyInspectionDao.xml
...main/resources/mapper/inspection/CompanyInspectionDao.xml
+73
-36
IndustryTypeDao.xml
src/main/resources/mapper/inspection/IndustryTypeDao.xml
+9
-2
InspectionDao.xml
src/main/resources/mapper/inspection/InspectionDao.xml
+28
-9
LeaseGoodsDao.xml
src/main/resources/mapper/lease/LeaseGoodsDao.xml
+5
-0
AppMallGoodsDao.xml
src/main/resources/mapper/mall/AppMallGoodsDao.xml
+46
-0
MallGoodsDao.xml
src/main/resources/mapper/mall/MallGoodsDao.xml
+11
-2
not-check.yml
src/main/resources/not-check.yml
+1
-0
没有找到文件。
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
160ba2c3
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/pms
newTag
:
24ca5416cccb6822ffc9b9c8ec3f056e7dcfbe5e
newTag
:
e00d10cefb341b9b5ab38a774728fa4c968bcaf2
src/main/java/com/mmc/pms/controller/data/ProductReportController.java
0 → 100644
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
controller
.
data
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.data.dto.ProductReportDTO
;
import
com.mmc.pms.service.data.ProductReportService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiResponse
;
import
io.swagger.annotations.ApiResponses
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
/**
* @Author LW
* @date 2023/9/16 17:49
* 概要:
*/
@Api
(
tags
=
"云享飞加盟入驻及商品sku看板数据"
)
@RequestMapping
(
"/product/report"
)
@RestController
public
class
ProductReportController
{
@Autowired
private
ProductReportService
productReportService
;
@ApiOperation
(
value
=
"获取用户报表数据"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ProductReportDTO
.
class
)})
@GetMapping
(
"/getProductReportData"
)
public
ResultBody
<
ProductReportDTO
>
getProductReportData
()
{
return
productReportService
.
getProductReportData
();
}
}
src/main/java/com/mmc/pms/controller/mall/AppMallGoodsController.java
浏览文件 @
160ba2c3
...
...
@@ -4,6 +4,8 @@ import com.mmc.pms.common.ResultBody;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
com.mmc.pms.service.mall.AppMallGoodsService
;
import
com.mmc.pms.service.mall.MallGoodsService
;
import
io.swagger.annotations.Api
;
...
...
@@ -56,4 +58,9 @@ public class AppMallGoodsController extends BaseController {
public
ResultBody
<
GoodsListVO
>
brandStoreList
(
@RequestBody
List
<
Integer
>
userAccountIds
)
{
return
appMallGoodsService
.
brandStoreList
(
userAccountIds
);
}
@PostMapping
(
"listPriceStock"
)
List
<
UavCartDTO
>
listPriceStock
(
@RequestBody
List
<
PriceStockQO
>
priceStockQOS
)
{
return
appMallGoodsService
.
listPriceStock
(
priceStockQOS
);
}
}
src/main/java/com/mmc/pms/dao/data/ProductReportDao.java
0 → 100644
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
dao
.
data
;
import
org.apache.ibatis.annotations.Mapper
;
/**
* @Author LW
* @date 2023/9/18 14:36
* 概要:
*/
@Mapper
public
interface
ProductReportDao
{
}
src/main/java/com/mmc/pms/dao/inspection/CompanyInspectionDao.java
浏览文件 @
160ba2c3
...
...
@@ -38,4 +38,6 @@ public interface CompanyInspectionDao {
void
removeByCompanyInfoId
(
Integer
companyInfoId
);
List
<
CompanyInspectionDO
>
listAPPCompanyInspectionPageByCompanyId
(
List
<
Integer
>
list
);
int
getServiceProduct
();
}
src/main/java/com/mmc/pms/dao/lease/LeaseGoodsDao.java
浏览文件 @
160ba2c3
...
...
@@ -76,4 +76,6 @@ public interface LeaseGoodsDao {
int
countLeaseGoodsByApp
(
LeaseGoodsQO
param
);
List
<
LeaseGoodsDO
>
listLeaseGoodsByApp
(
LeaseGoodsQO
param
);
int
getLeaseProduct
();
}
src/main/java/com/mmc/pms/dao/mall/AppMallGoodsDao.java
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
dao
.
mall
;
import
com.mmc.pms.entity.mall.MallGoodsDO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
org.apache.ibatis.annotations.Mapper
;
import
org.apache.ibatis.annotations.Param
;
...
...
@@ -17,4 +18,5 @@ public interface AppMallGoodsDao {
List
<
MallGoodsDO
>
brandStoreList
(
List
<
Integer
>
list
);
List
<
MallGoodsDO
>
listPriceStock
(
List
<
PriceStockQO
>
param
);
}
src/main/java/com/mmc/pms/dao/mall/MallGoodsDao.java
浏览文件 @
160ba2c3
...
...
@@ -64,4 +64,6 @@ public interface MallGoodsDao {
void
deleteSpecAttrValue
(
List
<
Integer
>
delValueIds
);
void
updateSpecAttrValue
(
SpecAttrVO
attrVO
);
int
getMallGoodsCount
();
}
src/main/java/com/mmc/pms/entity/mall/MallGoodsDO.java
浏览文件 @
160ba2c3
...
...
@@ -2,6 +2,7 @@ package com.mmc.pms.entity.mall;
import
com.mmc.pms.model.mall.GoodsResourcesVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
@@ -69,6 +70,8 @@ public class MallGoodsDO implements Serializable {
*/
private
Integer
sort
;
private
Integer
priceShow
;
private
Date
createTime
;
private
Date
updateTime
;
...
...
@@ -80,6 +83,8 @@ public class MallGoodsDO implements Serializable {
private
Integer
imgId
;
private
List
<
MallGoodsDO
>
mallGoodsDOList
;
private
List
<
PriceStockDO
>
priceStockDOS
;
public
MallGoodsDO
(
MallGoodsVO
mallGoodsVO
)
{
this
.
id
=
mallGoodsVO
.
getId
();
this
.
tradeName
=
mallGoodsVO
.
getTradeName
();
...
...
@@ -89,12 +94,13 @@ public class MallGoodsDO implements Serializable {
this
.
shelfStatus
=
mallGoodsVO
.
getShelfStatus
();
this
.
goodsLabel
=
mallGoodsVO
.
getGoodsLabel
();
this
.
labelShow
=
mallGoodsVO
.
getLabelShow
();
this
.
priceShow
=
mallGoodsVO
.
getPriceShow
();
this
.
goodsDetails
=
mallGoodsVO
.
getGoodsDetails
();
}
public
MallGoodsVO
buildMallGoodsVO
()
{
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
).
description
(
description
)
.
categoryPrimaryId
(
categoryPrimaryId
).
categorySubId
(
categorySubId
).
shelfStatus
(
shelfStatus
)
.
categoryPrimaryId
(
categoryPrimaryId
).
categorySubId
(
categorySubId
).
shelfStatus
(
shelfStatus
)
.
priceShow
(
priceShow
)
.
goodsLabel
(
goodsLabel
).
labelShow
(
labelShow
).
createTime
(
createTime
).
goodsDetails
(
goodsDetails
).
build
();
}
...
...
@@ -107,7 +113,12 @@ public class MallGoodsDO implements Serializable {
resourcesList
.
add
(
goodsResourcesVO
);
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
).
resourcesList
(
resourcesList
)
.
categoryPrimaryId
(
categoryPrimaryId
).
labelShow
(
labelShow
).
goodsLabel
(
goodsLabel
).
categorySubId
(
categorySubId
)
.
shelfStatus
(
shelfStatus
).
createTime
(
createTime
).
description
(
description
).
build
();
.
shelfStatus
(
shelfStatus
).
createTime
(
createTime
).
description
(
description
).
priceShow
(
priceShow
).
build
();
}
public
UavCartDTO
buildUavCartDTO
()
{
return
UavCartDTO
.
builder
().
mallGoodsId
(
id
).
thirdBackUserAccountId
(
userAccountId
).
tradeName
(
tradeName
)
.
priceShow
(
priceShow
).
deleted
(
deleted
).
shelfStatus
(
shelfStatus
).
build
();
}
}
src/main/java/com/mmc/pms/feign/ImsAppApi.java
浏览文件 @
160ba2c3
...
...
@@ -10,14 +10,16 @@ import java.util.List;
/**
* @Author LW
*
* @date 2023/6/15 10:46 概要:
*/
@FeignClient
(
url
=
"${iuav.ims.url}"
,
name
=
"ims"
,
fallback
=
ImsApiHystrix
.
class
)
public
interface
ImsAppApi
{
@GetMapping
(
"/release/curriculum/feignCurriculumInfoList"
)
List
<
CurriculumInfoVO
>
feignCurriculumInfoList
(
@RequestParam
Integer
categoriesId
);
@GetMapping
(
"/release/curriculum/feignCurriculumInfoList"
)
List
<
CurriculumInfoVO
>
feignCurriculumInfoList
(
@RequestParam
Integer
categoriesId
);
@GetMapping
(
"/release/curriculum/feignCountCurriculumInfo"
)
int
feignCountCurriculumInfo
(
@RequestParam
Integer
categoriesId
);
@GetMapping
(
"/release/curriculum/feignCountCurriculumInfo"
)
int
feignCountCurriculumInfo
(
@RequestParam
Integer
categoriesId
);
@GetMapping
(
"/release/curriculum/getCurriculumCount"
)
Integer
getCurriculumCount
();
}
src/main/java/com/mmc/pms/feign/UserAppApi.java
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
feign
;
import
com.alibaba.fastjson.JSONObject
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
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.common.ResultBody
;
import
com.mmc.pms.feign.hystrix.UserAppApiHystrix
;
import
com.mmc.pms.model.data.dto.ProductReportDTO
;
import
com.mmc.pms.model.qo.CompanyInfoQO
;
import
com.mmc.pms.model.qo.UserAccountQO
;
import
io.swagger.annotations.ApiParam
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.http.HttpEntity
;
import
org.springframework.http.HttpHeaders
;
import
org.springframework.http.MediaType
;
import
org.springframework.http.ResponseEntity
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
* @author: zj
...
...
@@ -65,22 +55,24 @@ public interface UserAppApi {
/**
* 获取小程序用户集合列表页面
*
* @param userAccountQO
* @param token
* @return
*/
@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"
)
ResultBody
<
CompanyInfoVO
>
getCompanyInfoById
(
@ApiParam
(
value
=
"单位"
,
required
=
true
)
@RequestParam
Integer
id
,
@RequestHeader
(
"token"
)
String
token
);
ResultBody
<
CompanyInfoVO
>
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
);
...
...
@@ -90,4 +82,7 @@ public interface UserAppApi {
@PostMapping
(
"/userapp/company/listCompanyInfoByBUIds"
)
List
<
CompanyInfoVO
>
listCompanyInfoByBUIds
(
@RequestBody
List
<
Integer
>
backUserAccountIds
);
@GetMapping
(
"/userapp/user/report/getJoinStoreNumber"
)
ProductReportDTO
getJoinStoreNumber
();
}
src/main/java/com/mmc/pms/feign/hystrix/ImsApiHystrix.java
浏览文件 @
160ba2c3
...
...
@@ -8,20 +8,25 @@ import java.util.List;
/**
* @Author LW
*
* @date 2023/6/15 10:47 概要:
*/
@Slf4j
public
class
ImsApiHystrix
implements
ImsAppApi
{
@Override
public
List
<
CurriculumInfoVO
>
feignCurriculumInfoList
(
Integer
categoriesId
)
{
log
.
error
(
"熔断:feignCurriculumInfoList:{}"
,
categoriesId
);
return
null
;
}
@Override
public
List
<
CurriculumInfoVO
>
feignCurriculumInfoList
(
Integer
categoriesId
)
{
log
.
error
(
"熔断:feignCurriculumInfoList:{}"
,
categoriesId
);
return
null
;
}
@Override
public
int
feignCountCurriculumInfo
(
Integer
categoriesId
)
{
log
.
error
(
"熔断:feignCountCurriculumInfo:{}"
,
categoriesId
);
return
0
;
}
@Override
public
int
feignCountCurriculumInfo
(
Integer
categoriesId
)
{
log
.
error
(
"熔断:feignCountCurriculumInfo:{}"
,
categoriesId
);
return
0
;
}
@Override
public
Integer
getCurriculumCount
()
{
log
.
error
(
"熔断:ImsApiHystrix.feignCountCurriculumInfo"
);
return
0
;
}
}
src/main/java/com/mmc/pms/feign/hystrix/UserAppApiHystrix.java
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
feign
.
hystrix
;
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.common.ResultBody
;
import
com.mmc.pms.feign.UserAppApi
;
import
com.mmc.pms.model.data.dto.ProductReportDTO
;
import
com.mmc.pms.model.qo.CompanyInfoQO
;
import
com.mmc.pms.model.qo.UserAccountQO
;
import
lombok.extern.slf4j.Slf4j
;
...
...
@@ -65,4 +65,10 @@ public class UserAppApiHystrix implements UserAppApi {
log
.
error
(
"熔断:listCompanyInfoByBUIds:{}"
,
backUserAccountIds
);
return
null
;
}
@Override
public
ProductReportDTO
getJoinStoreNumber
()
{
log
.
error
(
"熔断:UserAppApiHystrix.getJoinStoreNumber"
);
return
null
;
}
}
src/main/java/com/mmc/pms/model/data/dto/ProductReportDTO.java
0 → 100644
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
model
.
data
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
/**
* @Author LW
* @date 2023/9/16 14:15
* 概要:
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
ProductReportDTO
{
@ApiModelProperty
(
value
=
"入驻商家总数"
)
private
Integer
joinStoreCount
;
@ApiModelProperty
(
value
=
"品牌商"
)
private
Integer
brandStore
;
@ApiModelProperty
(
value
=
"维修商"
)
private
Integer
repairStore
;
@ApiModelProperty
(
value
=
"培训机构"
)
private
Integer
trainingInstitution
;
@ApiModelProperty
(
value
=
"租赁商"
)
private
Integer
leaseStore
;
@ApiModelProperty
(
value
=
"服务商"
)
private
Integer
serviceStore
;
@ApiModelProperty
(
value
=
"销售商品"
)
private
Integer
saleProduct
;
@ApiModelProperty
(
value
=
"出租商品"
)
private
Integer
leaseProduct
;
@ApiModelProperty
(
value
=
"服务商品"
)
private
Integer
serviceProduct
;
@ApiModelProperty
(
value
=
"在线课程"
)
private
Integer
onlineCourse
;
}
src/main/java/com/mmc/pms/model/mall/MallGoodsVO.java
浏览文件 @
160ba2c3
...
...
@@ -57,6 +57,9 @@ public class MallGoodsVO implements Serializable {
@ApiModelProperty
(
value
=
"商品标签"
)
private
String
goodsLabel
;
@ApiModelProperty
(
value
=
"价格是否显示 0不显示 1显示"
)
private
Integer
priceShow
;
@ApiModelProperty
(
value
=
"标签是否显示 0否 1是"
)
private
Integer
labelShow
;
...
...
src/main/java/com/mmc/pms/model/mall/UavCartDTO.java
0 → 100644
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
model
.
mall
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
import
java.math.BigDecimal
;
import
java.util.Date
;
/**
* @author: zj
* @Date: 2023/9/16 14:08
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public
class
UavCartDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
4386011514861211847L
;
@ApiModelProperty
(
value
=
"id"
)
private
Integer
id
;
@ApiModelProperty
(
value
=
"用户ID"
)
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"商家id"
)
private
Integer
thirdBackUserAccountId
;
@ApiModelProperty
(
value
=
"商家名称"
)
private
String
companyName
;
@ApiModelProperty
(
value
=
"商品id"
)
private
Integer
mallGoodsId
;
@ApiModelProperty
(
value
=
"商品名称"
)
private
String
tradeName
;
@ApiModelProperty
(
value
=
"商品规格id"
)
private
Integer
priceStockId
;
@ApiModelProperty
(
value
=
"商品规格名称"
)
private
String
productSpec
;
@ApiModelProperty
(
value
=
"数量"
)
private
Integer
orderNum
;
@ApiModelProperty
(
value
=
"售卖价"
)
private
BigDecimal
salePrice
;
@ApiModelProperty
(
value
=
"主图或规格图"
)
private
String
skuImage
;
@ApiModelProperty
(
value
=
"规格编号"
)
private
String
skuNo
;
@ApiModelProperty
(
value
=
"生成时间"
)
private
Date
createTime
;
@ApiModelProperty
(
value
=
"是否展示价格,0 不显示 1显示"
)
private
Integer
priceShow
;
@ApiModelProperty
(
value
=
"是否删除"
)
private
Integer
deleted
;
@ApiModelProperty
(
value
=
"上架状态"
)
private
Integer
shelfStatus
;
}
src/main/java/com/mmc/pms/model/qo/mall/PriceStockQO.java
0 → 100644
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
model
.
qo
.
mall
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.io.Serializable
;
/**
* @author: zj
* @Date: 2023/9/19 15:08
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
PriceStockQO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
@ApiModelProperty
(
value
=
"商品id"
)
private
Integer
mallGoodsId
;
@ApiModelProperty
(
value
=
"商品规格名称"
)
private
String
productSpec
;
}
src/main/java/com/mmc/pms/service/data/ProductReportService.java
0 → 100644
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
service
.
data
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.data.dto.ProductReportDTO
;
/**
* @Author LW
* @date 2023/9/16 17:51
* 概要:
*/
public
interface
ProductReportService
{
ResultBody
<
ProductReportDTO
>
getProductReportData
();
}
src/main/java/com/mmc/pms/service/data/impl/ProductReportServiceImpl.java
0 → 100644
浏览文件 @
160ba2c3
package
com
.
mmc
.
pms
.
service
.
data
.
impl
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.dao.inspection.CompanyInspectionDao
;
import
com.mmc.pms.dao.lease.LeaseGoodsDao
;
import
com.mmc.pms.dao.mall.MallGoodsDao
;
import
com.mmc.pms.feign.ImsAppApi
;
import
com.mmc.pms.feign.UserAppApi
;
import
com.mmc.pms.model.data.dto.ProductReportDTO
;
import
com.mmc.pms.service.data.ProductReportService
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
/**
* @Author LW
* @date 2023/9/16 17:51
* 概要:
*/
@Service
public
class
ProductReportServiceImpl
implements
ProductReportService
{
@Resource
UserAppApi
userAppApi
;
@Resource
MallGoodsDao
mallGoodsDao
;
@Resource
LeaseGoodsDao
leaseGoodsDao
;
@Resource
CompanyInspectionDao
companyInspectionDao
;
@Resource
ImsAppApi
imsAppApi
;
@Override
public
ResultBody
<
ProductReportDTO
>
getProductReportData
()
{
// 获取入驻商家总数
ProductReportDTO
joinStoreNumber
=
userAppApi
.
getJoinStoreNumber
();
// 获取销售商品个数
int
saleProduct
=
mallGoodsDao
.
getMallGoodsCount
();
// 获取出租商品个数
int
leaseProduct
=
leaseGoodsDao
.
getLeaseProduct
();
// 获取服务商品个数
int
serviceProduct
=
companyInspectionDao
.
getServiceProduct
();
// 获取在线课程个数
int
onlineCourse
=
imsAppApi
.
getCurriculumCount
();
if
(
joinStoreNumber
==
null
)
{
ProductReportDTO
productReportDTO
=
new
ProductReportDTO
();
productReportDTO
.
setJoinStoreCount
(
0
);
productReportDTO
.
setBrandStore
(
0
);
productReportDTO
.
setRepairStore
(
0
);
productReportDTO
.
setTrainingInstitution
(
0
);
productReportDTO
.
setLeaseStore
(
0
);
productReportDTO
.
setServiceStore
(
0
);
productReportDTO
.
setSaleProduct
(
saleProduct
);
productReportDTO
.
setLeaseProduct
(
leaseProduct
);
productReportDTO
.
setServiceProduct
(
serviceProduct
);
productReportDTO
.
setOnlineCourse
(
onlineCourse
);
return
ResultBody
.
success
(
productReportDTO
);
}
joinStoreNumber
.
setSaleProduct
(
saleProduct
);
joinStoreNumber
.
setLeaseProduct
(
leaseProduct
);
joinStoreNumber
.
setServiceProduct
(
serviceProduct
);
joinStoreNumber
.
setOnlineCourse
(
onlineCourse
);
return
ResultBody
.
success
(
joinStoreNumber
);
}
}
src/main/java/com/mmc/pms/service/impl/BrandManageServiceImpl.java
浏览文件 @
160ba2c3
...
...
@@ -22,134 +22,146 @@ import java.util.stream.Collectors;
/**
* @Author LW
*
* @date 2023/3/14 13:27 概要:
*/
@Service
public
class
BrandManageServiceImpl
implements
BrandManageService
{
@Autowired
private
BrandManageDao
brandManageDao
;
@Resource
private
ProductDao
productDao
;
@Autowired
private
BrandManageDao
brandManageDao
;
@Resource
private
ProductDao
productDao
;
/**
* 添加品牌信息
*
* @param brandName 品牌名称
* @return {@link ResultBody}
*/
@Override
public
ResultBody
addBrandInfo
(
String
brandName
)
{
// 根据品牌名称判断是否存在
int
count
=
brandManageDao
.
countBrandInfoByName
(
null
,
brandName
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
BrandInfoDO
brandInfoDO
=
new
BrandInfoDO
(
brandName
);
brandManageDao
.
insertBrandInfo
(
brandInfoDO
);
return
ResultBody
.
success
();
/**
* 添加品牌信息
*
* @param brandName 品牌名称
* @return {@link ResultBody}
*/
@Override
public
ResultBody
addBrandInfo
(
String
brandName
)
{
// 根据品牌名称判断是否存在
int
count
=
brandManageDao
.
countBrandInfoByName
(
null
,
brandName
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
BrandInfoDO
brandInfoDO
=
new
BrandInfoDO
(
brandName
);
brandManageDao
.
insertBrandInfo
(
brandInfoDO
);
return
ResultBody
.
success
();
}
/**
* 品牌列表信息
*
* @return {@link ResultBody}
*/
@Override
public
PageResult
listBrandInfo
(
Integer
pageNo
,
Integer
pageSize
)
{
int
count
=
brandManageDao
.
countBrandInfo
();
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
);
}
int
itemIndex
=
(
pageNo
-
1
)
*
pageSize
;
List
<
BrandInfoDO
>
brandInfo
=
brandManageDao
.
listBrandInfo
(
itemIndex
,
pageSize
);
List
<
Integer
>
ids
=
brandInfo
.
stream
().
map
(
BrandInfoDO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
DeviceModeDO
>
deviceModeDOList
=
brandManageDao
.
listDeviceModeByBrandId
(
ids
);
Map
<
Integer
,
List
<
DeviceModeDO
>>
map
=
deviceModeDOList
.
stream
().
collect
(
Collectors
.
groupingBy
(
DeviceModeDO:
:
getBrandInfoId
));
List
<
BrandInfoDTO
>
brandInfoList
=
brandInfo
.
stream
().
map
(
BrandInfoDO:
:
buildBrandInfoDTO
).
collect
(
Collectors
.
toList
());
brandInfoList
=
brandInfoList
.
stream
().
peek
(
d
->
{
List
<
DeviceModeDO
>
deviceModeList
=
map
.
get
(
d
.
getId
());
if
(
CollectionUtils
.
isNotEmpty
(
deviceModeList
))
{
d
.
setModeInfoList
(
deviceModeList
.
stream
().
map
(
DeviceModeDO:
:
buildModeInfoVO
).
collect
(
Collectors
.
toList
()));
}
}).
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
,
brandInfoList
);
/**
* 品牌列表信息
*
* @return {@link ResultBody}
*/
@Override
public
PageResult
listBrandInfo
(
Integer
pageNo
,
Integer
pageSize
)
{
int
count
=
brandManageDao
.
countBrandInfo
();
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
);
}
int
itemIndex
=
(
pageNo
-
1
)
*
pageSize
;
List
<
BrandInfoDO
>
brandInfo
=
brandManageDao
.
listBrandInfo
(
itemIndex
,
pageSize
);
List
<
Integer
>
ids
=
brandInfo
.
stream
().
map
(
BrandInfoDO:
:
getId
).
collect
(
Collectors
.
toList
());
List
<
DeviceModeDO
>
deviceModeDOList
=
brandManageDao
.
listDeviceModeByBrandId
(
ids
);
Map
<
Integer
,
List
<
DeviceModeDO
>>
map
=
deviceModeDOList
.
stream
().
collect
(
Collectors
.
groupingBy
(
DeviceModeDO:
:
getBrandInfoId
));
List
<
BrandInfoDTO
>
brandInfoList
=
brandInfo
.
stream
().
map
(
BrandInfoDO:
:
buildBrandInfoDTO
).
collect
(
Collectors
.
toList
());
brandInfoList
=
brandInfoList
.
stream
()
.
peek
(
d
->
{
List
<
DeviceModeDO
>
deviceModeList
=
map
.
get
(
d
.
getId
());
if
(
CollectionUtils
.
isNotEmpty
(
deviceModeList
))
{
d
.
setModeInfoList
(
deviceModeList
.
stream
()
.
map
(
DeviceModeDO:
:
buildModeInfoVO
)
.
collect
(
Collectors
.
toList
()));
}
})
.
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
pageSize
,
count
,
brandInfoList
);
}
/**
* 删除品牌信息
*
* @param id id
* @return {@link ResultBody}
*/
@Override
public
ResultBody
deleteBrandInfo
(
Integer
id
)
{
// 判断该品牌是否绑定产品信息
int
count
=
productDao
.
countLeaseGoodsByBrandId
(
id
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
BRAND_DELETE_FAIL
);
}
brandManageDao
.
removeBrandInfoById
(
id
);
return
ResultBody
.
success
();
/**
* 删除品牌信息
*
* @param id id
* @return {@link ResultBody}
*/
@Override
public
ResultBody
deleteBrandInfo
(
Integer
id
)
{
// 判断该品牌是否绑定产品信息
int
count
=
productDao
.
countLeaseGoodsByBrandId
(
id
);
// 是否绑定型号
ModeInfoQO
qo
=
new
ModeInfoQO
();
qo
.
setBrandInfoId
(
id
);
int
deviceModeCount
=
brandManageDao
.
countModeInfo
(
qo
);
if
(
count
>
0
||
deviceModeCount
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
BRAND_DELETE_FAIL
);
}
brandManageDao
.
removeBrandInfoById
(
id
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
editBrandInfo
(
Integer
id
,
String
brandName
)
{
// 根据品牌名称判断是否存在
int
count
=
brandManageDao
.
countBrandInfoByName
(
id
,
brandName
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
BrandInfoDO
brandInfoDO
=
new
BrandInfoDO
(
brandName
);
brandInfoDO
.
setId
(
id
);
brandManageDao
.
updateBrandInfo
(
brandInfoDO
);
return
ResultBody
.
success
();
@Override
public
ResultBody
editBrandInfo
(
Integer
id
,
String
brandName
)
{
// 根据品牌名称判断是否存在
int
count
=
brandManageDao
.
countBrandInfoByName
(
id
,
brandName
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
BrandInfoDO
brandInfoDO
=
new
BrandInfoDO
(
brandName
);
brandInfoDO
.
setId
(
id
);
brandManageDao
.
updateBrandInfo
(
brandInfoDO
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
addMode
(
ModeInfoVO
param
)
{
int
count
=
brandManageDao
.
countModeInfoByName
(
param
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
DeviceModeDO
modeInfoDO
=
new
DeviceModeDO
(
param
);
brandManageDao
.
insertModeInfo
(
modeInfoDO
);
return
ResultBody
.
success
();
@Override
public
ResultBody
addMode
(
ModeInfoVO
param
)
{
int
count
=
brandManageDao
.
countModeInfoByName
(
param
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
DeviceModeDO
modeInfoDO
=
new
DeviceModeDO
(
param
);
brandManageDao
.
insertModeInfo
(
modeInfoDO
);
return
ResultBody
.
success
();
}
@Override
public
PageResult
modeList
(
ModeInfoQO
param
)
{
int
count
=
brandManageDao
.
countModeInfo
(
param
);
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
}
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
DeviceModeDO
>
deviceModeDOList
=
brandManageDao
.
listDeviceMode
(
param
);
List
<
ModeInfoVO
>
list
=
deviceModeDOList
.
stream
().
map
(
DeviceModeDO:
:
buildModeInfoVO
).
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
list
);
@Override
public
PageResult
modeList
(
ModeInfoQO
param
)
{
int
count
=
brandManageDao
.
countModeInfo
(
param
);
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
}
Integer
pageNo
=
param
.
getPageNo
();
param
.
buildCurrentPage
();
List
<
DeviceModeDO
>
deviceModeDOList
=
brandManageDao
.
listDeviceMode
(
param
);
List
<
ModeInfoVO
>
list
=
deviceModeDOList
.
stream
().
map
(
DeviceModeDO:
:
buildModeInfoVO
).
collect
(
Collectors
.
toList
());
return
PageResult
.
buildPage
(
pageNo
,
param
.
getPageSize
(),
count
,
list
);
}
@Override
public
ResultBody
editMode
(
ModeInfoVO
param
)
{
int
count
=
brandManageDao
.
countModeInfoByName
(
param
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
DeviceModeDO
modeInfoDO
=
new
DeviceModeDO
(
param
);
brandManageDao
.
updateModeInfo
(
modeInfoDO
);
return
ResultBody
.
success
();
@Override
public
ResultBody
editMode
(
ModeInfoVO
param
)
{
int
count
=
brandManageDao
.
countModeInfoByName
(
param
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
DeviceModeDO
modeInfoDO
=
new
DeviceModeDO
(
param
);
brandManageDao
.
updateModeInfo
(
modeInfoDO
);
return
ResultBody
.
success
();
}
@Override
public
ResultBody
deleteMode
(
Integer
id
)
{
// 判断该品牌是否绑定产品信息
int
count
=
brandManageDao
.
countLeaseGoodsByDeviceModeId
(
id
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
DEVICE_MODE_DELETE_FAIL
);
}
brandManageDao
.
removeModeInfoById
(
id
);
return
ResultBody
.
success
();
@Override
public
ResultBody
deleteMode
(
Integer
id
)
{
// 判断该品牌是否绑定产品信息
int
count
=
brandManageDao
.
countLeaseGoodsByDeviceModeId
(
id
);
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
DEVICE_MODE_DELETE_FAIL
);
}
brandManageDao
.
removeModeInfoById
(
id
);
return
ResultBody
.
success
();
}
}
src/main/java/com/mmc/pms/service/mall/AppMallGoodsService.java
浏览文件 @
160ba2c3
...
...
@@ -3,6 +3,8 @@ package com.mmc.pms.service.mall;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
java.util.List
;
...
...
@@ -17,4 +19,6 @@ public interface AppMallGoodsService {
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
List
<
Integer
>
categorySubIds
);
ResultBody
<
GoodsListVO
>
brandStoreList
(
List
<
Integer
>
userAccountIds
);
List
<
UavCartDTO
>
listPriceStock
(
List
<
PriceStockQO
>
priceStockQOS
);
}
src/main/java/com/mmc/pms/service/mall/impl/AppMallGoodsServiceImpl.java
浏览文件 @
160ba2c3
...
...
@@ -3,10 +3,14 @@ package com.mmc.pms.service.mall.impl;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.dao.mall.AppMallGoodsDao
;
import
com.mmc.pms.entity.mall.MallGoodsDO
;
import
com.mmc.pms.entity.mall.PriceStockDO
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
com.mmc.pms.model.qo.mall.PriceStockQO
;
import
com.mmc.pms.service.mall.AppMallGoodsService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
...
...
@@ -48,7 +52,7 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
@Override
public
ResultBody
<
GoodsListVO
>
brandStoreList
(
List
<
Integer
>
userAccountIds
)
{
List
<
GoodsListVO
>
goodsList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
userAccountIds
)){
if
(
CollectionUtils
.
isNotEmpty
(
userAccountIds
))
{
List
<
MallGoodsDO
>
mallGoodsDOList
=
appMallGoodsDao
.
brandStoreList
(
userAccountIds
);
List
<
MallGoodsVO
>
list
=
mallGoodsDOList
.
stream
().
map
(
MallGoodsDO:
:
buildListMallGoodsVO
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
List
<
MallGoodsVO
>>
map
=
list
.
...
...
@@ -62,4 +66,24 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
}
return
ResultBody
.
success
(
goodsList
);
}
@Override
public
List
<
UavCartDTO
>
listPriceStock
(
List
<
PriceStockQO
>
param
)
{
// 根据商品id和规格套装查询
List
<
MallGoodsDO
>
mallGoodsList
=
appMallGoodsDao
.
listPriceStock
(
param
);
List
<
UavCartDTO
>
uavCartDTOS
=
new
ArrayList
<
UavCartDTO
>();
for
(
MallGoodsDO
mallGoodsDO
:
mallGoodsList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
mallGoodsDO
.
getPriceStockDOS
()))
{
for
(
PriceStockDO
priceStockDO
:
mallGoodsDO
.
getPriceStockDOS
())
{
UavCartDTO
uavCartDTO
=
mallGoodsDO
.
buildUavCartDTO
();
uavCartDTO
.
setSkuImage
(
StringUtils
.
isBlank
(
priceStockDO
.
getSkuImage
())
?
mallGoodsDO
.
getUrl
()
:
priceStockDO
.
getSkuImage
());
uavCartDTO
.
setProductSpec
(
priceStockDO
.
getProductSpec
());
uavCartDTO
.
setSalePrice
(
priceStockDO
.
getSalePrice
());
uavCartDTO
.
setSkuNo
(
priceStockDO
.
getSkuNo
());
uavCartDTOS
.
add
(
uavCartDTO
);
}
}
}
return
uavCartDTOS
;
}
}
src/main/resources/mapper/BrandManageDao.xml
浏览文件 @
160ba2c3
...
...
@@ -16,10 +16,15 @@
values (#{brandInfoId}, #{productTypeId}, #{modelName}, #{tag})
</insert>
<update
id=
"removeBrandInfoById"
>
<
!--<
update id="removeBrandInfoById">
update brand_info
set is_delete = 1
where id = #{id}
</update>-->
<update
id=
"removeBrandInfoById"
>
delete
from brand_info
where id = #{id}
</update>
<update
id=
"updateBrandInfo"
>
update brand_info
...
...
src/main/resources/mapper/data/ProductReportDao.xml
0 → 100644
浏览文件 @
160ba2c3
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.pms.dao.data.ProductReportDao"
>
</mapper>
\ No newline at end of file
src/main/resources/mapper/inspection/CompanyInspectionDao.xml
浏览文件 @
160ba2c3
...
...
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.pms.dao.inspection.CompanyInspectionDao"
>
<resultMap
id=
"companyInspectionResultMap"
type=
"com.mmc.pms.entity.inspection.CompanyInspectionDO"
>
<resultMap
id=
"companyInspectionResultMap"
type=
"com.mmc.pms.entity.inspection.CompanyInspectionDO"
>
<id
property=
"id"
column=
"id"
/>
<result
property=
"companyInfoId"
column=
"company_info_id"
/>
<result
property=
"serviceArea"
column=
"service_area"
/>
...
...
@@ -45,15 +45,20 @@
<select
id=
"listFileByCompanyInspectionId"
resultType=
"com.mmc.pms.entity.inspection.CompanyInspectionFileDO"
>
select cif.id, file_type, `first`, company_inspection_id, file_url, create_time
from company_inspection_file cif
where cif.is_deleted = 0 and cif.company_inspection_id = #{companyInspectionId} order by cif.id desc
from company_inspection_file cif
where cif.is_deleted = 0
and cif.company_inspection_id = #{companyInspectionId}
order by cif.id desc
</select>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
parameterType=
"com.mmc.pms.entity.inspection.CompanyInspectionDO"
>
insert into company_inspection(company_info_id, service_area, inspection_id, inspection_tag_id, price, price_remark, inspection_price_unit_id,
detail_page, sale_state, remark, create_time)
values (#{companyInfoId}, #{serviceArea}, #{inspectionId}, #{inspectionTagId}, #{price}, #{priceRemark}, #{inspectionPriceUnitId},
#{detailPage}, #{saleState}, #{remark}, NOW())
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
parameterType=
"com.mmc.pms.entity.inspection.CompanyInspectionDO"
>
insert into company_inspection(company_info_id, service_area, inspection_id, inspection_tag_id, price,
price_remark, inspection_price_unit_id,
detail_page, sale_state, remark, create_time)
values (#{companyInfoId}, #{serviceArea}, #{inspectionId}, #{inspectionTagId}, #{price}, #{priceRemark},
#{inspectionPriceUnitId},
#{detailPage}, #{saleState}, #{remark}, NOW())
</insert>
<insert
id=
"batchInsertCompanyInspectionFile"
>
...
...
@@ -100,31 +105,52 @@
where id = #{id}
</update>
<
upda
te
id=
"remove"
>
update company_inspection set is_deleted = 1
where id = #{id}
</
upda
te>
<
dele
te
id=
"remove"
>
delete from company_inspection
where id = #{id}
</
dele
te>
<update
id=
"updateRemark"
>
update company_inspection set remark = #{remark} where id = #{id}
update company_inspection
set remark = #{remark}
where id = #{id}
</update>
<update
id=
"removeByCompanyInfoId"
>
update company_inspection set is_deleted = 1 where company_info_id = #{companyInfoId}
update company_inspection
set is_deleted = 1
where company_info_id = #{companyInfoId}
</update>
<select
id=
"getCompanyInspectionById"
resultMap=
"companyInspectionResultMap"
>
select cins.id, cins.company_info_id, cins.service_area, cins.inspection_id, cins.inspection_tag_id, cins.price,
cins.price_remark, cins.inspection_price_unit_id,cins.detail_page, cins.sale_state, cins.remark, cins.create_time,
it.id as industry_type_id, it.type_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
itag.id as inspection_tag_id, itag.tag_name
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
LEFT JOIN inspection_tag itag ON itag.inspection_id = ins.id
where cins.id = #{id} and cins.is_deleted = 0
select cins.id,
cins.company_info_id,
cins.service_area,
cins.inspection_id,
cins.inspection_tag_id,
cins.price,
cins.price_remark,
cins.inspection_price_unit_id,
cins.detail_page,
cins.sale_state,
cins.remark,
cins.create_time,
it.id as industry_type_id,
it.type_name,
ins.id as inspection_id,
ins.inspection_no,
ins.inspection_name,
itag.id as inspection_tag_id,
itag.tag_name
from company_inspection cins
INNER JOIN inspection ins ON ins.id = cins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
LEFT JOIN inspection_tag itag ON itag.inspection_id = ins.id
where cins.id = #{id}
and cins.is_deleted = 0
</select>
<select
id=
"countListCompanyInspectionPage"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.pms.model.qo.CompanyInspectionQO"
>
<select
id=
"countListCompanyInspectionPage"
resultType=
"java.lang.Integer"
parameterType=
"com.mmc.pms.model.qo.CompanyInspectionQO"
>
select count(*)
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
...
...
@@ -148,15 +174,17 @@
</if>
</select>
<select
id=
"listCompanyInspectionPage"
resultMap=
"companyInspectionResultMap"
parameterType=
"com.mmc.pms.model.qo.CompanyInspectionQO"
>
<select
id=
"listCompanyInspectionPage"
resultMap=
"companyInspectionResultMap"
parameterType=
"com.mmc.pms.model.qo.CompanyInspectionQO"
>
select cins.id, cins.company_info_id, cins.service_area, cins.inspection_id, cins.inspection_tag_id, cins.price,
cins.price_remark, cins.inspection_price_unit_id,cins.detail_page, cins.sale_state, cins.remark, cins.create_time,
it.id as industry_type_id, it.type_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
itag.id as inspection_tag_id, itag.tag_name
cins.price_remark, cins.inspection_price_unit_id,cins.detail_page, cins.sale_state, cins.remark,
cins.create_time,
it.id as industry_type_id, it.type_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
itag.id as inspection_tag_id, itag.tag_name
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
LEFT JOIN inspection_tag itag ON cins.inspection_tag_id = itag.id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
LEFT JOIN inspection_tag itag ON cins.inspection_tag_id = itag.id
where cins.is_deleted = 0
<if
test=
"keyword != null"
>
and (ins.inspection_name like CONCAT("%",#{keyword},"%") or
...
...
@@ -204,7 +232,8 @@
<select
id=
"listAPPCompanyInspectionPage"
resultMap=
"companyInspectionResultMap"
>
select cins.id, cins.company_info_id, cins.service_area, cins.inspection_id, cins.inspection_tag_id, cins.price,
cins.price_remark, cins.inspection_price_unit_id,cins.detail_page, cins.sale_state, cins.remark, cins.create_time,
cins.price_remark, cins.inspection_price_unit_id,cins.detail_page, cins.sale_state, cins.remark,
cins.create_time,
it.id as industry_type_id, it.type_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
itag.id as inspection_tag_id, itag.tag_name
...
...
@@ -234,8 +263,10 @@
<select
id=
"listAPPCompanyInspectionPageByCompanyId"
resultMap=
"companyInspectionResultMap"
>
select com_ins.id, com_ins.company_info_id, com_ins.service_area, com_ins.inspection_id, com_ins.inspection_tag_id, com_ins.price,
com_ins.price_remark, com_ins.inspection_price_unit_id,com_ins.detail_page, com_ins.sale_state, com_ins.remark, com_ins.create_time,
select com_ins.id, com_ins.company_info_id, com_ins.service_area, com_ins.inspection_id,
com_ins.inspection_tag_id, com_ins.price,
com_ins.price_remark, com_ins.inspection_price_unit_id,com_ins.detail_page, com_ins.sale_state, com_ins.remark,
com_ins.create_time,
it.id as industry_type_id, it.type_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
itag.id as inspection_tag_id, itag.tag_name
...
...
@@ -246,10 +277,10 @@
ROW_NUMBER () OVER ( PARTITION BY company_info_id ORDER BY id ) AS row_num
FROM
company_inspection
WHERE
is_deleted = 0 and sale_state = 1 and
WHERE is_deleted = 0 and sale_state = 1 and
company_info_id IN (
<foreach
collection=
"list"
separator=
","
item=
"item"
>
#{item}
</foreach>
)
#{item}
</foreach>
)
) com_ins
INNER JOIN inspection ins ON ins.id = com_ins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
...
...
@@ -257,4 +288,9 @@
WHERE
row_num
<
= 2
</select>
<select
id=
"getServiceProduct"
resultType=
"java.lang.Integer"
>
select count(*)
from company_inspection
where is_deleted = 0
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/inspection/IndustryTypeDao.xml
浏览文件 @
160ba2c3
...
...
@@ -59,11 +59,18 @@
where id = #{id}
</update>
<update
id=
"remove"
>
<
!--<
update id="remove">
update industry_type
set is_deleted = 1
where id = #{id}
</update>
</update>-->
<delete
id=
"remove"
>
delete
from industry_type
where id = #{id}
</delete>
<select
id=
"countSameName"
resultType=
"java.lang.Integer"
>
select count(*) from industry_type it where it.is_deleted = 0
...
...
src/main/resources/mapper/inspection/InspectionDao.xml
浏览文件 @
160ba2c3
...
...
@@ -3,9 +3,12 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.pms.dao.inspection.InspectionDao"
>
<insert
id=
"insert"
parameterType=
"com.mmc.pms.entity.inspection.InspectionDO"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into inspection(inspection_no, inspection_name, industry_type_id, inspection_img, inspection_description, sale_state, case_img, case_video, create_time)
values(#{inspectionNo}, #{inspectionName}, #{industryTypeId}, #{inspectionImg}, #{inspectionDescription}, #{saleState}, #{caseImg}, #{caseVideo}, NOW())
<insert
id=
"insert"
parameterType=
"com.mmc.pms.entity.inspection.InspectionDO"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
insert into inspection(inspection_no, inspection_name, industry_type_id, inspection_img, inspection_description,
sale_state, case_img, case_video, create_time)
values (#{inspectionNo}, #{inspectionName}, #{industryTypeId}, #{inspectionImg}, #{inspectionDescription},
#{saleState}, #{caseImg}, #{caseVideo}, NOW())
</insert>
<update
id=
"update"
parameterType=
"com.mmc.pms.entity.inspection.InspectionDO"
>
...
...
@@ -39,9 +42,15 @@
where id = #{id}
</update>
<update
id=
"remove"
>
<
!--<
update id="remove">
update inspection set is_deleted = 1 where id = #{id}
</update>
</update>-->
<delete
id=
"remove"
>
delete
from inspection
where id = #{id}
</delete>
<select
id=
"countSameName"
resultType=
"java.lang.Integer"
>
select count(*) from inspection
...
...
@@ -54,9 +63,18 @@
</select>
<select
id=
"getInspectionById"
resultType=
"com.mmc.pms.entity.inspection.InspectionDO"
>
select ins.id , ins.inspection_no, ins.inspection_name, ins.industry_type_id, ins.inspection_img,
ins.inspection_description, ins.sale_state as ins_sale_state, ins.case_img, ins.case_video, ins.create_time
from inspection ins
where ins.is_deleted = 0 and ins.id = #{id}
select ins.id,
ins.inspection_no,
ins.inspection_name,
ins.industry_type_id,
ins.inspection_img,
ins.inspection_description,
ins.sale_state as ins_sale_state,
ins.case_img,
ins.case_video,
ins.create_time
from inspection ins
where ins.is_deleted = 0
and ins.id = #{id}
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/lease/LeaseGoodsDao.xml
浏览文件 @
160ba2c3
...
...
@@ -487,4 +487,8 @@
</where>
order by lg.shelf_status DESC, lg.sort DESC
</select>
<select
id=
"getLeaseProduct"
resultType=
"java.lang.Integer"
>
select count(*)
from lease_goods
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/mall/AppMallGoodsDao.xml
浏览文件 @
160ba2c3
...
...
@@ -65,4 +65,49 @@
WHERE
row_num
<
= 6 and mg.is_deleted = 0 and mg.shelf_status = 1
</select>
<resultMap
id=
"resultMallGoodsMap"
type=
"com.mmc.pms.entity.mall.MallGoodsDO"
>
<id
column=
"id"
property=
"id"
/>
<result
column=
"trade_name"
property=
"tradeName"
/>
<result
column=
"price_show"
property=
"priceShow"
/>
<result
column=
"user_account_id"
property=
"userAccountId"
/>
<result
column=
"url"
property=
"url"
/>
<result
column=
"is_deleted"
property=
"deleted"
/>
<result
column=
"shelf_status"
property=
"shelfStatus"
/>
<collection
property=
"priceStockDOS"
ofType=
"com.mmc.pms.entity.mall.PriceStockDO"
>
<id
column=
"productSpecId"
property=
"id"
/>
<result
column=
"product_spec"
property=
"productSpec"
/>
<result
column=
"sku_image"
property=
"skuImage"
/>
<result
column=
"sale_price"
property=
"salePrice"
/>
<result
column=
"sku_no"
property=
"skuNo"
/>
</collection>
</resultMap>
<select
id=
"listPriceStock"
resultMap=
"resultMallGoodsMap"
>
SELECT
mg.id,
mg.trade_name,
mg.price_show,
mg.user_account_id,
mg.is_deleted,
mg.shelf_status,
mgr.url url,
ps.id as productSpecId,
ps.product_spec,
ps.sale_price,
ps.sku_image,
ps.sku_no
FROM
mall_goods mg
INNER JOIN mall_goods_resources mgr on mg.id = mgr.mall_goods_id
AND mgr.type = 0
LEFT JOIN price_stock ps ON ps.mall_goods_id = mg.id
<where>
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"and ps.mall_goods_id in ("
close=
")"
>
#{item.mallGoodsId}
</foreach>
<foreach
collection=
"list"
item=
"item"
separator=
","
open=
"and ps.product_spec in ("
close=
")"
>
#{item.productSpec}
</foreach>
</where>
</select>
</mapper>
\ No newline at end of file
src/main/resources/mapper/mall/MallGoodsDao.xml
浏览文件 @
160ba2c3
...
...
@@ -15,9 +15,10 @@
label_show,
goods_details,
user_account_id,
price_show,
sort)
values ( #{goodsNo}, #{tradeName}, #{description}, #{categoryPrimaryId}, #{categorySubId}
, #{shelfStatus}, #{goodsLabel}, #{labelShow}, #{goodsDetails}, #{userAccountId}, #{sort})
, #{shelfStatus}, #{goodsLabel}, #{labelShow}, #{goodsDetails}, #{userAccountId}, #{
priceShow}, #{
sort})
</insert>
<insert
id=
"batchInsertMallGoodsResources"
>
...
...
@@ -67,7 +68,8 @@
shelf_status = #{mallGoodsDO.shelfStatus},
goods_label = #{mallGoodsDO.goodsLabel},
label_show = #{mallGoodsDO.labelShow},
goods_details = #{mallGoodsDO.goodsDetails}
goods_details = #{mallGoodsDO.goodsDetails},
price_show = #{mallGoodsDO.priceShow}
WHERE id = #{mallGoodsDO.id}
</update>
<update
id=
"updateMallGoodsSort"
>
...
...
@@ -155,6 +157,7 @@
label_show,
goods_details,
user_account_id,
price_show,
sort,
create_time
FROM mall_goods
...
...
@@ -201,6 +204,7 @@
mg.category_sub_id,
mg.user_account_id,
mg.description,
mg.price_show,
img.id as imgId,
img.url,
img.type
...
...
@@ -257,4 +261,9 @@
</foreach>
</where>
</select>
<select
id=
"getMallGoodsCount"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM mall_goods
WHERE is_deleted = 0
</select>
</mapper>
src/main/resources/not-check.yml
浏览文件 @
160ba2c3
...
...
@@ -22,6 +22,7 @@ data-filter:
-
/pms/category/appCategoryInfo
-
/pms/app/goods/queryBrandGoods
-
/pms/app/goods/queryGoodsInfoByCategorySub
-
/pms/app/goods/listPriceStock
-
/pms/mall/goods/feignRemoveGoodsByBackUserAccountId
-
/pms/app/lease/leaseGoodsDetails
-
/pms/app/lease/leaseGoodsList
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论