|
@@ -5,7 +5,10 @@ import com.alibaba.fastjson.JSONObject;
|
|
|
import com.google.gson.Gson;
|
|
|
import com.rf.help.base.rest.BaseController;
|
|
|
import com.rf.help.security.SafetyProcess;
|
|
|
+import com.rf.help.task.dao.model.TaskEntity;
|
|
|
+import com.rf.help.user.dao.model.SuggestEntity;
|
|
|
import com.rf.help.user.dao.model.UserEntity;
|
|
|
+import com.rf.help.user.service.SuggestService;
|
|
|
import com.rf.help.user.service.UserService;
|
|
|
import com.rf.help.utils.Constant;
|
|
|
import com.rf.help.utils.JWTUtil;
|
|
@@ -43,6 +46,9 @@ public class UserController extends BaseController {
|
|
|
@Autowired
|
|
|
private UserService userService;
|
|
|
|
|
|
+ @Autowired
|
|
|
+ private SuggestService suggestService;
|
|
|
+
|
|
|
@GetMapping("/code2openid/{code}")
|
|
|
@ApiOperation(value = "code 换 opernid",notes = "code:临时code,获取openid")
|
|
|
@SafetyProcess
|
|
@@ -182,4 +188,14 @@ public class UserController extends BaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @PostMapping("/suggest")
|
|
|
+ @ApiOperation(value = "用户建议", notes = "suggestContent:建议内容,userId:用户id")
|
|
|
+ public Result suggest(@RequestBody String json) {
|
|
|
+ SuggestEntity suggestEntity = JSONObject.parseObject(json, SuggestEntity.class);
|
|
|
+ suggestEntity.setCreateTime(DateUtil.now());
|
|
|
+ suggestEntity.setUpdateTime(DateUtil.now());
|
|
|
+ suggestEntity = this.suggestService.save(suggestEntity);
|
|
|
+ return success(suggestEntity);
|
|
|
+ }
|
|
|
+
|
|
|
}
|