|
|
|
@ -8,6 +8,7 @@ import java.util.stream.Collectors; |
|
|
|
|
import java.io.IOException; |
|
|
|
|
import java.io.UnsupportedEncodingException; |
|
|
|
|
import java.net.URLDecoder; |
|
|
|
|
import javax.servlet.ServletOutputStream; |
|
|
|
|
import javax.servlet.http.HttpServletRequest; |
|
|
|
|
import javax.servlet.http.HttpServletResponse; |
|
|
|
|
import org.jeecg.common.api.vo.Result; |
|
|
|
@ -50,7 +51,7 @@ import org.jeecg.common.aspect.annotation.AutoLog; |
|
|
|
|
public class CustomerMeasureController extends JeecgController<CustomerMeasure, ICustomerMeasureService> { |
|
|
|
|
@Autowired |
|
|
|
|
private ICustomerMeasureService customerMeasureService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
@ -72,7 +73,33 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure, |
|
|
|
|
IPage<CustomerMeasure> pageList = customerMeasureService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 分页列表查询 |
|
|
|
|
* |
|
|
|
|
* @param customerMeasure |
|
|
|
|
* @param pageNo |
|
|
|
|
* @param pageSize |
|
|
|
|
* @param req |
|
|
|
|
* @return |
|
|
|
|
*/ |
|
|
|
|
@AutoLog(value = "顾客测体管理-分页列表查询") |
|
|
|
|
@ApiOperation(value="顾客测体管理-分页列表查询", notes="顾客测体管理-分页列表查询") |
|
|
|
|
@GetMapping(value = "/list1") |
|
|
|
|
public Result<?> queryPageList1(CustomerMeasure customerMeasure, |
|
|
|
|
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, |
|
|
|
|
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, |
|
|
|
|
HttpServletRequest req) { |
|
|
|
|
QueryWrapper<CustomerMeasure> queryWrapper = QueryGenerator.initQueryWrapper(customerMeasure, req.getParameterMap()); |
|
|
|
|
System.out.println(req.toString()); |
|
|
|
|
System.out.println(customerMeasure); |
|
|
|
|
queryWrapper.eq("user_id",customerMeasure.getUserId()); |
|
|
|
|
Page<CustomerMeasure> page = new Page<CustomerMeasure>(pageNo, pageSize); |
|
|
|
|
IPage<CustomerMeasure> pageList = customerMeasureService.page(page, queryWrapper); |
|
|
|
|
return Result.OK(pageList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 添加 |
|
|
|
|
* |
|
|
|
@ -142,7 +169,7 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure, |
|
|
|
|
} |
|
|
|
|
return Result.OK(""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 编辑 |
|
|
|
|
* |
|
|
|
@ -213,7 +240,7 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure, |
|
|
|
|
|
|
|
|
|
return Result.OK(""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id删除 |
|
|
|
|
* |
|
|
|
@ -227,7 +254,7 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure, |
|
|
|
|
customerMeasureService.removeById(id); |
|
|
|
|
return Result.OK("删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 批量删除 |
|
|
|
|
* |
|
|
|
@ -241,7 +268,7 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure, |
|
|
|
|
this.customerMeasureService.removeByIds(Arrays.asList(ids.split(","))); |
|
|
|
|
return Result.OK("批量删除成功!"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 通过id查询 |
|
|
|
|
* |
|
|
|
@ -282,4 +309,26 @@ public class CustomerMeasureController extends JeecgController<CustomerMeasure, |
|
|
|
|
return super.importExcel(request, response, CustomerMeasure.class); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AutoLog(value = "排序") |
|
|
|
|
@ApiOperation(value="排序", notes="排序") |
|
|
|
|
@GetMapping(value = "/up") |
|
|
|
|
public Result<?> shang(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
customerMeasureService.up(id); |
|
|
|
|
return Result.ok("升序成功"); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@AutoLog(value = "排序") |
|
|
|
|
@ApiOperation(value="排序", notes="排序") |
|
|
|
|
@GetMapping(value = "/down") |
|
|
|
|
public Result<?> xia(@RequestParam(name="id",required=true) String id) { |
|
|
|
|
int a=customerMeasureService.findSort(id); |
|
|
|
|
if(a==0){ |
|
|
|
|
return Result.error("当前已经是最低级别!!!");}else { |
|
|
|
|
customerMeasureService.down(id); |
|
|
|
|
return Result.ok("降序成功"); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|