| | |
| | | @ApiModelProperty(value = "商品类型") |
| | | private HashSet<String> goodsTypeSet; |
| | | |
| | | |
| | | @ApiModelProperty(value = "商品调理问题") |
| | | private HashSet<String> goodsNurseSet; |
| | | } |
| | |
| | | @Data |
| | | public class MerEditUserDto extends MerBaseDto{ |
| | | |
| | | @ApiModelProperty(value = "修改类型1.昵称2.头像3.性别4.生日") |
| | | @ApiModelProperty(value = "修改类型1.昵称2.头像3.性别4.生日5.营业时间") |
| | | private Integer editType; |
| | | |
| | | @ApiModelProperty(value = "修改值 性别0=男,1=女,2=未知 生日YYYY-MM-DD ") |
| | | @ApiModelProperty(value = "修改值 性别0=男,1=女,2=未知 生日YYYY-MM-DD 营业时间HH:MM-HH:MM") |
| | | private String editValue; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName MgtClassNumDto |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/20 14:31 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class MgtClassNumDto { |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "增加的分类id") |
| | | private Long addClassId; |
| | | |
| | | @ApiModelProperty(value = "减少的分类id") |
| | | private Long subClassId; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName MgtShopStaffEditDto |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/19 18:59 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class MgtShopStaffEditDto { |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "员工姓名") |
| | | private String staffName; |
| | | |
| | | @ApiModelProperty(value = "员工电话") |
| | | private String staffMobile; |
| | | |
| | | @ApiModelProperty(value = "员工头像") |
| | | private String staffAvatar; |
| | | } |
| | | |
| | |
| | | @TableField("rel_goods_ids") |
| | | private String relGoodsIds; |
| | | |
| | | /** |
| | | * 优惠券来源1平台2商户 |
| | | */ |
| | | @TableField("coupon_from") |
| | | private Integer couponFrom; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
New file |
| | |
| | | package com.ruoyi.system.api.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @ClassName MerMemberCouponVo |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/19 17:31 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class MerMemberCouponVo { |
| | | |
| | | @ApiModelProperty(value = "优惠券id") |
| | | private String memberCouponId; |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | | private String goodsId; |
| | | |
| | | @ApiModelProperty(value="优惠券类型1.满减2.折扣3.代金4.商品") |
| | | private Integer couponType; |
| | | |
| | | @ApiModelProperty(value="优惠券名称") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value="门槛金额") |
| | | private BigDecimal moneyThreshold; |
| | | |
| | | @ApiModelProperty(value="折扣金额") |
| | | private BigDecimal discountMoney; |
| | | |
| | | @ApiModelProperty(value="折扣百分比") |
| | | private BigDecimal discountPercent; |
| | | |
| | | @ApiModelProperty(value="有效开始时间") |
| | | private Date validStartTime; |
| | | |
| | | @ApiModelProperty(value="使用有效期") |
| | | private Date deadlineTime; |
| | | } |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtUserIdByDept; |
| | | import com.ruoyi.system.api.domain.poji.config.Activeness; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | |
| | | return R.fail("获取其他设置失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R changeClassNum(MgtClassNumDto mgtClassNumDto) { |
| | | return R.fail("改变分类数量失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public R<List<SysTag>> listSysTag(Integer tagType) { |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.vo.AppMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerVerifyCouponGetVo; |
| | | import com.ruoyi.system.api.service.RemoteCouponService; |
| | |
| | | |
| | | |
| | | @Override |
| | | public R<List<AppMemberCouponVo>> listVoMemberCouponByUserId(Long userId) { |
| | | public R<List<AppMemberCouponVo>> listVoMemberCouponByUserId(MerBaseDto merBaseDto) { |
| | | return R.fail("获取优惠券列表失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | |
| | | package com.ruoyi.system.api.factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopIdByCodeDto; |
| | | import com.ruoyi.system.api.domain.dto.ShopTotalChangeDto; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.model.QwH5LoginVo; |
| | | import com.ruoyi.system.api.model.QwUserDetailDto; |
| | |
| | | public R<ShopRelUserVo> getShopByBelongUserId(Long userId) { |
| | | return R.fail("获取商户失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R editMgtShopStaff(MgtShopStaffEditDto mgtShopStaffEditDto) { |
| | | return R.fail("修改员工失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.api.factory; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.api.service.RemoteSysStaffService; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | |
| | | public Boolean isLeader() { |
| | | return null; |
| | | } |
| | | |
| | | @Override |
| | | public R editUserInfo(MerEditUserDto merEditUserDto) { |
| | | return R.fail("修改用户失败:" + throwable.getMessage()); } |
| | | }; |
| | | } |
| | | |
| | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtUserIdByDept; |
| | | import com.ruoyi.system.api.domain.poji.config.Activeness; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | |
| | | */ |
| | | @PostMapping("/config/getAppOtherConfigGetVo") |
| | | public R<AppOtherConfigGetVo> getAppOtherConfigGetVo(); |
| | | |
| | | /** |
| | | * @description 改变分类数量 |
| | | * @author jqs |
| | | * @date 2023/7/20 20:06 |
| | | * @param mgtClassNumDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/config/changeClassNum") |
| | | public R changeClassNum(@RequestBody MgtClassNumDto mgtClassNumDto); |
| | | } |
| | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.vo.AppMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerVerifyCouponGetVo; |
| | | import com.ruoyi.system.api.factory.RemoteCouponFallbackFactory; |
| | |
| | | * @return |
| | | */ |
| | | @PostMapping("/coupon/listVoMemberCouponByUserId") |
| | | public R<List<AppMemberCouponVo>> listVoMemberCouponByUserId(@RequestBody Long userId); |
| | | public R<List<AppMemberCouponVo>> listVoMemberCouponByUserId(@RequestBody MerBaseDto merBaseDto); |
| | | |
| | | /** |
| | | * @description 获取核销优惠券 |
| | |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopIdByCodeDto; |
| | | import com.ruoyi.system.api.domain.dto.ShopTotalChangeDto; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | | import com.ruoyi.system.api.factory.RemoteShopFallbackFactory; |
| | |
| | | |
| | | @PostMapping("/shop/getShopByBelongUserId") |
| | | public R<ShopRelUserVo> getShopByBelongUserId(@RequestBody Long userId); |
| | | |
| | | |
| | | /** |
| | | * @description 修改商户员工 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:02 |
| | | * @param mgtShopStaffEditDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/shop/editMgtShopStaff") |
| | | public R editMgtShopStaff(@RequestBody MgtShopStaffEditDto mgtShopStaffEditDto); |
| | | } |
| | |
| | | package com.ruoyi.system.api.service; |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.system.api.factory.RemoteUserFallbackFactory; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.api.factory.RemoteStaffFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | /** |
| | | * 用户服务 |
| | | * |
| | | * @author jqs |
| | | */ |
| | | @FeignClient(contextId = "remoteSysStaffService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) |
| | | @FeignClient(contextId = "remoteSysStaffService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteStaffFallbackFactory.class) |
| | | public interface RemoteSysStaffService |
| | | { |
| | | |
| | | @RequestMapping(value = "/staff/isLeader", method = RequestMethod.POST) |
| | | @PostMapping("/staff/isLeader") |
| | | public Boolean isLeader() ; |
| | | |
| | | /** |
| | | * @description 编辑商户员工 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:44 |
| | | * @param merEditUserDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/staff/editSysStaffInfo") |
| | | public R editUserInfo(@RequestBody MerEditUserDto merEditUserDto); |
| | | } |
| | |
| | | com.ruoyi.system.api.factory.RemoteShopFallbackFactory |
| | | com.ruoyi.system.api.factory.RemoteUserFallbackFactory |
| | | com.ruoyi.system.api.factory.RemoteMemberFallbackFactory |
| | | com.ruoyi.system.api.factory.RemoteStaffFallbackFactory |
| | |
| | | package com.ruoyi.goods.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtPageDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private Long goodsClassId; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | private String createTime; |
| | | private String createStartTime; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | private String createEndTime; |
| | | } |
| | |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.AppActivityGoodsPageDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import com.ruoyi.system.api.domain.poji.config.SysClassification; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | |
| | | Boolean newGoods = false; |
| | | String goodsId = mgtGoodsEditDto.getGoodsId(); |
| | | Goods goodsSame = this.getOne(new LambdaQueryWrapper<Goods>().eq(Goods::getDelFlag,0).eq(Goods::getGoodsName,mgtGoodsEditDto.getGoodsName())); |
| | | // 创建MgtClassNumDto对象 |
| | | MgtClassNumDto mgtClassNumDto = new MgtClassNumDto(); |
| | | // 判断是否有商品ID 没有则新建 |
| | | if (StringUtils.isNotBlank(goodsId)) { |
| | | if(goodsSame!=null&&!Objects.equals(goodsSame.getGoodsId(), goodsId)){ |
| | |
| | | } |
| | | //删除历史数据 |
| | | goodsFileService.deleteByGoodsId(goodsId); |
| | | // 如果类别ID不为空并且文章的类别ID不为空并且类别ID不同,则设置子类别ID和新增类别ID |
| | | if (mgtGoodsEditDto.getGoodsClassId() != null && goods.getGoodsClassId() != null |
| | | && !mgtGoodsEditDto.getGoodsClassId().equals(goods.getGoodsClassId())) { |
| | | mgtClassNumDto.setSubClassId(goods.getGoodsClassId()); |
| | | mgtClassNumDto.setAddClassId(mgtGoodsEditDto.getGoodsClassId()); |
| | | } |
| | | // 如果类别ID不为空并且文章的类别ID为空,则设置新增类别ID |
| | | else if (mgtGoodsEditDto.getGoodsClassId() != null && goods.getGoodsClassId() == null) { |
| | | mgtClassNumDto.setAddClassId(mgtGoodsEditDto.getGoodsClassId()); |
| | | } |
| | | } else { |
| | | if(goodsSame!=null){ |
| | | throw new ServiceException(AppErrorConstant.GOODS_DOUBLE); |
| | |
| | | goods.setCreateTime(new Date()); |
| | | goods.setCreateUserId(mgtGoodsEditDto.getUserId()); |
| | | newGoods = true; |
| | | mgtClassNumDto.setAddClassId(mgtGoodsEditDto.getGoodsClassId()); |
| | | } |
| | | goods.setUpdateTime(new Date()); |
| | | goods.setUpdateUserId(mgtGoodsEditDto.getUserId()); |
| | |
| | | goodsTotal.setBuyMoneyTotal(new BigDecimal("0.00")); |
| | | goodsTotalService.saveOrUpdate(goodsTotal); |
| | | } |
| | | //更新商品分类统计 |
| | | remoteConfigService.changeClassNum(mgtClassNumDto); |
| | | } |
| | | |
| | | /** |
| | |
| | | goods.setUpdateTime(new Date()); |
| | | goods.setUpdateUserId(userId); |
| | | this.saveOrUpdate(goods); |
| | | if(goods.getGoodsClassId()!=null){ |
| | | MgtClassNumDto mgtClassNumDto = new MgtClassNumDto(); |
| | | mgtClassNumDto.setSubClassId(goods.getGoodsClassId()); |
| | | //更新商品分类统计 |
| | | remoteConfigService.changeClassNum(mgtClassNumDto); |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | </resultMap> |
| | | |
| | | <sql id="selectGoodsVo"> |
| | | select goods_id, del_flag, goods_status, goods_type, create_time, create_user_id, update_time, update_user_id, goods_class_id, goods_name, cycle_num_flag, service_num, goods_introduction, sales_price, mininum_price, subscription_flag, subscription, goods_detail, recommend_flag, goods_nurses, goods_tags from t_goods |
| | | select goods_id, del_flag, goods_status, goods_type, create_time, create_user_id, update_time, update_user_id, goods_class_id, goods_name, cycle_num_flag, service_num, goods_introduction, sales_price, mininum_price, subscription_flag, subscription, goods_detail, recommend_flag, goods_nurses, goods_tags, goods_no from t_goods |
| | | </sql> |
| | | |
| | | <select id="selectGoodsList" parameterType="com.ruoyi.system.api.domain.poji.goods.Goods" resultMap="GoodsResult"> |
| | |
| | | </if> |
| | | <if test="param.sort != null and param.sort != ''"> |
| | | <choose> |
| | | <when test="param.sort==1"> |
| | | <when test="param.sort==2"> |
| | | ORDER BY salesPrice DESC,tg.create_time DESC |
| | | </when> |
| | | <when test="param.sort==2"> |
| | | <when test="param.sort==3"> |
| | | ORDER BY salesPrice ASC,tg.create_time DESC |
| | | </when> |
| | | <when test="param.sort==3"> |
| | | <when test="param.sort==4"> |
| | | ORDER BY tgt.buy_num_count ASC,tg.create_time DESC |
| | | </when> |
| | | <when test="param.sort==4"> |
| | | <when test="param.sort==5"> |
| | | ORDER BY tgt.buy_num_count DESC,tg.create_time DESC |
| | | </when> |
| | | <when test="param.sort==5"> |
| | | ORDER BY tg.create_time DESC |
| | | <when test="param.sort==2"> |
| | | ORDER BY tgt.buy_num_count,tg.create_time DESC |
| | | </when> |
| | | <otherwise> |
| | | ORDER BY tg.create_time DESC |
| | | ORDER BY tgt.buy_num_count,tg.create_time DESC |
| | | </otherwise> |
| | | </choose> |
| | | </if> |
| | |
| | | <if test="param.goodsClassId != null and param.goodsClassId != ''"> |
| | | AND tg.goods_class_id = #{param.goodsClassId} |
| | | </if> |
| | | <if test="param.createTime != null and param.createTime != ''"> |
| | | AND DATEDIFF(tg.create_time, #{param.createTime}) |
| | | <if test="param.createStartTime!=null and param.createStartTime!=''"> |
| | | AND tg.create_time >= #{param.createStartTime} |
| | | </if> |
| | | <if test="param.createEndTime!=null and param.createEndTime!=''"> |
| | | AND tg.create_time <= #{param.createEndTime} |
| | | </if> |
| | | <if test="param.goodsName != null and param.goodsName != ''"> |
| | | AND tg.goods_name LIKE CONCAT('%',#{param.goodsName},'%') |
| | |
| | | |
| | | <select id="getMgtGoodsTotal" resultType="com.ruoyi.goods.domain.vo.MgtGoodsTotalVo"> |
| | | SELECT |
| | | SUM(IFNULL(tgt.buy_num_count,0)) buyNumCount, |
| | | SUM(IFNULL(tgt.buy_money_total,0)) buyMoneyTotal |
| | | IFNULL(SUM(IFNULL(tgt.buy_num_count,0)),0) buyNumCount, |
| | | IFNULL(SUM(IFNULL(tgt.buy_money_total,0)),0) buyMoneyTotal |
| | | FROM t_goods_total tgt,t_goods tg |
| | | WHERE tg.goods_id = tgt.goods_id AND tg.del_flag = 0 |
| | | </select> |
| | |
| | | </update> |
| | | |
| | | <select id="listGoodsByGoodsId" resultType="com.ruoyi.system.api.domain.poji.goods.Goods"> |
| | | SELECT * FROM t_goods WHERE del_flag = 0 AND FIND_IN_SET(goods_id,#{goodsIds}) > 0 |
| | | select goods_id, del_flag, goods_status, goods_type, create_time, create_user_id, update_time, update_user_id, goods_class_id, goods_name, cycle_num_flag, service_num, goods_introduction, sales_price, mininum_price, subscription_flag, subscription, recommend_flag, goods_nurses, goods_tags, goods_no from t_goods FROM t_goods WHERE del_flag = 0 AND FIND_IN_SET(goods_id,#{goodsIds}) > 0 |
| | | </select> |
| | | |
| | | <select id="pageMgtSelectGoods" resultType="com.ruoyi.system.api.domain.vo.MgtSelectGoodsPageVo"> |
| | |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.member.domain.dto.MerCouponEditDto; |
| | | import com.ruoyi.member.domain.dto.MerCouponPageDto; |
| | | import com.ruoyi.member.domain.dto.MerGoodsCouponListDto; |
| | | import com.ruoyi.member.domain.dto.MgtCouponListDto; |
| | | import com.ruoyi.member.domain.vo.MerCouponGetVo; |
| | | import com.ruoyi.member.domain.vo.MerCouponPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtCouponSimpleListVo; |
| | | import com.ruoyi.member.service.coupon.CouponService; |
| | | import com.ruoyi.member.service.member.MemberCouponService; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.vo.MerMemberCouponVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | |
| | | @Resource |
| | | private CouponService couponService; |
| | | |
| | | @Resource |
| | | private MemberCouponService memberCouponService; |
| | | |
| | | |
| | | @RequestMapping(value = "/pagePlatformMerCoupon", method = RequestMethod.POST) |
| | | @ApiOperation(value = "商户分页获取平台优惠券列表") |
| | |
| | | List<MgtCouponSimpleListVo> mgtCouponSimpleListVoList = couponService.listMgtCouponSimpleVo(mgtCouponListDto); |
| | | return R.ok(mgtCouponSimpleListVoList); |
| | | } |
| | | |
| | | /** |
| | | * @description: 获取用户优惠券 |
| | | * @author jqs34 |
| | | * @date 2023/5/3 1:45 |
| | | * @version 1.0 |
| | | */ |
| | | @RequestMapping(value = "/listMerShopGoodsMemberCoupon", method = RequestMethod.POST) |
| | | @ApiOperation(value = "商户获取用户已领取优惠券") |
| | | public R<List<MerMemberCouponVo>> listMerShopGoodsMemberCoupon(@RequestBody MerGoodsCouponListDto merGoodsCouponListDto){ |
| | | List<MerMemberCouponVo> merMemberCouponVoList = memberCouponService.listMerShopGoodsMemberCoupon(merGoodsCouponListDto); |
| | | return R.ok(merMemberCouponVoList); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.member.service.coupon.CouponService; |
| | | import com.ruoyi.member.service.member.MemberCouponService; |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.vo.AppMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerVerifyCouponGetVo; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | |
| | | * @version 1.0 |
| | | */ |
| | | @PostMapping("/listVoMemberCouponByUserId") |
| | | public R<List<AppMemberCouponVo>> listVoMemberCouponByUserId(@RequestBody Long userId){ |
| | | List<AppMemberCouponVo> appMemberCouponVoList = memberCouponService.listVoMemberCouponByUserId(userId); |
| | | public R<List<AppMemberCouponVo>> listVoMemberCouponByUserId(@RequestBody MerBaseDto merBaseDto){ |
| | | List<AppMemberCouponVo> appMemberCouponVoList = memberCouponService.listVoMemberCouponByUserId(merBaseDto); |
| | | return R.ok(appMemberCouponVoList); |
| | | } |
| | | |
| | |
| | | public R signToday() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | IntegralChangeDto integralChangeDto = new IntegralChangeDto(); |
| | | integralChangeDto.setIntegralType(5); |
| | | integralChangeDto.setIntegralType(4); |
| | | integralChangeDto.setUserId(userId); |
| | | Boolean complete = memberService.changeIntegral(integralChangeDto); |
| | | if(complete){ |
New file |
| | |
| | | package com.ruoyi.member.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName MerGoodsCouponListDto |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/19 17:26 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class MerGoodsCouponListDto extends MerBaseDto { |
| | | |
| | | @ApiModelProperty(value = "会员用户id") |
| | | private Long memberUserId; |
| | | |
| | | @ApiModelProperty(value = "会员用户id") |
| | | private String goodsId; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.member.domain.dto.AppMemberCouponPageDto; |
| | | import com.ruoyi.member.domain.dto.MerGoodsCouponListDto; |
| | | import com.ruoyi.member.domain.vo.AppMemberCouponPageVo; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberCoupon; |
| | | import com.ruoyi.system.api.domain.vo.AppMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerMemberCouponVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | * @date 2023/5/3 1:47 |
| | | * @version 1.0 |
| | | */ |
| | | List<AppMemberCouponVo> listVoMemberCouponByUserId(@Param("userId") Long userId); |
| | | List<AppMemberCouponVo> listVoMemberCouponByUserId(@Param("param") MerBaseDto merBaseDto); |
| | | |
| | | /** |
| | | * @description 用户分页获取已领取优惠券列表 |
| | |
| | | void backMemberCoupon(@Param("memberCouponIds")String memberCouponIds); |
| | | |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/19 17:35 |
| | | * @param |
| | | * @return List<MerMemberCouponVo> |
| | | */ |
| | | List<MerMemberCouponVo> listMerShopGoodsMemberCoupon(MerGoodsCouponListDto merGoodsCouponListDto); |
| | | } |
| | |
| | | */ |
| | | public interface MemberTotalMapper extends BaseMapper<MemberTotal> { |
| | | |
| | | /** |
| | | * @description 重启积分标记 |
| | | * @author jqs |
| | | * @date 2023/7/20 15:31 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void initIntegralFlag(); |
| | | } |
| | |
| | | |
| | | import com.ruoyi.member.service.coupon.CouponService; |
| | | import com.ruoyi.member.service.member.MemberCouponService; |
| | | import com.ruoyi.member.service.member.MemberTotalService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | |
| | | @Resource |
| | | private MemberCouponService memberCouponService; |
| | | |
| | | @Resource |
| | | private MemberTotalService memberTotalService; |
| | | |
| | | /** |
| | | * 优惠券定时发送 |
| | | */ |
| | |
| | | /** |
| | | * 定时检查优惠券过期 |
| | | */ |
| | | @Scheduled(cron="2 0 * * * ?") |
| | | @Scheduled(cron="0 0 * * * ?") |
| | | private void timingCheckMemberCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时检查优惠券过期任务开始执行"); |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Scheduled(cron="3 0 * * * ?") |
| | | private void timinginitIntegralFlag(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时更新用户每日任务标记"); |
| | | memberTotalService.initIntegralFlag(); |
| | | } |
| | | } |
| | | } |
| | |
| | | memberCoupon.setValidStartTime(coupon.getValidStartTime()); |
| | | memberCoupon.setValidEndTime(coupon.getValidEndTime()); |
| | | memberCoupon.setValidDay(coupon.getValidDay()); |
| | | memberCoupon.setCouponFrom(coupon.getCouponFrom()); |
| | | memberCoupon.setReceiveTime(nowTime); |
| | | memberCoupon.setRelGoodsIds(coupon.getRelGoodsIds()); |
| | | //有效期处理1.时间段2.领取之日起 |
| | |
| | | memberCoupon.setValidStartTime(coupon.getValidStartTime()); |
| | | memberCoupon.setValidEndTime(coupon.getValidEndTime()); |
| | | memberCoupon.setValidDay(coupon.getValidDay()); |
| | | memberCoupon.setCouponFrom(coupon.getCouponFrom()); |
| | | memberCoupon.setReceiveTime(nowTime); |
| | | memberCoupon.setRelGoodsIds(coupon.getRelGoodsIds()); |
| | | //有效期处理1.时间段2.领取之日起 |
| | |
| | | memberCoupon.setValidStartTime(coupon.getValidStartTime()); |
| | | memberCoupon.setValidEndTime(coupon.getValidEndTime()); |
| | | memberCoupon.setValidDay(coupon.getValidDay()); |
| | | memberCoupon.setCouponFrom(coupon.getCouponFrom()); |
| | | memberCoupon.setReceiveTime(new Date()); |
| | | //有效期处理1.时间段2.领取之日起 |
| | | if(coupon.getValidTimeType()==1){ |
| | |
| | | memberCoupon.setValidStartTime(coupon.getValidStartTime()); |
| | | memberCoupon.setValidEndTime(coupon.getValidEndTime()); |
| | | memberCoupon.setValidDay(coupon.getValidDay()); |
| | | memberCoupon.setCouponFrom(coupon.getCouponFrom()); |
| | | memberCoupon.setReceiveTime(new Date()); |
| | | //有效期处理1.时间段2.领取之日起 |
| | | if(coupon.getValidTimeType()==1){ |
| | |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.member.domain.dto.AppMemberCouponPageDto; |
| | | import com.ruoyi.member.domain.dto.MerGoodsCouponListDto; |
| | | import com.ruoyi.member.domain.vo.AppMemberCouponPageVo; |
| | | import com.ruoyi.member.mapper.member.MemberCouponMapper; |
| | | import com.ruoyi.member.service.member.MemberCouponService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberCoupon; |
| | | import com.ruoyi.system.api.domain.vo.AppMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerVerifyCouponGetVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo; |
| | | import com.ruoyi.system.api.service.RemoteGoodsService; |
| | |
| | | * @version 1.0 |
| | | */ |
| | | @Override |
| | | public List<AppMemberCouponVo> listVoMemberCouponByUserId(Long userId){ |
| | | List<AppMemberCouponVo> appMemberCouponVoList = memberCouponMapper.listVoMemberCouponByUserId(userId); |
| | | public List<AppMemberCouponVo> listVoMemberCouponByUserId(MerBaseDto merBaseDto){ |
| | | List<AppMemberCouponVo> appMemberCouponVoList = memberCouponMapper.listVoMemberCouponByUserId(merBaseDto); |
| | | return appMemberCouponVoList; |
| | | } |
| | | |
| | |
| | | merVerifyCouponGetVo.setCouponFrom("平台"); |
| | | } |
| | | memberCoupon.setCouponStatus(2); |
| | | |
| | | memberCoupon.setUseTime(new Date()); |
| | | this.saveOrUpdate(memberCoupon); |
| | | merVerifyCouponGetVo.setMemberCoupon(memberCoupon); |
| | |
| | | public void backMemberCoupon(String memberCouponIds){ |
| | | memberCouponMapper.backMemberCoupon(memberCouponIds); |
| | | } |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/19 17:35 |
| | | * @param |
| | | * @return List<MerMemberCouponVo> |
| | | */ |
| | | @Override |
| | | public List<MerMemberCouponVo> listMerShopGoodsMemberCoupon(MerGoodsCouponListDto merGoodsCouponListDto){ |
| | | return memberCouponMapper.listMerShopGoodsMemberCoupon(merGoodsCouponListDto); |
| | | } |
| | | } |
| | |
| | | sysUser.setUserName(memberId); |
| | | sysUser.setUserType("03"); |
| | | sysUser.setNickName("鸿瑞堂用户"); |
| | | sysUser.setPhonenumber(mobile); |
| | | sysUser.setAvatar("https://hongruitang.oss-cn-beijing.aliyuncs.com/default.png"); |
| | | String password = "hongruitang"; |
| | | sysUser.setPassword(SecurityUtils.encryptPassword(password)); |
| | |
| | | */ |
| | | @Override |
| | | public void updateMemberGoodsType(AppMemberGoodsTypeDto appMemberGoodsTypeDto) { |
| | | // 根据用户ID获取会员信息 |
| | | Member member = this.getByUserId(appMemberGoodsTypeDto.getUserId()); |
| | | // 获取商品类型集合和商品护理集合 |
| | | HashSet<String> goodsTypeSet = appMemberGoodsTypeDto.getGoodsTypeSet(); |
| | | HashSet<String> goodsNurseSet = appMemberGoodsTypeDto.getGoodsNurseSet(); |
| | | // 如果会员存在 |
| | | if (member != null) { |
| | | String goodsType = member.getGoodsType(); |
| | | // 标识是否有变化 |
| | | Boolean change = false; |
| | | for (String str : goodsTypeSet) { |
| | | if (goodsType != null) { |
| | | if (!goodsType.contains(str)) { |
| | | goodsType = goodsType + "," + str; |
| | | // 更新商品类型 |
| | | if (goodsTypeSet != null && goodsTypeSet.size() > 0) { |
| | | String goodsType = member.getGoodsType(); |
| | | HashSet<String> goodsTypeOldSet = new HashSet<>(); |
| | | // 如果商品类型不为空 |
| | | if (StringUtils.isNotBlank(goodsType)) { |
| | | goodsTypeOldSet = new HashSet<>(Arrays.asList(goodsType.split(","))); |
| | | // 如果商品类型集合相等 |
| | | if (!goodsTypeSet.equals(goodsTypeOldSet)) { |
| | | change = true; |
| | | } |
| | | } else { |
| | | goodsType = str; |
| | | change = true; |
| | | } |
| | | goodsTypeOldSet.addAll(goodsTypeSet); |
| | | member.setGoodsType(String.join(",", goodsTypeOldSet)); |
| | | } |
| | | // 更新商品护理 |
| | | if (goodsNurseSet != null && goodsNurseSet.size() > 0) { |
| | | String memberNurse = member.getMemberNurse(); |
| | | HashSet<String> memberNurseOldSet = new HashSet<>(); |
| | | // 如果会员护理不为空 |
| | | if (StringUtils.isNotBlank(memberNurse)) { |
| | | memberNurseOldSet = new HashSet<>(Arrays.asList(memberNurse.split(","))); |
| | | // 如果商品护理集合相等 |
| | | if (!goodsNurseSet.equals(memberNurseOldSet)) { |
| | | change = true; |
| | | } |
| | | } else { |
| | | change = true; |
| | | } |
| | | memberNurseOldSet.addAll(goodsNurseSet); |
| | | member.setMemberNurse(String.join(",", memberNurseOldSet)); |
| | | } |
| | | // 如果有变化,则保存或更新会员信息 |
| | | if (change) { |
| | | member.setGoodsType(goodsType); |
| | | this.saveOrUpdate(member); |
| | | } |
| | | } |
| | |
| | | case 1: |
| | | changeIntegral = appOtherConfigGetVo.getShareIntegral(); |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setSurpIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("每日任务【分享小程序】获得积分"); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | |
| | | case 2: |
| | | changeIntegral = appOtherConfigGetVo.getSuggestPlatformIntegral(); |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setSurpIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("每日任务【提交平台建议】获得积分"); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | |
| | | case 3: |
| | | changeIntegral = appOtherConfigGetVo.getSuggestShopIntegral(); |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setSurpIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("每日任务【提交门店建议】获得积分"); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | |
| | | case 4: |
| | | changeIntegral = appOtherConfigGetVo.getSignInIntegral(); |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setSurpIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("每日任务【签到】获得积分"); |
| | | memberTotal.setTotalIntegral(memberTotal.getTotalIntegral()+changeIntegral); |
| | | memberTotal.setUseableIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | |
| | | break; |
| | | case 5: |
| | | integralRecord.setChangeIntegral(changeIntegral); |
| | | integralRecord.setSurpIntegral(integralRecord.getSurpIntegral()+changeIntegral); |
| | | integralRecord.setSurpIntegral(memberTotal.getUseableIntegral()+changeIntegral); |
| | | integralRecord.setChangeReason("订单【"+integralChangeDto.getOrderNo()+"】获得积分"); |
| | | integralRecord.setOrderId(integralChangeDto.getOrderId()); |
| | | integralRecord.setOrderNo(integralChangeDto.getOrderNo()); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.member.domain.pojo.member.MemberTotal; |
| | | import com.ruoyi.member.domain.vo.AppIntegralTaskListVo; |
| | | import com.ruoyi.member.mapper.member.MemberTotalMapper; |
| | | import com.ruoyi.member.service.member.MemberTotalService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class MemberTotalServiceImpl extends ServiceImpl<MemberTotalMapper, MemberTotal> implements MemberTotalService { |
| | | |
| | | @Resource |
| | | private MemberTotalMapper memberTotalMapper; |
| | | |
| | | |
| | | /** |
| | | * @description 重启积分标记 |
| | | * @author jqs |
| | | * @date 2023/7/20 15:31 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void initIntegralFlag(){ |
| | | memberTotalMapper.initIntegralFlag(); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.member.domain.dto.AppMemberCouponPageDto; |
| | | import com.ruoyi.member.domain.dto.MerGoodsCouponListDto; |
| | | import com.ruoyi.member.domain.vo.AppMemberCouponPageVo; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberCoupon; |
| | | import com.ruoyi.system.api.domain.vo.AppMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerMemberCouponVo; |
| | | import com.ruoyi.system.api.domain.vo.MerVerifyCouponGetVo; |
| | | |
| | | import java.util.List; |
| | |
| | | * @date 2023/5/3 1:47 |
| | | * @version 1.0 |
| | | */ |
| | | List<AppMemberCouponVo> listVoMemberCouponByUserId(Long userId); |
| | | List<AppMemberCouponVo> listVoMemberCouponByUserId(MerBaseDto merBaseDto); |
| | | |
| | | /** |
| | | * @description 核销优惠券 |
| | |
| | | * @return void |
| | | */ |
| | | void backMemberCoupon(String memberCouponIds); |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/7/19 17:35 |
| | | * @param |
| | | * @return List<MerMemberCouponVo> |
| | | */ |
| | | List<MerMemberCouponVo> listMerShopGoodsMemberCoupon(MerGoodsCouponListDto merGoodsCouponListDto); |
| | | } |
| | |
| | | public interface MemberTotalService extends IService<MemberTotal> { |
| | | |
| | | |
| | | /** |
| | | * @description 重启积分标记 |
| | | * @author jqs |
| | | * @date 2023/7/20 15:31 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void initIntegralFlag(); |
| | | } |
| | |
| | | tuc.deadline_time deadlineTime, |
| | | tuc.rel_goods_ids relGoodsIds |
| | | FROM t_member_coupon tuc |
| | | WHERE tuc.del_flag = 0 AND tuc.coupon_status = 1 AND tuc.user_id = #{userId} AND tuc.coupon_type IN (1,2,3) |
| | | WHERE tuc.del_flag = 0 AND tuc.coupon_status = 1 AND tuc.user_id = #{param.userId} AND (tuc.coupon_from = 1 OR (tuc.coupon_from = 2 AND tuc.shop_id = #{param.shopId})) AND tuc.coupon_type IN (1,2,3) |
| | | ORDER BY tuc.receive_time DESC |
| | | </select> |
| | | |
| | |
| | | WHERE del_flag = 0 AND coupon_status = 2 AND FIND_IN_SET(id, #{memberCouponIds}) > 0 |
| | | </update> |
| | | |
| | | <select id="listMerShopGoodsMemberCoupon" resultType="com.ruoyi.system.api.domain.vo.MerMemberCouponVo"> |
| | | SELECT |
| | | tuc.id memberCouponId, |
| | | tuc.coupon_type couponType, |
| | | tuc.coupon_name couponName, |
| | | tuc.money_threshold moneyThreshold, |
| | | tuc.discount_money discountMoney, |
| | | tuc.discount_percent discountPercent, |
| | | tuc.valid_start_time validStartTime, |
| | | tuc.deadline_time deadlineTime |
| | | FROM t_member_coupon tuc |
| | | WHERE tuc.del_flag = 0 AND tuc.coupon_status = 1 AND tuc.user_id = #{param.userId} AND tuc.coupon_type IN (1,2,3) |
| | | AND (tuc.coupon_from = 1 OR (tuc.coupon_from = 2 AND tuc.shop_id = #{param.shopId})) |
| | | AND (tuc.use_scope = 1 OR (tuc.use_scope = 2 AND FIND_IN_SET(#{param.goodsId}, rel_goods_ids) > 0)) |
| | | ORDER BY tuc.receive_time DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | <if test="param.suggestStatus!=null and param.suggestStatus!=''"> |
| | | AND tms.replay_flag = #{param.suggestStatus} |
| | | </if> |
| | | <if test="param.gender!=null and param.gender!=''"> |
| | | <if test="param.gender!=null"> |
| | | AND tm.gender = #{param.gender} |
| | | </if> |
| | | <if test="param.tags!=null and param.tags!=''"> |
| | | AND tm.suggest_tags REGEXP #{param.tags} |
| | | AND tms.suggest_tags REGEXP #{param.tags} |
| | | </if> |
| | | <if test="param.shopReplayStartTime!=null and param.shopReplayStartTime!=''"> |
| | | AND tms.shop_replay_time >= #{param.shopReplayStartTime} |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.member.mapper.member.MemberTotalMapper"> |
| | | |
| | | <update id="initIntegralFlag"> |
| | | UPDATE member_total SET share_flag = 0,pl_suggest_flag = 0,shop_suggest_flag = 0,sign_flag = 0,buy_flag = 0 |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | appPlaceOrderVo.setOrderNo(order.getOrderNo()); |
| | | appPlaceOrderVo.setPayMoney(order.getPayMoney()); |
| | | appPlaceOrderVo.setUnpaidMoney(order.getReceivableMoney().subtract(order.getPayMoney())); |
| | | orderService.payBack(order.getOrderId()); |
| | | return R.ok(appPlaceOrderVo); |
| | | } |
| | | |
| | |
| | | AppSureOrderGoodsVo appSureOrderGoodsVo; |
| | | // 获取购买商品列表 |
| | | List<AppBuyGoodsDto> appBuyGoodsDtoList = appSureOrderDto.getAppBuyGoodsDtoList(); |
| | | //获取商品列表 |
| | | StringJoiner goodsIdSJ = new StringJoiner(","); |
| | | for (AppBuyGoodsDto appBuyGoodsDto : appBuyGoodsDtoList) { |
| | | goodsIdSJ.add(appBuyGoodsDto.getGoodsId()); |
| | | } |
| | | List<Goods> goodsList = remoteGoodsService.listGoodsByGoodsId(goodsIdSJ.toString()).getData(); |
| | | Map<String, Goods> goodsMap = goodsList.stream() |
| | | .collect(Collectors.toMap(Goods::getGoodsId, Function.identity())); |
| | | Boolean haveDeposit = false; |
| | | for(Goods goods : goodsList){ |
| | | if(goods.getSubscription()!=null&&goods.getSubscription().compareTo(BigDecimal.ZERO)>0){ |
| | | haveDeposit = true; |
| | | } |
| | | } |
| | | String goodsId; |
| | | Integer buyNum; |
| | | BigDecimal buyNumBig; |
| | |
| | | BigDecimal goodsPrice; |
| | | BigDecimal goodsTotalPrice; |
| | | BigDecimal goodsRealPrice; |
| | | MerBaseDto merBaseDto = new MerBaseDto(); |
| | | merBaseDto.setUserId(userId); |
| | | merBaseDto.setShopId(appSureOrderDto.getShopId()); |
| | | // 获取用户优惠券列表 |
| | | List<AppMemberCouponVo> appMemberCouponVoList = remoteCouponService.listVoMemberCouponByUserId(userId).getData(); |
| | | List<AppMemberCouponVo> appMemberCouponVoList = remoteCouponService.listVoMemberCouponByUserId(merBaseDto).getData(); |
| | | // 初始化商品优惠券列表 |
| | | List<AppMemberCouponVo> appGoodsMemberCouponVoList; |
| | | // 将优惠券列表转换为Map,以优惠券ID为键 |
| | |
| | | buyNum = appBuyGoodsDto.getBuyNum(); |
| | | memberCouponId = appBuyGoodsDto.getMemberCouponId(); |
| | | // 获取商品信息 |
| | | goods = remoteGoodsService.getGoods(goodsId).getData(); |
| | | goods = goodsMap.get(goodsId); |
| | | if(goods.getGoodsStatus()!=1){ |
| | | throw new ServiceException(AppErrorConstant.GOODS_DOWN); |
| | | } |
| | |
| | | appSureOrderGoodsVo.setCouponDiscount(discountMoney); |
| | | appSureOrderGoodsVo.setGoodsRealPrice(goodsRealPrice); |
| | | goodsDeposit = goods.getSubscription(); |
| | | if (goodsDeposit == null) { |
| | | goodsDeposit = new BigDecimal("0.00"); |
| | | // 获取商品押金 |
| | | goodsDeposit = goods.getSubscription(); |
| | | if (goodsDeposit != null && goodsDeposit.compareTo(BigDecimal.ZERO)>0) { |
| | | goodsDeposit = goodsDeposit.multiply(buyNumBig); |
| | | }else{ |
| | | if(haveDeposit){ |
| | | goodsDeposit = goodsRealPrice; |
| | | }else{ |
| | | goodsDeposit = new BigDecimal("0.00"); |
| | | } |
| | | } |
| | | appSureOrderGoodsVo.setGoodsDeposit(goodsDeposit); |
| | | // 计算订单总金额 |
| | |
| | | appPanicBuyVo.setGoodsTotalPrice(goodsTotalPrice); |
| | | appPanicBuyVo.setGoodsRealPrice(goodsRealPrice); |
| | | goodsDeposit = activityGoodsGetVo.getActivitySubscription(); |
| | | if (goodsDeposit == null) { |
| | | if (goodsDeposit == null || goodsDeposit.compareTo(BigDecimal.ZERO)==0) { |
| | | goodsDeposit = new BigDecimal("0.00"); |
| | | }else{ |
| | | goodsDeposit = goodsDeposit.multiply(buyNumBig); |
| | | } |
| | | appPanicBuyVo.setGoodsDeposit(goodsDeposit); |
| | | orderGoodsMoney = orderGoodsMoney.add(goodsTotalPrice); |
| | |
| | | AppSureOrderGoodsVo appSureOrderGoodsVo; |
| | | // 获取购买的商品列表 |
| | | List<AppBuyGoodsDto> appBuyGoodsDtoList = appPlaceOrderDto.getAppBuyGoodsDtoList(); |
| | | StringJoiner goodsIdSJ = new StringJoiner(","); |
| | | for (AppBuyGoodsDto appBuyGoodsDto : appBuyGoodsDtoList) { |
| | | goodsIdSJ.add(appBuyGoodsDto.getGoodsId()); |
| | | } |
| | | //获取商品列表 |
| | | List<Goods> goodsList = remoteGoodsService.listGoodsByGoodsId(goodsIdSJ.toString()).getData(); |
| | | Map<String, Goods> goodsMap = goodsList.stream() |
| | | .collect(Collectors.toMap(Goods::getGoodsId, Function.identity())); |
| | | Boolean haveDeposit = false; |
| | | for(Goods goods : goodsList){ |
| | | if(goods.getSubscription()!=null&&goods.getSubscription().compareTo(BigDecimal.ZERO)>0){ |
| | | haveDeposit = true; |
| | | } |
| | | } |
| | | // 初始化变量 |
| | | String goodsId; |
| | | Integer buyNum; |
| | |
| | | BigDecimal goodsPrice; |
| | | BigDecimal goodsTotalPrice; |
| | | BigDecimal goodsRealPrice; |
| | | MerBaseDto merBaseDto = new MerBaseDto(); |
| | | merBaseDto.setUserId(userId); |
| | | merBaseDto.setShopId(appPlaceOrderDto.getShopId()); |
| | | // 获取用户优惠券列表 |
| | | List<AppMemberCouponVo> appMemberCouponVoList = remoteCouponService.listVoMemberCouponByUserId(userId).getData(); |
| | | List<AppMemberCouponVo> appMemberCouponVoList = remoteCouponService.listVoMemberCouponByUserId(merBaseDto).getData(); |
| | | // 将用户优惠券列表转换为Map,方便后续查找 |
| | | Map<String, AppMemberCouponVo> appMemberCouponVoMap = appMemberCouponVoList.stream().collect(Collectors.toMap(AppMemberCouponVo::getMemberCouponId, Function.identity())); |
| | | AppMemberCouponVo appMemberCouponVo; |
| | |
| | | goodsId = appBuyGoodsDto.getGoodsId(); |
| | | memberCouponId = appBuyGoodsDto.getMemberCouponId(); |
| | | // 获取商品信息 |
| | | goods = remoteGoodsService.getGoods(goodsId).getData(); |
| | | goods = goodsMap.get(goodsId); |
| | | // 设置商品信息 |
| | | appSureOrderGoodsVo.setGoodsId(goodsId); |
| | | appSureOrderGoodsVo.setGoodsName(goods.getGoodsName()); |
| | |
| | | appSureOrderGoodsVo.setGoodsRealPrice(goodsRealPrice); |
| | | // 获取商品押金 |
| | | goodsDeposit = goods.getSubscription(); |
| | | if (goodsDeposit == null) { |
| | | goodsDeposit = new BigDecimal("0.00"); |
| | | if (goodsDeposit != null && goodsDeposit.compareTo(BigDecimal.ZERO)>0) { |
| | | goodsDeposit = goodsDeposit.multiply(buyNumBig); |
| | | }else{ |
| | | if(haveDeposit){ |
| | | goodsDeposit = goodsRealPrice; |
| | | }else{ |
| | | goodsDeposit = new BigDecimal("0.00"); |
| | | } |
| | | } |
| | | appSureOrderGoodsVo.setGoodsDeposit(goodsDeposit); |
| | | // 计算商品总数量、商品总价、优惠总金额、支付押金、支付金额 |
| | |
| | | appPlaceOrderVo.setOrderId(orderId); |
| | | appPlaceOrderVo.setOrderNo(orderNo); |
| | | // 调用支付 |
| | | //使用优惠券 |
| | | //减去优惠券 |
| | | if(memberCouponSJ!=null){ |
| | | remoteCouponService.useMemberCoupon(memberCouponSJ.toString()); |
| | | } |
| | |
| | | String orderGoodsId; |
| | | // 创建商品类型集合 |
| | | HashSet<String> goodsTypeSet = new HashSet<>(); |
| | | HashSet<String> goodsNurseSet = new HashSet<>(); |
| | | // 创建商品订单对象,并设置商品ID,商品名称,商品介绍,商品类型 |
| | | appSureOrderGoodsVo = new AppSureOrderGoodsVo(); |
| | | useCoupon = 0; |
| | |
| | | appSureOrderGoodsVo.setGoodsRealPrice(goodsRealPrice); |
| | | // 获取商品押金 |
| | | goodsDeposit = activityGoodsGetVo.getActivitySubscription(); |
| | | if (goodsDeposit == null) { |
| | | if (goodsDeposit == null || goodsDeposit.compareTo(BigDecimal.ZERO)==0) { |
| | | goodsDeposit = new BigDecimal("0.00"); |
| | | }else{ |
| | | goodsDeposit = goodsDeposit.multiply(buyNumBig); |
| | | } |
| | | appSureOrderGoodsVo.setGoodsDeposit(goodsDeposit); |
| | | // 计算商品数量,订单商品金额,优惠券折扣,订单支付押金,订单支付金额 |
| | |
| | | } else if (goods.getGoodsType() == 4) { |
| | | goodsTypeSet.add("单品"); |
| | | } |
| | | String goodsNurse = goods.getGoodsNurses(); |
| | | if(StringUtils.isNotBlank(goodsNurse)){ |
| | | String[] goodsNurseArr = goodsNurse.split(","); |
| | | for(String str : goodsNurseArr){ |
| | | goodsNurseSet.add(str); |
| | | } |
| | | } |
| | | // 创建订单,并设置订单ID,删除标志,订单状态,订单号,订单来源,店铺ID,用户ID,订单金额,优惠券金额,折扣金额,应收金额,应收押金,变动应收金额,支付类型 |
| | | Order order = new Order(); |
| | | order.setOrderId(orderId); |
| | |
| | | // 保存订单 |
| | | this.save(order); |
| | | // 更新用户商品类型 |
| | | if (goodsTypeSet != null && goodsTypeSet.size() > 0) { |
| | | if (goodsTypeSet != null || goodsNurseSet!= null) { |
| | | AppMemberGoodsTypeDto appMemberGoodsTypeDto = new AppMemberGoodsTypeDto(); |
| | | appMemberGoodsTypeDto.setUserId(userId); |
| | | appMemberGoodsTypeDto.setGoodsTypeSet(goodsTypeSet); |
| | | appMemberGoodsTypeDto.setGoodsNurseSet(goodsNurseSet); |
| | | remoteMemberService.updateMemberGoodsType(appMemberGoodsTypeDto); |
| | | } |
| | | // 设置订单ID和订单号 |
| | |
| | | BigDecimal goodsRealPrice; |
| | | Long shopId = merNewOrderDto.getShopId(); |
| | | Shop shop = remoteShopService.getShop(shopId).getData(); |
| | | List<AppMemberCouponVo> appMemberCouponVoList = remoteCouponService.listVoMemberCouponByUserId(userId).getData(); |
| | | MerBaseDto merBaseDto = new MerBaseDto(); |
| | | merBaseDto.setUserId(userId); |
| | | merBaseDto.setShopId(shopId); |
| | | List<AppMemberCouponVo> appMemberCouponVoList = remoteCouponService.listVoMemberCouponByUserId(merBaseDto).getData(); |
| | | Map<String, AppMemberCouponVo> appMemberCouponVoMap = new HashMap<>(); |
| | | if (null != appMemberCouponVoList) { |
| | | appMemberCouponVoMap = appMemberCouponVoList.stream().collect(Collectors.toMap(AppMemberCouponVo::getMemberCouponId, Function.identity())); |
| | |
| | | } |
| | | |
| | | goodsDeposit = goods.getSubscription(); |
| | | if (goodsDeposit == null) { |
| | | if (goodsDeposit == null || goodsDeposit.compareTo(BigDecimal.ZERO)==0) { |
| | | goodsDeposit = new BigDecimal("0.00"); |
| | | }else{ |
| | | goodsDeposit = goodsDeposit.multiply(buyNumBig); |
| | | } |
| | | goodsNum = goodsNum + buyNum; |
| | | orderGoodsMoney = orderGoodsMoney.add(goodsTotalPrice); |
| | |
| | | SUM(CASE WHEN goods_type = 3 THEN service_num - used_num ELSE 0 END) experienceOrder, |
| | | SUM(CASE WHEN goods_type = 2 THEN service_num - used_num ELSE 0 END) serviceOrder |
| | | FROM t_consumer_goods tcg |
| | | WHERE tcg.del_flag = 0 AND tcg.user_id = #{param.memberUserId} AND tcg.shop_id = #{param.shopId} |
| | | WHERE tcg.del_flag = 0 AND tcg.user_id = #{userId} AND tcg.shop_id = #{shopId} |
| | | </select> |
| | | </mapper> |
| | |
| | | public R editShopStaffInfo(@RequestBody MerEditUserDto merEditUserDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | merEditUserDto.setUserId(userId); |
| | | shopStaffService.editShopStaffInfo(merEditUserDto); |
| | | if(merEditUserDto.getEditType()!=5){ |
| | | shopStaffService.editShopStaffInfo(merEditUserDto); |
| | | }else{ |
| | | Shop shop = shopService.getByShopId(merEditUserDto.getShopId()); |
| | | String editValue = merEditUserDto.getEditValue(); |
| | | String[] editArr = editValue.split("-"); |
| | | shop.setBusinessStartTime(editArr[0]); |
| | | shop.setBusinessEndTime(editArr[1]); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | import com.ruoyi.shop.service.task.MemberTaskService; |
| | | import com.ruoyi.shop.service.task.ShopTaskService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBasePlatformDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopIdByCodeDto; |
| | | import com.ruoyi.system.api.domain.dto.ShopTotalChangeDto; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.api.domain.vo.*; |
| | |
| | | return R.ok(marketingStatus); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @description 修改商户员工 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:02 |
| | | * @param mgtShopStaffEditDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/editMgtShopStaff") |
| | | public R editMgtShopStaff(@RequestBody MgtShopStaffEditDto mgtShopStaffEditDto) |
| | | { |
| | | shopStaffService.editMgtShopStaff(mgtShopStaffEditDto); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value="签约区域") |
| | | private String signAreaCode; |
| | | |
| | | @ApiModelProperty(value="签约区域全称") |
| | | private String signAreaName; |
| | | |
| | | @ApiModelProperty(value="商户服务电话") |
| | | private String shopServicePhone; |
| | | |
| | |
| | | @ApiModelProperty(value="下次任务内容") |
| | | private String nextTaskContent; |
| | | |
| | | @ApiModelProperty(value="跟踪类型") |
| | | private String customFollowType; |
| | | |
| | | @ApiModelProperty(value="紧急程度") |
| | | private String emergencyState; |
| | | } |
| | |
| | | * @return List<StaffShopTaskPageVo> |
| | | */ |
| | | List<StaffShopTaskPageVo> pageStaffShopTask(Page page, @Param("param")StaffShopTaskPageDto staffShopTaskPageDto); |
| | | |
| | | /** |
| | | * @description 更新商户任务 |
| | | * @author jqs |
| | | * @date 2023/7/20 15:53 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void checkShopTaskStatus(); |
| | | |
| | | /** |
| | | * @description 更新商户任务 |
| | | * @author jqs |
| | | * @date 2023/7/20 15:53 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void checkAgencyTaskStatus(); |
| | | |
| | | /** |
| | | * @description 更新商户任务 |
| | | * @author jqs |
| | | * @date 2023/7/20 15:53 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void checkMemberTaskStatus(); |
| | | } |
New file |
| | |
| | | package com.ruoyi.shop.scheduler; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.data.redis.core.StringRedisTemplate; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.net.Inet4Address; |
| | | import java.net.InetAddress; |
| | | import java.net.NetworkInterface; |
| | | import java.util.Enumeration; |
| | | |
| | | |
| | | @Component |
| | | public class SchedulerUtils { |
| | | |
| | | @Autowired |
| | | private StringRedisTemplate redisTemplate; |
| | | |
| | | public boolean getSchedulerRun() { |
| | | String localIpAddress = getLocalIpAddress(); |
| | | return true; |
| | | } |
| | | |
| | | public static String getLocalIpAddress() { |
| | | String localIpAddress = ""; |
| | | try { |
| | | Enumeration<NetworkInterface> allNetInterfaces = NetworkInterface.getNetworkInterfaces(); |
| | | InetAddress ip = null; |
| | | while (allNetInterfaces.hasMoreElements()) { |
| | | NetworkInterface netInterface = (NetworkInterface) allNetInterfaces.nextElement(); |
| | | if (netInterface.isLoopback() || netInterface.isVirtual() || !netInterface.isUp()) { |
| | | continue; |
| | | } else { |
| | | Enumeration<InetAddress> addresses = netInterface.getInetAddresses(); |
| | | while (addresses.hasMoreElements()) { |
| | | ip = addresses.nextElement(); |
| | | if (ip != null && ip instanceof Inet4Address) { |
| | | return ip.getHostAddress(); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return localIpAddress; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.shop.scheduler; |
| | | |
| | | |
| | | import com.ruoyi.shop.service.task.ShopTaskService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | |
| | | @Component |
| | | @Slf4j |
| | | public class ShopScheduler { |
| | | |
| | | |
| | | @Autowired |
| | | private SchedulerUtils schedulerUtils; |
| | | |
| | | @Resource |
| | | private ShopTaskService shopTaskService; |
| | | |
| | | |
| | | /** |
| | | * 定时检查跟进任务状态 |
| | | */ |
| | | @Scheduled(cron="5 0 * * * ?") |
| | | private void timingCheckMemberCoupon(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("定时检查跟进任务状态任务开始执行"); |
| | | shopTaskService.checkTaskDateStatus(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopStaff; |
| | | import com.ruoyi.shop.mapper.shop.ShopStaffMapper; |
| | | import com.ruoyi.shop.service.shop.ShopStaffService; |
| | | import com.ruoyi.system.api.domain.dto.AppEditUserDto; |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopStaffEditDto; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.MerStaffInfoVo; |
| | | import com.ruoyi.system.api.service.RemoteSysStaffService; |
| | | import com.ruoyi.system.api.service.RemoteUserService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private ShopStaffMapper shopStaffMapper; |
| | | |
| | | @Resource |
| | | private RemoteUserService remoteUserService; |
| | | |
| | | @Resource |
| | | private RemoteSysStaffService remoteSysStaffService; |
| | | |
| | | /** |
| | | * |
| | |
| | | break; |
| | | } |
| | | this.saveOrUpdate(shopStaff); |
| | | //同步修改系统用户表 |
| | | AppEditUserDto appEditUserDto = new AppEditUserDto(); |
| | | appEditUserDto.setEditType(merEditUserDto.getEditType()); |
| | | appEditUserDto.setEditValue(merEditUserDto.getEditValue()); |
| | | appEditUserDto.setUserId(merEditUserDto.getUserId()); |
| | | remoteUserService.editUserInfo(appEditUserDto); |
| | | //同步修改平台员工表 |
| | | remoteSysStaffService.editUserInfo(merEditUserDto); |
| | | } |
| | | |
| | | /** |
| | |
| | | public void clearShopStaffRelation(Long shopId){ |
| | | shopStaffMapper.clearShopStaffRelation(shopId); |
| | | } |
| | | |
| | | /** |
| | | * @description 修改商户员工信息 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:03 |
| | | * @param mgtShopStaffEditDto |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void editMgtShopStaff(MgtShopStaffEditDto mgtShopStaffEditDto){ |
| | | ShopStaff shopStaff = this.getByUserId(mgtShopStaffEditDto.getUserId()); |
| | | if(shopStaff!=null){ |
| | | if(StringUtils.isNotBlank(mgtShopStaffEditDto.getStaffName())){ |
| | | shopStaff.setStaffName(mgtShopStaffEditDto.getStaffName()); |
| | | } |
| | | if(StringUtils.isNotBlank(mgtShopStaffEditDto.getStaffMobile())){ |
| | | shopStaff.setStaffMobile(mgtShopStaffEditDto.getStaffMobile()); |
| | | } |
| | | if(StringUtils.isNotBlank(mgtShopStaffEditDto.getStaffAvatar())){ |
| | | shopStaff.setStaffAvatar(mgtShopStaffEditDto.getStaffAvatar()); |
| | | } |
| | | this.saveOrUpdate(shopStaff); |
| | | } |
| | | } |
| | | } |
| | |
| | | shopTaskRecord.setCallPhone(staffFollowShopTaskDto.getCallPhone()); |
| | | shopTaskRecord.setFollowContent(followPhoneDto.getFollowContent()); |
| | | shopTaskRecord.setCallTime(followPhoneDto.getCallTime()); |
| | | shopTaskRecord.setCreateTime(new Date()); |
| | | // 保存或更新会员任务记录 |
| | | shopTaskRecordService.saveOrUpdate(shopTaskRecord); |
| | | } |
| | |
| | | shopTaskRecord.setUserId(staffFollowShopTaskDto.getUserId()); |
| | | shopTaskRecord.setFollowType(staffFollowShopTaskDto.getFollowType()); |
| | | shopTaskRecord.setFollowContent(staffFollowShopTaskDto.getFollowContent()); |
| | | shopTaskRecord.setCustomFollowType(staffFollowShopTaskDto.getCustomFollowType()); |
| | | shopTaskRecord.setCreateTime(new Date()); |
| | | // 保存或更新会员任务记录 |
| | | shopTaskRecordService.saveOrUpdate(shopTaskRecord); |
| | |
| | | shopTask.setShopId(oldShopTask.getShopId()); |
| | | shopTask.setTaskDate(staffFollowShopTaskDto.getNextTaskDate()); |
| | | shopTask.setFollowContent(staffFollowShopTaskDto.getNextTaskContent()); |
| | | shopTask.setTaskStatus(2); |
| | | String nowTimeStr = DateUtils.getDate(); |
| | | int i = staffFollowShopTaskDto.getNextTaskDate().compareTo(nowTimeStr); |
| | | if(i>0){ |
| | | shopTask.setTaskStatus(0); |
| | | }else if(i==0){ |
| | | shopTask.setTaskStatus(1); |
| | | }else{ |
| | | shopTask.setTaskStatus(3); |
| | | } |
| | | shopTask.setEmergencyState(staffFollowShopTaskDto.getEmergencyState()); |
| | | shopTask.setCreateTime(new Date()); |
| | | this.saveOrUpdate(shopTask); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * @description 检查任务时间状态 |
| | | * @author jqs |
| | | * @date 2023/7/19 18:01 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void checkTaskDateStatus(){ |
| | | shopTaskMapper.checkShopTaskStatus(); |
| | | shopTaskMapper.checkAgencyTaskStatus(); |
| | | shopTaskMapper.checkMemberTaskStatus(); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopStaff; |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopStaffEditDto; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.MerStaffInfoVo; |
| | | |
| | |
| | | * @param shopId |
| | | */ |
| | | void clearShopStaffRelation(Long shopId); |
| | | |
| | | /** |
| | | * @description 修改商户员工信息 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:03 |
| | | * @param mgtShopStaffEditDto |
| | | * @return void |
| | | */ |
| | | void editMgtShopStaff(MgtShopStaffEditDto mgtShopStaffEditDto); |
| | | } |
| | |
| | | * @date 2023/7/16 11:56 |
| | | */ |
| | | void staffFollowShopTask(StaffFollowShopTaskDto staffFollowShopTaskDto); |
| | | |
| | | /** |
| | | * @description 检查任务时间状态 |
| | | * @author jqs |
| | | * @date 2023/7/19 18:01 |
| | | * @param |
| | | * @return void |
| | | */ |
| | | void checkTaskDateStatus(); |
| | | } |
| | |
| | | WHEN 0 THEN "冻结" |
| | | WHEN 1 THEN "正常" |
| | | WHEN 2 THEN "终止合作" |
| | | WHEN 3 THEN "进件中" |
| | | END shopStatus, |
| | | tsm.shop_marketing_total shopActivityCount, |
| | | ts.shop_custom_status shopCustomStatus, |
| | |
| | | AND tss.replay_flag = #{param.suggestStatus} |
| | | </if> |
| | | <if test="param.tags!=null and param.tags!=''"> |
| | | AND tm.suggest_tags REGEXP #{param.tags} |
| | | AND tss.suggest_tags REGEXP #{param.tags} |
| | | </if> |
| | | <if test="param.replayStartTime!=null and param.replayStartTime!=''"> |
| | | AND tss.replay_time >= #{param.replayStartTime} |
| | |
| | | ORDER BY tst.task_status ASC |
| | | </select> |
| | | |
| | | <update id="checkShopTaskStatus"> |
| | | UPDATE t_shop_task |
| | | SET task_status = CASE |
| | | WHEN task_date = CURDATE() THEN 1 |
| | | WHEN task_date < CURDATE() AND task_status < 2 THEN 3 |
| | | ELSE task_status |
| | | END |
| | | </update> |
| | | |
| | | <update id="checkMemberTaskStatus"> |
| | | UPDATE t_member_task |
| | | SET task_status = CASE |
| | | WHEN task_date = CURDATE() THEN 1 |
| | | WHEN task_date < CURDATE() AND task_status < 2 THEN 3 |
| | | ELSE task_status |
| | | END |
| | | </update> |
| | | |
| | | <update id="checkAgencyTaskStatus"> |
| | | UPDATE t_agency_task |
| | | SET task_status = CASE |
| | | WHEN task_date = CURDATE() THEN 1 |
| | | WHEN task_date < CURDATE() AND task_status < 2 THEN 3 |
| | | ELSE task_status |
| | | END |
| | | </update> |
| | | |
| | | </mapper> |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtUserIdByDept; |
| | | import com.ruoyi.system.api.domain.poji.config.Activeness; |
| | | import com.ruoyi.system.api.domain.poji.config.DelayTask; |
| | |
| | | |
| | | @Resource |
| | | private CustomConfigService customConfigService; |
| | | |
| | | |
| | | /** |
| | | * 获取系统标签 |
| | |
| | | return R.ok(appOtherConfigGetVo); |
| | | } |
| | | |
| | | /** |
| | | * @description 改变分类数量 |
| | | * @author jqs |
| | | * @date 2023/7/20 20:06 |
| | | * @param mgtClassNumDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/changeClassNum") |
| | | public R changeClassNum(@RequestBody MgtClassNumDto mgtClassNumDto) |
| | | { |
| | | sysClassificationService.changeClassNum(mgtClassNumDto); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.system.controller.conslole; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.domain.pojo.staff.SysStaff; |
| | | import com.ruoyi.system.service.staff.SysStaffService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private SysStaffService sysStaffService; |
| | | |
| | | @RequestMapping(value = "/isLeader", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取员工信息") |
| | | /** |
| | | * @description 判断员工是否领导 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:45 |
| | | * @param |
| | | * @return Boolean |
| | | */ |
| | | @PostMapping("/isLeader") |
| | | public Boolean isLeader() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | SysStaff sysStaff = sysStaffService.getByUserId(userId); |
| | |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * @description 编辑商户员工 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:44 |
| | | * @param merEditUserDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/editSysStaffInfo") |
| | | public R editUserInfo(@RequestBody MerEditUserDto merEditUserDto){ |
| | | sysStaffService.editSysStaffInfo(merEditUserDto); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.domain.vo.AppAdvertVo; |
| | | import com.ruoyi.system.domain.vo.AppBannerVo; |
| | | import com.ruoyi.system.domain.vo.AppPopVo; |
| | | import com.ruoyi.system.domain.vo.AppQuickEntryVo; |
| | | import com.ruoyi.system.service.config.AdvertService; |
| | | import com.ruoyi.system.service.config.BannerService; |
| | | import com.ruoyi.system.service.config.PopService; |
| | | import com.ruoyi.system.service.config.QuickEntryService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | private AdvertService advertService; |
| | | |
| | | |
| | | @Resource |
| | | private PopService popService; |
| | | |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/getHomeBanner", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取首页banner") |
| | |
| | | return R.ok(appAdvertVo); |
| | | } |
| | | |
| | | |
| | | @RequestMapping(value = "/getPop", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取弹窗") |
| | | public R<AppPopVo> getAppPop() { |
| | | AppPopVo appPopVo = popService.getAppPop(); |
| | | return R.ok(appPopVo); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | |
| | | private String linkUrl; |
| | | |
| | | /** |
| | | * 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂 |
| | | * 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖 |
| | | */ |
| | | @TableField("jump_type") |
| | | private Integer jumpType; |
| | |
| | | @TableField("link_url") |
| | | private String linkUrl; |
| | | /** |
| | | * 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂 |
| | | * 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖 |
| | | */ |
| | | @TableField("jump_type") |
| | | private Integer jumpType; |
| | |
| | | private Long createUserId; |
| | | |
| | | /** |
| | | * 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂 |
| | | * 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖 |
| | | */ |
| | | @TableField("jump_type") |
| | | private Integer jumpType; |
| | |
| | | private Long createUserId; |
| | | |
| | | /** |
| | | * 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂 |
| | | * 跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖 |
| | | */ |
| | | @TableField("jump_type") |
| | | private Integer jumpType; |
| | |
| | | */ |
| | | @TableField("recommended_phone") |
| | | private String recommendedPhone; |
| | | |
| | | @TableField("recommended_from") |
| | | private Integer recommendedFrom; |
| | | /** |
| | | * 备注 |
| | | */ |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
New file |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName AppPopVo |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/7/20 17:14 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class AppPopVo { |
| | | |
| | | @ApiModelProperty(value = "弹窗入口") |
| | | private Long popId; |
| | | |
| | | @ApiModelProperty(value = "弹窗图片地址") |
| | | private String popUrl; |
| | | |
| | | @ApiModelProperty(value = "对象类型1.外链2.内链3.无") |
| | | private Integer targetType; |
| | | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | | private String jumpId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | |
| | | @ApiModelProperty(value = "链接地址") |
| | | private String linkUrl; |
| | | |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂") |
| | | @ApiModelProperty(value = "跳转类型1.门店详情2.秒杀活动3领券中心4.商城列表5.关于洪瑞堂6.赚取积分7.建议有奖") |
| | | private Integer jumpType; |
| | | |
| | | @ApiModelProperty(value = "跳转id") |
| | |
| | | import org.springframework.data.redis.listener.RedisMessageListenerContainer; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Resource |
| | | private RemoteConfigService remoteConfigService; |
| | | |
| | | @Resource |
| | | private RemoteCouponService remoteCouponService; |
| | | |
| | | @Resource |
| | | private RemoteActivityService remoteActivityService; |
| | | |
| | | @Resource |
| | | private RemoteOrderService remoteOrderService; |
| | | |
| | | public RedisListener(RedisMessageListenerContainer listenerContainer, |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.domain.pojo.config.Pop; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.domain.vo.AppPopVo; |
| | | import com.ruoyi.system.domain.vo.MgtPopPageVo; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return List<MgtPopPageVo> |
| | | */ |
| | | List<MgtPopPageVo> pageMgtPop(Page page); |
| | | |
| | | /** |
| | | * @description 获取首页弹窗 |
| | | * @author jqs |
| | | * @date 2023/7/20 17:19 |
| | | * @param |
| | | * @return AppPopVo |
| | | */ |
| | | AppPopVo getAppPop(); |
| | | } |
| | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.domain.dto.MgtPopEditDto; |
| | | import com.ruoyi.system.domain.pojo.config.Pop; |
| | | import com.ruoyi.system.domain.vo.AppPopVo; |
| | | import com.ruoyi.system.domain.vo.MgtPopGetVo; |
| | | import com.ruoyi.system.domain.vo.MgtPopPageVo; |
| | | |
| | |
| | | * @return void |
| | | */ |
| | | void deleteMgtPop(MgtBaseGetDto mgtBaseGetDto); |
| | | |
| | | /** |
| | | * @description 获取首页弹窗 |
| | | * @author jqs |
| | | * @date 2023/7/20 17:19 |
| | | * @param |
| | | * @return AppPopVo |
| | | */ |
| | | AppPopVo getAppPop(); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | import com.ruoyi.system.api.domain.poji.config.SysClassification; |
| | | import com.ruoyi.system.domain.dto.MgtClassificationEditDto; |
| | | import com.ruoyi.system.domain.dto.MgtClassificationPageDto; |
| | |
| | | * @return List<AppClassListVo> |
| | | */ |
| | | List<AppClassListVo> listByType(Integer classType); |
| | | |
| | | /** |
| | | * @description 分类变化 |
| | | * @author jqs |
| | | * @date 2023/7/20 14:32 |
| | | * @param mgtClassNumDto |
| | | * @return void |
| | | */ |
| | | void changeClassNum(MgtClassNumDto mgtClassNumDto); |
| | | } |
| | |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | import com.ruoyi.system.domain.dto.MgtArticleEditDto; |
| | | import com.ruoyi.system.domain.dto.MgtArticlePageDto; |
| | | import com.ruoyi.system.domain.pojo.config.Article; |
| | |
| | | import com.ruoyi.system.domain.vo.MgtArticlePageVo; |
| | | import com.ruoyi.system.mapper.config.ArticleMapper; |
| | | import com.ruoyi.system.service.config.ArticleService; |
| | | import com.ruoyi.system.service.config.SysClassificationService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private ArticleMapper articleMapper; |
| | | |
| | | @Resource |
| | | private SysClassificationService sysClassificationService; |
| | | |
| | | /** |
| | | * @description 删除文章分类 |
| | |
| | | */ |
| | | @Override |
| | | public void editMgtArticle(MgtArticleEditDto mgtArticleEditDto){ |
| | | // 创建MgtClassNumDto对象 |
| | | MgtClassNumDto mgtClassNumDto = new MgtClassNumDto(); |
| | | // 创建Article对象 |
| | | Article article; |
| | | Article articleSame = this.getOne(new LambdaQueryWrapper<Article>().eq(Article::getDelFlag,0).eq(Article::getArticleTitle,mgtArticleEditDto.getArticleTitle()),false); |
| | | if(mgtArticleEditDto.getArticleId()!=null){ |
| | | if(articleSame!=null&&!articleSame.getArticleId().equals(mgtArticleEditDto.getArticleId())){ |
| | | // 根据文章标题查询文章是否存在 |
| | | Article articleSame = this.getOne(new LambdaQueryWrapper<Article>() |
| | | .eq(Article::getDelFlag, 0) |
| | | .eq(Article::getArticleTitle, mgtArticleEditDto.getArticleTitle()), false); |
| | | // 如果文章ID不为空 |
| | | if (mgtArticleEditDto.getArticleId() != null) { |
| | | // 如果存在相同标题的文章并且文章ID不同,则抛出异常 |
| | | if (articleSame != null && !articleSame.getArticleId().equals(mgtArticleEditDto.getArticleId())) { |
| | | throw new ServiceException(AppErrorConstant.ARTICLE_DOUBLE); |
| | | } |
| | | // 根据文章ID获取文章对象 |
| | | article = this.getById(mgtArticleEditDto.getArticleId()); |
| | | }else{ |
| | | if(articleSame!=null){ |
| | | // 如果类别ID不为空并且文章的类别ID不为空并且类别ID不同,则设置子类别ID和新增类别ID |
| | | if (mgtArticleEditDto.getClassId() != null && article.getClassId() != null |
| | | && !mgtArticleEditDto.getClassId().equals(article.getClassId())) { |
| | | mgtClassNumDto.setSubClassId(article.getClassId()); |
| | | mgtClassNumDto.setAddClassId(mgtArticleEditDto.getClassId()); |
| | | } |
| | | // 如果类别ID不为空并且文章的类别ID为空,则设置新增类别ID |
| | | else if (mgtArticleEditDto.getClassId() != null && article.getClassId() == null) { |
| | | mgtClassNumDto.setAddClassId(mgtArticleEditDto.getClassId()); |
| | | } |
| | | } |
| | | // 如果文章ID为空 |
| | | else { |
| | | // 如果存在相同标题的文章,则抛出异常 |
| | | if (articleSame != null) { |
| | | throw new ServiceException(AppErrorConstant.ARTICLE_DOUBLE); |
| | | } |
| | | // 创建新的文章对象 |
| | | article = new Article(); |
| | | article.setDelFlag(0); |
| | | article.setCreateTime(new Date()); |
| | | article.setCreateUserId(mgtArticleEditDto.getUserId()); |
| | | mgtClassNumDto.setAddClassId(mgtArticleEditDto.getClassId()); |
| | | } |
| | | // 设置文章的类别ID、排序、标题、简介、封面、视频、更新时间和更新用户ID |
| | | article.setClassId(mgtArticleEditDto.getClassId()); |
| | | article.setArticleSort(mgtArticleEditDto.getArticleSort()); |
| | | article.setArticleTitle(mgtArticleEditDto.getArticleTitle()); |
| | | article.setArticleIntroduce(mgtArticleEditDto.getArticleIntroduce()); |
| | | String articleDetail = mgtArticleEditDto.getArticleDetail(); |
| | | if(StringUtils.isNotBlank(articleDetail)){ |
| | | byte[] decodedBytes = Base64.getDecoder().decode(articleDetail); |
| | | articleDetail = new String(decodedBytes, StandardCharsets.UTF_8); |
| | | article.setArticleDetail(articleDetail); |
| | | } |
| | | article.setArticleCover(mgtArticleEditDto.getArticleCover()); |
| | | article.setArticleVideo(mgtArticleEditDto.getArticleVideo()); |
| | | article.setUpdateTime(new Date()); |
| | | article.setUpdateUserId(mgtArticleEditDto.getUserId()); |
| | | // 处理文章详情 |
| | | String articleDetail = mgtArticleEditDto.getArticleDetail(); |
| | | if (StringUtils.isNotBlank(articleDetail)) { |
| | | byte[] decodedBytes = Base64.getDecoder().decode(articleDetail); |
| | | articleDetail = new String(decodedBytes, StandardCharsets.UTF_8); |
| | | article.setArticleDetail(articleDetail); |
| | | } |
| | | // 保存或更新文章 |
| | | this.saveOrUpdate(article); |
| | | // 更新类别数量 |
| | | sysClassificationService.changeClassNum(mgtClassNumDto); |
| | | } |
| | | |
| | | |
| | |
| | | article.setUpdateTime(new Date()); |
| | | article.setUpdateUserId(mgtBaseGetDto.getUserId()); |
| | | this.saveOrUpdate(article); |
| | | if(article.getClassId()!=null){ |
| | | MgtClassNumDto mgtClassNumDto = new MgtClassNumDto(); |
| | | mgtClassNumDto.setSubClassId(article.getClassId()); |
| | | sysClassificationService.changeClassNum(mgtClassNumDto); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.system.service.impl.config; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.domain.dto.MgtBannerEditDto; |
| | |
| | | import com.ruoyi.system.domain.vo.MgtBannerPageVo; |
| | | import com.ruoyi.system.mapper.config.BannerMapper; |
| | | import com.ruoyi.system.service.config.BannerService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | } |
| | | // 将DTO中的属性值复制到横幅对象中 |
| | | BeanUtils.copyProperties(mgtBannerEditDto, banner); |
| | | if(banner.getTargetType()==1){ |
| | | banner.setJumpType(null); |
| | | banner.setJumpId(null); |
| | | banner.setLinkType(null); |
| | | }else if(banner.getTargetType()==2){ |
| | | if(banner.getLinkType()==1){ |
| | | banner.setJumpType(null); |
| | | banner.setJumpId(null); |
| | | }else{ |
| | | banner.setLinkUrl(null); |
| | | } |
| | | }else if(banner.getTargetType()==3){ |
| | | banner.setLinkUrl(null); |
| | | banner.setLinkType(null); |
| | | banner.setJumpType(null); |
| | | banner.setJumpId(null); |
| | | } |
| | | // 设置创建用户ID和创建时间 |
| | | banner.setCreateUserId(mgtBannerEditDto.getUserId()); |
| | | banner.setCreateTime(new Date()); |
| | |
| | | @Override |
| | | public MgtBannerGetVo getMgtBanner(Long bannerId){ |
| | | Banner banner = this.getById(bannerId); |
| | | if(banner.getTargetType()==1){ |
| | | banner.setJumpType(null); |
| | | banner.setJumpId(null); |
| | | banner.setLinkType(null); |
| | | }else if(banner.getTargetType()==2){ |
| | | if(banner.getLinkType()==1){ |
| | | banner.setJumpType(null); |
| | | banner.setJumpId(null); |
| | | }else{ |
| | | banner.setLinkUrl(null); |
| | | } |
| | | }else if(banner.getTargetType()==3){ |
| | | banner.setLinkUrl(null); |
| | | banner.setLinkType(null); |
| | | banner.setJumpType(null); |
| | | banner.setJumpId(null); |
| | | } |
| | | MgtBannerGetVo mgtBannerGetVo = new MgtBannerGetVo(); |
| | | BeanUtils.copyProperties(banner, mgtBannerGetVo); |
| | | return mgtBannerGetVo; |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | case "SHOP_FOLLOW_TYPE": |
| | | newValue = mgtShopConfigEditDto.getShopFollowType(); |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | case "SHOP_CUSTOM_STATUS": |
| | | newValue = mgtShopConfigEditDto.getShopCustomStatus(); |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | case "SHOP_SOURCE_CHANNEL": |
| | | newValue = mgtShopConfigEditDto.getShopSourceChannel(); |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | case "MEMBER_CHARACTER": |
| | | newValue = mgtMemberConfigEditDto.getMemberCharacter(); |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | case "MEMBER_LEVEL": |
| | | newValue = mgtMemberConfigEditDto.getMemberLevel(); |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | case "MEMBER_TYPE": |
| | | newValue = mgtMemberConfigEditDto.getMemberType(); |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | case "NURSE_PROBLEM": |
| | | newValue = mgtMemberConfigEditDto.getNurseProblem(); |
| | |
| | | customConfig.setUpdateTime(updateTime); |
| | | if(oldValue!=null&&!oldValue.isEmpty()){ |
| | | handleChangeConfig(oldValue, newValue, key); |
| | | updatedCustomConfigs.add(customConfig); |
| | | } |
| | | updatedCustomConfigs.add(customConfig); |
| | | break; |
| | | default: |
| | | break; |
| | |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.domain.dto.MgtPopEditDto; |
| | | import com.ruoyi.system.domain.pojo.config.Pop; |
| | | import com.ruoyi.system.domain.vo.AppPopVo; |
| | | import com.ruoyi.system.domain.vo.MgtPopGetVo; |
| | | import com.ruoyi.system.domain.vo.MgtPopPageVo; |
| | | import com.ruoyi.system.mapper.config.PopMapper; |
| | |
| | | } |
| | | // 将管理弹窗编辑DTO的属性复制到管理弹窗中 |
| | | BeanUtils.copyProperties(mgtPopEditDto, pop); |
| | | if(pop.getTargetType()==1){ |
| | | pop.setJumpType(null); |
| | | pop.setJumpId(null); |
| | | }else if(pop.getTargetType()==2){ |
| | | pop.setLinkUrl(null); |
| | | }else if(pop.getTargetType()==3){ |
| | | pop.setLinkUrl(null); |
| | | pop.setJumpType(null); |
| | | pop.setJumpId(null); |
| | | } |
| | | // 设置创建时间和创建者ID |
| | | pop.setCreateTime(new Date()); |
| | | pop.setCreateUserId(mgtPopEditDto.getPopId()); |
| | |
| | | @Override |
| | | public MgtPopGetVo getMgtPop(Long popId){ |
| | | Pop pop = this.getById(popId); |
| | | if(pop.getTargetType()==1){ |
| | | pop.setJumpType(null); |
| | | pop.setJumpId(null); |
| | | }else if(pop.getTargetType()==2){ |
| | | pop.setLinkUrl(null); |
| | | }else if(pop.getTargetType()==3){ |
| | | pop.setLinkUrl(null); |
| | | pop.setJumpType(null); |
| | | pop.setJumpId(null); |
| | | } |
| | | MgtPopGetVo mgtPopGetVo = new MgtPopGetVo(); |
| | | BeanUtils.copyProperties(pop, mgtPopGetVo); |
| | | return mgtPopGetVo; |
| | |
| | | pop.setDelFlag(1); |
| | | this.saveOrUpdate(pop); |
| | | } |
| | | |
| | | /** |
| | | * @description 获取首页弹窗 |
| | | * @author jqs |
| | | * @date 2023/7/20 17:19 |
| | | * @param |
| | | * @return AppPopVo |
| | | */ |
| | | @Override |
| | | public AppPopVo getAppPop(){ |
| | | return popMapper.getAppPop(); |
| | | } |
| | | } |
| | |
| | | } |
| | | // 将管理快速入口编辑DTO的属性复制到管理快速入口中 |
| | | BeanUtils.copyProperties(mgtQuickEntryEditDto, quickEntry); |
| | | if(quickEntry.getTargetType()==1){ |
| | | quickEntry.setJumpType(null); |
| | | quickEntry.setJumpId(null); |
| | | }else if(quickEntry.getTargetType()==2){ |
| | | quickEntry.setLinkUrl(null); |
| | | }else if(quickEntry.getTargetType()==3){ |
| | | quickEntry.setLinkUrl(null); |
| | | quickEntry.setJumpType(null); |
| | | quickEntry.setJumpId(null); |
| | | } |
| | | // 设置创建时间和创建者ID |
| | | quickEntry.setCreateTime(new Date()); |
| | | quickEntry.setCreateUserId(mgtQuickEntryEditDto.getEntryId()); |
| | |
| | | @Override |
| | | public MgtQuickEntryGetVo getMgtQuickEntry(Long quickEntryId){ |
| | | QuickEntry quickEntry = this.getById(quickEntryId); |
| | | if(quickEntry.getTargetType()==1){ |
| | | quickEntry.setJumpType(null); |
| | | quickEntry.setJumpId(null); |
| | | }else if(quickEntry.getTargetType()==2){ |
| | | quickEntry.setLinkUrl(null); |
| | | }else if(quickEntry.getTargetType()==3){ |
| | | quickEntry.setLinkUrl(null); |
| | | quickEntry.setJumpType(null); |
| | | quickEntry.setJumpId(null); |
| | | } |
| | | MgtQuickEntryGetVo mgtQuickEntryGetVo = new MgtQuickEntryGetVo(); |
| | | BeanUtils.copyProperties(quickEntry, mgtQuickEntryGetVo); |
| | | return mgtQuickEntryGetVo; |
| | |
| | | recommendCooperation.setShopId(merRecommendCooperationDto.getShopId()); |
| | | recommendCooperation.setCorpStatus(1); |
| | | recommendCooperation.setCreateTime(new Date()); |
| | | if(recommendCooperation.getShopId()!=null){ |
| | | recommendCooperation.setRecommendedFrom(2); |
| | | }else{ |
| | | recommendCooperation.setRecommendedFrom(1); |
| | | } |
| | | this.save(recommendCooperation); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | import com.ruoyi.system.api.domain.poji.config.SysClassification; |
| | | import com.ruoyi.system.api.service.RemoteGoodsService; |
| | | import com.ruoyi.system.domain.dto.MgtClassificationEditDto; |
| | |
| | | }).collect(Collectors.toList()); |
| | | return classListVos; |
| | | } |
| | | |
| | | /** |
| | | * @description 分类变化 |
| | | * @author jqs |
| | | * @date 2023/7/20 14:32 |
| | | * @param mgtClassNumDto |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void changeClassNum(MgtClassNumDto mgtClassNumDto){ |
| | | if(mgtClassNumDto.getAddClassId()!=null){ |
| | | SysClassification addSysClassification = this.getById(mgtClassNumDto.getAddClassId()); |
| | | if(addSysClassification!=null){ |
| | | addSysClassification.setRelationNum(addSysClassification.getRelationNum()+1); |
| | | this.saveOrUpdate(addSysClassification); |
| | | } |
| | | } |
| | | if(mgtClassNumDto.getSubClassId()!=null){ |
| | | SysClassification subSysClassification = this.getById(mgtClassNumDto.getAddClassId()); |
| | | if(subSysClassification!=null){ |
| | | subSysClassification.setRelationNum(subSysClassification.getRelationNum()-1); |
| | | this.saveOrUpdate(subSysClassification); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.constant.SecurityConstant; |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopStaffEditDto; |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.api.service.RemoteShopService; |
| | | import com.ruoyi.system.domain.dto.MgtStaffEditDto; |
| | | import com.ruoyi.system.domain.dto.MgtStaffPageDto; |
| | | import com.ruoyi.system.domain.pojo.staff.SysStaff; |
| | |
| | | |
| | | @Resource |
| | | private RedisService redisService; |
| | | |
| | | @Resource |
| | | private RemoteShopService remoteShopService; |
| | | |
| | | |
| | | /** |
| | |
| | | sysStaff.setStaffAvatar(mgtStaffEditDto.getStaffAvatar()); |
| | | sysStaff.setHeadFlag(mgtStaffEditDto.getHeadFlag()); |
| | | this.saveOrUpdate(sysStaff); |
| | | MgtShopStaffEditDto mgtShopStaffEditDto = new MgtShopStaffEditDto(); |
| | | mgtShopStaffEditDto.setUserId(sysStaff.getUserId()); |
| | | mgtShopStaffEditDto.setStaffName(sysStaff.getStaffName()); |
| | | mgtShopStaffEditDto.setStaffMobile(sysStaff.getStaffMobile()); |
| | | mgtShopStaffEditDto.setStaffAvatar(sysStaff.getStaffAvatar()); |
| | | remoteShopService.editMgtShopStaff(mgtShopStaffEditDto); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | return accessToken; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @description 编辑商户员工 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:42 |
| | | * @param merEditUserDto |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void editSysStaffInfo(MerEditUserDto merEditUserDto){ |
| | | SysStaff sysStaff = this.getByUserId(merEditUserDto.getUserId()); |
| | | Integer editType = merEditUserDto.getEditType(); |
| | | switch (editType){ |
| | | case 1: |
| | | sysStaff.setStaffName(merEditUserDto.getEditValue()); |
| | | break; |
| | | case 2: |
| | | sysStaff.setStaffAvatar(merEditUserDto.getEditValue()); |
| | | break; |
| | | case 3: |
| | | break; |
| | | case 4: |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | this.saveOrUpdate(sysStaff); |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.api.domain.vo.MgtSysSimpleUserVo; |
| | | import com.ruoyi.system.domain.dto.UserMenuEditDto; |
| | | import com.ruoyi.system.domain.pojo.staff.SysStaff; |
| | | import com.ruoyi.system.domain.pojo.sys.SysPost; |
| | | import com.ruoyi.system.domain.pojo.sys.SysUserMenu; |
| | | import com.ruoyi.system.domain.pojo.sys.SysUserPost; |
| | |
| | | @Resource |
| | | protected SysUserMenuMapper userMenuMapper; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据条件分页查询用户列表 |
| | | * |
| | |
| | | package com.ruoyi.system.service.staff; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.api.domain.dto.MerEditUserDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.domain.dto.MgtStaffEditDto; |
| | | import com.ruoyi.system.domain.dto.MgtStaffPageDto; |
| | |
| | | * @return void |
| | | */ |
| | | void synchronizeOrganizationalStructure(); |
| | | |
| | | |
| | | /** |
| | | * @description 编辑商户员工 |
| | | * @author jqs |
| | | * @date 2023/7/19 19:42 |
| | | * @param merEditUserDto |
| | | * @return void |
| | | */ |
| | | void editSysStaffInfo(MerEditUserDto merEditUserDto); |
| | | } |
| | |
| | | <result property="createUserId" column="create_user_id" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectBannerVo"> |
| | | <!--<sql id="selectBannerVo"> |
| | | select banner_id, del_flag, banner_position, banner_url, target_type, link_type, link_url, jump_type, jump_id, create_time, create_user_id from t_banner |
| | | </sql> |
| | | |
| | |
| | | <foreach item="bannerId" collection="array" open="(" separator="," close=")"> |
| | | #{bannerId} |
| | | </foreach> |
| | | </delete> |
| | | </delete>--> |
| | | |
| | | <select id="listHomeBannerVo" resultType="com.ruoyi.system.domain.vo.AppBannerVo"> |
| | | SELECT |
| | |
| | | WHERE del_flag = 0 |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | <select id="getAppPop" resultType="com.ruoyi.system.domain.vo.AppPopVo"> |
| | | SELECT |
| | | pop_id popId, |
| | | pop_url popUrl, |
| | | target_type targetType, |
| | | link_url linkUrl, |
| | | jump_type jumpType, |
| | | jump_id jumpId |
| | | FROM t_pop |
| | | WHERE del_flag = 0 AND CURDATE() BETWEEN show_start_time AND show_end_time |
| | | ORDER BY pop_sort,create_time DESC LIMIT 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | AND tss.replay_flag = #{param.suggestStatus} |
| | | </if> |
| | | <if test="param.tags!=null and param.tags!=''"> |
| | | AND tm.suggest_tags REGEXP #{param.tags} |
| | | AND tss.suggest_tags REGEXP #{param.tags} |
| | | </if> |
| | | <if test="param.replayStartTime!=null and param.replayStartTime!=''"> |
| | | AND tss.replay_time >= #{param.replayStartTime} |
| | |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="pageMerShopSuggest" resultType="com.ruoyi.system.domain.vo.StaffSuggestPageVo"> |
| | | <select id="pageStaffShopSuggest" resultType="com.ruoyi.system.domain.vo.StaffSuggestPageVo"> |
| | | SELECT |
| | | suggest_content suggestContent, |
| | | replay_content replayContent, |
| | |
| | | |
| | | <select id="selectMenuTreeAll" resultMap="SysMenuResult"> |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m where m.menu_type in ('M', 'C') and m.status = 0 AND menu_from = 1 |
| | | from sys_menu m where m.menu_type in ('M', 'C') and m.status = '0' AND menu_from = 1 |
| | | order by m.parent_id, m.order_num |
| | | </select> |
| | | |
| | |
| | | left join sys_role_menu rm on m.menu_id = rm.menu_id |
| | | left join sys_user_role ur on rm.role_id = ur.role_id |
| | | left join sys_role ro on ur.role_id = ro.role_id |
| | | where ur.user_id = #{params.userId} AND m.menu_from = 1 |
| | | where ur.user_id = #{params.userId} AND m.menu_from = 1 |
| | | <if test="menuName != null and menuName != ''"> |
| | | AND m.menu_name like concat('%', #{menuName}, '%') |
| | | </if> |
| | |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m |
| | | inner join sys_dept_menu rm on m.menu_id = rm.menu_id |
| | | where rm.dept_id = #{deptId} AND m.menu_from = 1 AND rm.menu_from = 1 |
| | | where rm.dept_id = #{deptId} AND m.menu_from = 1 AND rm.menu_from = 1 and m.status = '0' |
| | | order by m.parent_id, m.order_num |
| | | </select> |
| | | |
| | |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m |
| | | inner join sys_dept_menu rm on m.menu_id = rm.menu_id |
| | | where rm.dept_id = #{deptId} AND m.menu_from = 2 AND rm.menu_from = 2 |
| | | where rm.dept_id = #{deptId} AND m.menu_from = 2 AND rm.menu_from = 2 and m.status = '0' |
| | | order by m.parent_id, m.order_num |
| | | </select> |
| | | |
| | |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m |
| | | left join sys_user_menu rm on m.menu_id = rm.menu_id |
| | | where rm.user_id = #{params.userId} AND m.menu_from = 1 AND rm.menu = 1 |
| | | where rm.user_id = #{params.userId} AND m.menu_from = 1 AND rm.menu = 1 and m.status = '0' |
| | | <if test="menuName != null and menuName != ''"> |
| | | AND m.menu_name like concat('%', #{menuName}, '%') |
| | | </if> |
| | |
| | | select distinct m.menu_id, m.parent_id, m.menu_name, m.path, m.component, m.`query`, m.visible, m.status, ifnull(m.perms,'') as perms, m.is_frame, m.is_cache, m.menu_type, m.icon, m.order_num, m.create_time |
| | | from sys_menu m |
| | | left join sys_user_menu rm on m.menu_id = rm.menu_id |
| | | where rm.user_id = #{params.userId} AND rm.menu_from = 2 |
| | | where rm.user_id = #{params.userId} AND rm.menu_from = 2 and m.status = '0' |
| | | <if test="menuName != null and menuName != ''"> |
| | | AND m.menu_name like concat('%', #{menuName}, '%') |
| | | </if> |
| | |
| | | left join sys_user_role ur on rm.role_id = ur.role_id |
| | | left join sys_role ro on ur.role_id = ro.role_id |
| | | left join sys_user u on ur.user_id = u.user_id |
| | | where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = 0 AND ro.status = 0 AND menu_from = 1 |
| | | where u.user_id = #{userId} and m.menu_type in ('M', 'C') and m.status = '0' AND ro.status = 0 AND menu_from = 1 |
| | | order by m.parent_id, m.order_num |
| | | </select> |
| | | |
| | |
| | | select m.menu_id |
| | | from sys_menu m |
| | | left join sys_role_menu rm on m.menu_id = rm.menu_id |
| | | where rm.role_id = #{roleId} AND m.menu_from = 1 |
| | | where rm.role_id = #{roleId} AND m.menu_from = 1 and m.status = '0' |
| | | <if test="menuCheckStrictly"> |
| | | and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_role_menu rm on m.menu_id = rm.menu_id and rm.role_id = #{roleId}) |
| | | </if> |
| | |
| | | select m.menu_id |
| | | from sys_menu m |
| | | left join sys_dept_menu rm on m.menu_id = rm.menu_id |
| | | where rm.dept_id = #{deptId} AND m.menu_from = 1 AND rm.menu_from = 1 |
| | | where rm.dept_id = #{deptId} AND m.menu_from = 1 AND rm.menu_from = 1 and m.status = '0' |
| | | <if test="menuCheckStrictly"> |
| | | and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_dept_menu rm on m.menu_id = rm.menu_id and rm.dept_id = #{deptId}) |
| | | </if> |
| | |
| | | select m.menu_id |
| | | from sys_menu m |
| | | left join sys_dept_menu rm on m.menu_id = rm.menu_id |
| | | where rm.dept_id = #{deptId} AND m.menu_from = 2 AND rm.menu_from = 2 |
| | | where rm.dept_id = #{deptId} AND m.menu_from = 2 AND rm.menu_from = 2 and m.status = '0' |
| | | <if test="menuCheckStrictly"> |
| | | and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_dept_menu rm on m.menu_id = rm.menu_id and rm.dept_id = #{deptId}) |
| | | </if> |
| | |
| | | select m.menu_id |
| | | from sys_menu m |
| | | left join sys_user_menu rm on m.menu_id = rm.menu_id |
| | | where rm.user_id = #{deptUserId} AND m.menu_from = 1 AND rm.menu_from = 1 |
| | | where rm.user_id = #{deptUserId} AND m.menu_from = 1 AND rm.menu_from = 1 and m.status = '0' |
| | | <if test="menuCheckStrictly"> |
| | | and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_user_menu rm on m.menu_id = rm.menu_id and rm.user_id = #{deptUserId}) |
| | | </if> |
| | |
| | | select m.menu_id |
| | | from sys_menu m |
| | | left join sys_user_menu rm on m.menu_id = rm.menu_id |
| | | where rm.user_id = #{deptUserId} AND m.menu_from = 2 AND rm.menu_from = 2 |
| | | where rm.user_id = #{deptUserId} AND m.menu_from = 2 AND rm.menu_from = 2 and m.status = '0' |
| | | <if test="menuCheckStrictly"> |
| | | and m.menu_id not in (select m.parent_id from sys_menu m inner join sys_user_menu rm on m.menu_id = rm.menu_id and rm.user_id = #{deptUserId}) |
| | | </if> |
| | |
| | | from sys_menu m |
| | | left join sys_role_menu rm on m.menu_id = rm.menu_id |
| | | left join sys_user_role ur on rm.role_id = ur.role_id |
| | | where m.menu_from = 1 |
| | | where m.menu_from = 1 and m.status = '0' |
| | | </select> |
| | | |
| | | <select id="selectMenuPermsByUserId" parameterType="Long" resultType="String"> |
| | |
| | | select distinct m.perms |
| | | from sys_menu m |
| | | INNER join sys_user_menu rm on m.menu_id = rm.menu_id |
| | | where m.status = '0' and r.status = '0' and rm.user_id = #{userId} AND m.menu_from = 1 AND rm.menu_from = 1 |
| | | where m.status = '0' and rm.user_id = #{userId} AND m.menu_from = 1 AND rm.menu_from = 1 |
| | | </select> |
| | | |
| | | <select id="selectMenuPermsByRoleId" parameterType="Long" resultType="String"> |
| | |
| | | |
| | | <select id="selectUserByUserName" parameterType="String" resultMap="SysUserResult"> |
| | | <include refid="selectUserVo"/> |
| | | where u.user_name = #{userName} and u.del_flag = '0' |
| | | where u.user_name = #{userName} and u.del_flag = '0' and user_type = '00' |
| | | </select> |
| | | |
| | | <select id="selectUserById" parameterType="Long" resultMap="SysUserResult"> |
| | |
| | | <if test="createBy != null and createBy != ''">create_by,</if> |
| | | <if test="remark != null and remark != ''">remark,</if> |
| | | <if test="dataScope != null and dataScope != ''">data_scope,</if> |
| | | <if test="userType != null and userType != ''">user_type,</if> |
| | | create_time |
| | | )values( |
| | | <if test="userId != null and userId != ''">#{userId},</if> |
| | |
| | | <if test="createBy != null and createBy != ''">#{createBy},</if> |
| | | <if test="remark != null and remark != ''">#{remark},</if> |
| | | <if test="dataScope != null and dataScope != ''">#{dataScope},</if> |
| | | <if test="userType != null and userType != ''">#{userType},</if> |
| | | sysdate() |
| | | ) |
| | | </insert> |
| | |
| | | </update> |
| | | |
| | | <delete id="deleteUserById" parameterType="Long"> |
| | | update sys_user set del_flag = '2',user_name CONCAT(user_name,":已删除") where user_id = #{userId} |
| | | update sys_user set del_flag = '2',user_name = CONCAT(user_name,":已删除") where user_id = #{userId} |
| | | </delete> |
| | | |
| | | <delete id="deleteUserByIds" parameterType="Long"> |
| | | update sys_user set del_flag = '2',user_name CONCAT(user_name,":已删除") where user_id in |
| | | update sys_user set del_flag = '2',user_name = CONCAT(user_name,":已删除") where user_id in |
| | | <foreach collection="array" item="userId" open="(" separator="," close=")"> |
| | | #{userId} |
| | | </foreach> |