|
|
|
@ -8,8 +8,11 @@ import java.util.stream.Collectors; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
|
import java.net.URLDecoder; |
|
|
|
|
import javax.annotation.Resource; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
|
import org.jeecg.common.system.query.QueryGenerator; |
|
|
|
|
import org.jeecg.common.util.oConvertUtils; |
|
|
|
@ -28,6 +31,7 @@ import org.jeecg.modules.zyclothsstyle.service.IZyClothsStyleService; |
|
|
|
|
import org.jeecg.modules.zystylefabric.entity.NewZyStyleFabric; |
|
|
|
|
import org.jeecg.modules.zystylemodule.entity.NewStyleModule; |
|
|
|
|
import org.jeecg.modules.zystylemodule.entity.ZyStyleModule; |
|
|
|
|
import org.jeecg.modules.zystylemodule.mapper.ZyStyleModuleMapper; |
|
|
|
|
import org.jeecg.modules.zystylemodule.service.INewZyStyleModuleService; |
|
|
|
|
import org.jeecg.modules.zystylemodule.service.IZyStyleModuleService; |
|
|
|
|
import org.jeecgframework.poi.excel.ExcelImportUtil; |
|
|
|
@ -46,194 +50,221 @@ import io.swagger.annotations.Api; |
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
/** |
|
|
|
|
* @Description: 款式模块表 |
|
|
|
|
* @Author: jeecg-boot |
|
|
|
|
* @Date: 2022-09-08 |
|
|
|
|
* @Date: 2022-09-08 |
|
|
|
|
* @Version: V1.0 |
|
|
|
|
*/ |
|
|
|
|
@Api(tags="款式模块表") |
|
|
|
|
@Api(tags = "款式模块表") |
|
|
|
|
@RestController |
|
|
|
|
@RequestMapping("/zystylemodule/zyStyleModule") |
|
|
|
|
@Slf4j |
|
|
|
|
public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyStyleModuleService> { |
|
|
|
|
@Autowired |
|
|
|
|
private IZyStyleModuleService zyStyleModuleService; |
|
|
|
|
@Autowired |
|
|
|
|
private IZyClothsModularService zyClothsModularService; |
|
|
|
|
@Autowired |
|
|
|
|
private IZyClothsStyleService zyClothsStyleService; |
|
|
|
|
@Autowired |
|
|
|
|
private IZyClothsTypeService zyClothsTypeService; |
|
|
|
|
@Autowired |
|
|
|
|
private IZyStyleModuleService zyStyleModuleService; |
|
|
|
|
@Autowired |
|
|
|
|
private IZyClothsModularService zyClothsModularService; |
|
|
|
|
@Autowired |
|
|
|
|
private IZyClothsStyleService zyClothsStyleService; |
|
|
|
|
@Autowired |
|
|
|
|
private IZyClothsTypeService zyClothsTypeService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
|
* @param zyStyleModule2 |
|
|
|
|
* @param pageNo |
|
|
|
|
* @param pageSize |
|
|
|
|
* @param req |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-分页列表查询") |
|
|
|
|
@ApiOperation(value = "款式模块表-分页列表查询", notes = "款式模块表-分页列表查询") |
|
|
|
|
@GetMapping(value = "/list") |
|
|
|
|
public Result<?> queryPageList(ZyStyleModule zyStyleModule2, String id, |
|
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
/*LambdaQueryWrapper<ZyStyleModule> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
lambdaQueryWrapper.eq(ZyStyleModule::getStyleId,id); |
|
|
|
|
Page<NewStyleModule> page = new Page<>(pageNo,pageSize); |
|
|
|
|
Page<NewStyleModule> pageList = zyStyleModuleService.page(page, lambdaQueryWrapper); |
|
|
|
|
System.out.println(pageList.getRecords()); |
|
|
|
|
return Result.OK(pageList);*/ |
|
|
|
|
|
|
|
|
|
List<NewStyleModule> listNewStyleModules = new ArrayList<>(); |
|
|
|
|
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
if (id != null) { |
|
|
|
|
queryWrapper.eq("style_id", id); |
|
|
|
|
} |
|
|
|
|
if (zyStyleModule2.getStyleId() != null || zyStyleModule2.getModularId() != null || zyStyleModule2.getTypeId() != null) { |
|
|
|
|
if (zyStyleModule2.getStyleId() != null) { |
|
|
|
|
queryWrapper.eq("style_id", zyStyleModule2.getStyleId()); |
|
|
|
|
} |
|
|
|
|
if (zyStyleModule2.getModularId() != null) { |
|
|
|
|
queryWrapper.eq("modular_id", zyStyleModule2.getModularId()); |
|
|
|
|
} |
|
|
|
|
if (zyStyleModule2.getTypeId() != null) { |
|
|
|
|
queryWrapper.eq("type_id", zyStyleModule2.getTypeId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper); |
|
|
|
|
//System.out.println(list);
|
|
|
|
|
for (ZyStyleModule zyStyleModule : list) { |
|
|
|
|
NewStyleModule newSeMo = new NewStyleModule(); |
|
|
|
|
//编辑回显
|
|
|
|
|
newSeMo.setId(zyStyleModule.getId()); |
|
|
|
|
newSeMo.setTypeId(zyStyleModule.getTypeId()); |
|
|
|
|
newSeMo.setStyleId(zyStyleModule.getStyleId()); |
|
|
|
|
newSeMo.setModularId(zyStyleModule.getModularId()); |
|
|
|
|
//款式编号和名称
|
|
|
|
|
String styleId = zyStyleModule.getStyleId(); |
|
|
|
|
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId); |
|
|
|
|
newSeMo.setStyleNums(styleById.getNums()); |
|
|
|
|
newSeMo.setStyleNames(styleById.getStyleNames()); |
|
|
|
|
//模块编号和名称
|
|
|
|
|
String modularId = zyStyleModule.getModularId(); |
|
|
|
|
ZyClothsModular modularById = zyClothsModularService.getById(modularId); |
|
|
|
|
newSeMo.setModularNums(modularById.getNums()); |
|
|
|
|
newSeMo.setModularName(modularById.getModularName()); |
|
|
|
|
//服装类型
|
|
|
|
|
String typeId = zyStyleModule.getTypeId(); |
|
|
|
|
ZyClothsType typeById = zyClothsTypeService.getById(typeId); |
|
|
|
|
newSeMo.setCreateTime(zyStyleModule.getCreateTime()); |
|
|
|
|
if (typeById != null){ |
|
|
|
|
newSeMo.setTypeName(typeById.getTypeName()); |
|
|
|
|
} else { |
|
|
|
|
newSeMo.setTypeName("typeName为空"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
listNewStyleModules.add(newSeMo); |
|
|
|
|
} |
|
|
|
|
IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, listNewStyleModules.size()); |
|
|
|
|
pageList.setRecords(listNewStyleModules); |
|
|
|
|
|
|
|
|
|
System.out.println(pageList.getRecords()); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
|
* @param zyStyleModule |
|
|
|
|
* @param pageNo |
|
|
|
|
* @param pageSize |
|
|
|
|
* @param req |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
//@AutoLog(value = "款式模块表-分页列表查询")
|
|
|
|
|
@ApiOperation(value = "款式模块表-分页列表查询", notes = "款式模块表-分页列表查询") |
|
|
|
|
@GetMapping(value = "/list1") |
|
|
|
|
public Result<IPage<ZyStyleModule>> queryPageList1(ZyStyleModule zyStyleModule, |
|
|
|
|
@RequestParam(name = "pageNo", defaultValue = "1") Integer pageNo, |
|
|
|
|
@RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
|
|
|
|
|
QueryWrapper<ZyStyleModule> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap()); |
|
|
|
|
Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
|
* @param zyStyleModule2 |
|
|
|
|
* @param pageNo |
|
|
|
|
* @param pageSize |
|
|
|
|
* @param req |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-分页列表查询") |
|
|
|
|
@ApiOperation(value="款式模块表-分页列表查询", notes="款式模块表-分页列表查询") |
|
|
|
|
@GetMapping(value = "/list") |
|
|
|
|
public Result<?> queryPageList(ZyStyleModule zyStyleModule2,String id, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
List<NewStyleModule> listNewStyleModules = new ArrayList<>(); |
|
|
|
|
QueryWrapper<ZyStyleModule> queryWrapper = new QueryWrapper<>(); |
|
|
|
|
if(id!=null){ |
|
|
|
|
queryWrapper.eq("style_id",id); |
|
|
|
|
} |
|
|
|
|
if(zyStyleModule2.getStyleId()!=null || zyStyleModule2.getModularId()!=null || zyStyleModule2.getTypeId()!=null){ |
|
|
|
|
if(zyStyleModule2.getStyleId()!=null){ |
|
|
|
|
queryWrapper.eq("style_id",zyStyleModule2.getStyleId()); |
|
|
|
|
} |
|
|
|
|
if(zyStyleModule2.getModularId()!=null){ |
|
|
|
|
queryWrapper.eq("modular_id",zyStyleModule2.getModularId()); |
|
|
|
|
} |
|
|
|
|
if(zyStyleModule2.getTypeId()!=null){ |
|
|
|
|
queryWrapper.eq("type_id",zyStyleModule2.getTypeId()); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
List<ZyStyleModule> list = zyStyleModuleService.list(queryWrapper); |
|
|
|
|
for (ZyStyleModule zyStyleModule : list){ |
|
|
|
|
NewStyleModule newSeMo = new NewStyleModule(); |
|
|
|
|
//编辑回显
|
|
|
|
|
newSeMo.setId(zyStyleModule.getId()); |
|
|
|
|
newSeMo.setTypeId(zyStyleModule.getTypeId()); |
|
|
|
|
newSeMo.setStyleId(zyStyleModule.getStyleId()); |
|
|
|
|
newSeMo.setModularId(zyStyleModule.getModularId()); |
|
|
|
|
//款式编号和名称
|
|
|
|
|
String styleId = zyStyleModule.getStyleId(); |
|
|
|
|
ZyClothsStyle styleById = zyClothsStyleService.getById(styleId); |
|
|
|
|
newSeMo.setStyleNums(styleById.getNums()); |
|
|
|
|
newSeMo.setStyleNames(styleById.getStyleNames()); |
|
|
|
|
//模块编号和名称
|
|
|
|
|
String modularId = zyStyleModule.getModularId(); |
|
|
|
|
ZyClothsModular modularById = zyClothsModularService.getById(modularId); |
|
|
|
|
newSeMo.setModularNums(modularById.getNums()); |
|
|
|
|
newSeMo.setModularName(modularById.getModularName()); |
|
|
|
|
//服装类型
|
|
|
|
|
String typeId = zyStyleModule.getTypeId(); |
|
|
|
|
ZyClothsType typeById = zyClothsTypeService.getById(typeId); |
|
|
|
|
newSeMo.setTypeName(typeById.getTypeName()); |
|
|
|
|
listNewStyleModules.add(newSeMo); |
|
|
|
|
} |
|
|
|
|
IPage<NewStyleModule> pageList = new Page<>(pageNo, pageSize, list.size()); |
|
|
|
|
pageList.setRecords(listNewStyleModules); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
|
* @param zyStyleModule |
|
|
|
|
* @param pageNo |
|
|
|
|
* @param pageSize |
|
|
|
|
* @param req |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
//@AutoLog(value = "款式模块表-分页列表查询")
|
|
|
|
|
@ApiOperation(value="款式模块表-分页列表查询", notes="款式模块表-分页列表查询") |
|
|
|
|
@GetMapping(value = "/list1") |
|
|
|
|
public Result<IPage<ZyStyleModule>> queryPageList1(ZyStyleModule zyStyleModule, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper); |
|
|
|
|
//System.out.println(zyStyleModule);
|
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
QueryWrapper<ZyStyleModule> queryWrapper = QueryGenerator.initQueryWrapper(zyStyleModule, req.getParameterMap()); |
|
|
|
|
Page<ZyStyleModule> page = new Page<ZyStyleModule>(pageNo, pageSize); |
|
|
|
|
/** |
|
|
|
|
* 添加 |
|
|
|
|
* |
|
|
|
|
* @param zyStyleModule |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-添加") |
|
|
|
|
@ApiOperation(value = "款式模块表-添加", notes = "款式模块表-添加") |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add")
|
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
|
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) { |
|
|
|
|
//根据styleId到原表 zy cloths style直接把名字拿过来,再根据名字到另一个表 zy cloths type 中把id拿过来
|
|
|
|
|
String styleId = zyStyleModule.getStyleId(); |
|
|
|
|
|
|
|
|
|
IPage<ZyStyleModule> pageList = zyStyleModuleService.page(page, queryWrapper); |
|
|
|
|
System.out.println(zyStyleModule); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
ZyClothsStyle zyClothsStyle = zyClothsStyleService.getById(styleId); |
|
|
|
|
LambdaQueryWrapper<ZyClothsType> lambdaQueryWrapper = new LambdaQueryWrapper<>(); |
|
|
|
|
lambdaQueryWrapper.eq(ZyClothsType::getTypeName,zyClothsStyle.getTypeId()); |
|
|
|
|
ZyClothsType zyClothsType = zyClothsTypeService.getOne(lambdaQueryWrapper); |
|
|
|
|
zyStyleModule.setTypeId(zyClothsType.getId()); |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 添加 |
|
|
|
|
* |
|
|
|
|
* @param zyStyleModule |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-添加") |
|
|
|
|
@ApiOperation(value="款式模块表-添加", notes="款式模块表-添加") |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:add")
|
|
|
|
|
@PostMapping(value = "/add") |
|
|
|
|
public Result<String> add(@RequestBody ZyStyleModule zyStyleModule) { |
|
|
|
|
zyStyleModuleService.save(zyStyleModule); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
|
zyStyleModuleService.save(zyStyleModule); |
|
|
|
|
return Result.OK("添加成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 编辑 |
|
|
|
|
* |
|
|
|
|
* @param zyStyleModule |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-编辑") |
|
|
|
|
@ApiOperation(value="款式模块表-编辑", notes="款式模块表-编辑") |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:edit")
|
|
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) |
|
|
|
|
public Result<String> edit(@RequestBody ZyStyleModule zyStyleModule) { |
|
|
|
|
zyStyleModuleService.updateById(zyStyleModule); |
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 编辑 |
|
|
|
|
* |
|
|
|
|
* @param zyStyleModule |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-编辑") |
|
|
|
|
@ApiOperation(value = "款式模块表-编辑", notes = "款式模块表-编辑") |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:edit")
|
|
|
|
|
@RequestMapping(value = "/edit", method = {RequestMethod.PUT, RequestMethod.POST}) |
|
|
|
|
public Result<String> edit(@RequestBody ZyStyleModule zyStyleModule) { |
|
|
|
|
zyStyleModuleService.updateById(zyStyleModule); |
|
|
|
|
return Result.OK("编辑成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id删除 |
|
|
|
|
* |
|
|
|
|
* @param id |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-通过id删除") |
|
|
|
|
@ApiOperation(value="款式模块表-通过id删除", notes="款式模块表-通过id删除") |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:delete")
|
|
|
|
|
@DeleteMapping(value = "/delete") |
|
|
|
|
public Result<String> delete(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
zyStyleModuleService.removeById(id); |
|
|
|
|
return Result.OK("删除成功!"); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 通过id删除 |
|
|
|
|
* |
|
|
|
|
* @param id |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-通过id删除") |
|
|
|
|
@ApiOperation(value = "款式模块表-通过id删除", notes = "款式模块表-通过id删除") |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:delete")
|
|
|
|
|
@DeleteMapping(value = "/delete") |
|
|
|
|
public Result<String> delete(@RequestParam(name = "id", required = true) String id) { |
|
|
|
|
zyStyleModuleService.removeById(id); |
|
|
|
|
return Result.OK("删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 批量删除 |
|
|
|
|
* |
|
|
|
|
* @param ids |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-批量删除") |
|
|
|
|
@ApiOperation(value="款式模块表-批量删除", notes="款式模块表-批量删除") |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:deleteBatch")
|
|
|
|
|
@DeleteMapping(value = "/deleteBatch") |
|
|
|
|
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { |
|
|
|
|
this.zyStyleModuleService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 批量删除 |
|
|
|
|
* |
|
|
|
|
* @param ids |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "款式模块表-批量删除") |
|
|
|
|
@ApiOperation(value = "款式模块表-批量删除", notes = "款式模块表-批量删除") |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:deleteBatch")
|
|
|
|
|
@DeleteMapping(value = "/deleteBatch") |
|
|
|
|
public Result<String> deleteBatch(@RequestParam(name = "ids", required = true) String ids) { |
|
|
|
|
this.zyStyleModuleService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id查询 |
|
|
|
|
* |
|
|
|
|
* @param id |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
//@AutoLog(value = "款式模块表-通过id查询")
|
|
|
|
|
@ApiOperation(value="款式模块表-通过id查询", notes="款式模块表-通过id查询") |
|
|
|
|
@GetMapping(value = "/queryById") |
|
|
|
|
public Result<?> queryById(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
ZyStyleModule zyStyleModule = zyStyleModuleService.getById(id); |
|
|
|
|
if(zyStyleModule==null) { |
|
|
|
|
return Result.error("未找到对应数据"); |
|
|
|
|
} |
|
|
|
|
return Result.OK(zyStyleModule); |
|
|
|
|
} |
|
|
|
|
/** |
|
|
|
|
* 通过id查询 |
|
|
|
|
* |
|
|
|
|
* @param id |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
//@AutoLog(value = "款式模块表-通过id查询")
|
|
|
|
|
@ApiOperation(value = "款式模块表-通过id查询", notes = "款式模块表-通过id查询") |
|
|
|
|
@GetMapping(value = "/queryById") |
|
|
|
|
public Result<?> queryById(@RequestParam(name = "id", required = true) String id) { |
|
|
|
|
ZyStyleModule zyStyleModule = zyStyleModuleService.getById(id); |
|
|
|
|
if (zyStyleModule == null) { |
|
|
|
|
return Result.error("未找到对应数据"); |
|
|
|
|
} |
|
|
|
|
return Result.OK(zyStyleModule); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 导出excel |
|
|
|
|
* |
|
|
|
|
* @param request |
|
|
|
|
* @param zyStyleModule |
|
|
|
|
*/ |
|
|
|
|
* 导出excel |
|
|
|
|
* |
|
|
|
|
* @param request |
|
|
|
|
* @param zyStyleModule |
|
|
|
|
*/ |
|
|
|
|
//@RequiresPermissions("org.jeecg.modules.demo:zy_style_module:exportXls")
|
|
|
|
|
@RequestMapping(value = "/exportXls") |
|
|
|
|
public ModelAndView exportXls(HttpServletRequest request, ZyStyleModule zyStyleModule) { |
|
|
|
@ -241,12 +272,12 @@ public class ZyStyleModuleController extends JeecgController<ZyStyleModule, IZyS |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过excel导入数据 |
|
|
|
|
* |
|
|
|
|
* @param request |
|
|
|
|
* @param response |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
* 通过excel导入数据 |
|
|
|
|
* |
|
|
|
|
* @param request |
|
|
|
|
* @param response |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
//@RequiresPermissions("zy_style_module:importExcel")
|
|
|
|
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
|
|
|
|
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { |
|
|
|
|