| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- package com.goafanti.customer.controller;
- import com.goafanti.common.bo.Result;
- import com.goafanti.common.controller.BaseApiController;
- import com.goafanti.common.model.UserSuperEvaluate;
- import com.goafanti.common.utils.StringUtils;
- import com.goafanti.customer.service.UserSuperEvaluateService;
- import org.springframework.web.bind.annotation.GetMapping;
- import org.springframework.web.bind.annotation.PostMapping;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RestController;
- import javax.annotation.Resource;
- /**
- * 客户上级评价(UserSuperEvaluate)表控制层
- *
- * @author makejava
- * @since 2024-07-17 08:51:36
- */
- @RestController
- @RequestMapping("/api/admin/userSuperEvaluate")
- public class UserSuperEvaluateController extends BaseApiController{
- /**
- * 服务对象
- */
- @Resource
- private UserSuperEvaluateService userSuperEvaluateService;
- /**
- * 新增数据
- *
- * @param userSuperEvaluate 实体
- * @return 新增结果
- */
- @PostMapping("/add")
- public Result add(UserSuperEvaluate userSuperEvaluate) {
- return new Result<>().data(this.userSuperEvaluateService.insert(userSuperEvaluate));
- }
-
-
- /**
- * 通过主键查询单条数据
- *
- * @param id 主键
- * @return 单条数据
- */
- @GetMapping("/get")
- public Result<UserSuperEvaluate> queryById( Integer id) {
- return new Result<>().data(this.userSuperEvaluateService.queryById(id));
- }
- /**
- * 编辑数据
- *
- * @param userSuperEvaluate 实体
- * @return 编辑结果
- */
- @PostMapping("/update")
- public Result edit(UserSuperEvaluate userSuperEvaluate) {
- return new Result<>().data(this.userSuperEvaluateService.update(userSuperEvaluate));
- }
- /**
- * 删除数据
- *
- * @param id 主键
- * @return 删除是否成功
- */
- @GetMapping("/delete")
- public Result deleteById(Integer id) {
- return new Result<>().data(this.userSuperEvaluateService.deleteById(id));
- }
-
- /**
- * 列表查询
- * @param in 参数
- * @return
- */
- @GetMapping("/list")
- public Result list(UserSuperEvaluate in , Integer pageNo, Integer pageSize) {
- if (StringUtils.isBlank(in.getUid())){
- return new Result<>().error(buildError("客户选择不能为空"));
- }
- return new Result<>().data(this.userSuperEvaluateService.list(in, pageNo, pageSize));
- }
- }
|