|
|
@@ -94,6 +94,45 @@ func ModifyUserInfoApply(c *gin.Context) {
|
|
|
appG.Response(http.StatusOK, e.SUCCESS, "OK")
|
|
|
}
|
|
|
|
|
|
+// DeleteUserInfoApplyReq 删除客户申请请求参数
|
|
|
+type DeleteUserInfoApplyReq struct {
|
|
|
+ UserID int `form:"userID" binding:"required"`
|
|
|
+}
|
|
|
+
|
|
|
+// DeleteUserInfoApply 删除客户申请
|
|
|
+// @Summary 删除客户申请
|
|
|
+// @description 只可删除 UserState = 1 (未提交)状态的申请信息
|
|
|
+// @Produce json
|
|
|
+// @Security ApiKeyAuth
|
|
|
+// @Param userID query int true "用户ID"
|
|
|
+// @Success 200 {object} app.Response
|
|
|
+// @Failure 500 {object} app.Response
|
|
|
+// @Router /Erms3/DeleteUserInfoApply [get]
|
|
|
+// @Tags 风险管理v3
|
|
|
+func DeleteUserInfoApply(c *gin.Context) {
|
|
|
+ appG := app.Gin{C: c}
|
|
|
+
|
|
|
+ // 获取请求参数
|
|
|
+ var req DeleteUserInfoApplyReq
|
|
|
+ err := appG.C.ShouldBindQuery(&req)
|
|
|
+ if err != nil {
|
|
|
+ logger.GetLogger().Errorf("DeleteUserInfoApply failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.INVALID_PARAMS, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ if err := models.DeleteWSKHUserInfo(req.UserID); err != nil {
|
|
|
+ // 执行失败
|
|
|
+ logger.GetLogger().Errorf("DeleteUserInfoApply failed: %s", err.Error())
|
|
|
+ appG.Response(http.StatusBadRequest, e.ERROR_OPERATION_FAILED, nil)
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+ // 执行成功
|
|
|
+ logger.GetLogger().Debugln("DeleteUserInfoApply successed: %v", "OK")
|
|
|
+ appG.Response(http.StatusOK, e.SUCCESS, "OK")
|
|
|
+}
|
|
|
+
|
|
|
// QueryUserInfoAppliesReq 客户申请信息查询请求参数
|
|
|
type QueryUserInfoAppliesReq struct {
|
|
|
app.PageInfo
|