Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
rs-cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
周健威
rs-cloud-platform
Commits
8b859284
Commit
8b859284
authored
Dec 21, 2020
by
周健威
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加我的定制列表
parent
6f98fac1
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
59 additions
and
8 deletions
+59
-8
BaseController.java
...m/github/wxiaoqi/security/common/rest/BaseController.java
+24
-0
GtdataController.java
.../upyuns/platform/rs/datacenter/rest/GtdataController.java
+2
-1
CustomForm.java
...ava/com/upyuns/platform/rs/website/entity/CustomForm.java
+13
-3
CustomFormWebController.java
...rm/rs/website/controller/web/CustomFormWebController.java
+20
-4
No files found.
ace-common/src/main/java/com/github/wxiaoqi/security/common/rest/BaseController.java
View file @
8b859284
...
...
@@ -5,12 +5,15 @@ import com.github.wxiaoqi.security.common.context.BaseContextHandler;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.msg.TableResultResponse
;
import
com.github.wxiaoqi.security.common.util.Query
;
import
com.github.wxiaoqi.security.common.util.ReflectionUtils
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
javax.servlet.http.HttpServletRequest
;
import
java.lang.reflect.Field
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -87,5 +90,26 @@ public class BaseController<Biz extends BaseBiz,Entity> extends CommonBaseContro
return
ObjectRestResponse
.
succ
(
baseBiz
.
selectList
(
entity
));
}
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/del"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
public
ObjectRestResponse
del
(
Entity
entity
){
Field
field
=
ReflectionUtils
.
getAccessibleField
(
entity
,
"isDel"
);
Field
field2
=
ReflectionUtils
.
getAccessibleField
(
entity
,
"delete"
);
if
(
null
!=
field
)
{
ReflectionUtils
.
setFieldValue
(
entity
,
"isDel"
,
1
);
}
if
(
null
!=
field2
)
{
ReflectionUtils
.
setFieldValue
(
entity
,
"delete"
,
1
);
}
baseBiz
.
updateSelectiveById
(
entity
);
return
ObjectRestResponse
.
succ
();
}
@Data
public
static
class
BaseDetailDTO
{
Integer
id
;
}
}
rs-datacenter/rs-datacenter-server/src/main/java/com/upyuns/platform/rs/datacenter/rest/GtdataController.java
View file @
8b859284
...
...
@@ -35,7 +35,8 @@ public class GtdataController extends CommonBaseController {
public
void
queryAreaInfoByAreaId
()
throws
Exception
{
String
url
=
request
.
getRequestURI
();
String
fileName
=
url
.
substring
(
url
.
lastIndexOf
(
"/"
)+
1
);
String
filePath
=
"/obt/thumbnail/"
+
url
.
substring
(
url
.
lastIndexOf
(
"/app/unauth/image/"
)+
18
);
String
filePath
=
"https://box.bdimg.com/static/fisp_static/common/img/searchbox/logo_news_276_88_1f9876a.png"
;
// String filePath = "/obt/thumbnail/"+ url.substring(url.lastIndexOf("/app/unauth/image/")+18);
// String filePath = "/obt/thumbnail/data/VDM2/20200613/VDM2_20200525232637_0015_L1_MSS_CMOS5/VDM2_20200525232637_0015_L1_MSS_CMOS5_98_98.jpg";
// filePath = gtDataRestClient.openUrl(filePath);
downloadVideoById
(
fileName
,
filePath
,
getResponse
());
...
...
rs-website/rs-website-api/src/main/java/com/upyuns/platform/rs/website/entity/CustomForm.java
View file @
8b859284
...
...
@@ -18,10 +18,13 @@ import lombok.Data;
@Table
(
name
=
"custom_form"
)
public
class
CustomForm
implements
Serializable
{
private
static
final
long
serialVersionUID
=
1L
;
public
static
final
int
STATUS_SUBMIT
=
1
;
public
static
final
int
STATUS_ORDER
=
2
;
/**
*
*/
/**
*
*/
@Id
@GeneratedValue
(
strategy
=
GenerationType
.
IDENTITY
)
@ApiModelProperty
(
""
)
...
...
@@ -230,4 +233,11 @@ public class CustomForm implements Serializable {
@Column
(
name
=
"user_id"
)
@ApiModelProperty
(
value
=
"用户id"
)
private
Integer
userId
;
/**
* 状态 1--已提交;2--已转订单
*/
@Column
(
name
=
"status"
)
@ApiModelProperty
(
value
=
"状态 1--已提交;2--已转订单"
)
private
Integer
status
;
}
rs-website/rs-website-server/src/main/java/com/upyuns/platform/rs/website/controller/web/CustomFormWebController.java
View file @
8b859284
...
...
@@ -3,19 +3,24 @@ package com.upyuns.platform.rs.website.controller.web;
import
cn.hutool.core.util.StrUtil
;
import
com.github.wxiaoqi.security.admin.feign.UserFeign
;
import
com.github.wxiaoqi.security.admin.feign.rest.UserRestInterface
;
import
com.github.wxiaoqi.security.common.exception.BaseException
;
import
com.github.wxiaoqi.security.common.msg.ObjectRestResponse
;
import
com.github.wxiaoqi.security.common.rest.BaseController
;
import
com.github.wxiaoqi.security.common.util.AssertUtils
;
import
com.github.wxiaoqi.security.common.util.ReflectionUtils
;
import
com.github.wxiaoqi.security.common.util.process.ResultCode
;
import
com.github.wxiaoqi.security.common.vo.PageDataVO
;
import
com.github.wxiaoqi.security.common.vo.PageParam
;
import
com.upyuns.platform.rs.datacenter.fegin.DatacenterFeign
;
import
com.upyuns.platform.rs.website.biz.CustomFormBiz
;
import
com.upyuns.platform.rs.website.entity.CustomForm
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.
RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMetho
d
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.
*
;
import
java.lang.reflect.Fiel
d
;
import
static
com
.
github
.
wxiaoqi
.
security
.
common
.
constant
.
CommonConstants
.
SYS_FALSE
;
@RestController
...
...
@@ -91,5 +96,16 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom
},
" crt_time desc"
)));
}
@ApiOperation
(
"删除"
)
@RequestMapping
(
value
=
"/delCustom"
,
method
=
RequestMethod
.
DELETE
)
@ResponseBody
public
ObjectRestResponse
delCustom
(
CustomForm
entity
){
CustomForm
db
=
baseBiz
.
selectById
(
entity
.
getId
());
if
(
CustomForm
.
STATUS_SUBMIT
!=
db
.
getStatus
())
{
throw
new
BaseException
(
"该定制不能删除"
,
ResultCode
.
PARAM_ILLEGAL_CODE
);
}
baseBiz
.
updateSelectiveById
(
entity
);
return
ObjectRestResponse
.
succ
();
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment