Browse Source

2022-6-23 胡春雨

master
1913812@qq.com 3 years ago
parent
commit
298d670abf
  1. 29
      mls-admin/src/main/java/com/mls/web/controller/bmb/massage/api/BusMassageClubApiController.java
  2. 28
      mls-admin/src/main/java/com/mls/web/controller/bmb/massage/api/BusMassageSystemApiController.java
  3. 2
      mls-admin/src/main/resources/templates/activity/busClassIcon/add.html
  4. 8
      mls-admin/src/main/resources/templates/activity/busClassIcon/edit.html
  5. 4
      mls-bmb/src/main/java/com/mls/bmb/activity/service/impl/BusClubActivityServiceImpl.java
  6. 2
      mls-bmb/src/main/java/com/mls/bmb/massage/service/impl/BusMassageSystemServiceImpl.java
  7. 53
      mls-bmb/src/main/resources/mapper/massage/BusMassageClubMapper.xml
  8. 46
      mls-bmb/src/main/resources/mapper/massage/BusMassageSystemMapper.xml

29
mls-admin/src/main/java/com/mls/web/controller/bmb/massage/api/BusMassageClubApiController.java

@ -1,9 +1,15 @@
package com.mls.web.controller.bmb.massage.api;
import com.github.pagehelper.PageInfo;
import com.mls.bmb.club.domain.BusClubInfo;
import com.mls.bmb.club.vomain.ClubVO;
import com.mls.bmb.massage.domain.BusMassageClub;
import com.mls.bmb.massage.service.IBusMassageClubService;
import com.mls.bmb.massage.vomain.MassageClubDetailVO;
import com.mls.common.core.controller.BaseMobileController;
import com.mls.common.core.domain.MobileResult;
import com.mls.common.core.page.TableDataInfo;
import com.mls.common.utils.CollectionCopyUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
@ -40,4 +46,27 @@ public class BusMassageClubApiController extends BaseMobileController {
return MobileResult.success(data);
}
/**
* 查询俱乐部消息列表
*/
@ApiOperation("查询俱乐部消息列表【查询俱乐部消息用-分页】")
@ApiImplicitParam(name = "clubId", value = "俱乐部id", required = true, dataType = "String")
@PostMapping("/pages")
public TableDataInfo<MassageClubDetailVO> listPage(String clubId)
{
startPage();
BusMassageClub busMassageClub = new BusMassageClub();
busMassageClub.setClubId(clubId);
busMassageClub.setUserId(getUserId());
List<BusMassageClub> data = busMassageClubService.selectBusMassageClubList(busMassageClub);
PageInfo<BusMassageClub> pageInfo = new PageInfo<>(data);
List<MassageClubDetailVO> sl = CollectionCopyUtils.copyList(pageInfo.getList(), MassageClubDetailVO.class);
TableDataInfo<MassageClubDetailVO> result = new TableDataInfo<>();
result.setCode(0);
result.setTotal(pageInfo.getTotal());
result.setRows(sl);
return result;
}
}

28
mls-admin/src/main/java/com/mls/web/controller/bmb/massage/api/BusMassageSystemApiController.java

@ -1,11 +1,18 @@
package com.mls.web.controller.bmb.massage.api;
import com.github.pagehelper.PageInfo;
import com.mls.bmb.massage.domain.BusMassageClub;
import com.mls.bmb.massage.domain.BusMassageSystem;
import com.mls.bmb.massage.service.IBusMassageSystemService;
import com.mls.bmb.massage.vomain.MassageClubDetailVO;
import com.mls.bmb.massage.vomain.MassageSystemDetailVO;
import com.mls.common.core.controller.BaseMobileController;
import com.mls.common.core.domain.MobileResult;
import com.mls.common.core.page.TableDataInfo;
import com.mls.common.utils.CollectionCopyUtils;
import com.mls.common.utils.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
@ -43,4 +50,25 @@ public class BusMassageSystemApiController extends BaseMobileController {
return MobileResult.success(data);
}
/**
* 查询系统消息列表
*/
@ApiOperation("查询系统消息列表【查询系统消息用-分页】")
@PostMapping("/pages")
public TableDataInfo<MassageSystemDetailVO> listPage()
{
startPage();
BusMassageSystem busMassageSystem = new BusMassageSystem();
busMassageSystem.setUserId(getUserId());
List<BusMassageSystem> data = busMassageSystemService.selectBusMassageSystemList(busMassageSystem);
PageInfo<BusMassageSystem> pageInfo = new PageInfo<>(data);
List<MassageSystemDetailVO> sl = CollectionCopyUtils.copyList(pageInfo.getList(), MassageSystemDetailVO.class);
TableDataInfo<MassageSystemDetailVO> result = new TableDataInfo<>();
result.setCode(0);
result.setTotal(pageInfo.getTotal());
result.setRows(sl);
return result;
}
}

