Showing
4 changed files
with
50 additions
and
4 deletions
@@ -61,6 +61,13 @@ public class TradeBillsController { | @@ -61,6 +61,13 @@ public class TradeBillsController { | ||
61 | return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(result).build(); | 61 | return new ApiResponse.ApiResponseBuilder().code(200).message("查询成功").data(result).build(); |
62 | } | 62 | } |
63 | 63 | ||
64 | + @RequestMapping(value = "/unbindingAuthorizeInfoByUid") | ||
65 | + public ApiResponse unbindingAuthorizeInfoByUid(Integer uid) { | ||
66 | + LOGGER.info("unbindingAuthorizeInfoByUid in. uid is {}", uid); | ||
67 | + | ||
68 | + return new ApiResponse.ApiResponseBuilder().code(200).message("已解绑").build(); | ||
69 | + } | ||
70 | + | ||
64 | /** | 71 | /** |
65 | * 人工退款 | 72 | * 人工退款 |
66 | * @param req | 73 | * @param req |
@@ -14,6 +14,8 @@ public interface ITradeBillsService { | @@ -14,6 +14,8 @@ public interface ITradeBillsService { | ||
14 | 14 | ||
15 | AuthorizeResultRespVO queryAuthorizeInfoByUid(Integer uid); | 15 | AuthorizeResultRespVO queryAuthorizeInfoByUid(Integer uid); |
16 | 16 | ||
17 | + void unbindingAuthorizeInfoByUid(Integer uid); | ||
18 | + | ||
17 | /** | 19 | /** |
18 | * | 20 | * |
19 | * @param req | 21 | * @param req |
@@ -15,6 +15,7 @@ import com.yoho.ufo.order.constant.TradeStatusEnum; | @@ -15,6 +15,7 @@ import com.yoho.ufo.order.constant.TradeStatusEnum; | ||
15 | import com.yoho.ufo.order.response.StoredSellerRespVo; | 15 | import com.yoho.ufo.order.response.StoredSellerRespVo; |
16 | import com.yoho.ufo.order.service.ITradeBillsService; | 16 | import com.yoho.ufo.order.service.ITradeBillsService; |
17 | import com.yoho.ufo.service.IQNDownloadService; | 17 | import com.yoho.ufo.service.IQNDownloadService; |
18 | +import com.yoho.ufo.service.impl.UserHelper; | ||
18 | import com.yoho.ufo.service.model.PageResponseBO; | 19 | import com.yoho.ufo.service.model.PageResponseBO; |
19 | import com.yoho.ufo.util.CollectionUtil; | 20 | import com.yoho.ufo.util.CollectionUtil; |
20 | import com.yoho.ufo.util.KeyWordHiddenUtil; | 21 | import com.yoho.ufo.util.KeyWordHiddenUtil; |
@@ -248,6 +249,19 @@ public class TradeBillsServiceImpl implements ITradeBillsService { | @@ -248,6 +249,19 @@ public class TradeBillsServiceImpl implements ITradeBillsService { | ||
248 | return result; | 249 | return result; |
249 | } | 250 | } |
250 | 251 | ||
252 | + public void unbindingAuthorizeInfoByUid(Integer uid) { | ||
253 | + UserHelper userInfo= new UserHelper(); | ||
254 | + LOGGER.info("unbindingAuthorizeInfoByUid service in. unbinding uid is {},operator user id {} ,user name {},userInfo {}", uid,userInfo.getUserId(),userInfo.getUserName(),userInfo); | ||
255 | + //TODO 记录解绑日志 ,调用解绑接口,并且清理本地local cache缓存 | ||
256 | + | ||
257 | + /*AuthorizeInfoReq req = new AuthorizeInfoReq(); | ||
258 | + req.setUid(uid); | ||
259 | + req.setOperatorUid(userInfo.getUserId()); | ||
260 | + req.setOperatorName(userInfo.getUserName()); | ||
261 | + | ||
262 | + localUidAlipayAccountCache.invalidate(uid);*/ | ||
263 | + } | ||
264 | + | ||
251 | 265 | ||
252 | private List<TradeBillsResp> convertToResp(List<TradeBills> tradeBillsList){ | 266 | private List<TradeBillsResp> convertToResp(List<TradeBills> tradeBillsList){ |
253 | List<TradeBillsResp> respList = Lists.newArrayList(); | 267 | List<TradeBillsResp> respList = Lists.newArrayList(); |
@@ -89,18 +89,41 @@ function getAuthorizeInfoList(param){ | @@ -89,18 +89,41 @@ function getAuthorizeInfoList(param){ | ||
89 | width: 40, | 89 | width: 40, |
90 | align: "center", | 90 | align: "center", |
91 | formatter: function (value, rowData, rowIndex) { | 91 | formatter: function (value, rowData, rowIndex) { |
92 | - if (rowData.tradeStatus != 100) { | ||
93 | - var btn= "解绑"; | 92 | + var btn= "<a role='unbindingConfirm' onclick='openUnbindingConfirmDialog(\"%s\")' style='margin-left:10px;background-color: #d9534f !important;'>解绑</a>"; |
93 | + btn = btn.replace("%s",rowData.uid); | ||
94 | return btn; | 94 | return btn; |
95 | } | 95 | } |
96 | - } | ||
97 | }]], | 96 | }]], |
98 | cache: false, | 97 | cache: false, |
99 | pagination: true, | 98 | pagination: true, |
100 | idField: "id", | 99 | idField: "id", |
101 | singleSelect: true, | 100 | singleSelect: true, |
102 | onLoadSuccess: function (data) { | 101 | onLoadSuccess: function (data) { |
103 | - //$(this).datagrid("getPanel").find("a[role='refundsConfirm']").linkbutton({}); | 102 | + $(this).datagrid("getPanel").find("a[role='unbindingConfirm']").linkbutton({}); |
103 | + } | ||
104 | + }); | ||
105 | +} | ||
106 | + | ||
107 | +function openUnbindingConfirmDialog(uid) { | ||
108 | + alert("开发中..."); | ||
109 | + return ; | ||
110 | + $.messager.confirm("确认解绑", "是否确认解绑[uid="+uid+"]", function(flag) { | ||
111 | + if (flag) { | ||
112 | + $.post(contextPath + "/tradeBills/unbindingAuthorizeInfoByUid", { | ||
113 | + uid : uid | ||
114 | + }, function(data) { | ||
115 | + if (data.code == 200) { | ||
116 | + $("#authorizeInfoListTable").datagrid("load", { | ||
117 | + uid : uid | ||
118 | + }); | ||
119 | + window.self.$.messager.show({ | ||
120 | + title : "提示", | ||
121 | + msg : "解绑完成!" | ||
122 | + }); | ||
123 | + }else { | ||
124 | + window.self.$.messager.alert("失败", "失败!", "error"); | ||
125 | + } | ||
126 | + }); | ||
104 | } | 127 | } |
105 | }); | 128 | }); |
106 | } | 129 | } |
-
Please register or login to post a comment