Browse Source

修改bug

master
young 3 years ago
parent
commit
ab3ed9d091
  1. 4
      mls-admin/src/main/java/com/mls/web/controller/bmb/activity/api/BusClubActivityApiController.java
  2. 8
      mls-admin/src/main/java/com/mls/web/controller/bmbsys/BusClubActivityController.java
  3. 2
      mls-bmb/src/main/java/com/mls/bmb/activity/service/IBusClubActivityService.java
  4. 15
      mls-bmb/src/main/java/com/mls/bmb/activity/service/impl/BusClubActivityServiceImpl.java
  5. 2
      mls-bmb/src/main/java/com/mls/bmb/club/service/impl/BusClubInfoServiceImpl.java
  6. 40
      mls-bmb/src/main/java/com/mls/bmb/order/service/impl/CancelOrderReceiver.java
  7. 12
      mls-bmb/src/main/java/com/mls/bmb/order/service/impl/CancelOrderSender.java
  8. 7
      mls-bmb/src/main/resources/mapper/activity/BusClubActivityMapper.xml
  9. 2
      mls-bmb/src/main/resources/mapper/club/BusClubInfoMapper.xml

4
mls-admin/src/main/java/com/mls/web/controller/bmb/activity/api/BusClubActivityApiController.java

@ -46,6 +46,7 @@ public class BusClubActivityApiController extends BaseMobileController {
@PostMapping("/detail") @PostMapping("/detail")
public MobileResult<ActivityDetailVO> detail(String activityId) public MobileResult<ActivityDetailVO> detail(String activityId)
{ {
System.out.println("11-------------我是活动详情 -------");
ActivityDetailVO data = busClubActivityService.selectBusClubActivityByActivityId(activityId); ActivityDetailVO data = busClubActivityService.selectBusClubActivityByActivityId(activityId);
return MobileResult.success(data); return MobileResult.success(data);
} }
@ -58,6 +59,7 @@ public class BusClubActivityApiController extends BaseMobileController {
@PostMapping("/byId") @PostMapping("/byId")
public MobileResult<ActivityVO> byId(String activityId) public MobileResult<ActivityVO> byId(String activityId)
{ {
System.out.println("查询俱乐部活动信息11111111");
ActivityVO data = busClubActivityService.selectBusClubActivityById(activityId); ActivityVO data = busClubActivityService.selectBusClubActivityById(activityId);
return MobileResult.success(data); return MobileResult.success(data);
} }
@ -285,6 +287,7 @@ public class BusClubActivityApiController extends BaseMobileController {
@PostMapping("/edit") @PostMapping("/edit")
public MobileResult editSave(ActivityEditVO req) public MobileResult editSave(ActivityEditVO req)
{ {
System.out.println("编辑俱乐部活动-------");
return toAjax(busClubActivityService.updateBusClubActivity(req, getUserId())); return toAjax(busClubActivityService.updateBusClubActivity(req, getUserId()));
} }
@ -297,6 +300,7 @@ public class BusClubActivityApiController extends BaseMobileController {
@PostMapping( "/remove") @PostMapping( "/remove")
public MobileResult remove(String activityId) public MobileResult remove(String activityId)
{ {
System.out.println("删除俱乐部活动-------");
return toAjax(busClubActivityService.updateBusClubActivityRecordStatus(activityId, getUserId())); return toAjax(busClubActivityService.updateBusClubActivityRecordStatus(activityId, getUserId()));
} }

8
mls-admin/src/main/java/com/mls/web/controller/bmbsys/BusClubActivityController.java

@ -114,12 +114,14 @@ public class BusClubActivityController extends BaseController {
/* /*
* 删除俱乐部活动 * 删除俱乐部活动
*/ */
/*@RequiresPermissions("bmb:activity:remove") @RequiresPermissions("bmb:activity:remove")
@Log(title = "俱乐部活动", businessType = BusinessType.DELETE) @Log(title = "俱乐部活动", businessType = BusinessType.DELETE)
@PostMapping( "/remove") @PostMapping( "/remove")
@ResponseBody @ResponseBody
public AjaxResult remove(String ids) public AjaxResult remove(String ids)
{ {
return toAjax(busClubActivityService.deleteBusClubActivityByIds(ids)); System.out.println("我是一个删除功能~~~~~~~");
}*/
return toAjax(busClubActivityService.deleteBusClubActivityById(ids));
}
} }

2
mls-bmb/src/main/java/com/mls/bmb/activity/service/IBusClubActivityService.java

@ -247,5 +247,5 @@ public interface IBusClubActivityService
* @param activityId 俱乐部活动ID * @param activityId 俱乐部活动ID
* @return 结果 * @return 结果
*/ */
//public int deleteBusClubActivityById(String activityId); public int deleteBusClubActivityById(String activityId);
} }

