|
|
@@ -5,6 +5,7 @@ import com.dgtly.common.annotation.ApiPassToken;
|
|
|
import com.dgtly.common.core.controller.ApiBaseController;
|
|
|
import com.dgtly.common.core.domain.AjaxResult;
|
|
|
import com.dgtly.common.core.domain.ParameterObject;
|
|
|
+import com.dgtly.common.utils.StringUtils;
|
|
|
import com.dgtly.system.domain.*;
|
|
|
import com.dgtly.system.service.*;
|
|
|
import io.swagger.annotations.*;
|
|
|
@@ -250,12 +251,17 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
Long alertId = Long.valueOf(obj.getString("alertId"));//弹框ID
|
|
|
String alertContent = String.valueOf(obj.getString("alertContent"));//弹框内容
|
|
|
String photoUrl = String.valueOf(obj.getString("photoUrl"));//弹框图片
|
|
|
- Integer status = Integer.valueOf(obj.getString("status"));//状态
|
|
|
+ Integer status=3;//如果没有传status,为查询
|
|
|
+ if (obj.getString("status")!=null){
|
|
|
+ status = Integer.valueOf(obj.getString("status"));//状态
|
|
|
+ }
|
|
|
//根据用户ID、弹框ID查询是否有记录,,没有新增记录
|
|
|
AlertUpvoteLog alertUpvoteLog = alertUpvoteLogService.selectUpvoteByUidAndAid(userId, alertId);
|
|
|
if (alertUpvoteLog!=null){
|
|
|
//如果有 修改记录
|
|
|
- alertUpvoteLog.setStatus(status);
|
|
|
+ if (status!=3) {
|
|
|
+ alertUpvoteLog.setStatus(status);
|
|
|
+ }
|
|
|
alertUpvoteLog.setLoginName(loginName);
|
|
|
alertUpvoteLog.setUserName(userName);
|
|
|
alertUpvoteLog.setAlertContent(alertContent);
|
|
|
@@ -271,7 +277,9 @@ public class WxAlertLogController extends ApiBaseController {
|
|
|
upvoteLog.setAlertId(alertId);
|
|
|
upvoteLog.setAlertContent(alertContent);
|
|
|
upvoteLog.setPhotoUrl(photoUrl);
|
|
|
- upvoteLog.setStatus(status);
|
|
|
+ if (status!=null) {
|
|
|
+ upvoteLog.setStatus(status);
|
|
|
+ }
|
|
|
alertUpvoteLogService.insertAlertUpvoteLog(upvoteLog);
|
|
|
return AjaxResult.success(upvoteLog);
|
|
|
}
|