diff --git a/src/main/java/cn/com/tenlion/systembase/controller/api/keyplace/KeyPlaceController.java b/src/main/java/cn/com/tenlion/systembase/controller/api/keyplace/KeyPlaceController.java new file mode 100644 index 0000000..5651fe3 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/controller/api/keyplace/KeyPlaceController.java @@ -0,0 +1,111 @@ +package cn.com.tenlion.systembase.controller.api.keyplace; + +import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO; +import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO; +import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService; +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: KeyPlaceController + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 11:25:17 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_SYSTEM_PREFIX + "重点场所接口") +@RestController +@RequestMapping(ISystemConstant.API_PREFIX + "/keyplace") +public class KeyPlaceController extends DefaultBaseController { + + @Autowired + private IKeyPlaceService keyPlaceService; + + @ApiOperation(value = "新增重点场所", notes = "新增重点场所接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestBody KeyPlaceVO keyPlaceVO) { + keyPlaceService.save(keyPlaceVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除重点场所", notes = "删除重点场所接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@PathVariable("ids") String ids) { + keyPlaceService.remove(Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改重点场所", notes = "修改重点场所接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("update/{keyPlaceId}") + @CheckRequestBodyAnnotation + public SuccessResult update(@PathVariable("keyPlaceId") String keyPlaceId, @RequestBody KeyPlaceVO keyPlaceVO) { + keyPlaceService.update(keyPlaceId, keyPlaceVO); + return new SuccessResult(); + } + + @ApiOperation(value = "重点场所详情", notes = "重点场所详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{keyPlaceId}") + public KeyPlaceDTO get(@PathVariable("keyPlaceId") String keyPlaceId) { + return keyPlaceService.get(keyPlaceId); + } + + @ApiOperation(value = "重点场所列表", notes = "重点场所列表接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list() { + Map params = requestParams(); + return keyPlaceService.list(params); + } + + @ApiOperation(value = "重点场所分页列表", notes = "重点场所分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + page.setParams(params); + return keyPlaceService.listPage(page); + } + + @ApiOperation(value = "重点场所统计", notes = "重点场所统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(keyPlaceService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/controller/app/api/keyplace/KeyPlaceAppController.java b/src/main/java/cn/com/tenlion/systembase/controller/app/api/keyplace/KeyPlaceAppController.java new file mode 100644 index 0000000..0e23f1a --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/controller/app/api/keyplace/KeyPlaceAppController.java @@ -0,0 +1,121 @@ +package cn.com.tenlion.systembase.controller.app.api.keyplace; + +import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO; +import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO; +import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService; +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: KeyPlaceAppController + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 11:25:17 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_APP_PREFIX + "重点场所接口") +@RestController +@RequestMapping(ISystemConstant.APP_PREFIX + "/keyplace") +public class KeyPlaceAppController extends DefaultBaseController { + + @Autowired + private IKeyPlaceService keyPlaceService; + + @ApiOperation(value = "新增重点场所", notes = "新增重点场所接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestHeader("token") String token, @RequestBody KeyPlaceVO keyPlaceVO) { + keyPlaceService.save(token, keyPlaceVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除重点场所(id列表)", notes = "删除重点场所(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@RequestHeader("token") String token, @PathVariable("ids") String ids) { + keyPlaceService.remove(token, Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改重点场所", notes = "修改重点场所接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("updatekeyplace/{keyPlaceId}") + @CheckRequestBodyAnnotation + public SuccessResult updateKeyPlace(@RequestHeader("token") String token, @PathVariable("keyPlaceId") String keyPlaceId, @RequestBody KeyPlaceVO keyPlaceVO) { + keyPlaceService.update(token, keyPlaceId, keyPlaceVO); + return new SuccessResult(); + } + + @ApiOperation(value = "重点场所详情(通过ID)", notes = "重点场所详情(通过ID)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{keyPlaceId}") + public KeyPlaceDTO get(@RequestHeader("token") String token, @PathVariable("keyPlaceId") String keyPlaceId) { + return keyPlaceService.get(keyPlaceId); + } + + @ApiOperation(value = "重点场所列表", notes = "重点场所列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list(@RequestHeader("token") String token) { + Map params = requestParams(); + return keyPlaceService.list(params); + } + + @ApiOperation(value = "重点场所分页列表", notes = "重点场所分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "token", value = "token", paramType = "header"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpagekeyplace") + public SuccessResultList> listPage(@RequestHeader("token") String token, ListPage page) { + Map params = requestParams(); + page.setParams(params); + return keyPlaceService.listPage(page); + } + + @ApiOperation(value = "重点场所统计", notes = "重点场所统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(keyPlaceService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/controller/resource/keyplace/KeyPlaceResourceController.java b/src/main/java/cn/com/tenlion/systembase/controller/resource/keyplace/KeyPlaceResourceController.java new file mode 100644 index 0000000..423284e --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/controller/resource/keyplace/KeyPlaceResourceController.java @@ -0,0 +1,121 @@ +package cn.com.tenlion.systembase.controller.resource.keyplace; + +import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO; +import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO; +import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService; +import ink.wgink.annotation.CheckRequestBodyAnnotation; +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.ErrorResult; +import ink.wgink.pojo.result.SuccessResult; +import ink.wgink.pojo.result.SuccessResultData; +import ink.wgink.pojo.result.SuccessResultList; +import io.swagger.annotations.*; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * @ClassName: KeyPlaceResourceController + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 11:25:17 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.API_TAGS_RESOURCE_PREFIX + "重点场所接口") +@RestController +@RequestMapping(ISystemConstant.RESOURCE_PREFIX + "/keyplace") +public class KeyPlaceResourceController extends DefaultBaseController { + + @Autowired + private IKeyPlaceService keyPlaceService; + + @ApiOperation(value = "新增重点场所", notes = "新增重点场所接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PostMapping("save") + @CheckRequestBodyAnnotation + public SuccessResult save(@RequestBody KeyPlaceVO keyPlaceVO) { + keyPlaceService.save(keyPlaceVO); + return new SuccessResult(); + } + + @ApiOperation(value = "删除重点场所(id列表)", notes = "删除重点场所(id列表)接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"), + @ApiImplicitParam(name = "ids", value = "ID列表,用下划线分隔", paramType = "path", example = "1_2_3") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @DeleteMapping("remove/{ids}") + public SuccessResult remove(@PathVariable("ids") String ids) { + keyPlaceService.remove(Arrays.asList(ids.split("\\_"))); + return new SuccessResult(); + } + + @ApiOperation(value = "修改重点场所", notes = "修改重点场所接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"), + @ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @PutMapping("update/{keyPlaceId}") + @CheckRequestBodyAnnotation + public SuccessResult update(@PathVariable("keyPlaceId") String keyPlaceId, @RequestBody KeyPlaceVO keyPlaceVO) { + keyPlaceService.update(keyPlaceId, keyPlaceVO); + return new SuccessResult(); + } + + @ApiOperation(value = "重点场所详情", notes = "重点场所详情接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"), + @ApiImplicitParam(name = "keyPlaceId", value = "重点场所ID", paramType = "path") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("get/{keyPlaceId}") + public KeyPlaceDTO get(@PathVariable("keyPlaceId") String keyPlaceId) { + return keyPlaceService.get(keyPlaceId); + } + + @ApiOperation(value = "重点场所列表", notes = "重点场所列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("list") + public List list() { + Map params = requestParams(); + return keyPlaceService.list(params); + } + + @ApiOperation(value = "重点场所分页列表", notes = "重点场所分页列表接口") + @ApiImplicitParams({ + @ApiImplicitParam(name = "access_token", value = "access_token", paramType = "query"), + @ApiImplicitParam(name = "page", value = "当前页码", paramType = "query", dataType = "int", defaultValue = "1"), + @ApiImplicitParam(name = "rows", value = "显示数量", paramType = "query", dataType = "int", defaultValue = "20"), + @ApiImplicitParam(name = "keywords", value = "关键字", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "startTime", value = "开始时间", paramType = "query", dataType = "String"), + @ApiImplicitParam(name = "endTime", value = "结束时间", paramType = "query", dataType = "String") + }) + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("listpage") + public SuccessResultList> listPage(ListPage page) { + Map params = requestParams(); + page.setParams(params); + return keyPlaceService.listPage(page); + } + + @ApiOperation(value = "重点场所统计", notes = "重点场所统计接口") + @ApiResponses({@ApiResponse(code = 400, message = "请求失败", response = ErrorResult.class)}) + @GetMapping("count") + SuccessResultData count() { + Map params = requestParams(); + return new SuccessResultData<>(keyPlaceService.count(params)); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/controller/route/keyplace/KeyPlaceRouteController.java b/src/main/java/cn/com/tenlion/systembase/controller/route/keyplace/KeyPlaceRouteController.java new file mode 100644 index 0000000..e708d15 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/controller/route/keyplace/KeyPlaceRouteController.java @@ -0,0 +1,36 @@ +package cn.com.tenlion.systembase.controller.route.keyplace; + +import ink.wgink.common.base.DefaultBaseController; +import ink.wgink.interfaces.consts.ISystemConstant; +import io.swagger.annotations.*; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.servlet.ModelAndView; + +/** + * @ClassName: KeyPlaceController + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 11:25:17 + * @Version: 3.0 + **/ +@Api(tags = ISystemConstant.ROUTE_TAGS_PREFIX + "重点场所路由") +@RestController +@RequestMapping(ISystemConstant.ROUTE_PREFIX + "/keyplace") +public class KeyPlaceRouteController extends DefaultBaseController { + + @GetMapping("save") + public ModelAndView save() { + return new ModelAndView("keyplace/save"); + } + + @GetMapping("update") + public ModelAndView update() { + return new ModelAndView("keyplace/update"); + } + + @GetMapping("list") + public ModelAndView list() { + return new ModelAndView("keyplace/list"); + } + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/dao/keyplace/IKeyPlaceDao.java b/src/main/java/cn/com/tenlion/systembase/dao/keyplace/IKeyPlaceDao.java new file mode 100644 index 0000000..4b043d2 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/dao/keyplace/IKeyPlaceDao.java @@ -0,0 +1,120 @@ +package cn.com.tenlion.systembase.dao.keyplace; + +import cn.com.tenlion.systembase.pojo.bos.keyplace.KeyPlaceBO; +import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO; +import cn.com.tenlion.systembase.pojo.pos.keyplace.KeyPlacePO; +import ink.wgink.exceptions.RemoveException; +import ink.wgink.exceptions.SaveException; +import ink.wgink.exceptions.SearchException; +import ink.wgink.exceptions.UpdateException; +import org.springframework.stereotype.Repository; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IKeyPlaceDao + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 11:25:17 + * @Version: 3.0 + **/ +@Repository +public interface IKeyPlaceDao { + + /** + * 新增重点场所 + * + * @param params + * @throws SaveException + */ + void save(Map params) throws SaveException; + + /** + * 删除重点场所 + * + * @param params + * @throws RemoveException + */ + void remove(Map params) throws RemoveException; + + /** + * 删除重点场所(物理) + * + * @param params + * @throws RemoveException + */ + void delete(Map params) throws RemoveException; + + /** + * 修改重点场所 + * + * @param params + * @throws UpdateException + */ + void update(Map params) throws UpdateException; + + /** + * 重点场所详情 + * + * @param params + * @return + * @throws SearchException + */ + KeyPlaceDTO get(Map params) throws SearchException; + + /** + * 重点场所详情 + * + * @param params + * @return + * @throws SearchException + */ + KeyPlaceBO getBO(Map params) throws SearchException; + + /** + * 重点场所详情 + * + * @param params + * @return + * @throws SearchException + */ + KeyPlacePO getPO(Map params) throws SearchException; + + /** + * 重点场所列表 + * + * @param params + * @return + * @throws SearchException + */ + List list(Map params) throws SearchException; + + /** + * 重点场所列表 + * + * @param params + * @return + * @throws SearchException + */ + List listBO(Map params) throws SearchException; + + /** + * 重点场所列表 + * + * @param params + * @return + * @throws SearchException + */ + List listPO(Map params) throws SearchException; + + /** + * 重点场所统计 + * + * @param params + * @return + * @throws SearchException + */ + Integer count(Map params) throws SearchException; + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/bos/keyplace/KeyPlaceBO.java b/src/main/java/cn/com/tenlion/systembase/pojo/bos/keyplace/KeyPlaceBO.java new file mode 100644 index 0000000..c3d7835 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/pojo/bos/keyplace/KeyPlaceBO.java @@ -0,0 +1,186 @@ +package cn.com.tenlion.systembase.pojo.bos.keyplace; + +/** + * + * @ClassName: KeyPlaceBO + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 15:06:28 + * @Version: 3.0 + **/ +public class KeyPlaceBO { + + private String keyPlaceId; + private String placeName; + private String placeType; + private String placeTypeName; + private String detailType; + private String detailTypeName; + private String areaCode; + private String areaName; + private String address; + private String linkMan; + private String linkPhone; + private String phone; + private String longitude; + private String latitude; + private String creator; + private String gmtCreate; + private String modifier; + private String gmtModified; + private Integer isDelete; + + public String getKeyPlaceId() { + return keyPlaceId == null ? "" : keyPlaceId.trim(); + } + + public void setKeyPlaceId(String keyPlaceId) { + this.keyPlaceId = keyPlaceId; + } + + public String getPlaceName() { + return placeName == null ? "" : placeName.trim(); + } + + public void setPlaceName(String placeName) { + this.placeName = placeName; + } + + public String getPlaceType() { + return placeType == null ? "" : placeType.trim(); + } + + public void setPlaceType(String placeType) { + this.placeType = placeType; + } + + public String getPlaceTypeName() { + return placeTypeName == null ? "" : placeTypeName.trim(); + } + + public void setPlaceTypeName(String placeTypeName) { + this.placeTypeName = placeTypeName; + } + + public String getDetailType() { + return detailType == null ? "" : detailType.trim(); + } + + public void setDetailType(String detailType) { + this.detailType = detailType; + } + + public String getDetailTypeName() { + return detailTypeName == null ? "" : detailTypeName.trim(); + } + + public void setDetailTypeName(String detailTypeName) { + this.detailTypeName = detailTypeName; + } + + public String getAreaCode() { + return areaCode == null ? "" : areaCode.trim(); + } + + public void setAreaCode(String areaCode) { + this.areaCode = areaCode; + } + + public String getAreaName() { + return areaName == null ? "" : areaName.trim(); + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getAddress() { + return address == null ? "" : address.trim(); + } + + public void setAddress(String address) { + this.address = address; + } + + public String getLinkMan() { + return linkMan == null ? "" : linkMan.trim(); + } + + public void setLinkMan(String linkMan) { + this.linkMan = linkMan; + } + + public String getLinkPhone() { + return linkPhone == null ? "" : linkPhone.trim(); + } + + public void setLinkPhone(String linkPhone) { + this.linkPhone = linkPhone; + } + + public String getPhone() { + return phone == null ? "" : phone.trim(); + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getLongitude() { + return longitude == null ? "" : longitude.trim(); + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getLatitude() { + return latitude == null ? "" : latitude.trim(); + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/dtos/keyplace/KeyPlaceDTO.java b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/keyplace/KeyPlaceDTO.java new file mode 100644 index 0000000..cacdb2e --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/pojo/dtos/keyplace/KeyPlaceDTO.java @@ -0,0 +1,209 @@ +package cn.com.tenlion.systembase.pojo.dtos.keyplace; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: KeyPlaceDTO + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 15:06:28 + * @Version: 3.0 + **/ +@ApiModel +public class KeyPlaceDTO { + + @ApiModelProperty(name = "keyPlaceId", value = "主键UUID") + private String keyPlaceId; + @ApiModelProperty(name = "placeName", value = "场所名称") + private String placeName; + @ApiModelProperty(name = "placeType", value = "场所类型") + private String placeType; + @ApiModelProperty(name = "placeTypeName", value = "场所类型名称") + private String placeTypeName; + @ApiModelProperty(name = "detailType", value = "详细类型") + private String detailType; + @ApiModelProperty(name = "detailTypeName", value = "详细类型名称") + private String detailTypeName; + @ApiModelProperty(name = "areaCode", value = "地址编码") + private String areaCode; + @ApiModelProperty(name = "areaName", value = "地址名称") + private String areaName; + @ApiModelProperty(name = "address", value = "详细地址") + private String address; + @ApiModelProperty(name = "linkMan", value = "负责人") + private String linkMan; + @ApiModelProperty(name = "linkPhone", value = "负责人联系方式") + private String linkPhone; + @ApiModelProperty(name = "phone", value = "联系方式") + private String phone; + @ApiModelProperty(name = "longitude", value = "经度") + private String longitude; + @ApiModelProperty(name = "latitude", value = "纬度") + private String latitude; + @ApiModelProperty(name = "creator", value = "") + private String creator; + @ApiModelProperty(name = "gmtCreate", value = "") + private String gmtCreate; + @ApiModelProperty(name = "modifier", value = "") + private String modifier; + @ApiModelProperty(name = "gmtModified", value = "") + private String gmtModified; + @ApiModelProperty(name = "isDelete", value = "") + private Integer isDelete; + + public String getKeyPlaceId() { + return keyPlaceId == null ? "" : keyPlaceId.trim(); + } + + public void setKeyPlaceId(String keyPlaceId) { + this.keyPlaceId = keyPlaceId; + } + + public String getPlaceName() { + return placeName == null ? "" : placeName.trim(); + } + + public void setPlaceName(String placeName) { + this.placeName = placeName; + } + + public String getPlaceType() { + return placeType == null ? "" : placeType.trim(); + } + + public void setPlaceType(String placeType) { + this.placeType = placeType; + } + + public String getPlaceTypeName() { + return placeTypeName == null ? "" : placeTypeName.trim(); + } + + public void setPlaceTypeName(String placeTypeName) { + this.placeTypeName = placeTypeName; + } + + public String getDetailType() { + return detailType == null ? "" : detailType.trim(); + } + + public void setDetailType(String detailType) { + this.detailType = detailType; + } + + public String getDetailTypeName() { + return detailTypeName == null ? "" : detailTypeName.trim(); + } + + public void setDetailTypeName(String detailTypeName) { + this.detailTypeName = detailTypeName; + } + + public String getAreaCode() { + return areaCode == null ? "" : areaCode.trim(); + } + + public void setAreaCode(String areaCode) { + this.areaCode = areaCode; + } + + public String getAreaName() { + return areaName == null ? "" : areaName.trim(); + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getAddress() { + return address == null ? "" : address.trim(); + } + + public void setAddress(String address) { + this.address = address; + } + + public String getLinkMan() { + return linkMan == null ? "" : linkMan.trim(); + } + + public void setLinkMan(String linkMan) { + this.linkMan = linkMan; + } + + public String getLinkPhone() { + return linkPhone == null ? "" : linkPhone.trim(); + } + + public void setLinkPhone(String linkPhone) { + this.linkPhone = linkPhone; + } + + public String getPhone() { + return phone == null ? "" : phone.trim(); + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getLongitude() { + return longitude == null ? "" : longitude.trim(); + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getLatitude() { + return latitude == null ? "" : latitude.trim(); + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/pos/keyplace/KeyPlacePO.java b/src/main/java/cn/com/tenlion/systembase/pojo/pos/keyplace/KeyPlacePO.java new file mode 100644 index 0000000..1d43d3b --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/pojo/pos/keyplace/KeyPlacePO.java @@ -0,0 +1,186 @@ +package cn.com.tenlion.systembase.pojo.pos.keyplace; + +/** + * + * @ClassName: KeyPlacePO + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 15:06:28 + * @Version: 3.0 + **/ +public class KeyPlacePO { + + private String keyPlaceId; + private String placeName; + private String placeType; + private String placeTypeName; + private String detailType; + private String detailTypeName; + private String areaCode; + private String areaName; + private String address; + private String linkMan; + private String linkPhone; + private String phone; + private String longitude; + private String latitude; + private String creator; + private String gmtCreate; + private String modifier; + private String gmtModified; + private Integer isDelete; + + public String getKeyPlaceId() { + return keyPlaceId == null ? "" : keyPlaceId.trim(); + } + + public void setKeyPlaceId(String keyPlaceId) { + this.keyPlaceId = keyPlaceId; + } + + public String getPlaceName() { + return placeName == null ? "" : placeName.trim(); + } + + public void setPlaceName(String placeName) { + this.placeName = placeName; + } + + public String getPlaceType() { + return placeType == null ? "" : placeType.trim(); + } + + public void setPlaceType(String placeType) { + this.placeType = placeType; + } + + public String getPlaceTypeName() { + return placeTypeName == null ? "" : placeTypeName.trim(); + } + + public void setPlaceTypeName(String placeTypeName) { + this.placeTypeName = placeTypeName; + } + + public String getDetailType() { + return detailType == null ? "" : detailType.trim(); + } + + public void setDetailType(String detailType) { + this.detailType = detailType; + } + + public String getDetailTypeName() { + return detailTypeName == null ? "" : detailTypeName.trim(); + } + + public void setDetailTypeName(String detailTypeName) { + this.detailTypeName = detailTypeName; + } + + public String getAreaCode() { + return areaCode == null ? "" : areaCode.trim(); + } + + public void setAreaCode(String areaCode) { + this.areaCode = areaCode; + } + + public String getAreaName() { + return areaName == null ? "" : areaName.trim(); + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getAddress() { + return address == null ? "" : address.trim(); + } + + public void setAddress(String address) { + this.address = address; + } + + public String getLinkMan() { + return linkMan == null ? "" : linkMan.trim(); + } + + public void setLinkMan(String linkMan) { + this.linkMan = linkMan; + } + + public String getLinkPhone() { + return linkPhone == null ? "" : linkPhone.trim(); + } + + public void setLinkPhone(String linkPhone) { + this.linkPhone = linkPhone; + } + + public String getPhone() { + return phone == null ? "" : phone.trim(); + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getLongitude() { + return longitude == null ? "" : longitude.trim(); + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getLatitude() { + return latitude == null ? "" : latitude.trim(); + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + public String getCreator() { + return creator == null ? "" : creator.trim(); + } + + public void setCreator(String creator) { + this.creator = creator; + } + + public String getGmtCreate() { + return gmtCreate == null ? "" : gmtCreate.trim(); + } + + public void setGmtCreate(String gmtCreate) { + this.gmtCreate = gmtCreate; + } + + public String getModifier() { + return modifier == null ? "" : modifier.trim(); + } + + public void setModifier(String modifier) { + this.modifier = modifier; + } + + public String getGmtModified() { + return gmtModified == null ? "" : gmtModified.trim(); + } + + public void setGmtModified(String gmtModified) { + this.gmtModified = gmtModified; + } + + public Integer getIsDelete() { + return isDelete == null ? 0 : isDelete; + } + + public void setIsDelete(Integer isDelete) { + this.isDelete = isDelete; + } + + +} diff --git a/src/main/java/cn/com/tenlion/systembase/pojo/vos/keyplace/KeyPlaceVO.java b/src/main/java/cn/com/tenlion/systembase/pojo/vos/keyplace/KeyPlaceVO.java new file mode 100644 index 0000000..2f73ca5 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/pojo/vos/keyplace/KeyPlaceVO.java @@ -0,0 +1,151 @@ +package cn.com.tenlion.systembase.pojo.vos.keyplace; + +import ink.wgink.annotation.CheckEmptyAnnotation; +import ink.wgink.annotation.CheckNumberAnnotation; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; + +/** + * + * @ClassName: KeyPlaceVO + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 15:06:28 + * @Version: 3.0 + **/ +@ApiModel +public class KeyPlaceVO { + + @ApiModelProperty(name = "placeName", value = "场所名称") + private String placeName; + @ApiModelProperty(name = "placeType", value = "场所类型") + private String placeType; + @ApiModelProperty(name = "placeTypeName", value = "场所类型名称") + private String placeTypeName; + @ApiModelProperty(name = "detailType", value = "详细类型") + private String detailType; + @ApiModelProperty(name = "detailTypeName", value = "详细类型名称") + private String detailTypeName; + @ApiModelProperty(name = "areaCode", value = "地址编码") + private String areaCode; + @ApiModelProperty(name = "areaName", value = "地址名称") + private String areaName; + @ApiModelProperty(name = "address", value = "详细地址") + private String address; + @ApiModelProperty(name = "linkMan", value = "负责人") + private String linkMan; + @ApiModelProperty(name = "linkPhone", value = "负责人联系方式") + private String linkPhone; + @ApiModelProperty(name = "phone", value = "联系方式") + private String phone; + @ApiModelProperty(name = "longitude", value = "经度") + private String longitude; + @ApiModelProperty(name = "latitude", value = "纬度") + private String latitude; + + public String getPlaceName() { + return placeName == null ? "" : placeName.trim(); + } + + public void setPlaceName(String placeName) { + this.placeName = placeName; + } + + public String getPlaceType() { + return placeType == null ? "" : placeType.trim(); + } + + public void setPlaceType(String placeType) { + this.placeType = placeType; + } + + public String getPlaceTypeName() { + return placeTypeName == null ? "" : placeTypeName.trim(); + } + + public void setPlaceTypeName(String placeTypeName) { + this.placeTypeName = placeTypeName; + } + + public String getDetailType() { + return detailType == null ? "" : detailType.trim(); + } + + public void setDetailType(String detailType) { + this.detailType = detailType; + } + + public String getDetailTypeName() { + return detailTypeName == null ? "" : detailTypeName.trim(); + } + + public void setDetailTypeName(String detailTypeName) { + this.detailTypeName = detailTypeName; + } + + public String getAreaCode() { + return areaCode == null ? "" : areaCode.trim(); + } + + public void setAreaCode(String areaCode) { + this.areaCode = areaCode; + } + + public String getAreaName() { + return areaName == null ? "" : areaName.trim(); + } + + public void setAreaName(String areaName) { + this.areaName = areaName; + } + + public String getAddress() { + return address == null ? "" : address.trim(); + } + + public void setAddress(String address) { + this.address = address; + } + + public String getLinkMan() { + return linkMan == null ? "" : linkMan.trim(); + } + + public void setLinkMan(String linkMan) { + this.linkMan = linkMan; + } + + public String getLinkPhone() { + return linkPhone == null ? "" : linkPhone.trim(); + } + + public void setLinkPhone(String linkPhone) { + this.linkPhone = linkPhone; + } + + public String getPhone() { + return phone == null ? "" : phone.trim(); + } + + public void setPhone(String phone) { + this.phone = phone; + } + + public String getLongitude() { + return longitude == null ? "" : longitude.trim(); + } + + public void setLongitude(String longitude) { + this.longitude = longitude; + } + + public String getLatitude() { + return latitude == null ? "" : latitude.trim(); + } + + public void setLatitude(String latitude) { + this.latitude = latitude; + } + + +} diff --git a/src/main/java/cn/com/tenlion/systembase/service/keyareacheckrenovationpatrol/impl/KeyAreaCheckRenovationPatrolServiceImpl.java b/src/main/java/cn/com/tenlion/systembase/service/keyareacheckrenovationpatrol/impl/KeyAreaCheckRenovationPatrolServiceImpl.java index f5a92a5..32c1434 100644 --- a/src/main/java/cn/com/tenlion/systembase/service/keyareacheckrenovationpatrol/impl/KeyAreaCheckRenovationPatrolServiceImpl.java +++ b/src/main/java/cn/com/tenlion/systembase/service/keyareacheckrenovationpatrol/impl/KeyAreaCheckRenovationPatrolServiceImpl.java @@ -10,12 +10,15 @@ import ink.wgink.common.base.DefaultBaseService; import ink.wgink.pojo.ListPage; import ink.wgink.pojo.result.SuccessResult; import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.util.date.DateUtil; import ink.wgink.util.map.HashMapUtil; import ink.wgink.util.UUIDUtil; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.security.core.Authentication; +import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.stereotype.Service; import java.util.*; @@ -53,10 +56,24 @@ public class KeyAreaCheckRenovationPatrolServiceImpl extends DefaultBaseService String keyAreaCheckRenovationPatrolId = UUIDUtil.getUUID(); Map params = HashMapUtil.beanToMap(keyAreaCheckRenovationPatrolVO); params.put("keyAreaCheckRenovationPatrolId", keyAreaCheckRenovationPatrolId); - if (StringUtils.isBlank(token)) { - setSaveInfo(params); - } else { - setAppSaveInfo(token, params); + Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); + try { + if (null != authentication) { + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + } else { + String currentDate = DateUtil.getTime(); + params.put("creator", 1); + params.put("gmtCreate", currentDate); + params.put("modifier", 1); + params.put("gmtModified", currentDate); + params.put("isDelete", 0); + } + }catch (Exception e) { + } keyAreaCheckRenovationPatrolDao.save(params); return keyAreaCheckRenovationPatrolId; diff --git a/src/main/java/cn/com/tenlion/systembase/service/keyplace/IKeyPlaceService.java b/src/main/java/cn/com/tenlion/systembase/service/keyplace/IKeyPlaceService.java new file mode 100644 index 0000000..d8684e1 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/service/keyplace/IKeyPlaceService.java @@ -0,0 +1,188 @@ +package cn.com.tenlion.systembase.service.keyplace; + +import cn.com.tenlion.systembase.pojo.bos.keyplace.KeyPlaceBO; +import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO; +import cn.com.tenlion.systembase.pojo.pos.keyplace.KeyPlacePO; +import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; + +import java.util.List; +import java.util.Map; + +/** + * @ClassName: IKeyPlaceService + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 11:25:17 + * @Version: 3.0 + **/ +public interface IKeyPlaceService { + + /** + * 新增重点场所 + * + * @param keyPlaceVO + * @return + */ + void save(KeyPlaceVO keyPlaceVO); + + /** + * 新增重点场所 + * + * @param token + * @param keyPlaceVO + * @return + */ + void save(String token, KeyPlaceVO keyPlaceVO); + + /** + * 新增重点场所 + * + * @param keyPlaceVO + * @return keyPlaceId + */ + String saveReturnId(KeyPlaceVO keyPlaceVO); + + /** + * 新增重点场所 + * + * @param token + * @param keyPlaceVO + * @return keyPlaceId + */ + String saveReturnId(String token, KeyPlaceVO keyPlaceVO); + + /** + * 删除重点场所 + * + * @param ids id列表 + * @return + */ + void remove(List ids); + + + /** + * 删除重点场所 + * + * @param token + * @param ids id列表 + * @return + */ + void remove(String token, List ids); + + /** + * 删除重点场所(物理删除) + * + * @param ids id列表 + */ + void delete(List ids); + + /** + * 修改重点场所 + * + * @param keyPlaceId + * @param keyPlaceVO + * @return + */ + void update(String keyPlaceId, KeyPlaceVO keyPlaceVO); + + /** + * 修改重点场所 + * + * @param token + * @param keyPlaceId + * @param keyPlaceVO + * @return + */ + void update(String token, String keyPlaceId, KeyPlaceVO keyPlaceVO); + + /** + * 重点场所详情 + * + * @param params 参数Map + * @return + */ + KeyPlaceDTO get(Map params); + + /** + * 重点场所详情 + * + * @param keyPlaceId + * @return + */ + KeyPlaceDTO get(String keyPlaceId); + + /** + * 重点场所详情 + * + * @param params 参数Map + * @return + */ + KeyPlaceBO getBO(Map params); + + /** + * 重点场所详情 + * + * @param keyPlaceId + * @return + */ + KeyPlaceBO getBO(String keyPlaceId); + + /** + * 重点场所详情 + * + * @param params 参数Map + * @return + */ + KeyPlacePO getPO(Map params); + + /** + * 重点场所详情 + * + * @param keyPlaceId + * @return + */ + KeyPlacePO getPO(String keyPlaceId); + + /** + * 重点场所列表 + * + * @param params + * @return + */ + List list(Map params); + + /** + * 重点场所列表 + * + * @param params + * @return + */ + List listBO(Map params); + + /** + * 重点场所列表 + * + * @param params + * @return + */ + List listPO(Map params); + + /** + * 重点场所分页列表 + * + * @param page + * @return + */ + SuccessResultList> listPage(ListPage page); + + /** + * 重点场所统计 + * + * @param params + * @return + */ + Integer count(Map params); + +} \ No newline at end of file diff --git a/src/main/java/cn/com/tenlion/systembase/service/keyplace/impl/KeyPlaceServiceImpl.java b/src/main/java/cn/com/tenlion/systembase/service/keyplace/impl/KeyPlaceServiceImpl.java new file mode 100644 index 0000000..8d9bd02 --- /dev/null +++ b/src/main/java/cn/com/tenlion/systembase/service/keyplace/impl/KeyPlaceServiceImpl.java @@ -0,0 +1,170 @@ +package cn.com.tenlion.systembase.service.keyplace.impl; + +import cn.com.tenlion.systembase.dao.keyplace.IKeyPlaceDao; +import cn.com.tenlion.systembase.pojo.bos.keyplace.KeyPlaceBO; +import cn.com.tenlion.systembase.pojo.dtos.keyplace.KeyPlaceDTO; +import cn.com.tenlion.systembase.pojo.pos.keyplace.KeyPlacePO; +import cn.com.tenlion.systembase.pojo.vos.keyplace.KeyPlaceVO; +import cn.com.tenlion.systembase.service.keyplace.IKeyPlaceService; +import ink.wgink.common.base.DefaultBaseService; +import ink.wgink.pojo.ListPage; +import ink.wgink.pojo.result.SuccessResultList; +import ink.wgink.util.map.HashMapUtil; +import ink.wgink.util.UUIDUtil; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.*; + +/** + * @ClassName: KeyPlaceServiceImpl + * @Description: 重点场所 + * @Author: CodeFactory + * @Date: 2021-11-16 11:25:17 + * @Version: 3.0 + **/ +@Service +public class KeyPlaceServiceImpl extends DefaultBaseService implements IKeyPlaceService { + + @Autowired + private IKeyPlaceDao keyPlaceDao; + + @Override + public void save(KeyPlaceVO keyPlaceVO) { + saveReturnId(keyPlaceVO); + } + + @Override + public void save(String token, KeyPlaceVO keyPlaceVO) { + saveReturnId(token, keyPlaceVO); + } + + @Override + public String saveReturnId(KeyPlaceVO keyPlaceVO) { + return saveReturnId(null, keyPlaceVO); + } + + @Override + public String saveReturnId(String token, KeyPlaceVO keyPlaceVO) { + String keyPlaceId = UUIDUtil.getUUID(); + Map params = HashMapUtil.beanToMap(keyPlaceVO); + params.put("keyPlaceId", keyPlaceId); + if (StringUtils.isBlank(token)) { + setSaveInfo(params); + } else { + setAppSaveInfo(token, params); + } + keyPlaceDao.save(params); + return keyPlaceId; + } + + @Override + public void remove(List ids) { + remove(null, ids); + } + + @Override + public void remove(String token, List ids) { + Map params = getHashMap(2); + params.put("keyPlaceIds", ids); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + keyPlaceDao.remove(params); + } + + @Override + public void delete(List ids) { + Map params = getHashMap(2); + params.put("keyPlaceIds", ids); + keyPlaceDao.delete(params); + } + + @Override + public void update(String keyPlaceId, KeyPlaceVO keyPlaceVO) { + update(null, keyPlaceId, keyPlaceVO); + } + + @Override + public void update(String token, String keyPlaceId, KeyPlaceVO keyPlaceVO) { + Map params = HashMapUtil.beanToMap(keyPlaceVO); + params.put("keyPlaceId", keyPlaceId); + if (StringUtils.isBlank(token)) { + setUpdateInfo(params); + } else { + setAppUpdateInfo(token, params); + } + keyPlaceDao.update(params); + } + + @Override + public KeyPlaceDTO get(Map params) { + return keyPlaceDao.get(params); + } + + @Override + public KeyPlaceDTO get(String keyPlaceId) { + Map params = super.getHashMap(2); + params.put("keyPlaceId", keyPlaceId); + return get(params); + } + + @Override + public KeyPlaceBO getBO(Map params) { + return keyPlaceDao.getBO(params); + } + + @Override + public KeyPlaceBO getBO(String keyPlaceId) { + Map params = super.getHashMap(2); + params.put("keyPlaceId", keyPlaceId); + return getBO(params); + } + + @Override + public KeyPlacePO getPO(Map params) { + return keyPlaceDao.getPO(params); + } + + @Override + public KeyPlacePO getPO(String keyPlaceId) { + Map params = super.getHashMap(2); + params.put("keyPlaceId", keyPlaceId); + return getPO(params); + } + + @Override + public List list(Map params) { + return keyPlaceDao.list(params); + } + + @Override + public List listBO(Map params) { + return keyPlaceDao.listBO(params); + } + + @Override + public List listPO(Map params) { + return keyPlaceDao.listPO(params); + } + + @Override + public SuccessResultList> listPage(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List keyPlaceDTOs = list(page.getParams()); + PageInfo pageInfo = new PageInfo<>(keyPlaceDTOs); + return new SuccessResultList<>(keyPlaceDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } + + @Override + public Integer count(Map params) { + Integer count = keyPlaceDao.count(params); + return count == null ? 0 : count; + } + +} \ No newline at end of file diff --git a/src/main/resources/mybatis/mapper/keyplace/key-place-mapper.xml b/src/main/resources/mybatis/mapper/keyplace/key-place-mapper.xml new file mode 100644 index 0000000..42ce3df --- /dev/null +++ b/src/main/resources/mybatis/mapper/keyplace/key-place-mapper.xml @@ -0,0 +1,442 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO data_key_place( + key_place_id, + place_name, + place_type, + place_type_name, + detail_type, + detail_type_name, + area_code, + area_name, + address, + link_man, + link_phone, + phone, + longitude, + latitude, + creator, + gmt_create, + modifier, + gmt_modified, + is_delete + ) VALUES( + #{keyPlaceId}, + #{placeName}, + #{placeType}, + #{placeTypeName}, + #{detailType}, + #{detailTypeName}, + #{areaCode}, + #{areaName}, + #{address}, + #{linkMan}, + #{linkPhone}, + #{phone}, + #{longitude}, + #{latitude}, + #{creator}, + #{gmtCreate}, + #{modifier}, + #{gmtModified}, + #{isDelete} + ) + + + + + UPDATE + data_key_place + SET + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + is_delete = 1 + WHERE + key_place_id IN + + #{keyPlaceIds[${index}]} + + + + + + DELETE FROM + data_key_place + WHERE + key_place_id IN + + #{keyPlaceIds[${index}]} + + + + + + UPDATE + data_key_place + SET + + place_name = #{placeName}, + + + place_type = #{placeType}, + + + place_type_name = #{placeTypeName}, + + + detail_type = #{detailType}, + + + detail_type_name = #{detailTypeName}, + + + area_code = #{areaCode}, + + + area_name = #{areaName}, + + + address = #{address}, + + + link_man = #{linkMan}, + + + link_phone = #{linkPhone}, + + + phone = #{phone}, + + + longitude = #{longitude}, + + + latitude = #{latitude}, + + gmt_modified = #{gmtModified}, + modifier = #{modifier}, + key_place_id = key_place_id + WHERE + key_place_id = #{keyPlaceId} + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/keyplace/list.html b/src/main/resources/static/route/keyplace/list.html new file mode 100644 index 0000000..6c1756b --- /dev/null +++ b/src/main/resources/static/route/keyplace/list.html @@ -0,0 +1,390 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/keyplace/save.html b/src/main/resources/static/route/keyplace/save.html new file mode 100644 index 0000000..bb58d7b --- /dev/null +++ b/src/main/resources/static/route/keyplace/save.html @@ -0,0 +1,276 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/resources/static/route/keyplace/update.html b/src/main/resources/static/route/keyplace/update.html new file mode 100644 index 0000000..c16f344 --- /dev/null +++ b/src/main/resources/static/route/keyplace/update.html @@ -0,0 +1,301 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+
+
+
+
+ + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/keyplace/list.html b/src/main/resources/templates/keyplace/list.html new file mode 100644 index 0000000..e6a0f53 --- /dev/null +++ b/src/main/resources/templates/keyplace/list.html @@ -0,0 +1,338 @@ + + + + + + + + + + + + + +
+
+
+
+
+
+
+ +
+
+ +
+
+ +
+ +
+
+ + +
+
+
+
+
+ + + + + \ No newline at end of file diff --git a/src/main/resources/templates/keyplace/save.html b/src/main/resources/templates/keyplace/save.html new file mode 100644 index 0000000..4ad11cb --- /dev/null +++ b/src/main/resources/templates/keyplace/save.html @@ -0,0 +1,291 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + \ No newline at end of file diff --git a/src/main/resources/templates/keyplace/update.html b/src/main/resources/templates/keyplace/update.html new file mode 100644 index 0000000..786e14b --- /dev/null +++ b/src/main/resources/templates/keyplace/update.html @@ -0,0 +1,321 @@ + + + + + + + + + + + + + + +
+
+ +
+
+
+ +
+ +
+
+
+ + +
+ +
+ +
+ + +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+ + + + + + + + \ No newline at end of file