消息通知
This commit is contained in:
@@ -7,6 +7,7 @@ import com.czg.sa.StpKit;
|
|||||||
import com.czg.service.product.mapper.ConsInfoMapper;
|
import com.czg.service.product.mapper.ConsInfoMapper;
|
||||||
import com.czg.service.product.util.WxAccountUtil;
|
import com.czg.service.product.util.WxAccountUtil;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -18,6 +19,7 @@ import java.util.List;
|
|||||||
* @since 2025-03-17 11:47
|
* @since 2025-03-17 11:47
|
||||||
*/
|
*/
|
||||||
@Service
|
@Service
|
||||||
|
@Slf4j
|
||||||
public class SensitiveOperationServiceImpl implements SensitiveOperationService {
|
public class SensitiveOperationServiceImpl implements SensitiveOperationService {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
@@ -27,14 +29,18 @@ public class SensitiveOperationServiceImpl implements SensitiveOperationService
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void send(String operationDesc) {
|
public void send(String operationDesc) {
|
||||||
|
log.info("------------------------------------------------敏感操作通知开始1");
|
||||||
Long shopId = StpKit.USER.getShopId(0L);
|
Long shopId = StpKit.USER.getShopId(0L);
|
||||||
String userName = StpKit.USER.getAccount();
|
String userName = StpKit.USER.getAccount();
|
||||||
List<String> openIdList = consInfoMapper.findOpenIdList(shopId, "ope");
|
List<String> openIdList = consInfoMapper.findOpenIdList(shopId, "ope");
|
||||||
if (CollUtil.isEmpty(openIdList)) {
|
if (CollUtil.isEmpty(openIdList)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
log.info("------------------------------------------------敏感操作通知开始2");
|
||||||
ThreadUtil.execAsync(() -> {
|
ThreadUtil.execAsync(() -> {
|
||||||
|
log.info("------------------------------------------------敏感操作通知开始3");
|
||||||
wxAccountUtil.sendOperationMsg(openIdList, userName, operationDesc);
|
wxAccountUtil.sendOperationMsg(openIdList, userName, operationDesc);
|
||||||
|
log.info("------------------------------------------------敏感操作通知开始4");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,6 @@ public class WxAccountUtil {
|
|||||||
|
|
||||||
public String getAccessToken() {
|
public String getAccessToken() {
|
||||||
String accessToken = Convert.toStr(redisService.get("accessToken"));
|
String accessToken = Convert.toStr(redisService.get("accessToken"));
|
||||||
accessToken = "90_OzMitqhQZ1EPbaqFqGiaCeIhCWCPerSs43dTSNVdriltnbu6F-13Yao0ByELKKP50LtyFo2Kw9xnjivQhNagYqQoJy_vsqP7Nk5l0gfBfOBZDqrlKSFyKKiiIVoBPScAJASGJ";
|
|
||||||
if (StrUtil.isNotEmpty(accessToken)) {
|
if (StrUtil.isNotEmpty(accessToken)) {
|
||||||
return accessToken;
|
return accessToken;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user