ADD file via upload

main
pjhmizn49 1 year ago
parent 5a3cd32e21
commit 73ca8fd197

@ -0,0 +1,42 @@
package com.example.flower.controller;
import cn.hutool.core.lang.Dict;
import com.example.flower.config.Result;
import com.example.flower.entity.ImSingle;
import com.example.flower.service.ImSingleService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import jakarta.annotation.Resource;
import java.util.List;
/**
*
*/
@RestController
@RequestMapping(value = "/imsingle")
public class ImSingleController {
@Resource
private ImSingleService imSingleService;
/**
*
*/
@GetMapping
public Result findByFromUsername(@RequestParam String fromUser, @RequestParam String toUser) {
List<ImSingle> all = imSingleService.findByUsername(fromUser, toUser);
return Result.success(all);
}
/**
*
* @return
*/
@GetMapping("/unReadNums")
public Result findUnReadNums(@RequestParam String toUsername) {
Dict dict = imSingleService.findUnReadNums(toUsername);
return Result.success(dict);
}
}
Loading…
Cancel
Save