|
@@ -307,6 +307,37 @@ public class KuaishouItemCollectSamplesController extends BaseController {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ @GetMapping("/updateCourierNumber")
|
|
|
+ public JSONObject updateCourierNumber(Long id, String courierNumber, String companyCode) {
|
|
|
+ JSONObject returnJson = new JSONObject();
|
|
|
+ try {
|
|
|
+ if (Check.isNull(id)) {
|
|
|
+ throw new Exception("id不能为空");
|
|
|
+ }
|
|
|
+ if (Check.isNull(courierNumber)) {
|
|
|
+ throw new Exception("快递单号不能为空");
|
|
|
+ }
|
|
|
+ if (Check.isNull(companyCode)) {
|
|
|
+ throw new Exception("公司编号不能为空");
|
|
|
+ }
|
|
|
+ KuaishouItemCollectSamples kuaishouItemCollectSamples = new KuaishouItemCollectSamples();
|
|
|
+ kuaishouItemCollectSamples.setId(id);
|
|
|
+ kuaishouItemCollectSamples.setCourierNumber(courierNumber);
|
|
|
+ int i = kuaishouItemCollectSamplesService.updateKuaishouItemCollectSamples(kuaishouItemCollectSamples);
|
|
|
+ if (i > 0) {
|
|
|
+ kuaishouItemCollectSamplesService.subscribe(id, courierNumber, companyCode);
|
|
|
+ }
|
|
|
+ returnJson.put("code", 0);
|
|
|
+ returnJson.put("message", "修改成功");
|
|
|
+ } catch (Exception e) {
|
|
|
+ e.printStackTrace();
|
|
|
+ returnJson.put("code", 500);
|
|
|
+ returnJson.put("message", e.getMessage());
|
|
|
+ }
|
|
|
+ return returnJson;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
@GetMapping("/detail")
|
|
|
public JSONObject detail(Long id) {
|
|
|
JSONObject returnJson = new JSONObject();
|