zhangjinli 3 years ago
parent 90a71b7b0b
commit 31186b3354

@ -257,10 +257,9 @@ public class UtilsController {
}
public static void main(String[] args) {
String url ="测试https://v.kuaishou.com/lnmWDU 测试 复制此消息,打开【快手】直接观看!";
String s = RegexUtils.get("(https://)(.*?)(/)(.*?)(/)",url,0);
System.out.println(s);
String access_token = new HttpUtil().qywxGetToken();
JSONObject res = new HttpUtil().qywxUserSession(access_token,"6P1ZEZ9vFccm1007J7QF9o4fSHVnttZbfjn3r1Xe0c0");
System.out.println(res);
// String url = "4.38 wfb:/ 复制打开抖音身 https://v.douyin.com/YT98hjf/,看看【酸味真火的作品】坚持总会有收获的# 意想不到的情侣健身 https://v.douyin.com/YT982Sf/";
// System.out.println( RegexUtils.get("(https://)(.*?)(/)(.*?)(/)",url,0));
// String a = m.find() ? m.group(1) : url;

@ -57,8 +57,10 @@ public class RankUController {
@Data
static class RankParam {
@Schema(title = "时间条件", description = "1今日;2本周;3本月;4全年")
private Integer dateCondition;
// @Schema(title = "时间条件", description = "1今日;2本周;3本月;4全年")
// private Integer dateCondition;
@Schema(title = "月份", description = "格式为yyyy-MM-dd HH:mm:ss")
private LocalDateTime dateTime;
@Schema(title = "1经销商2员工", description = "默认1")
private Integer type;
private Integer pageNum;
@ -71,27 +73,8 @@ public class RankUController {
public Result list(@Validated @RequestBody RankParam param) {
Page pg = MybatisPlusUtil.SetNumPage(param.getPageNum(), param.getPageSize());
QueryWrapper<UserEffectRecords> qw = new QueryWrapper<>();
DateTimeFormatter df = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate now = LocalDateTime.now().toLocalDate();
LocalDate before =now.with(TemporalAdjusters.firstDayOfMonth());
if (param.getDateCondition() != null) {
switch (param.getDateCondition()) {
case 1:
before = now;
break;
case 2:
before = now.with(DayOfWeek.MONDAY);
break;
case 3:
before = now.with(TemporalAdjusters.firstDayOfMonth());
break;
case 4:
before = now.with(TemporalAdjusters.firstDayOfYear());
break;
default:
}
}
qw.between("t1.createAt", before, now.plusDays(1));
LocalDateTime now = param.getDateTime() != null?LocalDateTime.now():param.getDateTime();
qw.eq("date_format(t1.creatAt, '%Y-%m-%d')",now.toLocalDate());
IPage page =(param.getType() != null && param.getType() == 1) ? userEffectRecordsMapper.rankByDepartment(pg,qw) : userEffectRecordsMapper.rankByUser(pg,qw);
return Result.success(page.getRecords(), "请求成功");
}

Loading…
Cancel
Save