Commit a10ee366 authored by 陈祥烨's avatar 陈祥烨

修订

parent 3869434b
......@@ -36,7 +36,7 @@ public class TplCateResource {
*
* @return ApiSourceDto
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PostMapping(value = "/save/{sequenceNbr}")
@ApiOperation(httpMethod = "POST", value = "新增", notes = "新增")
public ResponseModel<TplCateModel> save(@PathVariable Long sequenceNbr,@RequestBody TplCateModel tplCateModel){
......@@ -53,7 +53,7 @@ public class TplCateResource {
* @param sequenceNbr 编码
* @return ApiSourceDto
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@PutMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "PUT", value = "根据sequenceNbr更新", notes = "根据sequenceNbr更新")
public ResponseModel<TplCateModel> updateBySeqTplCate(@RequestBody TplCateModel tplCateModel,@PathVariable(value = "sequenceNbr") Long sequenceNbr){
......@@ -67,7 +67,7 @@ public class TplCateResource {
* @param sequenceNbr 编码
* @return Boolean
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@DeleteMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除", notes = "根据sequenceNbr删除")
public ResponseModel<Boolean> deleteBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr") Long sequenceNbr) {
......@@ -84,7 +84,7 @@ public class TplCateResource {
* @param sequenceNbr 物理主键
* @return ApiSourceDto
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@GetMapping(value = "/{sequenceNbr}")
@ApiOperation(httpMethod = "GET", value = "根据sequenceNbr查询单个", notes = "根据sequenceNbr查询单个")
public ResponseModel<TplCateModel> selectOne(@PathVariable Long sequenceNbr){
......@@ -96,7 +96,7 @@ public class TplCateResource {
*
* @return List<ApiSourceDto>
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET", value = "列表全部数据查询", notes = "列表全部数据查询")
@GetMapping(value = "/list")
public ResponseModel<List<TplCateModel>> selectForList(){
......@@ -107,7 +107,7 @@ public class TplCateResource {
*
* @return List<ApiSourceDto>
*/
@TycloudOperation(ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@ApiOperation(httpMethod = "GET", value = "列表树形结构查询", notes = "列表树形结构查询")
@GetMapping(value = "/tree")
public ResponseModel<List<TplCateTreeModel>> selectForTree(){
......
......@@ -78,8 +78,8 @@ public class TplResource {
@TycloudOperation(ApiLevel = UserType.AGENCY,needAuth = false)
@DeleteMapping(value = "/s/{sequenceNbr}")
@ApiOperation(httpMethod = "DELETE", value = "根据sequenceNbr删除多项", notes = "根据sequenceNbr删除多项")
public ResponseModel<Boolean[]> deleteModelsBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr")String sequenceNbr){
return ResponseHelper.buildResponse(tplService.deleteByIds(sequenceNbr));
public void deleteModelsBySequenceNbr(HttpServletRequest request, @PathVariable(value = "sequenceNbr")String sequenceNbr){
tplService.deleteByIds(sequenceNbr);
}
/**
* 根据sequenceNbr查询
......
package com.yeejoin.amos.api.tool.face.service;
import com.yeejoin.amos.api.tool.face.model.TplCateModel;
import com.yeejoin.amos.api.tool.face.model.TplCateTreeModel;
import com.yeejoin.amos.api.tool.face.model.VisualDesignerModel;
import com.yeejoin.amos.api.tool.face.orm.dao.TplCateMapper;
import com.yeejoin.amos.api.tool.face.orm.entity.TplCate;
import org.springframework.beans.factory.annotation.Autowired;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@Service
public class TplCateService extends BaseService<TplCateModel, TplCate, TplCateMapper> {
......@@ -27,13 +23,6 @@ public class TplCateService extends BaseService<TplCateModel, TplCate, TplCateMa
return this.queryForList("", false);
}
// /**
// * 列表查询 示例
// */
// public List<TplCateModel> queryForTplCateListByVisualDesigner(Long sequenceNbr) {
// List<TplCateModel> result = new ArrayList<>();
// List<TplCateTreeModel>
// }
......
......@@ -2,16 +2,15 @@ package com.yeejoin.amos.api.tool.face.service;
import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.api.tool.face.model.TplCateModel;
import com.yeejoin.amos.api.tool.face.model.TplModel;
import com.yeejoin.amos.api.tool.face.model.TplVoModel;
import com.yeejoin.amos.api.tool.face.orm.dao.TplMapper;
import com.yeejoin.amos.api.tool.face.orm.entity.Tpl;
import org.apache.commons.beanutils.ConvertUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;
import org.typroject.tyboot.core.foundation.utils.StringUtil;
import org.typroject.tyboot.core.rdbms.service.BaseService;
import java.io.IOException;
......@@ -26,20 +25,23 @@ public class TplService extends BaseService<TplModel, Tpl, TplMapper> {
TplService tplService;
@Autowired
TplCateService tplCateService;
@Autowired
VisualDesignerService visualDesignerService;
/**
* 分页查询
*/
public Page<TplModel> queryForTplPage(Page<TplModel> page, Long categorySeq, String displayName) {
return this.queryForPage(page, null, false, categorySeq, displayName);
}
/**
* 根据设计器分页查询
*/
// /**
// * 根据设计器分页查询
// */
// public Page<TplModel> queryForTplPageByVisualDesigner(Page<TplModel> page, Long sequenceNbr){
// List<TplCateModel> tplCateModels = tplCateService.queryForTplCateListByVisualDesigner(sequenceNbr);
// for(TplCateModel tplCateModel:tplCateModels){
// page.getRecords().addAll(tplService.queryForTplListByCategorySeq(tplCateModel.getSequenceNbr()));
// List<TplCateTreeModel> tplCateTreeModels = visualDesignerService.queryForTplCateTreeListByVisualDesigner(sequenceNbr);
// for(TplCateTreeModel tplCateTreeModel:tplCateTreeModels){
// page.getRecords().addAll(tplService.queryForTplListByCategorySeq(tplCateTreeModel.getSequenceNbr()));
// }
// System.out.println(page);
// return page;
// }
......@@ -76,14 +78,11 @@ public class TplService extends BaseService<TplModel, Tpl, TplMapper> {
/**
* 删除多个模板
*/
public Boolean[] deleteByIds(String sequenceNbr){
String[] arr = sequenceNbr.split(",");
Long[] seq = (Long[]) ConvertUtils.convert(arr, Long.class);
Boolean[] arr2 = new Boolean[arr.length];
for (int i = 0;i < arr.length;i++){
arr2[i] = this.removeById(seq[i]);
public void deleteByIds(String sequenceNbr){
Long[] seq = StringUtil.String2LongArray(sequenceNbr);
for (int i = 0;i < seq.length;i++){
this.removeById(seq[i]);
}
return arr2;
}
/**
* 读取json文件
......
......@@ -52,4 +52,5 @@ public class VisualDesignerService extends BaseService<VisualDesignerModel, Visu
return treeList;
}
}
\ 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