StringsqlCount="select count(1) from user_collections where type='TICKET' and status=1 and content_id>=5722";
StringsqlCount="select count(1) from user_collections where type='TICKET' and status=1 and content_id>=5722 and created_at"+(StringUtils.isBlank(incrDt)?"<":">=")+"curdate()";
StringsqlCount="select count(1) from enters where (type <> 1 or (type = 1 and is_certification = 'yes'))";
StringsqlCount="select count(1) from enters where (type <> 1 or (type = 1 and is_certification = 'yes')) and created_at"+(StringUtils.isBlank(incrDt)?"<":">=")+"curdate()";
StringsqlCount="select count(1) from user_real_name where 1=1";
StringsqlCount="select count(1) from user_real_name where id not in (9145,7456,7448,7197,7194,4137,4138,4139,269,261,262,263,264,265,266,267,251) and created_at"+(StringUtils.isBlank(incrDt)?"<":">=")+"curdate()";
@@ -37,8 +38,8 @@ public class DMThirdPartsProcessor extends DataMigrationProcessorService {
}
StringsqlCount="select count(1) from (\n"+
" select row_number() over (partition by uid,type order by created_at desc) rn,uid,open_id,avatar,nickname,type,created_at,updated_at from user_third_parts where `status`=1 and delete_tag in (0,1) and open_id<>'' and uid>0\n"+
" ) t where t.rn = 1";
" select row_number() over (partition by uid,type order by created_at desc) rn,id,uid,open_id,avatar,nickname,type,created_at,updated_at from user_third_parts where `status`=1 and delete_tag in (0,1) and open_id<>'' and uid>0 and created_at"+(StringUtils.isBlank(incrDt)?"<":">=")+"curdate()\n"+
StringsqlCount="select count(1) from users where delete_tag in (0,1) and length(mobile)=11 ";
StringsqlCount="select count(1) from users where delete_tag in (0,1) and length(mobile)=11 and created_at"+(StringUtils.isBlank(incrDt)?"<":">=")+"curdate()";
StringsqlAllCount="select count(0) as 'allCount' from order_tickets where performance_id > 5721 and status != 2 and created_at like '2021-"+month+"%'";//设置的预编译语句格式
// String sqlAllCount = "select count(0) as 'allCount' from order_tickets where performance_id = "+month + " and status != 2 and status !=-1"; //设置的预编译语句格式
System.out.println(" SQL COUNT = "+sqlAllCount);
System.out.println(" SQL COUNT = "+sqlAllCount);
pstmt=con.prepareStatement(sqlAllCount);
ResultSetallCount=pstmt.executeQuery();
intallCountResult=0;//共多少条
...
...
@@ -478,7 +478,7 @@ public class DataImpl {
//订单
Stringsql="select * from order_tickets where performance_id > 5721 and status != 2 and created_at like '2021-"+month+"%' limit "+count*page+" ,"+count;//设置的预编译语句格式
// String sql = "select * from order_tickets where performance_id = "+month +" and status != 2 limit " + count * page + " ," + count;
System.out.println(" SQL DATA = "+sql);
System.out.println(" SQL DATA = "+sql);
pstmt=con.prepareStatement(sql);
ResultSetorderData=pstmt.executeQuery();
while(orderData.next()){
...
...
@@ -506,14 +506,14 @@ public class DataImpl {
}
//退款
StringrefundSql="select refund_table_id,sum(refund_number) as 'refund_number',sum(refund_price) as 'refund_price' from order_refunds where refund_table = 'order_ticket_entities' and order_id = "+orderData.getInt("id")+" group by refund_table_id";//设置的预编译语句格式
StringrefundSql="select refund_table_id,sum(refund_number) as 'refund_number',sum(refund_price) as 'refund_price' from order_refunds where refund_table = 'order_ticket_entities' and order_id = "+orderData.getInt("id")+" group by refund_table_id";//设置的预编译语句格式
Stringsql="select rs.id,rs.title,rs.img_poster,rs.created_at,rs.updated_at,count(p.id) as 'count' from road_shows as rs left join performances as p on p.road_show_id = rs.id where p.id > 5721 group by rs.id,rs.title having count>0";