用户消息配置对外接口
This commit is contained in:
@@ -22,6 +22,8 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import springfox.documentation.annotations.ApiIgnore;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 前端控制器
|
||||
@@ -69,5 +71,15 @@ public class AppInfoSetController extends BaseController {
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, null, methodDescribe);
|
||||
}
|
||||
|
||||
@OperateInfo(info = LogEnum.BUSINESS_COMMON)
|
||||
@PostMapping("/getListById")
|
||||
@ApiOperation("根据用户id查询消息配置信息")
|
||||
@ApiImplicitParam(name = "list", value = "用户集合", required = true)
|
||||
public HttpResult<List<AppInfoSet>> getListById(@RequestBody List<String> list){
|
||||
String methodDescribe = getMethodDescribe("getListById");
|
||||
List<AppInfoSet> result = appInfoSetService.getListById(list);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, result, methodDescribe);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -4,6 +4,8 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.njcn.user.pojo.param.AppInfoSetParam;
|
||||
import com.njcn.user.pojo.po.app.AppInfoSet;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务类
|
||||
@@ -18,4 +20,11 @@ public interface IAppInfoSetService extends IService<AppInfoSet> {
|
||||
*/
|
||||
void updateAppInfo(AppInfoSetParam param);
|
||||
|
||||
/**
|
||||
* 根据用户集合查询数据
|
||||
* @param list
|
||||
* @return
|
||||
*/
|
||||
List<AppInfoSet> getListById(List<String> list);
|
||||
|
||||
}
|
||||
|
||||
@@ -9,6 +9,8 @@ import com.njcn.web.utils.RequestUtil;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 服务实现类
|
||||
@@ -27,4 +29,9 @@ public class AppInfoSetServiceImpl extends ServiceImpl<AppInfoSetMapper, AppInfo
|
||||
appInfoSet.setUserId(RequestUtil.getUserIndex());
|
||||
this.updateById(appInfoSet);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<AppInfoSet> getListById(List<String> list) {
|
||||
return this.lambdaQuery().in(AppInfoSet::getUserId,list).list();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user