| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/updateEnergyId") |
| | | public R updateEnergyId(String id,String identification) { |
| | | String[] strArray = id.split(","); |
| | | for (int i = 0; i < strArray.length; i++) { |
| | | energyService.updateEnergyId(strArray[i]); |
| | | } |
| | | public R updateEnergyId(String id,String identification,int num) { |
| | | |
| | | energyService.updateEnergyId(id,identification); |
| | | //能量树 |
| | | String nums = energyTreeService.selectNum(identification); |
| | | Integer a=Integer.valueOf(nums); |
| | | int length = strArray.length; |
| | | int i = a + length; |
| | | String num=String.valueOf(i); |
| | | energyTreeService.updateEnergyTreeId(num,identification); |
| | | Integer n=Integer.valueOf(num); |
| | | int i1 = n + a; |
| | | String i = String.valueOf(i1); |
| | | energyTreeService.updateEnergyTreeId(i,identification); |
| | | return R.success("拾取成功"); |
| | | } |
| | | |