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")
public MobileResult<ActivityDetailVO> detail(String activityId)
{
System.out.println("11-------------我是活动详情 -------");
ActivityDetailVO data = busClubActivityService.selectBusClubActivityByActivityId(activityId);
return MobileResult.success(data);
}
@ -58,6 +59,7 @@ public class BusClubActivityApiController extends BaseMobileController {
@PostMapping("/byId")
public MobileResult<ActivityVO> byId(String activityId)
{
System.out.println("查询俱乐部活动信息11111111");
ActivityVO data = busClubActivityService.selectBusClubActivityById(activityId);
return MobileResult.success(data);
}
@ -285,6 +287,7 @@ public class BusClubActivityApiController extends BaseMobileController {
@PostMapping("/edit")
public MobileResult editSave(ActivityEditVO req)
{
System.out.println("编辑俱乐部活动-------");
return toAjax(busClubActivityService.updateBusClubActivity(req, getUserId()));
}
@ -297,6 +300,7 @@ public class BusClubActivityApiController extends BaseMobileController {
@PostMapping( "/remove")
public MobileResult remove(String activityId)
{
System.out.println("删除俱乐部活动-------");
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)
@PostMapping( "/remove")
@ResponseBody
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
* @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);
}
/**
* 查询热门活动 api
* @return
*/
@Override
public List<BusClubActivity> selectBusClubActivityByHot() {
// 热门活动按照报名人最多的倒序查询
@ -143,6 +147,7 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
*/
@Override
public ActivityVO selectBusClubActivityById(String activityId) {
System.out.println("ActivityVO 俱乐部活动ID");
BusClubActivity activity = busClubActivityMapper.selectBusClubActivityById(activityId);
ActivityVO result = new ActivityVO();
BeanUtils.copyProperties(activity, result);
@ -157,6 +162,7 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
*/
@Override
public BusClubActivity selectBusClubActivityByAId(String activityId) {
System.out.println("BusClubActivity 俱乐部活动ID");
return busClubActivityMapper.selectBusClubActivityById(activityId);
}
@ -302,7 +308,8 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
// [4] 若收款类型为管理员代收 则创建俱乐部管理员钱包(活动创建者)
BusClubInfo club = busClubInfoMapper.selectBusClubInfoById(clubId);
// 收款类型 1-会长账户 2-管理员账户
String payType = club.getPayType();
// String payType = club.getPayType(); --廖杨6月18日修改
String payType = "1";
if("2".equals(payType)){
String walletId = busClubWalletService.getClubWalletId(clubId);
busClubWalletService.insertBusClubBlankWallet(walletId, clubId, userId);
@ -566,6 +573,12 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
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.setCreatedBy(userId);
member.setRecordStatus("1");
System.out.println( "新增俱乐部==="+ member.getUserId() +" 2");
busClubMemberMapper.insertBusClubMember(member);
// [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
* @date 2021-04-24
*/
@Component
@RabbitListener(queues = "mall.order.cancel.ttl", containerFactory = "multiListenerContainer")
//@Component
//@RabbitListener(queues = "mall.order.cancel.ttl", containerFactory = "multiListenerContainer")
public class CancelOrderReceiver {
private final Logger logger = LoggerFactory.getLogger(CancelOrderReceiver.class.getName());
@Autowired
private IBusOrderInfoService busOrderInfoService;
@RabbitHandler
public void handle(String orderNumber, Channel channel, Message message) {
logger.info("Receiver orderNumber:{}", orderNumber);
try {
//业务处理
busOrderInfoService.updateBusOrderStatusByTimeout(orderNumber);
}catch (Exception e){
try {
channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
} catch (IOException ioException) {
ioException.printStackTrace();
}
}
}
// private final Logger logger = LoggerFactory.getLogger(CancelOrderReceiver.class.getName());
// @Autowired
// private IBusOrderInfoService busOrderInfoService;
//
// @RabbitHandler
// public void handle(String orderNumber, Channel channel, Message message) {
// logger.info("Receiver orderNumber:{}", orderNumber);
// try {
// //业务处理
// busOrderInfoService.updateBusOrderStatusByTimeout(orderNumber);
// }catch (Exception e){
// try {
// channel.basicAck(message.getMessageProperties().getDeliveryTag(),false);
// } catch (IOException ioException) {
// 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) {
// 给延迟队列发送消息
amqpTemplate.convertAndSend(QueueEnum.QUEUE_ORDER_CANCEL.getExchange(),
QueueEnum.QUEUE_ORDER_CANCEL.getRouteKey(), orderNumber, message -> {
message.getMessageProperties().setExpiration(String.valueOf(delayTimes));
return message;
});
logger.info("Send orderNumber:{}", orderNumber);
// amqpTemplate.convertAndSend(QueueEnum.QUEUE_ORDER_CANCEL.getExchange(),
// QueueEnum.QUEUE_ORDER_CANCEL.getRouteKey(), orderNumber, message -> {
// message.getMessageProperties().setExpiration(String.valueOf(delayTimes));
// return message;
// });
// 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>
<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>
<select id="selectBusClubActivityList" parameterType="BusClubActivity" resultMap="BusClubActivityResult">
@ -272,6 +272,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where a.record_status = "1"
and a.publish_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,
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,
@ -851,9 +852,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
where activity_id = #{activityId}
</update>
<!-- PC删除该俱乐部活动 -->
<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 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}
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>

Loading…
Cancel
Save