15
mls-bmb/src/main/java/com/mls/bmb/activity/service/impl/BusClubActivityServiceImpl.java

@ -65,6 +65,10 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
// return CollectionCopyUtils.copyList(data, ActivityRecommendVO.class); // return CollectionCopyUtils.copyList(data, ActivityRecommendVO.class);
} }
/**
* 查询热门活动 api
* @return
*/
@Override @Override
public List<BusClubActivity> selectBusClubActivityByHot() { public List<BusClubActivity> selectBusClubActivityByHot() {
// 热门活动按照报名人最多的倒序查询 // 热门活动按照报名人最多的倒序查询
@ -143,6 +147,7 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
*/ */
@Override @Override
public ActivityVO selectBusClubActivityById(String activityId) { public ActivityVO selectBusClubActivityById(String activityId) {
System.out.println("ActivityVO 俱乐部活动ID");
BusClubActivity activity = busClubActivityMapper.selectBusClubActivityById(activityId); BusClubActivity activity = busClubActivityMapper.selectBusClubActivityById(activityId);
ActivityVO result = new ActivityVO(); ActivityVO result = new ActivityVO();
BeanUtils.copyProperties(activity, result); BeanUtils.copyProperties(activity, result);
@ -157,6 +162,7 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
*/ */
@Override @Override
public BusClubActivity selectBusClubActivityByAId(String activityId) { public BusClubActivity selectBusClubActivityByAId(String activityId) {
System.out.println("BusClubActivity 俱乐部活动ID");
return busClubActivityMapper.selectBusClubActivityById(activityId); return busClubActivityMapper.selectBusClubActivityById(activityId);
} }
@ -302,7 +308,8 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
// [4] 若收款类型为管理员代收 则创建俱乐部管理员钱包(活动创建者) // [4] 若收款类型为管理员代收 则创建俱乐部管理员钱包(活动创建者)
BusClubInfo club = busClubInfoMapper.selectBusClubInfoById(clubId); BusClubInfo club = busClubInfoMapper.selectBusClubInfoById(clubId);
// 收款类型 1-会长账户 2-管理员账户 // 收款类型 1-会长账户 2-管理员账户
String payType = club.getPayType(); // String payType = club.getPayType(); --廖杨6月18日修改
String payType = "1";
if("2".equals(payType)){ if("2".equals(payType)){
String walletId = busClubWalletService.getClubWalletId(clubId); String walletId = busClubWalletService.getClubWalletId(clubId);
busClubWalletService.insertBusClubBlankWallet(walletId, clubId, userId); busClubWalletService.insertBusClubBlankWallet(walletId, clubId, userId);
@ -566,6 +573,12 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
return busClubActivityMapper.updateBusClubActivity(busClubActivity); return busClubActivityMapper.updateBusClubActivity(busClubActivity);
} }
@Override
public int deleteBusClubActivityById(String activityId) {
System.out.println("我要删除的 活动ID=======" + activityId + " dfdfd");
return busClubActivityMapper.deleteBusClubActivityById(activityId);
}
/* /*
* 删除俱乐部活动对象 * 删除俱乐部活动对象
* *

2
mls-bmb/src/main/java/com/mls/bmb/club/service/impl/BusClubInfoServiceImpl.java

@ -367,6 +367,8 @@ public class BusClubInfoServiceImpl implements IBusClubInfoService
member.setCreatedTime(new Date()); member.setCreatedTime(new Date());
member.setCreatedBy(userId); member.setCreatedBy(userId);
member.setRecordStatus("1"); member.setRecordStatus("1");
System.out.println( "新增俱乐部==="+ member.getUserId() +" 2");
busClubMemberMapper.insertBusClubMember(member); busClubMemberMapper.insertBusClubMember(member);
// [3] 保存俱乐部信息 // [3] 保存俱乐部信息

40
mls-bmb/src/main/java/com/mls/bmb/order/service/impl/CancelOrderReceiver.java

@ -17,26 +17,26 @@ import java.io.IOException;
* @author dongdong * @author dongdong
* @date 2021-04-24 * @date 2021-04-24
*/ */
@Component //@Component
@RabbitListener(queues = "mall.order.cancel.ttl", containerFactory = "multiListenerContainer") //@RabbitListener(queues = "mall.order.cancel.ttl", containerFactory = "multiListenerContainer")
public class CancelOrderReceiver { public class CancelOrderReceiver {
private final Logger logger = LoggerFactory.getLogger(CancelOrderReceiver.class.getName()); // private final Logger logger = LoggerFactory.getLogger(CancelOrderReceiver.class.getName());
@Autowired // @Autowired
private IBusOrderInfoService busOrderInfoService; // private IBusOrderInfoService busOrderInfoService;
//
@RabbitHandler // @RabbitHandler
public void handle(String orderNumber, Channel channel, Message message) { // public void handle(String orderNumber, Channel channel, Message message) {
logger.info("Receiver orderNumber:{}", orderNumber); // logger.info("Receiver orderNumber:{}", orderNumber);
try { // try {
//业务处理 // //业务处理
busOrderInfoService.updateBusOrderStatusByTimeout(orderNumber); // busOrderInfoService.updateBusOrderStatusByTimeout(orderNumber);
}catch (Exception e){ // }catch (Exception e){
try { // try {
channel.basicAck(message.getMessageProperties().getDeliveryTag(),false); // channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
} catch (IOException ioException) { // } catch (IOException ioException) {
ioException.printStackTrace(); // ioException.printStackTrace();
} // }
} // }
} // }
} }

12
mls-bmb/src/main/java/com/mls/bmb/order/service/impl/CancelOrderSender.java

@ -26,11 +26,11 @@ public class CancelOrderSender {
*/ */
public void sendMessage(String orderNumber, final long delayTimes) { public void sendMessage(String orderNumber, final long delayTimes) {
// 给延迟队列发送消息 // 给延迟队列发送消息
amqpTemplate.convertAndSend(QueueEnum.QUEUE_ORDER_CANCEL.getExchange(), // amqpTemplate.convertAndSend(QueueEnum.QUEUE_ORDER_CANCEL.getExchange(),
QueueEnum.QUEUE_ORDER_CANCEL.getRouteKey(), orderNumber, message -> { // QueueEnum.QUEUE_ORDER_CANCEL.getRouteKey(), orderNumber, message -> {
message.getMessageProperties().setExpiration(String.valueOf(delayTimes)); // message.getMessageProperties().setExpiration(String.valueOf(delayTimes));
return message; // return message;
}); // });
logger.info("Send orderNumber:{}", orderNumber); // logger.info("Send orderNumber:{}", orderNumber);
} }
} }

7
mls-bmb/src/main/resources/mapper/activity/BusClubActivityMapper.xml

@ -81,7 +81,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectBusClubActivityAll"> <sql id="selectBusClubActivityAll">
select activity_id, activity_name, activity_logo, cover_first_image, cover_small_image, cover_big_image, club_id, activity_content, activity_addr, lon_and_lat, addr_lon, addr_lat, start_register_time, end_register_time, start_time, end_time, is_free, is_help_register, is_limit_select, is_check, refund_type, refund_time, refund_start_time, refund_end_time, is_update_register, is_show_register, is_show_sponsor, show_register_type, register_btn_name, cost_id, activity_price, official_price, team_price, is_limit, activity_read, activity_share, insurance_type, insurance_price, is_sms_notify, sms_notify_time, sms_explain, sms_content, is_applet_notify, applet_notify_time, is_join, poster, is_register, is_open_team, is_recommend, check_status, publish_status, register_status, sign_status, record_status, created_tel, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, notes from bus_club_activity select activity_id, activity_name, activity_logo, cover_first_image, cover_small_image, cover_big_image, club_id, activity_content, activity_addr, lon_and_lat, addr_lon, addr_lat, start_register_time, end_register_time, start_time, end_time, is_free, is_help_register, is_limit_select, is_check, refund_type, refund_time, refund_start_time, refund_end_time, is_update_register, is_show_register, is_show_sponsor, show_register_type, register_btn_name, cost_id, activity_price, official_price, team_price, is_limit, activity_read, activity_share, insurance_type, insurance_price, is_sms_notify, sms_notify_time, sms_explain, sms_content, is_applet_notify, applet_notify_time, is_join, poster, is_register, is_open_team, is_recommend, check_status, publish_status, register_status, sign_status, record_status, created_tel, REVISION, CREATED_BY, CREATED_TIME, UPDATED_BY, UPDATED_TIME, notes from bus_club_activity where stats='1'
</sql> </sql>
<select id="selectBusClubActivityList" parameterType="BusClubActivity" resultMap="BusClubActivityResult"> <select id="selectBusClubActivityList" parameterType="BusClubActivity" resultMap="BusClubActivityResult">
@ -272,6 +272,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where a.record_status = "1" where a.record_status = "1"
and a.publish_status = "1" and a.publish_status = "1"
and a.check_status = "1" and a.check_status = "1"
and a.stats = "1"
group by a.activity_id, activity_name, activity_logo, cover_first_image, cover_small_image, cover_big_image, group by a.activity_id, activity_name, activity_logo, cover_first_image, cover_small_image, cover_big_image,
a.club_id, activity_content, activity_addr, lon_and_lat, addr_lon, addr_lat, start_register_time, a.club_id, activity_content, activity_addr, lon_and_lat, addr_lon, addr_lat, start_register_time,
end_register_time, start_time, end_time, is_free, is_help_register, is_limit_select, end_register_time, start_time, end_time, is_free, is_help_register, is_limit_select,
@ -851,9 +852,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim> </trim>
where activity_id = #{activityId} where activity_id = #{activityId}
</update> </update>
<!-- PC删除该俱乐部活动 -->
<delete id="deleteBusClubActivityById" parameterType="String"> <delete id="deleteBusClubActivityById" parameterType="String">
delete from bus_club_activity where activity_id = #{activityId} update bus_club_activity set stats = 0 where activity_id = #{activityId}
</delete> </delete>
<delete id="deleteBusClubActivityByIds" parameterType="String"> <delete id="deleteBusClubActivityByIds" parameterType="String">

2
mls-bmb/src/main/resources/mapper/club/BusClubInfoMapper.xml

@ -209,7 +209,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select club_id from bus_club_member where user_id = #{userId} select club_id from bus_club_member where user_id = #{userId}
and (member_type="1" or member_type="2" or member_type="3") and record_status = "1" and (member_type="1" or member_type="2" or member_type="3") and record_status = "1"
) )
and c.check_status = "1" and c.record_status = "1" and c.record_status = "1"
</select> </select>

Loading…
Cancel
Save