package com.xiaopeng.account.controller;
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.xiaopeng.account.service.IXpUserRoutePlanRuleService;
|
import com.xiaopeng.api.model.account.XpUserRoutePlanRule;
|
import com.xiaopeng.common.core.domain.R;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
|
/**
|
* 用户规划线路偏好
|
*/
|
@RestController
|
@RequestMapping("")
|
public class XpUserRoutePlanRuleController {
|
|
@Resource
|
private IXpUserRoutePlanRuleService xpUserRoutePlanRuleService;
|
|
|
/**
|
* 根据用户id获取导航偏好设置
|
* @param uid
|
* @return
|
*/
|
@GetMapping("/logan/inner/userRoutePlanRule/getXpUserRoutePlanRule/{uid}")
|
public R<XpUserRoutePlanRule> getXpUserRoutePlanRule(@PathVariable("uid") String uid){
|
XpUserRoutePlanRule one = xpUserRoutePlanRuleService.getOne(new LambdaQueryWrapper<XpUserRoutePlanRule>().eq(XpUserRoutePlanRule::getUserId, uid)
|
.eq(XpUserRoutePlanRule::getDeleted, 0));
|
return R.ok(one);
|
}
|
|
}
|