|
@@ -59,6 +59,7 @@ import com.huimv.modular.farmstock.param.FarmStockParam;
|
|
|
import com.huimv.modular.result.R;
|
|
|
import com.huimv.modular.utils.util.StringUtilsWork;
|
|
|
import com.tencentcloudapi.vpc.v20170312.models.PrivateIpAddressSpecification;
|
|
|
+import io.swagger.models.auth.In;
|
|
|
import org.apache.poi.ss.formula.functions.T;
|
|
|
import org.junit.Test;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@@ -110,18 +111,19 @@ public class EartagRegisterController{
|
|
|
}
|
|
|
|
|
|
@PostMapping ("/test/testUpdate2")
|
|
|
- public String testUpdate2(@RequestBody Map<String,Integer> map) {
|
|
|
- Integer starId = map.get("starId");
|
|
|
- Integer endId = map.get("endId");
|
|
|
- Integer starEartag = map.get("starEartag");
|
|
|
- Integer endEartag = map.get("endEartag");
|
|
|
+ public ResponseData testUpdate2(@RequestBody Map<String,String> map) {
|
|
|
+ int starId = Integer.parseInt(map.get("starId"));
|
|
|
+ int endId = Integer.parseInt(map.get("endId"));
|
|
|
+ String starEartag = map.get("starEartag");
|
|
|
+ int endEartag = Integer.parseInt(map.get("endEartag"));
|
|
|
|
|
|
for (int i = starId ;i <= endId ; i++){
|
|
|
- EartagRegister byId = eartagRegisterService.getById(i +100 );
|
|
|
+ EartagRegister byId = eartagRegisterService.getById(i);
|
|
|
byId.setEartagNo(starEartag+getStrId(endEartag));
|
|
|
eartagRegisterService.updateById(byId);
|
|
|
+ endEartag ++;
|
|
|
}
|
|
|
- return "成功";
|
|
|
+ return ResponseData.success("成功");
|
|
|
}
|
|
|
private String getStrId(Integer id) {
|
|
|
StringBuilder strId = new StringBuilder(id + "");
|