Commit be14627e authored by 王俊权's avatar 王俊权

清除用户活跃订单

parent 2d58eca4
......@@ -85,8 +85,8 @@ public class OrderController {
@PostMapping("/lending")
public Result<Boolean> lending(@RequestBody @Valid LendingFormModel lendingFormModel) {
if (Application.isDebug()) {
boolean lendingResult = this.orderService.lending(lendingFormModel);
return Result.buildSuccess(lendingResult, lendingResult ? "放款操作成功" : "放款操作失败");
Tuple<Boolean, String> lendingResult = this.orderService.lending(lendingFormModel);
return Result.buildSuccess(lendingResult.getKey(), lendingResult.getKey() ? "放款操作成功" : "放款操作失败");
} else {
return Result.buildSuccess(false,"无此操作");
}
......
......@@ -138,7 +138,7 @@ public class UserController {
* @param phoneNo 用户ID
* @return
*/
@PutMapping("/delete/userid")
@PutMapping("/info/clean")
public Boolean deleteByUserId(@RequestParam @Valid @NotEmpty(message = "无效的用户手机号") String phoneNo) {
return this.xyqbUserService.deleteByUserId(phoneNo);
}
......
......@@ -13,6 +13,7 @@ import cn.quantgroup.user.retbean.XUser;
import cn.quantgroup.user.retbean.XUserDetail;
import cn.quantgroup.user.retbean.XUserExtInfo;
import cn.quantgroup.user.vo.UserSysResult;
import com.alibaba.fastjson.JSONObject;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
......@@ -180,7 +181,8 @@ public class XyqbUserServiceImpl implements XyqbUserService {
cancel_list.add("delete from user_operation_history where user_id="+userId);
data.put("sql",cancel_list);
String cancel_result = jolyneCenter.executeXYQBSQL(JSONTools.serialize(data));
return "success".equals(cancel_result);
JSONObject resp = JSONObject.parseObject(cancel_result);
return (Objects.nonNull(resp) && resp.containsKey("code"))?"0000".equals(resp.get("code")):false;
}
@Override public Boolean deleteByUserId(String phoneNo) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment