Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
P
pms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
pms
Commits
37f15d5b
提交
37f15d5b
authored
9月 19, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
入驻商家及上架商品数据看板
上级
b1e94f0f
隐藏空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
302 行增加
和
64 行删除
+302
-64
ProductReportController.java
.../com/mmc/pms/controller/data/ProductReportController.java
+36
-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
MallGoodsDao.java
src/main/java/com/mmc/pms/dao/mall/MallGoodsDao.java
+2
-0
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
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
ProductReportDao.xml
src/main/resources/mapper/data/ProductReportDao.xml
+8
-0
CompanyInspectionDao.xml
...main/resources/mapper/inspection/CompanyInspectionDao.xml
+73
-34
LeaseGoodsDao.xml
src/main/resources/mapper/lease/LeaseGoodsDao.xml
+5
-0
MallGoodsDao.xml
src/main/resources/mapper/mall/MallGoodsDao.xml
+5
-0
没有找到文件。
src/main/java/com/mmc/pms/controller/data/ProductReportController.java
0 → 100644
浏览文件 @
37f15d5b
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
(
"/getUserReportData"
)
public
ResultBody
<
ProductReportDTO
>
getUserReportData
()
{
return
productReportService
.
getUserReportData
();
}
}
src/main/java/com/mmc/pms/dao/data/ProductReportDao.java
0 → 100644
浏览文件 @
37f15d5b
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
浏览文件 @
37f15d5b
...
@@ -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
浏览文件 @
37f15d5b
...
@@ -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/MallGoodsDao.java
浏览文件 @
37f15d5b
...
@@ -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/feign/ImsAppApi.java
浏览文件 @
37f15d5b
...
@@ -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
浏览文件 @
37f15d5b
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
浏览文件 @
37f15d5b
...
@@ -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
浏览文件 @
37f15d5b
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
浏览文件 @
37f15d5b
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/service/data/ProductReportService.java
0 → 100644
浏览文件 @
37f15d5b
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
>
getUserReportData
();
}
src/main/java/com/mmc/pms/service/data/impl/ProductReportServiceImpl.java
0 → 100644
浏览文件 @
37f15d5b
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
>
getUserReportData
()
{
// 获取入驻商家总数
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/resources/mapper/data/ProductReportDao.xml
0 → 100644
浏览文件 @
37f15d5b
<?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
浏览文件 @
37f15d5b
...
@@ -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"
>
...
@@ -101,30 +106,53 @@
...
@@ -101,30 +106,53 @@
</update>
</update>
<update
id=
"remove"
>
<update
id=
"remove"
>
update company_inspection set is_deleted = 1 where id = #{id}
update company_inspection
set is_deleted = 1
where id = #{id}
</update>
</update>
<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 +176,17 @@
...
@@ -148,15 +176,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 +234,8 @@
...
@@ -204,7 +234,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 +265,10 @@
...
@@ -234,8 +265,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 +279,10 @@
...
@@ -246,10 +279,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 +290,9 @@
...
@@ -257,4 +290,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/lease/LeaseGoodsDao.xml
浏览文件 @
37f15d5b
...
@@ -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/MallGoodsDao.xml
浏览文件 @
37f15d5b
...
@@ -261,4 +261,9 @@
...
@@ -261,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>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论