本文整理了Java中org.hsweb.web.bean.common.QueryParam.build
方法的一些代码示例,展示了QueryParam.build
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryParam.build
方法的具体详情如下:
包路径:org.hsweb.web.bean.common.QueryParam
类名称:QueryParam
方法名:build
暂无
代码示例来源:origin: org.hsweb/hsweb-web-service-api
default UserProfile selectByUserIdAndType(String userId, String type) {
return selectSingle(QueryParam.build().where("userId", userId).and("type", type));
}
}
代码示例来源:origin: org.hsweb/hsweb-web-service-simple
@Override
public String insert(Form data) {
List<Form> old = this.select(QueryParam.build().where("name", data.getName()));
Assert.isTrue(old.isEmpty(), "表单 [" + data.getName() + "] 已存在!");
data.setCreateDate(new Date());
data.setVersion(1);
if (StringUtils.isNullOrEmpty(data.getId()))
data.setId(RandomUtil.randomChar());
super.insert(data);
return data.getId();
}
代码示例来源:origin: org.hsweb/hsweb-web-controller
@RequestMapping(value = "/type/{type}", method = RequestMethod.GET)
@AccessLogger("当前用户对应的类型")
public ResponseMessage byLoginUserAndType(@PathVariable("type") String type) {
User user = WebUtil.getLoginUser();
// where type=#{type} and (create_id=#{user.id} or sharing=1)
QueryParam param = QueryParam.build().noPaging();
param.where("type", type)
.nest("creatorId", user.getId()).or("sharing", 1);
return ResponseMessage.ok(queryPlanService.select(param)).onlyData();
}
代码示例来源:origin: org.hsweb/hsweb-web-oauth2-controller
@RequestMapping(value = "/user", method = RequestMethod.GET)
@AccessLogger("获取当前用户持有的客户端信息")
@Authorize
protected ResponseMessage loginUserClient() {
User user = WebUtil.getLoginUser();
OAuth2Client client = oAuth2ClientService.selectSingle(QueryParam.build().where("userId", user.getId()));
if (client == null) {
throw new NotFoundException("未绑定客户端");
}
return ResponseMessage.ok(client);
}
代码示例来源:origin: org.hsweb/hsweb-web-oauth2-controller
@RequestMapping(value = "/secret", method = RequestMethod.PUT)
@AccessLogger("刷新当前用户密钥")
@Authorize
protected ResponseMessage refreshLoginUserSecret() {
User user = WebUtil.getLoginUser();
OAuth2Client client = oAuth2ClientService.selectSingle(QueryParam.build().where("userId", user.getId()));
if (client == null) {
throw new NotFoundException("未绑定客户端");
}
return ResponseMessage.ok(oAuth2ClientService.refreshSecret(client.getId()));
}
代码示例来源:origin: org.hsweb/hsweb-web-service-simple
@Override
public String insert(DynamicScript data) {
DynamicScript old = selectSingle(QueryParam.build().where("name", data.getName()).and("type", data.getType()));
if (old != null) throw new BusinessException("已存在相同名称和类型的脚本!", 400);
data.setStatus(1);
return super.insert(data);
}
代码示例来源:origin: org.hsweb/hsweb-web-oauth2-controller
OAuth2Client client = oAuth2ClientService.selectSingle(QueryParam.build()
.where("id", clientId)
.and("secret", clientSecret).and("status", 1));
内容来源于网络,如有侵权,请联系作者删除!