You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					36 lines
				
				1.1 KiB
			
		
		
			
		
	
	
					36 lines
				
				1.1 KiB
			| 
								 
											2 years ago
										 
									 | 
							
								package com.ynxbd.common.action;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.action.base.BaseAction;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.helper.common.JsonHelper;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.helper.http.OkHttpHelper;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.common.result.Result;
							 | 
						||
| 
								 | 
							
								import com.ynxbd.wx.config.MessagePushConfig;
							 | 
						||
| 
								 | 
							
								import lombok.extern.slf4j.Slf4j;
							 | 
						||
| 
								 | 
							
								import okhttp3.FormBody;
							 | 
						||
| 
								 | 
							
								import okhttp3.RequestBody;
							 | 
						||
| 
								 | 
							
								import org.apache.struts2.convention.annotation.Action;
							 | 
						||
| 
								 | 
							
								import org.apache.struts2.convention.annotation.Namespace;
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								/**
							 | 
						||
| 
								 | 
							
								 * @author 李进才
							 | 
						||
| 
								 | 
							
								 * @ClassName PushAction
							 | 
						||
| 
								 | 
							
								 * @Description 消息推送交互接口
							 | 
						||
| 
								 | 
							
								 * @date 2023/05/08 15:51:00
							 | 
						||
| 
								 | 
							
								 */
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								@Slf4j
							 | 
						||
| 
								 | 
							
								@Namespace("/push")
							 | 
						||
| 
								 | 
							
								public class PushAction extends BaseAction {
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								    @Action("getRedis")
							 | 
						||
| 
								 | 
							
								    public Result getRedis(String name) {
							 | 
						||
| 
								 | 
							
								        RequestBody requestBody = new FormBody.Builder()
							 | 
						||
| 
								 | 
							
								                .add("name",name)
							 | 
						||
| 
								 | 
							
								                .build();
							 | 
						||
| 
								 | 
							
								        String url = MessagePushConfig.HOST_URL+"api/getRedis";
							 | 
						||
| 
								 | 
							
								        String requestResult = OkHttpHelper.post(url,requestBody);
							 | 
						||
| 
								 | 
							
								        log.info("[获取推送缓存]requestResult-{},url-{}",requestResult,url);
							 | 
						||
| 
								 | 
							
								        return Result.success(JsonHelper.parseObject(requestResult));
							 | 
						||
| 
								 | 
							
								    }
							 | 
						||
| 
								 | 
							
								}
							 |