设置业务字典post请求方式为对应实体类。
This commit is contained in:
parent
3544ae61fa
commit
659583526e
@ -16,10 +16,10 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
@ -35,7 +35,7 @@ spring:
|
||||
datasource:
|
||||
ds1:
|
||||
nacos:
|
||||
server-addr: 118.24.137.203:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
dataId: sentinel-ruoyi-gateway
|
||||
groupId: DEFAULT_GROUP
|
||||
data-type: json
|
||||
|
||||
@ -14,10 +14,10 @@ spring:
|
||||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 118.24.137.203:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
||||
@ -4,6 +4,7 @@ import com.xhpc.common.core.web.controller.BaseController;
|
||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||
import com.xhpc.general.domain.XhpcDictionary;
|
||||
import com.xhpc.general.domain.XhpcDictionaryChild;
|
||||
import com.xhpc.general.service.IXhpcDictBizService;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -42,8 +43,9 @@ public class XhpcDictBizController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addMainItem")
|
||||
public AjaxResult addMainDictionaryItem(String name, String code, Integer sort){
|
||||
return xhpcDictBizService.addADictionaryItem(name,code,sort);
|
||||
public AjaxResult addMainDictionaryItem(@RequestBody XhpcDictionary xhpcDictionary){
|
||||
|
||||
return xhpcDictBizService.addADictionaryItem(xhpcDictionary.getDictValue(),xhpcDictionary.getCode(),xhpcDictionary.getSort());
|
||||
}
|
||||
|
||||
|
||||
@ -69,9 +71,9 @@ public class XhpcDictBizController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/addDetailItem")
|
||||
public AjaxResult addDetailDictionaryItem(@RequestParam("parentId") Long parentId, String code, String dictKey, String dictValue,Integer sort){
|
||||
public AjaxResult addDetailDictionaryItem(@RequestBody XhpcDictionary xhpcDictionary){
|
||||
|
||||
return xhpcDictBizService.addAChildDictionaryItem(parentId, code, dictKey, dictValue, sort);
|
||||
return xhpcDictBizService.addAChildDictionaryItem(xhpcDictionary.getParentId(), xhpcDictionary.getCode(), xhpcDictionary.getDictKey(), xhpcDictionary.getDictValue(), xhpcDictionary.getSort());
|
||||
}
|
||||
|
||||
|
||||
@ -81,14 +83,15 @@ public class XhpcDictBizController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/deleteChildDictionaryItem")
|
||||
public AjaxResult deleteChildDictionaryItem(@RequestParam Long id){
|
||||
public AjaxResult deleteChildDictionaryItem(@RequestBody XhpcDictionary xhpcDictionary){
|
||||
|
||||
return xhpcDictBizService.deleteChildDictionaryItem(id);
|
||||
return xhpcDictBizService.deleteChildDictionaryItem(xhpcDictionary.getDictBizId());
|
||||
}
|
||||
|
||||
@PostMapping("/deleteFather")
|
||||
public AjaxResult deleteParentItem(@RequestParam Long id){
|
||||
return xhpcDictBizService.deleteParentItem(id);
|
||||
public AjaxResult deleteParentItem(@RequestBody XhpcDictionary xhpcDictionary){
|
||||
|
||||
return xhpcDictBizService.deleteParentItem(xhpcDictionary.getDictBizId());
|
||||
}
|
||||
|
||||
|
||||
@ -133,9 +136,9 @@ public class XhpcDictBizController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateFatherItem")
|
||||
public AjaxResult updateFatherItem(@RequestParam Long dictBizId,String code,String keyValue,Integer sort){
|
||||
public AjaxResult updateFatherItem(@RequestBody XhpcDictionary xhpcDictionary){
|
||||
|
||||
return xhpcDictBizService.updateMainItem(dictBizId, code, keyValue, sort);
|
||||
return xhpcDictBizService.updateMainItem(xhpcDictionary.getDictBizId(), xhpcDictionary.getCode(), xhpcDictionary.getDictValue(), xhpcDictionary.getSort());
|
||||
}
|
||||
|
||||
|
||||
@ -149,9 +152,9 @@ public class XhpcDictBizController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/updateChildItem")
|
||||
public AjaxResult updateChildItem(@RequestParam Long parentId,@RequestParam Long id, String value, String key,Integer sort ){
|
||||
public AjaxResult updateChildItem(@RequestBody XhpcDictionary xhpcDictionary){
|
||||
|
||||
return xhpcDictBizService.updateChildItem(parentId, id, value, key, sort);
|
||||
return xhpcDictBizService.updateChildItem(xhpcDictionary.getParentId(), xhpcDictionary.getDictBizId(), xhpcDictionary.getDictValue(), xhpcDictionary.getDictKey(), xhpcDictionary.getSort());
|
||||
}
|
||||
|
||||
|
||||
@ -161,13 +164,14 @@ public class XhpcDictBizController extends BaseController {
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/deleteChildItems")
|
||||
public AjaxResult deletChildItems(@RequestParam String ids){
|
||||
public AjaxResult deletChildItems(@RequestBody XhpcDictionaryChild xhpcDictionaryChild){
|
||||
|
||||
return xhpcDictBizService.deleteChildItems(ids);
|
||||
return xhpcDictBizService.deleteChildItems(xhpcDictionaryChild.getIds());
|
||||
}
|
||||
@PostMapping("/deleteParentItems")
|
||||
public AjaxResult deleteParentItems(@RequestParam String ids){
|
||||
return xhpcDictBizService.deleteParentItems(ids);
|
||||
public AjaxResult deleteParentItems(@RequestBody XhpcDictionaryChild xhpcDictionaryChild){
|
||||
|
||||
return xhpcDictBizService.deleteParentItems(xhpcDictionaryChild.getIds());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -8,6 +8,7 @@ import com.xhpc.common.core.web.domain.BaseEntity;
|
||||
* Date:2021-07-27 11
|
||||
*/
|
||||
public class XhpcDictionary extends BaseEntity {
|
||||
|
||||
private Long dictBizId;
|
||||
private Long parentId;
|
||||
private String code;
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
package com.xhpc.general.domain;
|
||||
|
||||
/**
|
||||
* program: ruoyi
|
||||
* User: HongYun
|
||||
* Date:2021-08-02 10
|
||||
*/
|
||||
public class XhpcDictionaryChild extends XhpcDictionary {
|
||||
private String ids;
|
||||
|
||||
public String getIds() {
|
||||
return ids;
|
||||
}
|
||||
|
||||
public void setIds(String ids) {
|
||||
this.ids = ids;
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user