公司统计上架数
This commit is contained in:
		
							parent
							
								
									d574a6b142
								
							
						
					
					
						commit
						b64f24c2f2
					
				| 
						 | 
				
			
			@ -239,5 +239,7 @@ public class BmCompanyInfo implements Serializable {
 | 
			
		|||
    //用户名
 | 
			
		||||
    private String userName;
 | 
			
		||||
 | 
			
		||||
    //上架数
 | 
			
		||||
    private Integer maCount;
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			@ -142,6 +142,8 @@ public interface DevInfoMapper {
 | 
			
		|||
     */
 | 
			
		||||
    List<BmCompanyInfo> selectCompanyList(BmCompanyInfo obj);
 | 
			
		||||
 | 
			
		||||
    List<BmCompanyInfo> getMaCountByCompany(BmCompanyInfo obj);
 | 
			
		||||
 | 
			
		||||
    int updateUpDown(@Param("maIds") List<Long> maIds, @Param("maStatus") Object maStatus);
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -625,7 +625,18 @@ public class DevInfoServiceImpl implements DevInfoService {
 | 
			
		|||
     */
 | 
			
		||||
    @Override
 | 
			
		||||
    public List<BmCompanyInfo> selectCompanyList(BmCompanyInfo obj) {
 | 
			
		||||
        return devInfoMapper.selectCompanyList(obj);
 | 
			
		||||
        List<BmCompanyInfo> companyInfos = devInfoMapper.selectCompanyList(obj);
 | 
			
		||||
        List<BmCompanyInfo> companyMaCountList = devInfoMapper.getMaCountByCompany(obj);
 | 
			
		||||
        if (!CollectionUtils.isEmpty(companyInfos) && !CollectionUtils.isEmpty(companyMaCountList)) {
 | 
			
		||||
            for (BmCompanyInfo bmInfo : companyInfos) {
 | 
			
		||||
                for (BmCompanyInfo maCountList : companyMaCountList) {
 | 
			
		||||
                    if (bmInfo.getCompanyId().equals(maCountList.getCompanyId())) {
 | 
			
		||||
                        bmInfo.setMaCount(maCountList.getMaCount());
 | 
			
		||||
                    }
 | 
			
		||||
                }
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
        return companyInfos;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -585,6 +585,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 | 
			
		|||
        </if>
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <select id="getMaCountByCompany" resultType="com.bonus.common.biz.domain.BmCompanyInfo">
 | 
			
		||||
        select own_co as companyId,count(1) as maCount from ma_dev_info
 | 
			
		||||
        where ma_status=2
 | 
			
		||||
        group by own_co
 | 
			
		||||
    </select>
 | 
			
		||||
 | 
			
		||||
    <select id="getBookCar" resultType="com.bonus.material.book.domain.BookCarInfoDto">
 | 
			
		||||
        SELECT
 | 
			
		||||
            ma_id as maId,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue