35 lines
1.1 KiB
Java
35 lines
1.1 KiB
Java
package cn.unizk.controller;
|
|
|
|
import cn.unizk.entity.po.UserTreatmentParameters;
|
|
import cn.unizk.mapper.UserTreatmentParametersMapper;
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
import org.apache.commons.lang3.StringUtils;
|
|
import org.springframework.web.bind.annotation.*;
|
|
|
|
import javax.annotation.Resource;
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
/**
|
|
* @Author hao
|
|
* @Date 2026/5/8 11:50
|
|
* @Version 1.0
|
|
**/
|
|
@RestController
|
|
@RequestMapping("/pc/userTreat")
|
|
public class UserTreatController {
|
|
|
|
@Resource
|
|
private UserTreatmentParametersMapper userTreatmentParametersMapper;
|
|
|
|
@GetMapping("/lookTreat")
|
|
public List<UserTreatmentParameters> lookTreat(@RequestParam(value = "deviceId",required = false) String deviceId){
|
|
if (StringUtils.isBlank(deviceId)){
|
|
return new ArrayList<>();
|
|
}
|
|
return userTreatmentParametersMapper.selectList(new LambdaQueryWrapper<UserTreatmentParameters>()
|
|
.eq(UserTreatmentParameters::getStatus,1).eq(UserTreatmentParameters::getDeviceId,deviceId));
|
|
}
|
|
|
|
}
|