Commit d13b840e authored by 周健威's avatar 周健威

添加我的定制列表

parent 840134c2
...@@ -58,7 +58,9 @@ public class ImageInputLogMQHandler { ...@@ -58,7 +58,9 @@ public class ImageInputLogMQHandler {
executorService2.execute(() -> { executorService2.execute(() -> {
try { try {
//查询数据是否存在 //查询数据是否存在
//rscpImageDataTotalBiz.selectByQuery(new ) rscpImageDataTotalBiz.selectCount(new RscpImageDataTotal(){{
setName(ii.getName());
}});
}catch (Exception e) { }catch (Exception e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw e; throw e;
......
...@@ -195,4 +195,39 @@ public class CustomForm implements Serializable { ...@@ -195,4 +195,39 @@ public class CustomForm implements Serializable {
@ApiModelProperty(value = "几何json") @ApiModelProperty(value = "几何json")
private String geojson; private String geojson;
/**
* 创建时间
*/
@Column(name = "crt_time")
@ApiModelProperty(value = "创建时间", hidden = true )
private Date crtTime;
/**
* 创建者id
*/
@Column(name = "crt_user")
@ApiModelProperty(value = "创建者id")
private String crtUser;
/**
* 更新时间
*/
@Column(name = "upd_time")
@ApiModelProperty(value = "更新时间", hidden = true )
private Date updTime;
/**
* 创建者id
*/
@Column(name = "upd_user")
@ApiModelProperty(value = "更新者id")
private String updUser;
/**
* 用户id
*/
@Column(name = "user_id")
@ApiModelProperty(value = "用户id")
private Integer userId;
} }
package com.upyuns.platform.rs.website.controller.web; package com.upyuns.platform.rs.website.controller.web;
import cn.hutool.core.util.StrUtil; 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.msg.ObjectRestResponse; import com.github.wxiaoqi.security.common.msg.ObjectRestResponse;
import com.github.wxiaoqi.security.common.rest.BaseController; import com.github.wxiaoqi.security.common.rest.BaseController;
import com.github.wxiaoqi.security.common.util.AssertUtils; import com.github.wxiaoqi.security.common.util.AssertUtils;
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.datacenter.fegin.DatacenterFeign;
import com.upyuns.platform.rs.website.biz.CustomFormBiz; import com.upyuns.platform.rs.website.biz.CustomFormBiz;
import com.upyuns.platform.rs.website.entity.CustomForm; import com.upyuns.platform.rs.website.entity.CustomForm;
...@@ -12,14 +16,23 @@ import org.springframework.web.bind.annotation.RequestBody; ...@@ -12,14 +16,23 @@ import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import static com.github.wxiaoqi.security.common.constant.CommonConstants.SYS_FALSE;
@RestController @RestController
@RequestMapping("customForm/web") @RequestMapping("customForm/web")
public class CustomFormWebController extends BaseController<CustomFormBiz,CustomForm> { public class CustomFormWebController extends BaseController<CustomFormBiz,CustomForm> implements UserRestInterface {
@Autowired
UserFeign userFeign;
@Autowired @Autowired
DatacenterFeign datacenterFegin; DatacenterFeign datacenterFegin;
@Override
public UserFeign getUserFeign() {
return userFeign;
}
@RequestMapping(value = "customIndustry",method = RequestMethod.POST) @RequestMapping(value = "customIndustry",method = RequestMethod.POST)
public ObjectRestResponse customIndustry(@RequestBody CustomForm entity) { public ObjectRestResponse customIndustry(@RequestBody CustomForm entity) {
if(StrUtil.isNotBlank(entity.getProvinceCode())) { if(StrUtil.isNotBlank(entity.getProvinceCode())) {
...@@ -31,6 +44,7 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom ...@@ -31,6 +44,7 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom
if(StrUtil.isNotBlank(entity.getAreaCode())) { if(StrUtil.isNotBlank(entity.getAreaCode())) {
entity.setAreaName(datacenterFegin.queryByCode(entity.getAreaCode()).getData().getName()); entity.setAreaName(datacenterFegin.queryByCode(entity.getAreaCode()).getData().getName());
} }
entity.setUserId(getAppUser().getUserid());
baseBiz.insertSelective(entity); baseBiz.insertSelective(entity);
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
...@@ -46,6 +60,7 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom ...@@ -46,6 +60,7 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom
if(StrUtil.isNotBlank(entity.getAreaCode())) { if(StrUtil.isNotBlank(entity.getAreaCode())) {
entity.setAreaName(datacenterFegin.queryByCode(entity.getAreaCode()).getData().getName()); entity.setAreaName(datacenterFegin.queryByCode(entity.getAreaCode()).getData().getName());
} }
entity.setUserId(getAppUser().getUserid());
baseBiz.insertSelective(entity); baseBiz.insertSelective(entity);
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
...@@ -61,7 +76,20 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom ...@@ -61,7 +76,20 @@ public class CustomFormWebController extends BaseController<CustomFormBiz,Custom
if(StrUtil.isNotBlank(entity.getAreaCode())) { if(StrUtil.isNotBlank(entity.getAreaCode())) {
entity.setAreaName(datacenterFegin.queryByCode(entity.getAreaCode()).getData().getName()); entity.setAreaName(datacenterFegin.queryByCode(entity.getAreaCode()).getData().getName());
} }
entity.setUserId(getAppUser().getUserid());
baseBiz.insertSelective(entity); baseBiz.insertSelective(entity);
return ObjectRestResponse.succ(); return ObjectRestResponse.succ();
} }
@RequestMapping(value = "myCustoms",method = RequestMethod.GET)
public ObjectRestResponse<PageDataVO<CustomForm>> myCustoms(PageParam dto) {
return ObjectRestResponse.succ(PageDataVO.pageInfo(dto.initQuery(), () -> baseBiz.selectByWeekend(w -> {
w.andEqualTo(CustomForm::getUserId, getAppUser().getUserid());
w.andEqualTo(CustomForm::getIsDel, SYS_FALSE);
return w;
}, " crt_time desc")));
}
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment