提交 340cece5 authored 作者: 李秋林's avatar 李秋林

1、微信小程序appId\appsecret从后台获取;2、计划列表按日期(同日期按打卡时间)排序

上级 35a08eb2
package com.wangxiaolu.promotion.controller.user.tem;
import com.wangxiaolu.promotion.result.basedata.R;
import com.wangxiaolu.promotion.utils.TencentUtils;
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 : liqiulin
* @date : 2025-03-07 13
* @describe :
*/
@RestController
@RequestMapping("/wechat/miniapp/")
public class MiappInfoController {
@Autowired
private TencentUtils tencentUtils;
/**
* 获取小程序 - 小卤通信息
* @return
*/
@GetMapping("/xlt")
public R getXLT() {
return R.success(tencentUtils.getXltMini());
}
}
......@@ -24,7 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
@RequestMapping("/user/wechat/query")
public class temporaryInfoQueryController {
public class TemporaryInfoQueryController {
@Autowired
private WeChatUserQueryService weChatUserQueryService;
......
......@@ -2,7 +2,6 @@ package com.wangxiaolu.promotion.domain.activity.dao.impl;
import cn.hutool.core.date.DateUtil;
import com.alibaba.druid.util.StringUtils;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wangxiaolu.promotion.common.enums.StatusType;
......@@ -52,7 +51,7 @@ public class TemporaryActivityReportedDaoImpl implements TemporaryActivityReport
}
/**
* 分查询数据
* 分查询数据
*/
@Override
public void findPage(TemporaryActivityWrapper taw, PageInfo pageInfo) {
......
......@@ -155,7 +155,7 @@ public class ActivityPlanInfoDaoImpl implements ActivityPlanInfoDao {
qw.like(ActivityPlanInfoDo::getStoreName, wrapper.getStoreNameLike());
}
qw.eq(ActivityPlanInfoDo::getIsDelete, StatusType.VALID.getType());
qw.orderByDesc(ActivityPlanInfoDo::getDate);
qw.orderByDesc(ActivityPlanInfoDo::getDate,ActivityPlanInfoDo::getClockInTime);
if (Objects.nonNull(wrapper.getLimitNum())){
qw.last(" limit "+wrapper.getLimitNum());
}
......
package com.wangxiaolu.promotion.utils;
import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.result.basedata.RCode;
import com.tencentcloudapi.common.Credential;
import com.tencentcloudapi.common.exception.TencentCloudSDKException;
import com.tencentcloudapi.common.profile.ClientProfile;
......@@ -10,11 +8,16 @@ import com.tencentcloudapi.sms.v20210111.SmsClient;
import com.tencentcloudapi.sms.v20210111.models.SendSmsRequest;
import com.tencentcloudapi.sms.v20210111.models.SendSmsResponse;
import com.tencentcloudapi.sms.v20210111.models.SendStatus;
import com.wangxiaolu.promotion.exception.ParamException;
import com.wangxiaolu.promotion.result.basedata.RCode;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.apache.groovy.util.Maps;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import java.util.Map;
/**
* @author : liqiulin
* @date : 2024-04-15 15
......@@ -48,6 +51,15 @@ public class TencentUtils {
@Value("${tengxunyun.sms.overdue_long}")
private long overdueLong;
// 小卤通信息
@Value("${weixin.xlt_miniapp.app_id}")
private String xltAppId;
@Value("${weixin.xlt_miniapp.app_secret}")
private String xltAppSecret;
public Map<String,String> getXltMini() {
return Maps.of("appId", xltAppId, "appSecret", xltAppSecret);
}
/**
* 给指定手机号发送验证码
*
......
......@@ -62,6 +62,11 @@ tengxunyun:
template_id_a: 2127434
#验证码过期时间(分钟)
overdue_long: 5
weixin:
xlt_miniapp:
app_id: wx5d89065bb4725557
app_secret: 7395e91baf6b49ca9b84b1301989f77e
#qince:
# open_api: https://openapi.region2.qince.com
......
......@@ -2,7 +2,7 @@ package com.wangxiaolu.promotion.controller.wechat;
import com.alibaba.fastjson.JSONObject;
import com.wangxiaolu.promotion.controller.user.tem.TemporaryInfoCoreController;
import com.wangxiaolu.promotion.controller.user.tem.temporaryInfoQueryController;
import com.wangxiaolu.promotion.controller.user.tem.TemporaryInfoQueryController;
import com.wangxiaolu.promotion.pojo.user.vo.WxTemporaryEnrollVo;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
......@@ -22,7 +22,7 @@ class WeChatUserCoreControllerTest {
@Autowired
TemporaryInfoCoreController weChatUserCoreController;
@Autowired
temporaryInfoQueryController weChatUserQueryController;
TemporaryInfoQueryController weChatUserQueryController;
@Test
void enrollUserInfo() {
......
package com.wangxiaolu.promotion.controller.wechat;
import com.wangxiaolu.promotion.controller.user.tem.temporaryInfoQueryController;
import com.wangxiaolu.promotion.controller.user.tem.TemporaryInfoQueryController;
import com.wangxiaolu.promotion.pojo.user.vo.WxTemporaryLoginVo;
import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
......@@ -18,7 +18,7 @@ import org.springframework.test.context.junit4.SpringRunner;
class WeChatUserQueryControllerTest {
@Autowired
temporaryInfoQueryController weChatUserQueryController;
TemporaryInfoQueryController weChatUserQueryController;
@Test
void temporaryLoginByPhoneAndOpenId() {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论