Browse Source

代码优化

master
lizhi 3 years ago
parent
commit
9ffdc428ae
  1. 4
      kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/AddressController.java
  2. 4
      kicc-platform/kicc-platform-biz/kicc-template-biz/src/main/java/com/cloud/kicc/template/KiccTemplateApplication.java

4
kicc-platform/kicc-platform-biz/kicc-system-biz/src/main/java/com/cloud/kicc/system/controller/AddressController.java

@ -107,7 +107,7 @@ public class AddressController {
List<Address> addressList = addressService.list(getQueryWrapper(address)); List<Address> addressList = addressService.list(getQueryWrapper(address));
//配置 //配置
TreeNodeConfig treeNodeConfig = new TreeNodeConfig(); TreeNodeConfig treeNodeConfig = new TreeNodeConfig();
treeNodeConfig.setIdKey("code"); treeNodeConfig.setIdKey("id");
treeNodeConfig.setParentIdKey("parent_id"); treeNodeConfig.setParentIdKey("parent_id");
treeNodeConfig.setNameKey("name"); treeNodeConfig.setNameKey("name");
treeNodeConfig.setWeightKey("sort"); treeNodeConfig.setWeightKey("sort");
@ -115,7 +115,7 @@ public class AddressController {
treeNodeConfig.setDeep(3); treeNodeConfig.setDeep(3);
//转换器 //转换器
List<Tree<String>> treeNodes = TreeUtil.build(addressList,"0",treeNodeConfig,(treeNode,tree)->{ List<Tree<String>> treeNodes = TreeUtil.build(addressList,"0",treeNodeConfig,(treeNode,tree)->{
tree.setId(treeNode.getCode()); tree.setId(treeNode.getId());
tree.setParentId(treeNode.getParentId()); tree.setParentId(treeNode.getParentId());
tree.setName(treeNode.getName()); tree.setName(treeNode.getName());
tree.setWeight(treeNode.getSort()); tree.setWeight(treeNode.getSort());

4
kicc-platform/kicc-platform-biz/kicc-template-biz/src/main/java/com/cloud/kicc/template/KiccTemplateApplication.java

@ -4,7 +4,7 @@ import com.cloud.kicc.common.core.annotation.EnableKiccJacksonAutoConvert;
import com.cloud.kicc.common.feign.annotation.EnableKiccFeignClients; import com.cloud.kicc.common.feign.annotation.EnableKiccFeignClients;
import com.cloud.kicc.common.security.annotation.EnableKiccResourceServer; import com.cloud.kicc.common.security.annotation.EnableKiccResourceServer;
import com.cloud.kicc.common.swagger.annotation.EnableKiccSwagger2; import com.cloud.kicc.common.swagger.annotation.EnableKiccSwagger2;
import com.cloud.kicc.equip.KiccEquipApplication;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
@ -25,7 +25,7 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
public class KiccTemplateApplication { public class KiccTemplateApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(KiccEquipApplication.class, args); SpringApplication.run(KiccTemplateApplication.class, args);
} }
} }

Loading…
Cancel
Save