Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
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:
...
@@ -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
:
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;
...
@@ -4,6 +4,8 @@ import com.mmc.pms.common.ResultBody;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.controller.BaseController
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
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.AppMallGoodsService
;
import
com.mmc.pms.service.mall.MallGoodsService
;
import
com.mmc.pms.service.mall.MallGoodsService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -56,4 +58,9 @@ public class AppMallGoodsController extends BaseController {
...
@@ -56,4 +58,9 @@ public class AppMallGoodsController extends BaseController {
public
ResultBody
<
GoodsListVO
>
brandStoreList
(
@RequestBody
List
<
Integer
>
userAccountIds
)
{
public
ResultBody
<
GoodsListVO
>
brandStoreList
(
@RequestBody
List
<
Integer
>
userAccountIds
)
{
return
appMallGoodsService
.
brandStoreList
(
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 {
...
@@ -38,4 +38,6 @@ public interface CompanyInspectionDao {
void
removeByCompanyInfoId
(
Integer
companyInfoId
);
void
removeByCompanyInfoId
(
Integer
companyInfoId
);
List
<
CompanyInspectionDO
>
listAPPCompanyInspectionPageByCompanyId
(
List
<
Integer
>
list
);
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 {
...
@@ -76,4 +76,6 @@ public interface LeaseGoodsDao {
int
countLeaseGoodsByApp
(
LeaseGoodsQO
param
);
int
countLeaseGoodsByApp
(
LeaseGoodsQO
param
);
List
<
LeaseGoodsDO
>
listLeaseGoodsByApp
(
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
;
package
com
.
mmc
.
pms
.
dao
.
mall
;
import
com.mmc.pms.entity.mall.MallGoodsDO
;
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.Mapper
;
import
org.apache.ibatis.annotations.Param
;
import
org.apache.ibatis.annotations.Param
;
...
@@ -17,4 +18,5 @@ public interface AppMallGoodsDao {
...
@@ -17,4 +18,5 @@ public interface AppMallGoodsDao {
List
<
MallGoodsDO
>
brandStoreList
(
List
<
Integer
>
list
);
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 {
...
@@ -64,4 +64,6 @@ public interface MallGoodsDao {
void
deleteSpecAttrValue
(
List
<
Integer
>
delValueIds
);
void
deleteSpecAttrValue
(
List
<
Integer
>
delValueIds
);
void
updateSpecAttrValue
(
SpecAttrVO
attrVO
);
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;
...
@@ -2,6 +2,7 @@ package com.mmc.pms.entity.mall;
import
com.mmc.pms.model.mall.GoodsResourcesVO
;
import
com.mmc.pms.model.mall.GoodsResourcesVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
import
com.mmc.pms.model.mall.UavCartDTO
;
import
lombok.AllArgsConstructor
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.NoArgsConstructor
;
...
@@ -69,6 +70,8 @@ public class MallGoodsDO implements Serializable {
...
@@ -69,6 +70,8 @@ public class MallGoodsDO implements Serializable {
*/
*/
private
Integer
sort
;
private
Integer
sort
;
private
Integer
priceShow
;
private
Date
createTime
;
private
Date
createTime
;
private
Date
updateTime
;
private
Date
updateTime
;
...
@@ -80,6 +83,8 @@ public class MallGoodsDO implements Serializable {
...
@@ -80,6 +83,8 @@ public class MallGoodsDO implements Serializable {
private
Integer
imgId
;
private
Integer
imgId
;
private
List
<
MallGoodsDO
>
mallGoodsDOList
;
private
List
<
MallGoodsDO
>
mallGoodsDOList
;
private
List
<
PriceStockDO
>
priceStockDOS
;
public
MallGoodsDO
(
MallGoodsVO
mallGoodsVO
)
{
public
MallGoodsDO
(
MallGoodsVO
mallGoodsVO
)
{
this
.
id
=
mallGoodsVO
.
getId
();
this
.
id
=
mallGoodsVO
.
getId
();
this
.
tradeName
=
mallGoodsVO
.
getTradeName
();
this
.
tradeName
=
mallGoodsVO
.
getTradeName
();
...
@@ -89,12 +94,13 @@ public class MallGoodsDO implements Serializable {
...
@@ -89,12 +94,13 @@ public class MallGoodsDO implements Serializable {
this
.
shelfStatus
=
mallGoodsVO
.
getShelfStatus
();
this
.
shelfStatus
=
mallGoodsVO
.
getShelfStatus
();
this
.
goodsLabel
=
mallGoodsVO
.
getGoodsLabel
();
this
.
goodsLabel
=
mallGoodsVO
.
getGoodsLabel
();
this
.
labelShow
=
mallGoodsVO
.
getLabelShow
();
this
.
labelShow
=
mallGoodsVO
.
getLabelShow
();
this
.
priceShow
=
mallGoodsVO
.
getPriceShow
();
this
.
goodsDetails
=
mallGoodsVO
.
getGoodsDetails
();
this
.
goodsDetails
=
mallGoodsVO
.
getGoodsDetails
();
}
}
public
MallGoodsVO
buildMallGoodsVO
()
{
public
MallGoodsVO
buildMallGoodsVO
()
{
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
).
description
(
description
)
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
();
.
goodsLabel
(
goodsLabel
).
labelShow
(
labelShow
).
createTime
(
createTime
).
goodsDetails
(
goodsDetails
).
build
();
}
}
...
@@ -107,7 +113,12 @@ public class MallGoodsDO implements Serializable {
...
@@ -107,7 +113,12 @@ public class MallGoodsDO implements Serializable {
resourcesList
.
add
(
goodsResourcesVO
);
resourcesList
.
add
(
goodsResourcesVO
);
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
).
resourcesList
(
resourcesList
)
return
MallGoodsVO
.
builder
().
id
(
id
).
userAccountId
(
userAccountId
).
tradeName
(
tradeName
).
resourcesList
(
resourcesList
)
.
categoryPrimaryId
(
categoryPrimaryId
).
labelShow
(
labelShow
).
goodsLabel
(
goodsLabel
).
categorySubId
(
categorySubId
)
.
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;
...
@@ -10,14 +10,16 @@ import java.util.List;
/**
/**
* @Author LW
* @Author LW
*
* @date 2023/6/15 10:46 概要:
* @date 2023/6/15 10:46 概要:
*/
*/
@FeignClient
(
url
=
"${iuav.ims.url}"
,
name
=
"ims"
,
fallback
=
ImsApiHystrix
.
class
)
@FeignClient
(
url
=
"${iuav.ims.url}"
,
name
=
"ims"
,
fallback
=
ImsApiHystrix
.
class
)
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"
)
@GetMapping
(
"/release/curriculum/feignCountCurriculumInfo"
)
int
feignCountCurriculumInfo
(
@RequestParam
Integer
categoriesId
);
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
;
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.BUserAccountQO
;
import
com.mmc.pms.auth.dto.CompanyInfoDTO
;
import
com.mmc.pms.auth.dto.CompanyInfoVO
;
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.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.feign.hystrix.UserAppApiHystrix
;
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.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.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cloud.openfeign.FeignClient
;
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.bind.annotation.*
;
import
org.springframework.web.client.RestTemplate
;
import
java.util.List
;
import
java.util.List
;
import
java.util.stream.Collectors
;
/**
/**
* @author: zj
* @author: zj
...
@@ -65,22 +55,24 @@ public interface UserAppApi {
...
@@ -65,22 +55,24 @@ public interface UserAppApi {
/**
/**
* 获取小程序用户集合列表页面
* 获取小程序用户集合列表页面
*
* @param userAccountQO
* @param userAccountQO
* @param token
* @param token
* @return
* @return
*/
*/
@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 id
* @param token
* @param token
* @return
* @return
*/
*/
@GetMapping
(
"/userapp/company/getCompanyInfoById"
)
@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"
)
@PostMapping
(
"/userapp/company/listCompanyPageBack"
)
List
<
CompanyInfoVO
>
listCompanyPage
(
@ApiParam
(
value
=
"单位查询QO"
,
required
=
true
)
@RequestBody
CompanyInfoQO
companyInfoQO
,
@RequestHeader
(
"token"
)
String
token
);
List
<
CompanyInfoVO
>
listCompanyPage
(
@ApiParam
(
value
=
"单位查询QO"
,
required
=
true
)
@RequestBody
CompanyInfoQO
companyInfoQO
,
@RequestHeader
(
"token"
)
String
token
);
...
@@ -90,4 +82,7 @@ public interface UserAppApi {
...
@@ -90,4 +82,7 @@ public interface UserAppApi {
@PostMapping
(
"/userapp/company/listCompanyInfoByBUIds"
)
@PostMapping
(
"/userapp/company/listCompanyInfoByBUIds"
)
List
<
CompanyInfoVO
>
listCompanyInfoByBUIds
(
@RequestBody
List
<
Integer
>
backUserAccountIds
);
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;
...
@@ -8,20 +8,25 @@ import java.util.List;
/**
/**
* @Author LW
* @Author LW
*
* @date 2023/6/15 10:47 概要:
* @date 2023/6/15 10:47 概要:
*/
*/
@Slf4j
@Slf4j
public
class
ImsApiHystrix
implements
ImsAppApi
{
public
class
ImsApiHystrix
implements
ImsAppApi
{
@Override
@Override
public
List
<
CurriculumInfoVO
>
feignCurriculumInfoList
(
Integer
categoriesId
)
{
public
List
<
CurriculumInfoVO
>
feignCurriculumInfoList
(
Integer
categoriesId
)
{
log
.
error
(
"熔断:feignCurriculumInfoList:{}"
,
categoriesId
);
log
.
error
(
"熔断:feignCurriculumInfoList:{}"
,
categoriesId
);
return
null
;
return
null
;
}
}
@Override
@Override
public
int
feignCountCurriculumInfo
(
Integer
categoriesId
)
{
public
int
feignCountCurriculumInfo
(
Integer
categoriesId
)
{
log
.
error
(
"熔断:feignCountCurriculumInfo:{}"
,
categoriesId
);
log
.
error
(
"熔断:feignCountCurriculumInfo:{}"
,
categoriesId
);
return
0
;
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
;
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.CompanyInfoVO
;
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
;
import
com.mmc.pms.feign.UserAppApi
;
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.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
;
...
@@ -65,4 +65,10 @@ public class UserAppApiHystrix implements UserAppApi {
...
@@ -65,4 +65,10 @@ public class UserAppApiHystrix implements UserAppApi {
log
.
error
(
"熔断:listCompanyInfoByBUIds:{}"
,
backUserAccountIds
);
log
.
error
(
"熔断:listCompanyInfoByBUIds:{}"
,
backUserAccountIds
);
return
null
;
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 {
...
@@ -57,6 +57,9 @@ public class MallGoodsVO implements Serializable {
@ApiModelProperty
(
value
=
"商品标签"
)
@ApiModelProperty
(
value
=
"商品标签"
)
private
String
goodsLabel
;
private
String
goodsLabel
;
@ApiModelProperty
(
value
=
"价格是否显示 0不显示 1显示"
)
private
Integer
priceShow
;
@ApiModelProperty
(
value
=
"标签是否显示 0否 1是"
)
@ApiModelProperty
(
value
=
"标签是否显示 0否 1是"
)
private
Integer
labelShow
;
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;
...
@@ -22,134 +22,146 @@ 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
,
count
);
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
);
}
}
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
* @param id id
* @return {@link ResultBody}
* @return {@link ResultBody}
*/
*/
@Override
@Override
public
ResultBody
deleteBrandInfo
(
Integer
id
)
{
public
ResultBody
deleteBrandInfo
(
Integer
id
)
{
// 判断该品牌是否绑定产品信息
// 判断该品牌是否绑定产品信息
int
count
=
productDao
.
countLeaseGoodsByBrandId
(
id
);
int
count
=
productDao
.
countLeaseGoodsByBrandId
(
id
);
if
(
count
>
0
)
{
// 是否绑定型号
return
ResultBody
.
error
(
ResultEnum
.
BRAND_DELETE_FAIL
);
ModeInfoQO
qo
=
new
ModeInfoQO
();
}
qo
.
setBrandInfoId
(
id
);
brandManageDao
.
removeBrandInfoById
(
id
);
int
deviceModeCount
=
brandManageDao
.
countModeInfo
(
qo
);
return
ResultBody
.
success
();
if
(
count
>
0
||
deviceModeCount
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
BRAND_DELETE_FAIL
);
}
}
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
();
}
@Override
@Override
public
ResultBody
addMode
(
ModeInfoVO
param
)
{
public
ResultBody
addMode
(
ModeInfoVO
param
)
{
int
count
=
brandManageDao
.
countModeInfoByName
(
param
);
int
count
=
brandManageDao
.
countModeInfoByName
(
param
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
DeviceModeDO
modeInfoDO
=
new
DeviceModeDO
(
param
);
brandManageDao
.
insertModeInfo
(
modeInfoDO
);
return
ResultBody
.
success
();
}
}
DeviceModeDO
modeInfoDO
=
new
DeviceModeDO
(
param
);
brandManageDao
.
insertModeInfo
(
modeInfoDO
);
return
ResultBody
.
success
();
}
@Override
@Override
public
PageResult
modeList
(
ModeInfoQO
param
)
{
public
PageResult
modeList
(
ModeInfoQO
param
)
{
int
count
=
brandManageDao
.
countModeInfo
(
param
);
int
count
=
brandManageDao
.
countModeInfo
(
param
);
if
(
count
==
0
)
{
if
(
count
==
0
)
{
return
PageResult
.
buildPage
(
param
.
getPageNo
(),
param
.
getPageSize
(),
count
);
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
);
}
}
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
@Override
public
ResultBody
editMode
(
ModeInfoVO
param
)
{
public
ResultBody
editMode
(
ModeInfoVO
param
)
{
int
count
=
brandManageDao
.
countModeInfoByName
(
param
);
int
count
=
brandManageDao
.
countModeInfoByName
(
param
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
return
ResultBody
.
error
(
ResultEnum
.
GOODS_CATEGORY_NAME_EXIST_ERROR
);
}
DeviceModeDO
modeInfoDO
=
new
DeviceModeDO
(
param
);
brandManageDao
.
updateModeInfo
(
modeInfoDO
);
return
ResultBody
.
success
();
}
}
DeviceModeDO
modeInfoDO
=
new
DeviceModeDO
(
param
);
brandManageDao
.
updateModeInfo
(
modeInfoDO
);
return
ResultBody
.
success
();
}
@Override
@Override
public
ResultBody
deleteMode
(
Integer
id
)
{
public
ResultBody
deleteMode
(
Integer
id
)
{
// 判断该品牌是否绑定产品信息
// 判断该品牌是否绑定产品信息
int
count
=
brandManageDao
.
countLeaseGoodsByDeviceModeId
(
id
);
int
count
=
brandManageDao
.
countLeaseGoodsByDeviceModeId
(
id
);
if
(
count
>
0
)
{
if
(
count
>
0
)
{
return
ResultBody
.
error
(
ResultEnum
.
DEVICE_MODE_DELETE_FAIL
);
return
ResultBody
.
error
(
ResultEnum
.
DEVICE_MODE_DELETE_FAIL
);
}
brandManageDao
.
removeModeInfoById
(
id
);
return
ResultBody
.
success
();
}
}
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;
...
@@ -3,6 +3,8 @@ package com.mmc.pms.service.mall;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
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
;
import
java.util.List
;
...
@@ -17,4 +19,6 @@ public interface AppMallGoodsService {
...
@@ -17,4 +19,6 @@ public interface AppMallGoodsService {
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
List
<
Integer
>
categorySubIds
);
ResultBody
<
MallGoodsVO
>
queryGoodsInfoByCategorySub
(
List
<
Integer
>
categorySubIds
);
ResultBody
<
GoodsListVO
>
brandStoreList
(
List
<
Integer
>
userAccountIds
);
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;
...
@@ -3,10 +3,14 @@ package com.mmc.pms.service.mall.impl;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.common.ResultBody
;
import
com.mmc.pms.dao.mall.AppMallGoodsDao
;
import
com.mmc.pms.dao.mall.AppMallGoodsDao
;
import
com.mmc.pms.entity.mall.MallGoodsDO
;
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.GoodsListVO
;
import
com.mmc.pms.model.mall.MallGoodsVO
;
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.AppMallGoodsService
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -48,7 +52,7 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
...
@@ -48,7 +52,7 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
@Override
@Override
public
ResultBody
<
GoodsListVO
>
brandStoreList
(
List
<
Integer
>
userAccountIds
)
{
public
ResultBody
<
GoodsListVO
>
brandStoreList
(
List
<
Integer
>
userAccountIds
)
{
List
<
GoodsListVO
>
goodsList
=
new
ArrayList
<>();
List
<
GoodsListVO
>
goodsList
=
new
ArrayList
<>();
if
(
CollectionUtils
.
isNotEmpty
(
userAccountIds
)){
if
(
CollectionUtils
.
isNotEmpty
(
userAccountIds
))
{
List
<
MallGoodsDO
>
mallGoodsDOList
=
appMallGoodsDao
.
brandStoreList
(
userAccountIds
);
List
<
MallGoodsDO
>
mallGoodsDOList
=
appMallGoodsDao
.
brandStoreList
(
userAccountIds
);
List
<
MallGoodsVO
>
list
=
mallGoodsDOList
.
stream
().
map
(
MallGoodsDO:
:
buildListMallGoodsVO
).
collect
(
Collectors
.
toList
());
List
<
MallGoodsVO
>
list
=
mallGoodsDOList
.
stream
().
map
(
MallGoodsDO:
:
buildListMallGoodsVO
).
collect
(
Collectors
.
toList
());
Map
<
Integer
,
List
<
MallGoodsVO
>>
map
=
list
.
Map
<
Integer
,
List
<
MallGoodsVO
>>
map
=
list
.
...
@@ -62,4 +66,24 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
...
@@ -62,4 +66,24 @@ public class AppMallGoodsServiceImpl implements AppMallGoodsService {
}
}
return
ResultBody
.
success
(
goodsList
);
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 @@
...
@@ -16,10 +16,15 @@
values (#{brandInfoId}, #{productTypeId}, #{modelName}, #{tag})
values (#{brandInfoId}, #{productTypeId}, #{modelName}, #{tag})
</insert>
</insert>
<update
id=
"removeBrandInfoById"
>
<
!--<
update id="removeBrandInfoById">
update brand_info
update brand_info
set is_delete = 1
set is_delete = 1
where id = #{id}
where id = #{id}
</update>-->
<update
id=
"removeBrandInfoById"
>
delete
from brand_info
where id = #{id}
</update>
</update>
<update
id=
"updateBrandInfo"
>
<update
id=
"updateBrandInfo"
>
update brand_info
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 @@
...
@@ -3,7 +3,7 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.pms.dao.inspection.CompanyInspectionDao"
>
<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"
/>
<id
property=
"id"
column=
"id"
/>
<result
property=
"companyInfoId"
column=
"company_info_id"
/>
<result
property=
"companyInfoId"
column=
"company_info_id"
/>
<result
property=
"serviceArea"
column=
"service_area"
/>
<result
property=
"serviceArea"
column=
"service_area"
/>
...
@@ -45,15 +45,20 @@
...
@@ -45,15 +45,20 @@
<select
id=
"listFileByCompanyInspectionId"
resultType=
"com.mmc.pms.entity.inspection.CompanyInspectionFileDO"
>
<select
id=
"listFileByCompanyInspectionId"
resultType=
"com.mmc.pms.entity.inspection.CompanyInspectionFileDO"
>
select cif.id, file_type, `first`, company_inspection_id, file_url, create_time
select cif.id, file_type, `first`, company_inspection_id, file_url, create_time
from company_inspection_file cif
from company_inspection_file cif
where cif.is_deleted = 0 and cif.company_inspection_id = #{companyInspectionId} order by cif.id desc
where cif.is_deleted = 0
and cif.company_inspection_id = #{companyInspectionId}
order by cif.id desc
</select>
</select>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
parameterType=
"com.mmc.pms.entity.inspection.CompanyInspectionDO"
>
<insert
id=
"insert"
keyProperty=
"id"
useGeneratedKeys=
"true"
insert into company_inspection(company_info_id, service_area, inspection_id, inspection_tag_id, price, price_remark, inspection_price_unit_id,
parameterType=
"com.mmc.pms.entity.inspection.CompanyInspectionDO"
>
detail_page, sale_state, remark, create_time)
insert into company_inspection(company_info_id, service_area, inspection_id, inspection_tag_id, price,
values (#{companyInfoId}, #{serviceArea}, #{inspectionId}, #{inspectionTagId}, #{price}, #{priceRemark}, #{inspectionPriceUnitId},
price_remark, inspection_price_unit_id,
#{detailPage}, #{saleState}, #{remark}, NOW())
detail_page, sale_state, remark, create_time)
values (#{companyInfoId}, #{serviceArea}, #{inspectionId}, #{inspectionTagId}, #{price}, #{priceRemark},
#{inspectionPriceUnitId},
#{detailPage}, #{saleState}, #{remark}, NOW())
</insert>
</insert>
<insert
id=
"batchInsertCompanyInspectionFile"
>
<insert
id=
"batchInsertCompanyInspectionFile"
>
...
@@ -100,31 +105,52 @@
...
@@ -100,31 +105,52 @@
where id = #{id}
where id = #{id}
</update>
</update>
<
upda
te
id=
"remove"
>
<
dele
te
id=
"remove"
>
update company_inspection set is_deleted = 1
where id = #{id}
delete from company_inspection
where id = #{id}
</
upda
te>
</
dele
te>
<update
id=
"updateRemark"
>
<update
id=
"updateRemark"
>
update company_inspection set remark = #{remark} where id = #{id}
update company_inspection
set remark = #{remark}
where id = #{id}
</update>
</update>
<update
id=
"removeByCompanyInfoId"
>
<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>
</update>
<select
id=
"getCompanyInspectionById"
resultMap=
"companyInspectionResultMap"
>
<select
id=
"getCompanyInspectionById"
resultMap=
"companyInspectionResultMap"
>
select cins.id, cins.company_info_id, cins.service_area, cins.inspection_id, cins.inspection_tag_id, cins.price,
select cins.id,
cins.price_remark, cins.inspection_price_unit_id,cins.detail_page, cins.sale_state, cins.remark, cins.create_time,
cins.company_info_id,
it.id as industry_type_id, it.type_name,
cins.service_area,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
cins.inspection_id,
itag.id as inspection_tag_id, itag.tag_name
cins.inspection_tag_id,
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
cins.price,
INNER JOIN industry_type it ON it.id = ins.industry_type_id
cins.price_remark,
LEFT JOIN inspection_tag itag ON itag.inspection_id = ins.id
cins.inspection_price_unit_id,
where cins.id = #{id} and cins.is_deleted = 0
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>
<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(*)
select count(*)
from company_inspection cins INNER JOIN inspection ins ON ins.id = cins.inspection_id
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
INNER JOIN industry_type it ON it.id = ins.industry_type_id
...
@@ -148,15 +174,17 @@
...
@@ -148,15 +174,17 @@
</if>
</if>
</select>
</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,
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,
it.id as industry_type_id, it.type_name,
cins.create_time,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
it.id as industry_type_id, it.type_name,
itag.id as inspection_tag_id, itag.tag_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
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
INNER JOIN industry_type it ON it.id = ins.industry_type_id
LEFT JOIN inspection_tag itag ON cins.inspection_tag_id = itag.id
LEFT JOIN inspection_tag itag ON cins.inspection_tag_id = itag.id
where cins.is_deleted = 0
where cins.is_deleted = 0
<if
test=
"keyword != null"
>
<if
test=
"keyword != null"
>
and (ins.inspection_name like CONCAT("%",#{keyword},"%") or
and (ins.inspection_name like CONCAT("%",#{keyword},"%") or
...
@@ -204,7 +232,8 @@
...
@@ -204,7 +232,8 @@
<select
id=
"listAPPCompanyInspectionPage"
resultMap=
"companyInspectionResultMap"
>
<select
id=
"listAPPCompanyInspectionPage"
resultMap=
"companyInspectionResultMap"
>
select cins.id, cins.company_info_id, cins.service_area, cins.inspection_id, cins.inspection_tag_id, cins.price,
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,
it.id as industry_type_id, it.type_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
itag.id as inspection_tag_id, itag.tag_name
itag.id as inspection_tag_id, itag.tag_name
...
@@ -234,8 +263,10 @@
...
@@ -234,8 +263,10 @@
<select
id=
"listAPPCompanyInspectionPageByCompanyId"
<select
id=
"listAPPCompanyInspectionPageByCompanyId"
resultMap=
"companyInspectionResultMap"
>
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,
select com_ins.id, com_ins.company_info_id, com_ins.service_area, com_ins.inspection_id,
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,
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,
it.id as industry_type_id, it.type_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
ins.id as inspection_id, ins.inspection_no, ins.inspection_name,
itag.id as inspection_tag_id, itag.tag_name
itag.id as inspection_tag_id, itag.tag_name
...
@@ -246,10 +277,10 @@
...
@@ -246,10 +277,10 @@
ROW_NUMBER () OVER ( PARTITION BY company_info_id ORDER BY id ) AS row_num
ROW_NUMBER () OVER ( PARTITION BY company_info_id ORDER BY id ) AS row_num
FROM
FROM
company_inspection
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"
>
company_info_id IN (
<foreach
collection=
"list"
separator=
","
item=
"item"
>
#{item}
#{item}
</foreach>
)
</foreach>
)
) com_ins
) com_ins
INNER JOIN inspection ins ON ins.id = com_ins.inspection_id
INNER JOIN inspection ins ON ins.id = com_ins.inspection_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
INNER JOIN industry_type it ON it.id = ins.industry_type_id
...
@@ -257,4 +288,9 @@
...
@@ -257,4 +288,9 @@
WHERE
WHERE
row_num
<
= 2
row_num
<
= 2
</select>
</select>
<select
id=
"getServiceProduct"
resultType=
"java.lang.Integer"
>
select count(*)
from company_inspection
where is_deleted = 0
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/inspection/IndustryTypeDao.xml
浏览文件 @
160ba2c3
...
@@ -59,11 +59,18 @@
...
@@ -59,11 +59,18 @@
where id = #{id}
where id = #{id}
</update>
</update>
<update
id=
"remove"
>
<
!--<
update id="remove">
update industry_type
update industry_type
set is_deleted = 1
set is_deleted = 1
where id = #{id}
where id = #{id}
</update>
</update>-->
<delete
id=
"remove"
>
delete
from industry_type
where id = #{id}
</delete>
<select
id=
"countSameName"
resultType=
"java.lang.Integer"
>
<select
id=
"countSameName"
resultType=
"java.lang.Integer"
>
select count(*) from industry_type it where it.is_deleted = 0
select count(*) from industry_type it where it.is_deleted = 0
...
...
src/main/resources/mapper/inspection/InspectionDao.xml
浏览文件 @
160ba2c3
...
@@ -3,9 +3,12 @@
...
@@ -3,9 +3,12 @@
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mmc.pms.dao.inspection.InspectionDao"
>
<mapper
namespace=
"com.mmc.pms.dao.inspection.InspectionDao"
>
<insert
id=
"insert"
parameterType=
"com.mmc.pms.entity.inspection.InspectionDO"
keyProperty=
"id"
useGeneratedKeys=
"true"
>
<insert
id=
"insert"
parameterType=
"com.mmc.pms.entity.inspection.InspectionDO"
keyProperty=
"id"
insert into inspection(inspection_no, inspection_name, industry_type_id, inspection_img, inspection_description, sale_state, case_img, case_video, create_time)
useGeneratedKeys=
"true"
>
values(#{inspectionNo}, #{inspectionName}, #{industryTypeId}, #{inspectionImg}, #{inspectionDescription}, #{saleState}, #{caseImg}, #{caseVideo}, NOW())
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>
</insert>
<update
id=
"update"
parameterType=
"com.mmc.pms.entity.inspection.InspectionDO"
>
<update
id=
"update"
parameterType=
"com.mmc.pms.entity.inspection.InspectionDO"
>
...
@@ -39,9 +42,15 @@
...
@@ -39,9 +42,15 @@
where id = #{id}
where id = #{id}
</update>
</update>
<update
id=
"remove"
>
<
!--<
update id="remove">
update inspection set is_deleted = 1 where id = #{id}
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
id=
"countSameName"
resultType=
"java.lang.Integer"
>
select count(*) from inspection
select count(*) from inspection
...
@@ -54,9 +63,18 @@
...
@@ -54,9 +63,18 @@
</select>
</select>
<select
id=
"getInspectionById"
resultType=
"com.mmc.pms.entity.inspection.InspectionDO"
>
<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,
select ins.id,
ins.inspection_description, ins.sale_state as ins_sale_state, ins.case_img, ins.case_video, ins.create_time
ins.inspection_no,
from inspection ins
ins.inspection_name,
where ins.is_deleted = 0 and ins.id = #{id}
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>
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/lease/LeaseGoodsDao.xml
浏览文件 @
160ba2c3
...
@@ -487,4 +487,8 @@
...
@@ -487,4 +487,8 @@
</where>
</where>
order by lg.shelf_status DESC, lg.sort DESC
order by lg.shelf_status DESC, lg.sort DESC
</select>
</select>
<select
id=
"getLeaseProduct"
resultType=
"java.lang.Integer"
>
select count(*)
from lease_goods
</select>
</mapper>
</mapper>
\ No newline at end of file
src/main/resources/mapper/mall/AppMallGoodsDao.xml
浏览文件 @
160ba2c3
...
@@ -65,4 +65,49 @@
...
@@ -65,4 +65,49 @@
WHERE
WHERE
row_num
<
= 6 and mg.is_deleted = 0 and mg.shelf_status = 1
row_num
<
= 6 and mg.is_deleted = 0 and mg.shelf_status = 1
</select>
</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>
</mapper>
\ No newline at end of file
src/main/resources/mapper/mall/MallGoodsDao.xml
浏览文件 @
160ba2c3
...
@@ -15,9 +15,10 @@
...
@@ -15,9 +15,10 @@
label_show,
label_show,
goods_details,
goods_details,
user_account_id,
user_account_id,
price_show,
sort)
sort)
values ( #{goodsNo}, #{tradeName}, #{description}, #{categoryPrimaryId}, #{categorySubId}
values ( #{goodsNo}, #{tradeName}, #{description}, #{categoryPrimaryId}, #{categorySubId}
, #{shelfStatus}, #{goodsLabel}, #{labelShow}, #{goodsDetails}, #{userAccountId}, #{sort})
, #{shelfStatus}, #{goodsLabel}, #{labelShow}, #{goodsDetails}, #{userAccountId}, #{
priceShow}, #{
sort})
</insert>
</insert>
<insert
id=
"batchInsertMallGoodsResources"
>
<insert
id=
"batchInsertMallGoodsResources"
>
...
@@ -67,7 +68,8 @@
...
@@ -67,7 +68,8 @@
shelf_status = #{mallGoodsDO.shelfStatus},
shelf_status = #{mallGoodsDO.shelfStatus},
goods_label = #{mallGoodsDO.goodsLabel},
goods_label = #{mallGoodsDO.goodsLabel},
label_show = #{mallGoodsDO.labelShow},
label_show = #{mallGoodsDO.labelShow},
goods_details = #{mallGoodsDO.goodsDetails}
goods_details = #{mallGoodsDO.goodsDetails},
price_show = #{mallGoodsDO.priceShow}
WHERE id = #{mallGoodsDO.id}
WHERE id = #{mallGoodsDO.id}
</update>
</update>
<update
id=
"updateMallGoodsSort"
>
<update
id=
"updateMallGoodsSort"
>
...
@@ -155,6 +157,7 @@
...
@@ -155,6 +157,7 @@
label_show,
label_show,
goods_details,
goods_details,
user_account_id,
user_account_id,
price_show,
sort,
sort,
create_time
create_time
FROM mall_goods
FROM mall_goods
...
@@ -201,6 +204,7 @@
...
@@ -201,6 +204,7 @@
mg.category_sub_id,
mg.category_sub_id,
mg.user_account_id,
mg.user_account_id,
mg.description,
mg.description,
mg.price_show,
img.id as imgId,
img.id as imgId,
img.url,
img.url,
img.type
img.type
...
@@ -257,4 +261,9 @@
...
@@ -257,4 +261,9 @@
</foreach>
</foreach>
</where>
</where>
</select>
</select>
<select
id=
"getMallGoodsCount"
resultType=
"java.lang.Integer"
>
SELECT count(*)
FROM mall_goods
WHERE is_deleted = 0
</select>
</mapper>
</mapper>
src/main/resources/not-check.yml
浏览文件 @
160ba2c3
...
@@ -22,6 +22,7 @@ data-filter:
...
@@ -22,6 +22,7 @@ data-filter:
-
/pms/category/appCategoryInfo
-
/pms/category/appCategoryInfo
-
/pms/app/goods/queryBrandGoods
-
/pms/app/goods/queryBrandGoods
-
/pms/app/goods/queryGoodsInfoByCategorySub
-
/pms/app/goods/queryGoodsInfoByCategorySub
-
/pms/app/goods/listPriceStock
-
/pms/mall/goods/feignRemoveGoodsByBackUserAccountId
-
/pms/mall/goods/feignRemoveGoodsByBackUserAccountId
-
/pms/app/lease/leaseGoodsDetails
-
/pms/app/lease/leaseGoodsDetails
-
/pms/app/lease/leaseGoodsList
-
/pms/app/lease/leaseGoodsList
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论