提交 37f15d5b 作者: xiaowang

入驻商家及上架商品数据看板

上级 b1e94f0f
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();
}
}
package com.mmc.pms.dao.data;
import org.apache.ibatis.annotations.Mapper;
/**
* @Author LW
* @date 2023/9/18 14:36
* 概要:
*/
@Mapper
public interface ProductReportDao {
}
...@@ -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();
} }
...@@ -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();
} }
...@@ -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();
} }
...@@ -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();
} }
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();
} }
...@@ -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;
}
} }
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;
}
} }
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;
}
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();
}
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);
}
}
<?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
...@@ -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 &lt;= 2 row_num &lt;= 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
...@@ -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
...@@ -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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论