|
@@ -372,7 +372,7 @@ public class IndexController {
|
|
|
equipmentApply.setAdminUserName(username);
|
|
|
equipmentApply.setEquimentType(equimentType);
|
|
|
// 如果是爆米花
|
|
|
- if (equimentType.equals("P30")) {
|
|
|
+ if (equimentType.equals("P10") || equimentType.equals("P20") || equimentType.equals("P30")) {
|
|
|
machineType = "1";
|
|
|
}
|
|
|
// 如果是冰淇淋
|
|
@@ -2390,5 +2390,32 @@ public class IndexController {
|
|
|
return "调价成功";
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 新修改商品名称
|
|
|
+ * @param clientId 设备编号
|
|
|
+ * @param productNo 商品编号
|
|
|
+ * @param newProductName 新名称
|
|
|
+ * @return 修改结果
|
|
|
+ */
|
|
|
+ @RequestMapping(value = "/newUpdateProductName", method = RequestMethod.POST)
|
|
|
+ @ResponseBody
|
|
|
+ public String newUpdateProductName(String clientId, String productNo, String newProductName) {
|
|
|
+ LambdaQueryWrapper<TEquipment> query = Wrappers.lambdaQuery();
|
|
|
+ query.eq(TEquipment::getClientId, clientId);
|
|
|
+ TEquipment equipment = equipmentService.getOne(query);
|
|
|
+ if (equipment != null && equipment.getId() != null) {
|
|
|
+ LambdaQueryWrapper<TProduct> queryWrapper = Wrappers.lambdaQuery();
|
|
|
+ queryWrapper.eq(TProduct::getEquipmentId, equipment.getId());
|
|
|
+ queryWrapper.eq(TProduct::getNo, productNo);
|
|
|
+ TProduct product = productService.getOne(queryWrapper);
|
|
|
+ product.setModifyDate(new Date());
|
|
|
+ product.setName(product.getProductName());
|
|
|
+ product.setProductName(newProductName);
|
|
|
+ productService.updateById(product);
|
|
|
+ return "修改成功(Success)!";
|
|
|
+ }
|
|
|
+ return "找不到设备";
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|