From f628be11a131a262855908b7815c3027d6bafb4c Mon Sep 17 00:00:00 2001
From: whycrzg <ruanzhigang@whycst.com>
Date: 星期三, 03 二月 2021 09:35:23 +0800
Subject: [PATCH] update

---
 src/main/java/com/fgkj/controller/Batt_attentionController.java |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/main/java/com/fgkj/controller/Batt_attentionController.java b/src/main/java/com/fgkj/controller/Batt_attentionController.java
index 13dc8b6..f21de90 100644
--- a/src/main/java/com/fgkj/controller/Batt_attentionController.java
+++ b/src/main/java/com/fgkj/controller/Batt_attentionController.java
@@ -27,7 +27,7 @@
 	//娣诲姞鍏虫敞
 	@PostMapping("/")
 	@ApiOperation(notes = "",value="娣诲姞鍏虫敞")
-	public ServiceModel add(@RequestParam Integer battGroupId,@RequestParam Integer monNum,@ApiParam(value = "ID")@RequestParam Integer uid) {
+	public ServiceModel add(@RequestParam Integer battGroupId,@RequestParam Integer monNum) {
 		Batt_attention attention = new Batt_attention();
 		User_inf uinf = (User_inf)ActionUtil.getUser();
 //		User_inf uinf = new User_inf();
@@ -35,9 +35,8 @@
 		attention.setUid(uinf.getuId());
 		attention.setBattGroupId(battGroupId);
 		attention.setMonNum(monNum);
-		attention.setUid(uid);
 		ServiceModel model = service.add(attention);
-		{
+		if (model.getCode().equals(1)){
 			String msg="娣诲姞瀵�"+attention.getBattGroupId()+"鐢垫睜缁勭殑"+attention.getMonNum()+"鍗曚綋鐨勫叧娉�";
 			User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Increase, msg);
 			uservice.add(ulog);//灏嗙敤鎴风殑鎿嶄綔璁板綍涓嬫潵
@@ -58,15 +57,14 @@
 	//鍙栨秷鍏虫敞
 	@DeleteMapping("/")
 	@ApiOperation(notes = "",value="鍙栨秷鍏虫敞")
-	public ServiceModel delete(@RequestParam Integer battGroupId,@RequestParam Integer monNum,@ApiParam(value = "ID",required = true)@RequestParam Integer uid) {
+	public ServiceModel delete(@RequestParam Integer battGroupId,@RequestParam Integer monNum) {
 		Batt_attention attention = new Batt_attention();
 		User_inf uinf = (User_inf)ActionUtil.getUser();
 		attention.setUid(uinf.getuId());
 		attention.setBattGroupId(battGroupId);
 		attention.setMonNum(monNum);
-		attention.setUid(uid);
 		ServiceModel model = service.delete(attention);
-		{
+		if (model.getCode().equals(1)){
 			String msg="鍙栨秷瀵�"+attention.getBattGroupId()+"鐢垫睜缁勭殑"+attention.getMonNum()+"鍙峰崟浣撶殑鍏虫敞";
 			User_log ulog=UinfDaoFactory.CreateULog(UinfDaoFactory.Delete, msg);
 			uservice.add(ulog);//灏嗙敤鎴风殑鎿嶄綔璁板綍涓嬫潵
@@ -89,13 +87,12 @@
 	 //鍏虫敞涔嬪墠璇嗗埆鏄惁鍏虫敞杩�
 	@GetMapping("judge")
 	@ApiOperation(notes = "",value="鍏虫敞涔嬪墠璇嗗埆鏄惁鍏虫敞杩�")
-	public ServiceModel judgeInOrNot(@RequestParam Integer battGroupId,@RequestParam Integer monNum,@ApiParam(value = "ID",required = true)@RequestParam Integer uid) {
+	public ServiceModel judgeInOrNot(@RequestParam Integer battGroupId,@RequestParam Integer monNum) {
 		Batt_attention attention = new Batt_attention();
 		User_inf uinf = (User_inf)ActionUtil.getUser();
 		attention.setUid(uinf.getuId());
 		attention.setBattGroupId(battGroupId);
 		attention.setMonNum(monNum);
-		attention.setUid(uid);
 		ServiceModel model = service.judgeInOrNot(attention);
 
 		return model;

--
Gitblit v1.9.1