2
mls-admin/src/main/resources/templates/activity/busClassIcon/add.html

@ -47,7 +47,7 @@
fileIcon = new $TMap.FileInput({
el:'#icon-file',
suf:['jpg','png','gif','jpeg','icon','ico'],
suf:['jpg','png','bmp','gif','jpeg','icon','ico'],
maxCount:1,
url:ctx + 'common/minio/upload',
name:'file',

8
mls-admin/src/main/resources/templates/activity/busClassIcon/edit.html

@ -34,21 +34,19 @@
var prefix = ctx + "activity/busClassIcon";
$("#form-busClassIcon-edit").validate({focusCleanup: true});
var fileIcon = null;
$(function (){
//限制数组中ID的输入框只能输入0位小数的数字
$TMap.textInputFormatNumber(['sort'],0);
fileIcon = new $TMap.FileInput({
el:'#icon-file',
suf:['jpg','png','gif','jpeg','icon'],
suf:['jpg','png','bmp','gif','jpeg','icon','ico'],
maxCount:1,
url:ctx + 'common/upload',
url:ctx + 'common/minio/upload',
name:'file',
initData:[{url:$('#typeImg').val()}],
uploadCallback:function (data) {
var rdata = function (item){
return item.url || '';
return item || '';
};
$('#typeImg').val(data.map(rdata).join(','));
}

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

@ -192,10 +192,10 @@ public class BusClubActivityServiceImpl implements IBusClubActivityService
// 判断俱乐部是否审核通过
BusClubInfo clubInfo = busClubInfoMapper.selectBusClubInfoById(clubId.get());
if("0".equals(clubInfo.getIsVerify())){
returnStr.set("俱乐部未审核通过,不能发布活动");
returnStr.set("俱乐部未审核通过,不能操作");
}
}else{
returnStr.set("不是会长,副会长,管理员不能发布活动");
returnStr.set("不是会长,副会长,管理员不能操作");
}
return returnStr.get();
}

2
mls-bmb/src/main/java/com/mls/bmb/massage/service/impl/BusMassageSystemServiceImpl.java

@ -52,7 +52,7 @@ public class BusMassageSystemServiceImpl implements IBusMassageSystemService
@Override
public List<BusMassageSystem> selectBusMassageSystemList(BusMassageSystem busMassageSystem)
{
busMassageSystem.setRecordStatus("1");
// busMassageSystem.setRecordStatus("1");
return busMassageSystemMapper.selectBusMassageSystemList(busMassageSystem);
}

53
mls-bmb/src/main/resources/mapper/massage/BusMassageClubMapper.xml

@ -29,24 +29,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</sql>
<select id="selectBusMassageClubList" parameterType="BusMassageClub" resultMap="BusMassageClubResult">
<include refid="selectBusMassageClubAll"/>
SELECT
msg.massage_id,
msg.massage_name,
msg.massage_title,
msg.massage_content,
msg.club_id,
msg.member_id,
msg.user_id,
msg.record_status,
msg.REVISION,
msg.CREATED_BY,
msg.CREATED_TIME,
msg.UPDATED_BY,
msg.UPDATED_TIME,
msg.notes,
( SELECT user_photo FROM bus_user_info AS bus WHERE bus.user_id = msg.user_id ) user_photo,
( SELECT nickname FROM bus_user_info AS buss WHERE buss.user_id = msg.user_id ) member_name,
( SELECT club_name FROM bus_club_info AS busClub WHERE busClub.club_id = msg.club_id ) club_name
FROM
bus_massage_club msg
<where>
<if test="massageName != null and massageName != ''"> and massage_name like concat('%', #{massageName}, '%')</if>
<if test="massageTitle != null and massageTitle != ''"> and massage_title = #{massageTitle}</if>
<if test="massageContent != null and massageContent != ''"> and massage_content = #{massageContent}</if>
<if test="clubId != null and clubId != ''"> and club_id = #{clubId}</if>
<if test="clubName != null and clubName != ''"> and club_name like concat('%', #{clubName}, '%')</if>
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
<if test="memberName != null and memberName != ''"> and member_name like concat('%', #{memberName}, '%')</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="userPhoto != null and userPhoto != ''"> and user_photo = #{userPhoto}</if>
<if test="recordStatus != null and recordStatus != ''"> and record_status = #{recordStatus}</if>
<if test="revision != null "> and REVISION = #{revision}</if>
<if test="createdBy != null and createdBy != ''"> and CREATED_BY = #{createdBy}</if>
<if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and UPDATED_BY = #{updatedBy}</if>
<if test="updatedTime != null "> and UPDATED_TIME = #{updatedTime}</if>
<if test="notes != null and notes != ''"> and notes = #{notes}</if>
<if test="massageName != null and massageName != ''"> and msg.massage_name like concat('%', #{massageName}, '%')</if>
<if test="massageTitle != null and massageTitle != ''"> and msg.massage_title = #{massageTitle}</if>
<if test="massageContent != null and massageContent != ''"> and msg.massage_content = #{massageContent}</if>
<if test="clubId != null and clubId != ''"> and msg.club_id = #{clubId}</if>
<if test="clubName != null and clubName != ''"> and msg.club_name like concat('%', #{clubName}, '%')</if>
<if test="memberId != null and memberId != ''"> and msg.member_id = #{memberId}</if>
<if test="memberName != null and memberName != ''"> and msg.member_name like concat('%', #{memberName}, '%')</if>
<if test="userId != null and userId != ''"> and msg.user_id = #{userId}</if>
<if test="userPhoto != null and userPhoto != ''"> and msg.user_photo = #{userPhoto}</if>
<if test="recordStatus != null and recordStatus != ''"> and msg.record_status = #{recordStatus}</if>
<if test="revision != null "> and msg.REVISION = #{revision}</if>
<if test="createdBy != null and createdBy != ''"> and msg.CREATED_BY = #{createdBy}</if>
<if test="createdTime != null "> and msg.CREATED_TIME = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and msg.UPDATED_BY = #{updatedBy}</if>
<if test="updatedTime != null "> and msg.UPDATED_TIME = #{updatedTime}</if>
<if test="notes != null and notes != ''"> and msg.notes = #{notes}</if>
</where>
</select>

46
mls-bmb/src/main/resources/mapper/massage/BusMassageSystemMapper.xml

@ -26,21 +26,39 @@
</sql>
<select id="selectBusMassageSystemList" parameterType="BusMassageSystem" resultMap="BusMassageSystemResult">
<include refid="selectBusMassageSystemAll"/>
SELECT
msg.massage_id,
msg.massage_name,
msg.massage_title,
msg.massage_content,
msg.member_id,
msg.user_id,
msg.member_type,
msg.record_status,
msg.REVISION,
msg.CREATED_BY,
msg.CREATED_TIME,
msg.UPDATED_BY,
msg.UPDATED_TIME,
msg.notes,
( SELECT user_photo FROM bus_user_info AS bus WHERE bus.user_id = msg.user_id ) user_photo,
( SELECT nickname FROM bus_user_info AS buss WHERE buss.user_id = msg.user_id ) member_name
FROM
bus_massage_system msg
<where>
<if test="massageName != null and massageName != ''"> and massage_name like concat('%', #{massageName}, '%')</if>
<if test="massageTitle != null and massageTitle != ''"> and massage_title = #{massageTitle}</if>
<if test="massageContent != null and massageContent != ''"> and massage_content = #{massageContent}</if>
<if test="memberId != null and memberId != ''"> and member_id = #{memberId}</if>
<if test="userId != null and userId != ''"> and user_id = #{userId}</if>
<if test="memberType != null and memberType != ''"> and member_type = #{memberType}</if>
<if test="recordStatus != null and recordStatus != ''"> and record_status = #{recordStatus}</if>
<if test="revision != null "> and REVISION = #{revision}</if>
<if test="createdBy != null and createdBy != ''"> and CREATED_BY = #{createdBy}</if>
<if test="createdTime != null "> and CREATED_TIME = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and UPDATED_BY = #{updatedBy}</if>
<if test="updatedTime != null "> and UPDATED_TIME = #{updatedTime}</if>
<if test="notes != null and notes != ''"> and notes = #{notes}</if>
<if test="massageName != null and massageName != ''"> and msg.massage_name like concat('%', #{massageName}, '%')</if>
<if test="massageTitle != null and massageTitle != ''"> and msg.massage_title = #{massageTitle}</if>
<if test="massageContent != null and massageContent != ''"> and msg.massage_content = #{massageContent}</if>
<if test="memberId != null and memberId != ''"> and msg.member_id = #{memberId}</if>
<if test="userId != null and userId != ''"> and msg.user_id = #{userId}</if>
<if test="memberType != null and memberType != ''"> and msg.member_type = #{memberType}</if>
<if test="recordStatus != null and recordStatus != ''"> and msg.record_status = #{recordStatus}</if>
<if test="revision != null "> and msg.REVISION = #{revision}</if>
<if test="createdBy != null and createdBy != ''"> and msg.CREATED_BY = #{createdBy}</if>
<if test="createdTime != null "> and msg.CREATED_TIME = #{createdTime}</if>
<if test="updatedBy != null and updatedBy != ''"> and msg.UPDATED_BY = #{updatedBy}</if>
<if test="updatedTime != null "> and msg.UPDATED_TIME = #{updatedTime}</if>
<if test="notes != null and notes != ''"> and msg.notes = #{notes}</if>
</where>
order by CREATED_BY desc
</select>

Loading…
Cancel
Save