Commit b4c25cc3 authored by 赵啸非's avatar 赵啸非

修改短信开关redis查询

parent 7a3d8f99
package com.mortals.xhx.module.sms.service; package com.mortals.xhx.module.sms.service;
import com.mortals.framework.service.ICRUDCacheService;
import com.mortals.framework.service.ICRUDService; import com.mortals.framework.service.ICRUDService;
import com.mortals.xhx.module.sms.model.SmsSetEntity; import com.mortals.xhx.module.sms.model.SmsSetEntity;
/** /**
...@@ -9,6 +10,6 @@ import com.mortals.xhx.module.sms.model.SmsSetEntity; ...@@ -9,6 +10,6 @@ import com.mortals.xhx.module.sms.model.SmsSetEntity;
* @author zxfei * @author zxfei
* @date 2022-01-12 * @date 2022-01-12
*/ */
public interface SmsSetService extends ICRUDService<SmsSetEntity,Long>{ public interface SmsSetService extends ICRUDCacheService<SmsSetEntity,Long>{
} }
\ No newline at end of file
package com.mortals.xhx.module.sms.service.impl; package com.mortals.xhx.module.sms.service.impl;
import com.mortals.framework.exception.AppException;
import com.mortals.framework.service.impl.AbstractCRUDCacheServiceImpl;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.xhx.module.sms.dao.SmsSetDao; import com.mortals.xhx.module.sms.dao.SmsSetDao;
import com.mortals.xhx.module.sms.model.SmsSetEntity; import com.mortals.xhx.module.sms.model.SmsSetEntity;
import com.mortals.xhx.module.sms.service.SmsSetService; import com.mortals.xhx.module.sms.service.SmsSetService;
import org.springframework.util.ObjectUtils;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
/** /**
* SmsSetService * SmsSetService
* 短信设置 service实现 * 短信设置 service实现
...@@ -12,6 +20,14 @@ import com.mortals.xhx.module.sms.service.SmsSetService; ...@@ -12,6 +20,14 @@ import com.mortals.xhx.module.sms.service.SmsSetService;
* @date 2022-01-12 * @date 2022-01-12
*/ */
@Service("smsSetService") @Service("smsSetService")
public class SmsSetServiceImpl extends AbstractCRUDServiceImpl<SmsSetDao, SmsSetEntity, Long> implements SmsSetService { public class SmsSetServiceImpl extends AbstractCRUDCacheServiceImpl<SmsSetDao, SmsSetEntity, Long> implements SmsSetService {
@Override
public List<SmsSetEntity> find(SmsSetEntity entity) throws AppException {
List<SmsSetEntity> cacheList = this.getCacheList();
List<SmsSetEntity> collect = cacheList.parallelStream().filter(f -> f.getSiteId().equals(entity.getSiteId())).collect(Collectors.toList());
if(ObjectUtils.isEmpty(collect)) return Collections.emptyList();
return collect;
}
} }
\ No newline at end of file
...@@ -17,16 +17,12 @@ Authorization: Bearer {{authToken}} ...@@ -17,16 +17,12 @@ Authorization: Bearer {{authToken}}
###短信设置更新与保存 ###短信设置更新与保存
POST {{baseUrl}}/sms/set/save POST {{baseUrl}}/sms/set/save
Content-Type: application/json Content-Type: application/json
Authorization: Bearer {{authToken}} Authorization: {{authToken}}
{ {
"sign":"67u93o", "messageoff":1,
"lastnum":9060, "siteId":2,
"username":"m1zfu6", "siteName":"凉山州行政审批局"
"messageoff":1641,
"siteId":1693,
"smsplatform":9301,
"siteName":"o2sisn"
} }
> {% > {%
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment