|
@@ -155,7 +155,8 @@ public interface CompanyMapper
|
|
|
|
|
|
|
|
|
|
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
- "select c.*,cu.user_name,qu.used_num FROM company c LEFT JOIN company_user cu ON c.user_id =cu.user_id " +
|
|
|
|
|
|
|
+ "select c.*,cu.user_name,qu.used_num,t1.config_value->>'$.mchId' as mchId FROM company c LEFT JOIN company_user cu ON c.user_id =cu.user_id " +
|
|
|
|
|
+ " left join company_config t1 on t1.config_key = 'redPacket:config' and t1.company_id = c.company_id " +
|
|
|
"LEFT JOIN (select company_id, count(id) as used_num from qw_user where server_id is not null and server_status = 1 group by company_id) qu ON qu.company_id = c.company_id " +
|
|
"LEFT JOIN (select company_id, count(id) as used_num from qw_user where server_id is not null and server_status = 1 group by company_id) qu ON qu.company_id = c.company_id " +
|
|
|
"where c.is_del=0 " +
|
|
"where c.is_del=0 " +
|
|
|
" <if test=\"companyName != null and companyName != ''\"> and c.company_name like concat('%', #{companyName}, '%')</if>\n" +
|
|
" <if test=\"companyName != null and companyName != ''\"> and c.company_name like concat('%', #{companyName}, '%')</if>\n" +
|