|  | @@ -132,6 +132,40 @@ public class ReplacementInstrumentActivityController extends BaseController {
 | 
											
												
													
														|  |          return succeed(replacementInstrumentActivity);
 |  |          return succeed(replacementInstrumentActivity);
 | 
											
												
													
														|  |      }
 |  |      }
 | 
											
												
													
														|  |  
 |  |  
 | 
											
												
													
														|  | 
 |  | +    @ApiOperation(value = "开启/关闭缴费")
 | 
											
												
													
														|  | 
 |  | +    @PostMapping("/updateOpenFlag")
 | 
											
												
													
														|  | 
 |  | +    @PreAuthorize("@pcs.hasPermissions('replacementInstrumentActivity/updateOpenFlag')")
 | 
											
												
													
														|  | 
 |  | +    public HttpResponseResult<ReplacementInstrumentActivity> updateOpenFlag(Integer Id,Integer openFlag) {
 | 
											
												
													
														|  | 
 |  | +        ReplacementInstrumentActivity replacementInstrumentActivity = replacementInstrumentActivityDao.getLock(Id);
 | 
											
												
													
														|  | 
 |  | +        if (!replacementInstrumentActivity.getPayStatus().equals(0)) {
 | 
											
												
													
														|  | 
 |  | +            return failed("支付中、已支付的乐器置换,不能修改");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        if(replacementInstrumentActivity.getInstrumentsId() == null){
 | 
											
												
													
														|  | 
 |  | +            return failed("修改失败:用户没有可置换商品");
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +        if (openFlag == 1) {
 | 
											
												
													
														|  | 
 |  | +            Goods goods = goodsService.get(replacementInstrumentActivity.getInstrumentsId());
 | 
											
												
													
														|  | 
 |  | +            Map<Integer, String> userMap = new HashMap<>();
 | 
											
												
													
														|  | 
 |  | +            Map<Integer, String> userPhoneMap = new HashMap<>();
 | 
											
												
													
														|  | 
 |  | +            Integer userId = replacementInstrumentActivity.getUserId();
 | 
											
												
													
														|  | 
 |  | +            String baseApiUrl = sysConfigDao.findConfigValue("base_api_url");
 | 
											
												
													
														|  | 
 |  | +            String pushUrl = baseApiUrl + "/#/questionGoodsSale?id=";
 | 
											
												
													
														|  | 
 |  | +            userMap.put(userId, userId.toString());
 | 
											
												
													
														|  | 
 |  | +            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.JIGUANG, MessageTypeEnum.REPLACEMENT_PAY_PUSH,
 | 
											
												
													
														|  | 
 |  | +                    userMap, null, 0, "5?" + pushUrl + replacementInstrumentActivity.getId(), "STUDENT", goods.getBrand(), "");
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +            userPhoneMap.put(userId, replacementInstrumentActivity.getMobileNo());
 | 
											
												
													
														|  | 
 |  | +            sysMessageService.batchSendMessage(MessageSenderPluginContext.MessageSender.AWSMS, MessageTypeEnum.REPLACEMENT_PAY_PUSH,
 | 
											
												
													
														|  | 
 |  | +                    userPhoneMap, null, 0, null, "STUDENT", goods.getBrand(), HttpUtil.getSortUrl(pushUrl + replacementInstrumentActivity.getId()));
 | 
											
												
													
														|  | 
 |  | +        }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  | 
 |  | +        replacementInstrumentActivity.setOpenFlag(openFlag);
 | 
											
												
													
														|  | 
 |  | +        replacementInstrumentActivity.setUpdateTime(new Date());
 | 
											
												
													
														|  | 
 |  | +        replacementInstrumentActivityService.update(replacementInstrumentActivity);
 | 
											
												
													
														|  | 
 |  | +        return succeed(replacementInstrumentActivity);
 | 
											
												
													
														|  | 
 |  | +    }
 | 
											
												
													
														|  | 
 |  | +
 | 
											
												
													
														|  |      @ApiOperation(value = "导出")
 |  |      @ApiOperation(value = "导出")
 | 
											
												
													
														|  |      @RequestMapping("/export")
 |  |      @RequestMapping("/export")
 | 
											
												
													
														|  |      @PreAuthorize("@pcs.hasPermissions('replacementInstrumentActivity/export')")
 |  |      @PreAuthorize("@pcs.hasPermissions('replacementInstrumentActivity/export')")
 |