26 文件已重命名
47个文件已修改
1个文件已删除
18个文件已添加
| | |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.factory.RemoteActivityFallbackFactory; |
| | | import com.ruoyi.system.api.factory.RemoteConfigFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | * @description: TODO |
| | | * @date 2023 2023/4/30 15:58 |
| | | */ |
| | | @FeignClient(contextId = "remoteConfigService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteActivityFallbackFactory.class) |
| | | @FeignClient(contextId = "remoteConfigService", value = ServiceNameConstants.SYSTEM_SERVICE,fallbackFactory = RemoteConfigFallbackFactory.class) |
| | | public interface RemoteConfigService { |
| | | |
| | | @PostMapping("/config/getSysTag") |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.vo.AppUserCouponVo; |
| | | import com.ruoyi.system.api.factory.RemoteMemberFallbackFactory; |
| | | import com.ruoyi.system.api.factory.RemoteUserFallbackFactory; |
| | | import com.ruoyi.system.api.model.AppMiniLoginDto; |
| | | import com.ruoyi.system.api.model.AppMiniLoginVo; |
| | |
| | | |
| | | import java.util.List; |
| | | |
| | | @FeignClient(contextId = "remoteMemberService", value = ServiceNameConstants.MEMBER_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) |
| | | @FeignClient(contextId = "remoteMemberService", value = ServiceNameConstants.MEMBER_SERVICE, fallbackFactory = RemoteMemberFallbackFactory.class) |
| | | public interface RemoteMemberService { |
| | | |
| | | @PostMapping("/member/getMember") |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import com.ruoyi.system.api.factory.RemoteOrderFallbackFactory; |
| | | import com.ruoyi.system.api.factory.RemoteUserFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | @FeignClient(contextId = "remoteOrderService", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) |
| | | @FeignClient(contextId = "remoteOrderService", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = RemoteOrderFallbackFactory.class) |
| | | public interface RemoteOrderService { |
| | | |
| | | @PostMapping("/order/getAppOrderTotal") |
| | | public R<AppOrderTotalVo> getAppOrderTotal(@RequestBody Long userId); |
| | | |
| | | @PostMapping("/order/getMerHomeTotal") |
| | | public R<MerHomeShopTotalVo> getMerHomeTotal(@RequestBody MerHomeShopTotalVo merHomeShopTotalVo); |
| | | |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.factory.RemoteShopFallbackFactory; |
| | | import com.ruoyi.system.api.factory.RemoteUserFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | @FeignClient(contextId = "remoteShopService", value = ServiceNameConstants.SHOP_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class) |
| | | @FeignClient(contextId = "remoteShopService", value = ServiceNameConstants.SHOP_SERVICE, fallbackFactory = RemoteShopFallbackFactory.class) |
| | | public interface RemoteShopService { |
| | | |
| | | @PostMapping("/shop/getShop") |
| | |
| | | String INTEGRAL_COUPON_ERROR = "积分不能和优惠券同时使用"; |
| | | |
| | | String ADDRESS_FAILED = "只能修改未支付订单地址"; |
| | | |
| | | String SALESPRICE_MIN = "设置价格不能低于最低限价"; |
| | | |
| | | String VERIFY_TYPE_MISS = "没有核销类型"; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName AppBaseDto |
| | | * @description: TODO |
| | | * @date 2023年04月19日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerBaseDto { |
| | | |
| | | @ApiModelProperty(value = "userId",hidden = true) |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName AppPageDto |
| | | * @description: TODO |
| | | * @date 2023年04月20日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerPageDto extends MerBaseDto{ |
| | | |
| | | @ApiModelProperty(name = "pagenum", value = "页码") |
| | | private Integer pageNum = 1; |
| | | |
| | | |
| | | @ApiModelProperty(name = "pagesize", value = "每页显示条数") |
| | | private Integer pageSize = 20; |
| | | |
| | | } |
| | |
| | | @TableField("update_user_id") |
| | | private Long updateUserId; |
| | | |
| | | /** |
| | | * 用户标签 |
| | | */ |
| | | @TableField("user_tags") |
| | | private String userTags; |
| | | |
| | | /** |
| | | * 用户头像 |
| | | */ |
| | | private String avatar; |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
File was renamed from ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/vo/MerHomeShopTotalVo.java |
| | |
| | | package com.ruoyi.system.domain.vo; |
| | | package com.ruoyi.system.api.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | |
| | | @ApiModelProperty("商户类型1.经销商2.代理商") |
| | | private Integer shopType; |
| | | |
| | | @ApiModelProperty(value = "今日到店") |
| | | private Integer todayShop; |
| | | |
| | |
| | | { |
| | | |
| | | @Override |
| | | public R<SysTag> getSysTag(@RequestBody Long sysTagId) { |
| | | public R<SysTag> getSysTag(Long sysTagId) { |
| | | return R.fail("获取系统标签失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | |
| | | import com.ruoyi.system.api.RemoteMemberService; |
| | | import com.ruoyi.system.api.RemoteOrderService; |
| | | import com.ruoyi.system.api.domain.vo.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | |
| | | public R<AppOrderTotalVo> getAppOrderTotal(Long userId) { |
| | | return R.fail("获取订单统计失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<MerHomeShopTotalVo> getMerHomeTotal(MerHomeShopTotalVo merHomeShopTotalVo) { |
| | | return R.fail("获取商户端统计失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | return R.ok(tokenService.createMiniToken(appMiniLoginVo)); |
| | | } |
| | | |
| | | @ApiOperation("商户端登录") |
| | | @PostMapping("shopLogin") |
| | | public R<?> shopLogin(@RequestBody AppMiniLoginDto appMiniLoginDto) |
| | | { |
| | | // 小程序用户登录 |
| | | AppMiniLoginVo appMiniLoginVo = sysLoginService.miniLogin(appMiniLoginDto); |
| | | // 获取登录token |
| | | return R.ok(tokenService.createMiniToken(appMiniLoginVo)); |
| | | } |
| | | |
| | | @DeleteMapping("logout") |
| | | public R<?> logout(HttpServletRequest request) |
| | | { |
| | |
| | | import com.ruoyi.common.security.annotation.EnableCustomConfig; |
| | | import com.ruoyi.common.security.annotation.EnableRyFeignClients; |
| | | import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.context.annotation.ComponentScans; |
| | | |
| | | /** |
| | | * 系统模块 |
| | |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | @SpringBootApplication |
| | | @ComponentScans(value = {@ComponentScan("com.ruoyi.system.api")}) |
| | | public class RuoYiMemberApplication |
| | | { |
| | | public static void main(String[] args) |
New file |
| | |
| | | package com.ruoyi.member.controller.business; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.member.domain.dto.MerMemberPageDto; |
| | | import com.ruoyi.member.domain.vo.AppUserInfoVo; |
| | | import com.ruoyi.member.domain.vo.MerMemberPageVo; |
| | | import com.ruoyi.member.service.member.MemberService; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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 java.util.List; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerMemberController |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Api(value = "商户端会员相关接口", tags = "商户端会员相关接口", description = "商户端会员相关接口") |
| | | @RestController |
| | | @RequestMapping("/mer/member") |
| | | public class MerMemberController { |
| | | |
| | | @Autowired |
| | | private MemberService memberService; |
| | | |
| | | @RequestMapping(value = "/pageMerMember", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取商户绑定会员列表") |
| | | public R<Page<MerMemberPageVo>> pageMerMember(@RequestBody MerMemberPageDto merMemberPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | Page<MerMemberPageVo> page = new Page<>(); |
| | | page.setSize(merMemberPageDto.getPageSize()); |
| | | page.setCurrent(merMemberPageDto.getPageNum()); |
| | | List<MerMemberPageVo> merMemberPageVoList = memberService.pageMerMember(page,merMemberPageDto); |
| | | return R.ok(page.setRecords(merMemberPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/getMerMemberInfo", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取会员信息") |
| | | public R<AppUserInfoVo> getAppUserInfo() { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | AppUserInfoVo appUserInfoVo = memberService.getAppUserInfo(userId); |
| | | return R.ok(appUserInfoVo); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.member.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerMemberPageDto |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerMemberPageDto extends MerPageDto { |
| | | |
| | | @ApiModelProperty(value = "关键词") |
| | | private String keyword; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerMemberInfoVo |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerMemberInfoVo { |
| | | |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "性别") |
| | | private String gender; |
| | | |
| | | @ApiModelProperty(value = "用户电话") |
| | | private String mobile; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerMemberPageVo |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerMemberPageVo { |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "用户头像") |
| | | private String avatar; |
| | | |
| | | @ApiModelProperty(value = "用户昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "性别") |
| | | private String gender; |
| | | |
| | | @ApiModelProperty(value = "用户电话") |
| | | private String mobile; |
| | | |
| | | @ApiModelProperty(value = "推荐人") |
| | | private String referrer; |
| | | |
| | | @ApiModelProperty(value = "推荐人数") |
| | | private Integer recommendNum; |
| | | |
| | | @ApiModelProperty(value = "剩余次数") |
| | | private Integer surpNum; |
| | | |
| | | @ApiModelProperty(value = "生日") |
| | | private String birthday; |
| | | |
| | | @ApiModelProperty(value = "用户标签") |
| | | private String userTags; |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.member.mapper.member; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.member.domain.dto.MerMemberPageDto; |
| | | import com.ruoyi.member.domain.vo.MerMemberPageVo; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @return |
| | | */ |
| | | Member getOneByMiniOpenid(@Param("miniOpenid")String miniOpenid); |
| | | |
| | | /** |
| | | * |
| | | * @param page |
| | | * @return |
| | | */ |
| | | List<MerMemberPageVo> pageMerMember(Page page,@Param("param")MerMemberPageDto merMemberPageDto); |
| | | } |
| | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaJscode2SessionResult; |
| | | import cn.binarywang.wx.miniapp.bean.WxMaPhoneNumberInfo; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.member.domain.dto.AppUserAuthorizeDto; |
| | | import com.ruoyi.member.domain.dto.MerMemberPageDto; |
| | | import com.ruoyi.member.domain.vo.AppUserAuthorizeVo; |
| | | import com.ruoyi.member.domain.vo.AppUserInfoVo; |
| | | import com.ruoyi.member.domain.vo.MerMemberPageVo; |
| | | import com.ruoyi.member.mapper.member.MemberMapper; |
| | | import com.ruoyi.member.service.member.MemberService; |
| | | import com.ruoyi.system.api.RemoteOrderService; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | |
| | | sysUser.setPhonenumber(mobile); |
| | | sysUserService.updateUserMobile(sysUser); |
| | | member.setMobile(mobile); |
| | | member.setRealName(sysUser.getNickName()); |
| | | this.saveOrUpdate(member); |
| | | appUserAuthorizeVo.setMobile(mobile); |
| | | appUserAuthorizeVo.setNickName(sysUser.getNickName()); |
| | |
| | | Member member = this.getByUserId(appEditUserDto.getUserId()); |
| | | switch (editType){ |
| | | case 1: |
| | | member.setRealName(editValue); |
| | | member.setUpdateTime(new Date()); |
| | | member.setUpdateUserId(appEditUserDto.getUserId()); |
| | | this.saveOrUpdate(member); |
| | | break; |
| | | case 2: |
| | | break; |
| | |
| | | default: |
| | | break; |
| | | } |
| | | sysUserService.editUserInfo(appEditUserDto); |
| | | } |
| | | |
| | | /** |
| | | * 分页获取会员信息 |
| | | * @param merMemberPageDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MerMemberPageVo> pageMerMember(Page page, MerMemberPageDto merMemberPageDto){ |
| | | List<MerMemberPageVo> merMemberPageVoList = memberMapper.pageMerMember(page,merMemberPageDto); |
| | | return merMemberPageVoList; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.member.service.member; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.member.domain.dto.MerMemberPageDto; |
| | | import com.ruoyi.member.domain.vo.AppUserAuthorizeVo; |
| | | import com.ruoyi.member.domain.vo.AppUserInfoVo; |
| | | import com.ruoyi.member.domain.vo.MerMemberPageVo; |
| | | import com.ruoyi.system.api.domain.dto.AppEditUserDto; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.model.AppMiniLoginDto; |
| | | import com.ruoyi.system.api.model.AppMiniLoginVo; |
| | | import com.ruoyi.member.domain.dto.AppUserAuthorizeDto; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @param appEditUserDto |
| | | */ |
| | | void editAppUserInfo(AppEditUserDto appEditUserDto); |
| | | |
| | | /** |
| | | * 分页获取会员信息 |
| | | * @param merMemberPageDto |
| | | * @return |
| | | */ |
| | | List<MerMemberPageVo> pageMerMember(Page page, MerMemberPageDto merMemberPageDto); |
| | | } |
| | |
| | | <result property="level" column="level" /> |
| | | <result property="birthday" column="birthday" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateUserId" column="update_user_id" /> |
| | | <result property="userTags" column="user_tags" /> |
| | | <result property="avatar" column="avatar" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectMemberVo"> |
| | | select user_id, del_flag, member_id, member_no, wx_openid, mini_openid, wx_unionid, relation_shop_id, real_name, mobile, gender, referrer, customer_source, level, birthday, create_time, update_time, update_user_id from t_member |
| | | select user_id, del_flag, member_id, member_no, wx_openid, mini_openid, wx_unionid, relation_shop_id, real_name, mobile, gender, referrer, customer_source, level, birthday, create_time, update_time, update_user_id, user_tags, avatar from t_member |
| | | </sql> |
| | | |
| | | <select id="selectMemberList" parameterType="com.ruoyi.system.api.domain.poji.member.Member" resultMap="MemberResult"> |
| | |
| | | <if test="level != null">level,</if> |
| | | <if test="birthday != null">birthday,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateime != null">update_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="updateUserId != null">update_user_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="level != null">#{level},</if> |
| | | <if test="birthday != null">#{birthday},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateime != null">#{updateime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="updateUserId != null">#{updateUserId},</if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="level != null">level = #{level},</if> |
| | | <if test="birthday != null">birthday = #{birthday},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateime != null">update_time = #{updateime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateUserId != null">update_user_id = #{updateUserId},</if> |
| | | </trim> |
| | | where user_id = #{userId} |
| | |
| | | SELECT * FROM t_member WHERE mini_openid = #{miniOpenid} |
| | | </select> |
| | | |
| | | <select id="pageMerMember" resultType="com.ruoyi.member.domain.vo.MerMemberPageVo"> |
| | | SELECT |
| | | tm.user_id userId, |
| | | tm.real_name nickName, |
| | | tm.avatar avatar, |
| | | CASE tm.gender WHEN 0 THEN '男' WHEN 1 THEN '女' ELSE '未知' END gender, |
| | | tm.mobile mobile, |
| | | tm.referrer referrer, |
| | | 0 recommendNum, |
| | | 0 surpNum, |
| | | tm.birthday birthday, |
| | | tm.user_tags userTags |
| | | FROM t_member tm |
| | | WHERE tm.relationShopId = #{param.shopId} |
| | | <if test="param.keyword != null and param.keyword != ''"> |
| | | AND (tm.real_name LIKE CONCAT('%',#{param.keyword},'%') OR tm.mobile LIKE CONCAT('%',#{param.keyword},'%') OR tm.referrer LIKE CONCAT('%',#{param.keyword},'%')) |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.ruoyi.common.security.annotation.EnableCustomConfig; |
| | | import com.ruoyi.common.security.annotation.EnableRyFeignClients; |
| | | import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.context.annotation.ComponentScans; |
| | | |
| | | /** |
| | | * 系统模块 |
| | |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | @SpringBootApplication |
| | | @ComponentScans(value = {@ComponentScan("com.ruoyi.system.api")}) |
| | | public class RuoYiOrderApplication |
| | | { |
| | | public static void main(String[] args) |
New file |
| | |
| | | package com.ruoyi.order.controller.business; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.domain.dto.AppConsumerPageDto; |
| | | import com.ruoyi.order.domain.dto.MerGoodsPageDto; |
| | | import com.ruoyi.order.domain.dto.MerShopGoodsEditDto; |
| | | import com.ruoyi.order.domain.vo.AppConsumerPageVo; |
| | | import com.ruoyi.order.domain.vo.MerGoodsPageVo; |
| | | import com.ruoyi.order.service.goods.GoodsService; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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 java.util.List; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerGoodsController |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Api(value = "商户端商品相关接口", tags = "商户端商品相关接口", description = "商户端商品相关接口") |
| | | @RestController |
| | | @RequestMapping("/mer/goods") |
| | | public class MerGoodsController { |
| | | |
| | | @Autowired |
| | | private GoodsService goodsService; |
| | | |
| | | @RequestMapping(value = "/pageMerShopGoods", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页获取商户商品列表") |
| | | public R<Page<MerGoodsPageVo>> pageMerShopGoods(@RequestBody MerGoodsPageDto merGoodsPageDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | Page<MerGoodsPageVo> page = new Page<>(); |
| | | page.setSize(merGoodsPageDto.getPageSize()); |
| | | page.setCurrent(merGoodsPageDto.getPageNum()); |
| | | List<MerGoodsPageVo> merGoodsPageVoList = goodsService.pageMerShopGoods(page,merGoodsPageDto); |
| | | return R.ok(page.setRecords(merGoodsPageVoList)); |
| | | } |
| | | |
| | | @RequestMapping(value = "/editMerShopGoods", method = RequestMethod.POST) |
| | | @ApiOperation(value = "编辑商户商品价格") |
| | | public R editMerShopGoods(@RequestBody MerShopGoodsEditDto merShopGoodsEditDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | goodsService.editMerShopGoods(merShopGoodsEditDto); |
| | | return R.ok(); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.controller.business; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.domain.dto.AppSureOrderDto; |
| | | import com.ruoyi.order.domain.dto.MerVerifyCodeDto; |
| | | import com.ruoyi.order.domain.dto.MerVerifyOrderDto; |
| | | import com.ruoyi.order.domain.vo.*; |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerOrderController |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Api(value = "商户端订单相关接口", tags = "商户端订单相关接口", description = "商户端订单相关接口") |
| | | @RestController |
| | | @RequestMapping("/mer/order") |
| | | public class MerOrderController { |
| | | |
| | | @Autowired |
| | | private OrderService orderService; |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/verifyCode", method = RequestMethod.POST) |
| | | @ApiOperation(value = "核销code") |
| | | public R<MerVerifyCodeVo> verifyCode(@RequestBody MerVerifyCodeDto merVerifyCodeDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | String verifyCode = merVerifyCodeDto.getVerifyCode(); |
| | | String[] verifyCodeArr = verifyCode.split("-"); |
| | | MerVerifyCodeVo merVerifyCodeVo = new MerVerifyCodeVo(); |
| | | Integer type = Integer.valueOf(verifyCodeArr[0]); |
| | | verifyCode = verifyCodeArr[1]; |
| | | merVerifyCodeVo.setVerifyType(type); |
| | | switch(type){ |
| | | case 1: |
| | | MerVerifyOrderVo merVerifyOrderVo = orderService.verifyOrder(verifyCode); |
| | | merVerifyCodeVo.setMerVerifyOrderVo(merVerifyOrderVo); |
| | | break; |
| | | case 2: |
| | | MerVerifyCouponVo merVerifyCouponVo = null; |
| | | merVerifyCodeVo.setMerVerifyCouponVo(merVerifyCouponVo); |
| | | break; |
| | | case 3: |
| | | MerVerifyAwardVo merVerifyAwardVo = null; |
| | | merVerifyCodeVo.setMerVerifyAwardVo(merVerifyAwardVo); |
| | | break; |
| | | default: |
| | | throw new ServiceException(AppErrorConstant.VERIFY_TYPE_MISS); |
| | | } |
| | | return R.ok(merVerifyCodeVo); |
| | | } |
| | | |
| | | @RequestMapping(value = "/sureVerifyOrder", method = RequestMethod.POST) |
| | | @ApiOperation(value = "核销订单") |
| | | public R<MerVerifyOrderVo> sureVerifyOrder(@RequestBody MerVerifyOrderDto merVerifyOrderDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | MerVerifyOrderVo merVerifyOrderVo = orderService.sureVerifyOrder(merVerifyOrderDto); |
| | | return R.ok(merVerifyOrderVo); |
| | | } |
| | | |
| | | } |
| | |
| | | import com.ruoyi.common.security.annotation.InnerAuth; |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import com.ruoyi.system.api.domain.vo.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | AppOrderTotalVo appOrderTotalVo = orderService.getAppOrderTotal(userId); |
| | | return R.ok(appOrderTotalVo); |
| | | } |
| | | |
| | | @InnerAuth |
| | | @PostMapping("/getMerHomeTotal") |
| | | public R<MerHomeShopTotalVo> getMerHomeTotal(@RequestBody MerHomeShopTotalVo merHomeShopTotalVo){ |
| | | merHomeShopTotalVo = orderService.getMerHomeTotal(merHomeShopTotalVo); |
| | | return R.ok(merHomeShopTotalVo); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerGoodsPageDto |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerGoodsPageDto extends MerPageDto { |
| | | |
| | | @ApiModelProperty(value = "商品类型1周期2服务3体验4单品") |
| | | private Integer goodsType; |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerShopGoodsEditDto |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerShopGoodsEditDto extends MerBaseDto { |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | | private Long goodsId; |
| | | |
| | | @ApiModelProperty(value = "售价") |
| | | private BigDecimal salePrice; |
| | | |
| | | @ApiModelProperty(value = "服务次数") |
| | | private Integer serviceNum; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerVerifyCodeDto |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerVerifyCodeDto extends MerBaseDto { |
| | | |
| | | @ApiModelProperty(value = "核销码") |
| | | private String verifyCode; |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.dto; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerVerifyCodeDto |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerVerifyOrderDto extends MerBaseDto { |
| | | |
| | | @ApiModelProperty(value = "订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty(value = "实收金额") |
| | | private BigDecimal relReceiveMoney; |
| | | } |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | @Data |
| | | public class AppUserOrderGoodsPageVo { |
| | | |
| | | @ApiModelProperty("订单商品id") |
| | | private String orderGoodsId; |
| | | |
| | | @ApiModelProperty("商品id") |
| | | private String goodsId; |
| | |
| | | @ApiModelProperty(value = "商品实际价格") |
| | | private BigDecimal goodsRealPrice; |
| | | |
| | | @ApiModelProperty("周期标记") |
| | | private Integer cycleNumFlag; |
| | | |
| | | @ApiModelProperty("服务次数") |
| | | private Integer serviceNum; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerGoodsPageVo |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerGoodsPageVo { |
| | | |
| | | @ApiModelProperty(value = "商品id") |
| | | private Long goodsId; |
| | | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value = "商品简介") |
| | | private String goodsIntroduction; |
| | | |
| | | @ApiModelProperty(value = "商品标签") |
| | | private String goodsTag; |
| | | |
| | | @ApiModelProperty(value = "商品图片") |
| | | private String goodsPicture; |
| | | |
| | | @ApiModelProperty(value = "商品类型1周期2服务3体验4单品") |
| | | private Integer goodsType; |
| | | |
| | | @ApiModelProperty(value = "商品调理问题") |
| | | private BigDecimal goodsNurses; |
| | | |
| | | @ApiModelProperty(value = "商品建议售价") |
| | | private BigDecimal suggestSalesPrice;; |
| | | |
| | | @ApiModelProperty(value = "商品售价") |
| | | private BigDecimal salesPrice;; |
| | | |
| | | @ApiModelProperty("周期次数标记0否1是") |
| | | private Integer cycleNumFlag; |
| | | |
| | | @ApiModelProperty(value = "商品默认服务次数") |
| | | private Integer defaultServiceNum;; |
| | | |
| | | @ApiModelProperty(value = "服务次数") |
| | | private Integer serviceNum;; |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerVerifyAwardVo |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerVerifyAwardVo { |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerVerifyCodeDto |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerVerifyCodeVo{ |
| | | |
| | | @ApiModelProperty(value = "核销类型1订单2优惠券3奖品") |
| | | private Integer verifyType; |
| | | |
| | | @ApiModelProperty(value = "核销订单信息") |
| | | private MerVerifyOrderVo merVerifyOrderVo; |
| | | |
| | | @ApiModelProperty(value = "核销优惠券信息") |
| | | private MerVerifyCouponVo merVerifyCouponVo; |
| | | |
| | | @ApiModelProperty(value = "核销奖品信息") |
| | | private MerVerifyAwardVo merVerifyAwardVo; |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerVerifyCouponVo |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerVerifyCouponVo { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName MerVerifyOrderVo |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Data |
| | | public class MerVerifyOrderVo { |
| | | |
| | | @ApiModelProperty(value = "订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "订单状态0.已取消1.待支付2.待核销3.已完成") |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty("订单来源1.商城2.秒杀活动3.线下创建") |
| | | private Integer orderFrom; |
| | | |
| | | @ApiModelProperty(value = "商品总价") |
| | | private BigDecimal orderGoodsMoney; |
| | | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty("应收金额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty("应收订金") |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty("订单商品列表") |
| | | private List<AppUserOrderGoodsPageVo> appUserOrderGoodsPageVoList; |
| | | |
| | | @ApiModelProperty("订单支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty("创建时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("支付时间") |
| | | private Date payTime; |
| | | |
| | | @ApiModelProperty("核销时间") |
| | | private Date useTime; |
| | | |
| | | @ApiModelProperty("订单备注") |
| | | private String orderRemark; |
| | | |
| | | @ApiModelProperty(value = "用户姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value = "用户电话") |
| | | private String userMobile; |
| | | } |
| | |
| | | package com.ruoyi.order.mapper.goods; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.order.domain.dto.MerGoodsPageDto; |
| | | import com.ruoyi.order.domain.vo.AppSimpleActivityGoodsVo; |
| | | import com.ruoyi.order.domain.vo.AppSimpleGoodsVo; |
| | | import com.ruoyi.order.domain.dto.AppSearchGoodsPageDto; |
| | | import com.ruoyi.order.domain.dto.AppShopGoodsPageDto; |
| | | import com.ruoyi.order.domain.pojo.goods.Goods; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.domain.vo.MerGoodsPageVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | |
| | | */ |
| | | List<AppSimpleActivityGoodsVo> pageSearchActivityGoods(Page page, @Param("param")AppSearchGoodsPageDto appSearchGoodsPageDto); |
| | | |
| | | /** |
| | | * 分页商户商品列表 |
| | | * @param merGoodsPageDto |
| | | * @return |
| | | */ |
| | | List<MerGoodsPageVo> pageMerShopGoods(Page page, @Param("param")MerGoodsPageDto merGoodsPageDto); |
| | | } |
| | |
| | | package com.ruoyi.order.service.goods; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.order.domain.dto.*; |
| | | import com.ruoyi.order.domain.vo.AppGoodsInfoVo; |
| | | import com.ruoyi.order.domain.vo.AppSimpleActivityGoodsVo; |
| | | import com.ruoyi.order.domain.vo.AppSimpleGoodsVo; |
| | | import com.ruoyi.order.domain.dto.AppGoodsInfoGetDto; |
| | | import com.ruoyi.order.domain.dto.AppSearchGoodsPageDto; |
| | | import com.ruoyi.order.domain.dto.AppShopGoodsPageDto; |
| | | import com.ruoyi.order.domain.pojo.goods.Goods; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.order.domain.vo.MerGoodsPageVo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | AppGoodsInfoVo getGoodsInfo(AppGoodsInfoGetDto appGoodsInfoGetDto); |
| | | |
| | | /** |
| | | * 分页商户商品列表 |
| | | * @param merGoodsPageDto |
| | | * @return |
| | | */ |
| | | List<MerGoodsPageVo> pageMerShopGoods(Page page,MerGoodsPageDto merGoodsPageDto); |
| | | |
| | | /** |
| | | * 修改商户商品 |
| | | * @param merShopGoodsEditDto |
| | | */ |
| | | void editMerShopGoods(MerShopGoodsEditDto merShopGoodsEditDto); |
| | | } |
| | |
| | | public ActivityGoods getByGoodsId(String goodsId){ |
| | | LambdaQueryWrapper<ActivityGoods> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(ActivityGoods::getDelFlag, 0).eq(ActivityGoods::getGoodsId, goodsId); |
| | | ActivityGoods activityGoods = this.getOne(queryWrapper); |
| | | ActivityGoods activityGoods = this.getOne(queryWrapper,false); |
| | | return activityGoods; |
| | | } |
| | | } |
| | |
| | | public GoodsFile getGoodsPicture(String goodsId){ |
| | | LambdaQueryWrapper<GoodsFile> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(GoodsFile::getDelFlag, 0).eq(GoodsFile::getGoodsId, goodsId).eq(GoodsFile::getFileType,1); |
| | | GoodsFile goodsFile = this.getOne(queryWrapper); |
| | | GoodsFile goodsFile = this.getOne(queryWrapper,false); |
| | | return goodsFile; |
| | | } |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.order.domain.dto.AppGoodsInfoGetDto; |
| | | import com.ruoyi.order.domain.dto.AppSearchGoodsPageDto; |
| | | import com.ruoyi.order.domain.dto.AppShopGoodsPageDto; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | | import com.ruoyi.order.domain.dto.*; |
| | | import com.ruoyi.order.domain.pojo.goods.Goods; |
| | | import com.ruoyi.order.domain.pojo.goods.GoodsFile; |
| | | import com.ruoyi.order.domain.pojo.goods.ShopGoods; |
| | | import com.ruoyi.order.domain.vo.AppGoodsInfoVo; |
| | | import com.ruoyi.order.domain.vo.AppSimpleActivityGoodsVo; |
| | | import com.ruoyi.order.domain.vo.AppSimpleGoodsVo; |
| | | import com.ruoyi.order.domain.vo.MerGoodsPageVo; |
| | | import com.ruoyi.order.mapper.goods.GoodsMapper; |
| | | import com.ruoyi.order.service.activity.ActivityGoodsService; |
| | | import com.ruoyi.order.service.goods.GoodsFileService; |
| | | import com.ruoyi.order.service.goods.GoodsService; |
| | | import com.ruoyi.order.service.goods.ShopGoodsService; |
| | | import com.ruoyi.system.api.RemoteActivityService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.StringJoiner; |
| | | |
| | |
| | | } |
| | | return appGoodsInfoVo; |
| | | } |
| | | |
| | | /** |
| | | * 分页商户商品列表 |
| | | * @param merGoodsPageDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MerGoodsPageVo> pageMerShopGoods(Page page,MerGoodsPageDto merGoodsPageDto){ |
| | | List<MerGoodsPageVo> merGoodsPageVoList = goodsMapper.pageMerShopGoods(page,merGoodsPageDto); |
| | | return merGoodsPageVoList; |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 修改商户商品 |
| | | * @param merShopGoodsEditDto |
| | | */ |
| | | @Override |
| | | public void editMerShopGoods(MerShopGoodsEditDto merShopGoodsEditDto){ |
| | | Goods goods = this.getById(merShopGoodsEditDto.getGoodsId()); |
| | | if(merShopGoodsEditDto.getSalePrice().compareTo(goods.getMininumPrice())<0){ |
| | | throw new ServiceException(AppErrorConstant.SALESPRICE_MIN+goods.getMininumPrice().toString()+"元"); |
| | | } |
| | | //商户定制价格 |
| | | ShopGoods shopGoods = shopGoodsService.getByShopIdAndGoodsId(merShopGoodsEditDto.getShopId(),goods.getGoodsId()); |
| | | if(shopGoods!=null){ |
| | | shopGoods.setSalesPrice(merShopGoodsEditDto.getSalePrice()); |
| | | shopGoods.setServiceNum(merShopGoodsEditDto.getServiceNum()); |
| | | shopGoods.setUpdateTime(new Date()); |
| | | shopGoods.setUpdateUserId(merShopGoodsEditDto.getUserId()); |
| | | }else{ |
| | | shopGoods = new ShopGoods(); |
| | | shopGoods.setDelFlag(0); |
| | | shopGoods.setShopId(merShopGoodsEditDto.getShopId()); |
| | | shopGoods.setGoodsId(merShopGoodsEditDto.getGoodsId()); |
| | | shopGoods.setSalesPrice(merShopGoodsEditDto.getSalePrice()); |
| | | shopGoods.setServiceNum(merShopGoodsEditDto.getServiceNum()); |
| | | shopGoods.setUpdateTime(new Date()); |
| | | shopGoods.setUpdateUserId(merShopGoodsEditDto.getUserId()); |
| | | } |
| | | shopGoodsService.saveOrUpdate(shopGoods); |
| | | } |
| | | } |
| | |
| | | public ShopGoods getByShopIdAndGoodsId(Long shopId,String goodsId){ |
| | | LambdaQueryWrapper<ShopGoods> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(ShopGoods::getDelFlag, 0).eq(ShopGoods::getShopId, shopId).eq(ShopGoods::getGoodsId, goodsId); |
| | | ShopGoods shopGoods = this.getOne(queryWrapper); |
| | | ShopGoods shopGoods = this.getOne(queryWrapper,false); |
| | | return shopGoods; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.order.domain.pojo.goods.Goods; |
| | | import com.ruoyi.order.domain.pojo.goods.GoodsFile; |
| | | import com.ruoyi.order.domain.pojo.goods.ShopGoods; |
| | | import com.ruoyi.order.domain.pojo.order.ConsumerGoods; |
| | | import com.ruoyi.order.domain.pojo.order.Order; |
| | | import com.ruoyi.order.domain.pojo.order.OrderGoods; |
| | | import com.ruoyi.order.domain.vo.*; |
| | | import com.ruoyi.order.service.goods.GoodsFileService; |
| | | import com.ruoyi.order.service.goods.ShopGoodsService; |
| | | import com.ruoyi.order.service.order.ConsumerGoodsService; |
| | | import com.ruoyi.order.service.order.OrderGoodsService; |
| | | import com.ruoyi.order.util.CodeFactoryUtil; |
| | | import com.ruoyi.system.api.RemoteMemberService; |
| | | import com.ruoyi.system.api.RemoteShopService; |
| | | import com.ruoyi.system.api.RemoteUserService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.AppBaseGetDto; |
| | | 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.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.AppUserCouponVo; |
| | | import com.ruoyi.order.mapper.order.OrderMapper; |
| | | import com.ruoyi.order.service.goods.GoodsService; |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | |
| | | @Resource |
| | | private RemoteShopService remoteShopService; |
| | | |
| | | @Resource |
| | | private RemoteUserService remoteUserService; |
| | | |
| | | @Resource |
| | | private ConsumerGoodsService consumerGoodsService; |
| | | |
| | | /** |
| | | * @description: buyGoods |
| | |
| | | appOrderTotalVo.setNoUseCount(noUseCount); |
| | | return appOrderTotalVo; |
| | | } |
| | | |
| | | /** |
| | | * 获取B端首页统计 |
| | | * @param merHomeShopTotalVo |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MerHomeShopTotalVo getMerHomeTotal(MerHomeShopTotalVo merHomeShopTotalVo){ |
| | | Long shopId = merHomeShopTotalVo.getShopId(); |
| | | Integer todayShop = 0; |
| | | Integer unHandleOrder = 0; |
| | | BigDecimal shopTurnover = new BigDecimal("0.00"); |
| | | Integer cycleSurp = 0; |
| | | Integer explorationSurp = 0; |
| | | merHomeShopTotalVo.setTodayShop(todayShop); |
| | | merHomeShopTotalVo.setUnHandleOrder(unHandleOrder); |
| | | merHomeShopTotalVo.setShopTurnover(shopTurnover); |
| | | merHomeShopTotalVo.setCycleSurp(cycleSurp); |
| | | merHomeShopTotalVo.setExplorationSurp(explorationSurp); |
| | | return merHomeShopTotalVo; |
| | | } |
| | | |
| | | /** |
| | | * 核销订单 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MerVerifyOrderVo verifyOrder(String orderId){ |
| | | MerVerifyOrderVo merVerifyOrderVo = new MerVerifyOrderVo(); |
| | | Order order = this.getById(orderId); |
| | | List<AppUserOrderGoodsPageVo> appUserOrderGoodsPageVoList = orderGoodsService.listVoByOrderId(orderId); |
| | | merVerifyOrderVo.setOrderId(orderId); |
| | | merVerifyOrderVo.setOrderNo(order.getOrderNo()); |
| | | merVerifyOrderVo.setOrderStatus(order.getOrderStatus()); |
| | | merVerifyOrderVo.setOrderFrom(order.getOrderFrom()); |
| | | merVerifyOrderVo.setOrderGoodsMoney(order.getOrderMoney()); |
| | | merVerifyOrderVo.setCouponDiscount(order.getCouponMoney()); |
| | | merVerifyOrderVo.setReceivableDeposit(order.getReceivableDeposit()); |
| | | merVerifyOrderVo.setReceivableMoney(order.getReceivableMoney()); |
| | | merVerifyOrderVo.setPayMoney(order.getPayMoney()); |
| | | merVerifyOrderVo.setOrderRemark(order.getOrderRemark()); |
| | | merVerifyOrderVo.setAppUserOrderGoodsPageVoList(appUserOrderGoodsPageVoList); |
| | | SysUser sysUser = remoteUserService.getSysUser(order.getUserId()).getData(); |
| | | merVerifyOrderVo.setUserName(sysUser.getNickName()); |
| | | merVerifyOrderVo.setUserMobile(sysUser.getPhonenumber()); |
| | | return merVerifyOrderVo; |
| | | } |
| | | |
| | | /** |
| | | * 确认核销订单 |
| | | * @param merVerifyOrderDto |
| | | * @return |
| | | */ |
| | | @Override |
| | | public MerVerifyOrderVo sureVerifyOrder(MerVerifyOrderDto merVerifyOrderDto){ |
| | | String orderId = merVerifyOrderDto.getOrderId(); |
| | | BigDecimal relReceiveMoney = merVerifyOrderDto.getRelReceiveMoney(); |
| | | Date nowTime = new Date(); |
| | | //更新订单信息 |
| | | Order order = this.getById(orderId); |
| | | order.setOrderStatus(3); |
| | | order.setUseTime(nowTime); |
| | | order.setUseUserId(merVerifyOrderDto.getUserId()); |
| | | order.setOfflinePayMoney(relReceiveMoney); |
| | | order.setPayMoney(order.getPayMoney().add(relReceiveMoney)); |
| | | this.saveOrUpdate(order); |
| | | //创建服务商品 |
| | | List<AppUserOrderGoodsPageVo> appUserOrderGoodsPageVoList = orderGoodsService.listVoByOrderId(orderId); |
| | | ConsumerGoods consumerGoods; |
| | | String consumerGoodsId; |
| | | for(AppUserOrderGoodsPageVo appUserOrderGoodsPageVo : appUserOrderGoodsPageVoList){ |
| | | consumerGoods = new ConsumerGoods(); |
| | | consumerGoodsId = IdUtils.simpleUUID(); |
| | | consumerGoods.setConsumerGoodsId(consumerGoodsId); |
| | | consumerGoods.setDelFlag(0); |
| | | consumerGoods.setServiceStatus(1); |
| | | consumerGoods.setShopId(order.getShopId()); |
| | | consumerGoods.setUserId(order.getUserId()); |
| | | consumerGoods.setOrderId(orderId); |
| | | consumerGoods.setOrderGoodsId(appUserOrderGoodsPageVo.getOrderGoodsId()); |
| | | consumerGoods.setGoodsId(appUserOrderGoodsPageVo.getGoodsId()); |
| | | consumerGoods.setGoodsName(appUserOrderGoodsPageVo.getGoodsName()); |
| | | consumerGoods.setCycleNumFlag(appUserOrderGoodsPageVo.getCycleNumFlag()); |
| | | consumerGoods.setServiceNum(appUserOrderGoodsPageVo.getServiceNum()); |
| | | consumerGoods.setCreateTime(nowTime); |
| | | consumerGoodsService.save(consumerGoods); |
| | | } |
| | | //生成返回 |
| | | MerVerifyOrderVo merVerifyOrderVo = new MerVerifyOrderVo(); |
| | | merVerifyOrderVo.setOrderId(orderId); |
| | | merVerifyOrderVo.setOrderNo(order.getOrderNo()); |
| | | merVerifyOrderVo.setOrderStatus(order.getOrderStatus()); |
| | | merVerifyOrderVo.setOrderFrom(order.getOrderFrom()); |
| | | merVerifyOrderVo.setOrderGoodsMoney(order.getOrderMoney()); |
| | | merVerifyOrderVo.setCouponDiscount(order.getCouponMoney()); |
| | | merVerifyOrderVo.setReceivableDeposit(order.getReceivableDeposit()); |
| | | merVerifyOrderVo.setReceivableMoney(order.getReceivableMoney()); |
| | | merVerifyOrderVo.setPayMoney(order.getPayMoney()); |
| | | merVerifyOrderVo.setOrderRemark(order.getOrderRemark()); |
| | | merVerifyOrderVo.setAppUserOrderGoodsPageVoList(appUserOrderGoodsPageVoList); |
| | | SysUser sysUser = remoteUserService.getSysUser(order.getUserId()).getData(); |
| | | merVerifyOrderVo.setUserName(sysUser.getNickName()); |
| | | merVerifyOrderVo.setUserMobile(sysUser.getPhonenumber()); |
| | | return merVerifyOrderVo; |
| | | } |
| | | } |
| | |
| | | } |
| | | LambdaQueryWrapper<ShoppingCart> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(ShoppingCart::getDelFlag, 0).eq(ShoppingCart::getGoodsId, goodsId); |
| | | ShoppingCart shoppingCart = this.getOne(queryWrapper); |
| | | ShoppingCart shoppingCart = this.getOne(queryWrapper,false); |
| | | if(shoppingCart==null){ |
| | | shoppingCart = new ShoppingCart(); |
| | | shoppingCart.setUserId(appShoppingCartAddDto.getUserId()); |
| | |
| | | } |
| | | LambdaQueryWrapper<ShoppingCart> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(ShoppingCart::getDelFlag, 0).eq(ShoppingCart::getGoodsId, goodsId); |
| | | ShoppingCart shoppingCart = this.getOne(queryWrapper); |
| | | ShoppingCart shoppingCart = this.getOne(queryWrapper,false); |
| | | shoppingCart.setBuyNum(appShoppingCartChangeDto.getBuyNum()); |
| | | shoppingCart.setUpdateTime(new Date()); |
| | | this.saveOrUpdate(shoppingCart); |
| | |
| | | package com.ruoyi.order.service.order; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.order.domain.dto.MerVerifyOrderDto; |
| | | import com.ruoyi.order.domain.vo.*; |
| | | import com.ruoyi.system.api.domain.dto.AppBaseGetDto; |
| | | import com.ruoyi.order.domain.dto.AppPlaceOrderDto; |
| | | import com.ruoyi.order.domain.dto.AppSureOrderDto; |
| | | import com.ruoyi.order.domain.dto.AppUserOrderPageDto; |
| | | import com.ruoyi.order.domain.pojo.order.Order; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.order.domain.vo.AppPlaceOrderVo; |
| | | import com.ruoyi.order.domain.vo.AppSureOrderVo; |
| | | import com.ruoyi.order.domain.vo.AppUserOrderGetVo; |
| | | import com.ruoyi.order.domain.vo.AppUserOrderPageVo; |
| | | import com.ruoyi.system.api.domain.vo.AppOrderTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | AppOrderTotalVo getAppOrderTotal(Long userId); |
| | | |
| | | /** |
| | | * 获取B端首页统计 |
| | | * @param merHomeShopTotalVo |
| | | * @return |
| | | */ |
| | | MerHomeShopTotalVo getMerHomeTotal(MerHomeShopTotalVo merHomeShopTotalVo); |
| | | |
| | | /** |
| | | * 获取核销订单 |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | MerVerifyOrderVo verifyOrder(String orderId); |
| | | |
| | | /** |
| | | * 确认核销订单 |
| | | * @param merVerifyOrderDto |
| | | * @return |
| | | */ |
| | | MerVerifyOrderVo sureVerifyOrder(MerVerifyOrderDto merVerifyOrderDto); |
| | | } |
| | |
| | | <result property="goodsType" column="goods_type" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="createUserId" column="create_user_id" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateUserId" column="update_user_id" /> |
| | | <result property="goodsClassId" column="goods_class_id" /> |
| | | <result property="goodsName" column="goods_name" /> |
| | |
| | | <if test="goodsType != null">goods_type,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="createUserId != null">create_user_id,</if> |
| | | <if test="updateime != null">update_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="updateUserId != null">update_user_id,</if> |
| | | <if test="goodsClassId != null">goods_class_id,</if> |
| | | <if test="goodsName != null">goods_name,</if> |
| | |
| | | <if test="goodsType != null">#{goodsType},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="createUserId != null">#{createUserId},</if> |
| | | <if test="updateime != null">#{updateime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="updateUserId != null">#{updateUserId},</if> |
| | | <if test="goodsClassId != null">#{goodsClassId},</if> |
| | | <if test="goodsName != null">#{goodsName},</if> |
| | |
| | | <if test="goodsType != null">goods_type = #{goodsType},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="createUserId != null">create_user_id = #{createUserId},</if> |
| | | <if test="updateime != null">update_time = #{updateime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateUserId != null">update_user_id = #{updateUserId},</if> |
| | | <if test="goodsClassId != null">goods_class_id = #{goodsClassId},</if> |
| | | <if test="goodsName != null">goods_name = #{goodsName},</if> |
| | |
| | | </if> |
| | | ORDER BY tg.create_time DESC |
| | | </select> |
| | | |
| | | <select id="pageMerShopGoods" resultType="com.ruoyi.order.domain.vo.MerGoodsPageVo"> |
| | | SELECT |
| | | tg.goods_id goodsId, |
| | | tg.goods_name goodsName, |
| | | tg.goods_introduction goodsIntroduction, |
| | | tg.goods_type goodsType, |
| | | CASE tg.goods_type |
| | | WHEN 1 THEN "周期" |
| | | WHEN 2 THEN "服务" |
| | | WHEN 3 THEN "体验" |
| | | WHEN 4 THEN "单品" |
| | | END goodsTag, |
| | | IFNULL(tsg.sales_price,tg.sales_price) salesPrice, |
| | | tg.sales_price suggestSalesPrice, |
| | | tgf.file_url goodsPicture, |
| | | tg.goods_nurses goodsNurses, |
| | | tg.cycle_num_flag cycleNumFlag, |
| | | tg.service_num defaultServiceNum, |
| | | IFNULL(tsg.service_num,tg.service_num) serviceNum |
| | | FROM t_goods tg |
| | | LEFT JOIN t_goods_file tgf ON tg.goods_id = tgf.goods_id AND tgf.del_flag = 0 AND tgf.file_type = 1 |
| | | LEFT JOIN t_shop_goods tsg ON tg.goods_id = tsg.goods_id AND tsg.shop_id = #{shopId} |
| | | WHERE tg.del_flag = 0 AND tg.goods_status = 1 |
| | | ORDER BY tg.create_time DESC |
| | | </select> |
| | | </mapper> |
| | |
| | | <result property="goodsId" column="goods_id" /> |
| | | <result property="salesPrice" column="sales_price" /> |
| | | <result property="serviceNum" column="service_num" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateUserId" column="update_user_id" /> |
| | | </resultMap> |
| | | |
| | |
| | | <if test="goodsId != null">goods_id,</if> |
| | | <if test="salesPrice != null">sales_price,</if> |
| | | <if test="serviceNum != null">service_num,</if> |
| | | <if test="updateime != null">update_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="updateUserId != null">update_user_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="goodsId != null">#{goodsId},</if> |
| | | <if test="salesPrice != null">#{salesPrice},</if> |
| | | <if test="serviceNum != null">#{serviceNum},</if> |
| | | <if test="updateime != null">#{updateime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="updateUserId != null">#{updateUserId},</if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="goodsId != null">goods_id = #{goodsId},</if> |
| | | <if test="salesPrice != null">sales_price = #{salesPrice},</if> |
| | | <if test="serviceNum != null">service_num = #{serviceNum},</if> |
| | | <if test="updateime != null">update_time = #{updateime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateUserId != null">update_user_id = #{updateUserId},</if> |
| | | </trim> |
| | | where id = #{id} |
| | |
| | | |
| | | <select id="listVoByOrderId" resultType="com.ruoyi.order.domain.vo.AppUserOrderGoodsPageVo"> |
| | | SELECT |
| | | tog.order_goods_id orderGoodsId, |
| | | tog.goods_id goodsId, |
| | | tg.goods_name goodsName, |
| | | tog.goods_type goodsType, |
| | | tog.buy_num buyNum, |
| | | tgf.file_url goodsPrice, |
| | | tog.goods_total_money goodsRealPrice |
| | | tog.goods_total_money goodsRealPrice, |
| | | tog.cycle_num_flag cycleNumFlag, |
| | | tog.service_num serviceNum |
| | | FROM t_order toc |
| | | INNER JOIN t_order_goods tog ON tog.order_id = toc.order_id |
| | | INNER JOIN t_goods tg ON tg.goods_id = tog.goods_id |
| | |
| | | <result property="goodsId" column="goods_id" /> |
| | | <result property="buyNum" column="buy_num" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectShoppingCartVo"> |
| | |
| | | <if test="goodsId != null">goods_id,</if> |
| | | <if test="buyNum != null">buy_num,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateime != null">update_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | |
| | | <if test="goodsId != null">#{goodsId},</if> |
| | | <if test="buyNum != null">#{buyNum},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateime != null">#{updateime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="goodsId != null">goods_id = #{goodsId},</if> |
| | | <if test="buyNum != null">buy_num = #{buyNum},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateime != null">update_time = #{updateime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | import com.ruoyi.common.security.annotation.EnableCustomConfig; |
| | | import com.ruoyi.common.security.annotation.EnableRyFeignClients; |
| | | import com.ruoyi.common.swagger.annotation.EnableCustomSwagger2; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.context.annotation.ComponentScans; |
| | | |
| | | /** |
| | | * 系统模块 |
| | |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | @SpringBootApplication |
| | | @ComponentScans(value = {@ComponentScan("com.ruoyi.system.api")}) |
| | | public class RuoYiShopApplication |
| | | { |
| | | public static void main(String[] args) |
New file |
| | |
| | | package com.ruoyi.shop.controller.business; |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.shop.domain.vo.MgtShopInfoVo; |
| | | import com.ruoyi.shop.service.shop.ShopService; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @ClassName BShopController |
| | | * @description: TODO |
| | | * @date 2023年05月04日 |
| | | * @version: 1.0 |
| | | */ |
| | | @Api(value = "商户端商户相关接口", tags = "商户端商户相关接口", description = "商户端商户相关接口") |
| | | @RestController |
| | | @RequestMapping("/mer/shop") |
| | | public class MerShopController { |
| | | |
| | | |
| | | @Autowired |
| | | private ShopService shopService; |
| | | |
| | | /** |
| | | * 未完成实际统计 |
| | | * @param merBaseDto |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getMerHomeTotal", method = RequestMethod.POST) |
| | | @ApiOperation(value = "获取商户端商业统计") |
| | | public R<MerHomeShopTotalVo> getMerHomeTotal(@RequestBody MerBaseDto merBaseDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | MerHomeShopTotalVo merHomeShopTotalVo = shopService.getMerHomeTotal(userId); |
| | | return R.ok(merHomeShopTotalVo); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/MemberTask.java |
| | |
| | | package com.ruoyi.shop.domain.pojo.shop; |
| | | package com.ruoyi.shop.domain.pojo.task; |
| | | |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/MemberTaskRecord.java |
| | |
| | | package com.ruoyi.shop.domain.pojo.shop; |
| | | package com.ruoyi.shop.domain.pojo.task; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import java.util.Date; |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/ShopFile.java |
| | |
| | | package com.ruoyi.shop.domain.pojo.shop; |
| | | package com.ruoyi.shop.domain.pojo.task; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/ShopTask.java |
| | |
| | | package com.ruoyi.shop.domain.pojo.shop; |
| | | package com.ruoyi.shop.domain.pojo.task; |
| | | |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/domain/pojo/shop/TaskFile.java |
| | |
| | | package com.ruoyi.shop.domain.pojo.shop; |
| | | package com.ruoyi.shop.domain.pojo.task; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/shop/MemberTaskMapper.java |
| | |
| | | package com.ruoyi.shop.mapper.shop; |
| | | package com.ruoyi.shop.mapper.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.MemberTask; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTask; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/shop/MemberTaskRecordMapper.java |
| | |
| | | package com.ruoyi.shop.mapper.shop; |
| | | package com.ruoyi.shop.mapper.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.MemberTaskRecord; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTaskRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/shop/ShopFileMapper.java |
| | |
| | | package com.ruoyi.shop.mapper.shop; |
| | | package com.ruoyi.shop.mapper.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopFile; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopFile; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/shop/ShopTaskMapper.java |
| | |
| | | package com.ruoyi.shop.mapper.shop; |
| | | package com.ruoyi.shop.mapper.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopTask; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopTask; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/mapper/shop/TaskFileMapper.java |
| | |
| | | package com.ruoyi.shop.mapper.shop; |
| | | package com.ruoyi.shop.mapper.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.TaskFile; |
| | | import com.ruoyi.shop.domain.pojo.task.TaskFile; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | |
| | | /** |
| | |
| | | queryWrapper.eq(ShopRelUser::getDelFlag, 0).eq(ShopRelUser::getShopId, shopId); |
| | | return this.list(queryWrapper); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ShopRelUser getByUserId(Long userId){ |
| | | LambdaQueryWrapper<ShopRelUser> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(ShopRelUser::getDelFlag, 0).eq(ShopRelUser::getUserId, userId); |
| | | return this.getOne(queryWrapper,false); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.shop.domain.dto.*; |
| | | import com.ruoyi.shop.domain.pojo.shop.*; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopFile; |
| | | import com.ruoyi.shop.domain.vo.AppNearbyShopVo; |
| | | import com.ruoyi.shop.mapper.shop.ShopMapper; |
| | | import com.ruoyi.shop.service.shop.*; |
| | | import com.ruoyi.shop.service.task.ShopFileService; |
| | | import com.ruoyi.shop.util.CodeFactoryUtil; |
| | | import com.ruoyi.system.api.RemoteConfigService; |
| | | import com.ruoyi.system.api.RemoteOrderService; |
| | | import com.ruoyi.system.api.RemoteUserService; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | |
| | | import com.ruoyi.shop.domain.vo.MgtShopInfoVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopPageVo; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Resource |
| | | private ShopRelUserService shopRelUserService; |
| | | |
| | | @Resource |
| | | private RemoteOrderService remoteOrderService; |
| | | |
| | | /** |
| | | * 获取商户详情 |
| | |
| | | public Shop getByShopId(Long shopId){ |
| | | LambdaQueryWrapper<Shop> queryWrapper = Wrappers.lambdaQuery(); |
| | | queryWrapper.eq(Shop::getDelFlag, 0).eq(Shop::getShopId, shopId); |
| | | Shop shop = this.getOne(queryWrapper); |
| | | Shop shop = this.getOne(queryWrapper,false); |
| | | return shop; |
| | | } |
| | | |
| | | @Override |
| | | public MerHomeShopTotalVo getMerHomeTotal(Long userId){ |
| | | MerHomeShopTotalVo merHomeShopTotalVo = new MerHomeShopTotalVo(); |
| | | ShopRelUser shopRelUser = shopRelUserService.getByUserId(userId); |
| | | Long shopId = shopRelUser.getShopId(); |
| | | merHomeShopTotalVo.setShopId(shopId); |
| | | Shop shop = this.getById(shopId); |
| | | merHomeShopTotalVo.setShopType(shop.getShopType()); |
| | | Integer task = 0; |
| | | merHomeShopTotalVo.setTask(task); |
| | | merHomeShopTotalVo = remoteOrderService.getMerHomeTotal(merHomeShopTotalVo).getData(); |
| | | return merHomeShopTotalVo; |
| | | } |
| | | } |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/MemberTaskRecordServiceImpl.java |
| | |
| | | package com.ruoyi.shop.service.impl.shop; |
| | | package com.ruoyi.shop.service.impl.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.MemberTaskRecord; |
| | | import com.ruoyi.shop.mapper.shop.MemberTaskRecordMapper; |
| | | import com.ruoyi.shop.service.shop.MemberTaskRecordService; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTaskRecord; |
| | | import com.ruoyi.shop.mapper.task.MemberTaskRecordMapper; |
| | | import com.ruoyi.shop.service.task.MemberTaskRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/MemberTaskServiceImpl.java |
| | |
| | | package com.ruoyi.shop.service.impl.shop; |
| | | package com.ruoyi.shop.service.impl.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.MemberTask; |
| | | import com.ruoyi.shop.mapper.shop.MemberTaskMapper; |
| | | import com.ruoyi.shop.service.shop.MemberTaskService; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTask; |
| | | import com.ruoyi.shop.mapper.task.MemberTaskMapper; |
| | | import com.ruoyi.shop.service.task.MemberTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopFileServiceImpl.java |
| | |
| | | package com.ruoyi.shop.service.impl.shop; |
| | | package com.ruoyi.shop.service.impl.task; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopFile; |
| | | import com.ruoyi.shop.mapper.shop.ShopFileMapper; |
| | | import com.ruoyi.shop.service.shop.ShopFileService; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopFile; |
| | | import com.ruoyi.shop.mapper.task.ShopFileMapper; |
| | | import com.ruoyi.shop.service.task.ShopFileService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/ShopTaskServiceImpl.java |
| | |
| | | package com.ruoyi.shop.service.impl.shop; |
| | | package com.ruoyi.shop.service.impl.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopTask; |
| | | import com.ruoyi.shop.mapper.shop.ShopTaskMapper; |
| | | import com.ruoyi.shop.service.shop.ShopTaskService; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopTask; |
| | | import com.ruoyi.shop.mapper.task.ShopTaskMapper; |
| | | import com.ruoyi.shop.service.task.ShopTaskService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/impl/shop/TaskFileServiceImpl.java |
| | |
| | | package com.ruoyi.shop.service.impl.shop; |
| | | package com.ruoyi.shop.service.impl.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.TaskFile; |
| | | import com.ruoyi.shop.mapper.shop.TaskFileMapper; |
| | | import com.ruoyi.shop.service.shop.TaskFileService; |
| | | import com.ruoyi.shop.domain.pojo.task.TaskFile; |
| | | import com.ruoyi.shop.mapper.task.TaskFileMapper; |
| | | import com.ruoyi.shop.service.task.TaskFileService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<ShopRelUser> listByShopId(Long shopId); |
| | | |
| | | /** |
| | | * |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | ShopRelUser getByUserId(Long userId); |
| | | } |
| | |
| | | import com.ruoyi.shop.domain.vo.MgtShopInfoVo; |
| | | import com.ruoyi.shop.domain.vo.MgtShopPageVo; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | Shop getByShopId(Long shopId); |
| | | |
| | | |
| | | /** |
| | | * 获取商户详情 |
| | | * 获取商户端首页统计 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | //MgtShopInfoVo getMerShopInfo(Long userId); |
| | | MerHomeShopTotalVo getMerHomeTotal(Long userId); |
| | | } |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/shop/MemberTaskRecordService.java |
| | |
| | | package com.ruoyi.shop.service.shop; |
| | | package com.ruoyi.shop.service.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.MemberTaskRecord; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTaskRecord; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/shop/MemberTaskService.java |
| | |
| | | package com.ruoyi.shop.service.shop; |
| | | package com.ruoyi.shop.service.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.MemberTask; |
| | | import com.ruoyi.shop.domain.pojo.task.MemberTask; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/shop/ShopFileService.java |
| | |
| | | package com.ruoyi.shop.service.shop; |
| | | package com.ruoyi.shop.service.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopFile; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopFile; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | import java.util.List; |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/shop/ShopTaskService.java |
| | |
| | | package com.ruoyi.shop.service.shop; |
| | | package com.ruoyi.shop.service.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopTask; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopTask; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/service/shop/TaskFileService.java |
| | |
| | | package com.ruoyi.shop.service.shop; |
| | | package com.ruoyi.shop.service.task; |
| | | |
| | | import com.ruoyi.shop.domain.pojo.shop.TaskFile; |
| | | import com.ruoyi.shop.domain.pojo.task.TaskFile; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | |
| | | /** |
| | |
| | | <result property="shopStatus" column="shop_status" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="createUserId" column="create_user_id" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateUserId" column="update_user_id" /> |
| | | <result property="shopName" column="shop_name" /> |
| | | <result property="shopNumber" column="shop_number" /> |
| | |
| | | <if test="shopStatus != null">shop_status,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="createUserId != null">create_user_id,</if> |
| | | <if test="updateime != null">update_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="updateUserId != null">update_user_id,</if> |
| | | <if test="shopName != null">shop_name,</if> |
| | | <if test="shopNumber != null">shop_number,</if> |
| | |
| | | <if test="shopStatus != null">#{shopStatus},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="createUserId != null">#{createUserId},</if> |
| | | <if test="updateime != null">#{updateime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="updateUserId != null">#{updateUserId},</if> |
| | | <if test="shopName != null">#{shopName},</if> |
| | | <if test="shopNumber != null">#{shopNumber},</if> |
| | |
| | | <if test="shopStatus != null">shop_status = #{shopStatus},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="createUserId != null">create_user_id = #{createUserId},</if> |
| | | <if test="updateime != null">update_time = #{updateime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateUserId != null">update_user_id = #{updateUserId},</if> |
| | | <if test="shopName != null">shop_name = #{shopName},</if> |
| | | <if test="shopNumber != null">shop_number = #{shopNumber},</if> |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/MemberTaskMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.shop.MemberTaskMapper"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.task.MemberTaskMapper"> |
| | | |
| | | <resultMap type="MemberTask" id="MemberTaskResult"> |
| | | <result property="taskId" column="task_id" /> |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/MemberTaskRecordMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.shop.MemberTaskRecordMapper"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.task.MemberTaskRecordMapper"> |
| | | |
| | | <resultMap type="MemberTaskRecord" id="MemberTaskRecordResult"> |
| | | <result property="id" column="id" /> |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopFileMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.shop.ShopFileMapper"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.task.ShopFileMapper"> |
| | | |
| | | <resultMap type="ShopFile" id="ShopFileResult"> |
| | | <result property="id" column="id" /> |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/ShopTaskMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.shop.ShopTaskMapper"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.task.ShopTaskMapper"> |
| | | |
| | | <resultMap type="ShopTask" id="ShopTaskResult"> |
| | | <result property="taskId" column="task_id" /> |
File was renamed from ruoyi-modules/ruoyi-shop/src/main/resources/mapper/shop/TaskFileMapper.xml |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.shop.TaskFileMapper"> |
| | | <mapper namespace="com.ruoyi.shop.mapper.task.TaskFileMapper"> |
| | | |
| | | <resultMap type="TaskFile" id="TaskFileResult"> |
| | | <result property="id" column="id" /> |
| | |
| | | <result property="name" column="name" /> |
| | | <result property="value" column="value" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectCustomeConfigVo"> |
| | |
| | | <if test="name != null">name,</if> |
| | | <if test="value != null">value,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="updateime != null">update_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | | <if test="delFlag != null">#{delFlag},</if> |
| | |
| | | <if test="name != null">#{name},</if> |
| | | <if test="value != null">#{value},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="updateime != null">#{updateime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | |
| | | <if test="name != null">name = #{name},</if> |
| | | <if test="value != null">value = #{value},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="updateime != null">update_time = #{updateime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | </trim> |
| | | where id = #{id} |
| | | </update> |
| | |
| | | <result property="validDay" column="valid_day" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="createUserId" column="create_user_id" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateUserId" column="update_user_id" /> |
| | | </resultMap> |
| | | |
| | |
| | | <if test="validDay != null">valid_day,</if> |
| | | <if test="createTime != null">create_time,</if> |
| | | <if test="createUserId != null">create_user_id,</if> |
| | | <if test="updateime != null">update_time,</if> |
| | | <if test="updateTime != null">update_time,</if> |
| | | <if test="updateUserId != null">update_user_id,</if> |
| | | </trim> |
| | | <trim prefix="values (" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="validDay != null">#{validDay},</if> |
| | | <if test="createTime != null">#{createTime},</if> |
| | | <if test="createUserId != null">#{createUserId},</if> |
| | | <if test="updateime != null">#{updateime},</if> |
| | | <if test="updateTime != null">#{updateTime},</if> |
| | | <if test="updateUserId != null">#{updateUserId},</if> |
| | | </trim> |
| | | </insert> |
| | |
| | | <if test="validDay != null">valid_day = #{validDay},</if> |
| | | <if test="createTime != null">create_time = #{createTime},</if> |
| | | <if test="createUserId != null">create_user_id = #{createUserId},</if> |
| | | <if test="updateime != null">update_time = #{updateime},</if> |
| | | <if test="updateTime != null">update_time = #{updateTime},</if> |
| | | <if test="updateUserId != null">update_user_id = #{updateUserId},</if> |
| | | </trim> |
| | | where coupon_id = #{couponId} |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectConfigVo"> |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDeptVo"> |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDictDataVo"> |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | </resultMap> |
| | | |
| | | <sql id="selectDictTypeVo"> |
| | |
| | | <result property="icon" column="icon" /> |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | </resultMap> |
| | | |
| | |
| | | <result property="createBy" column="create_by" /> |
| | | <result property="createTime" column="create_time" /> |
| | | <result property="updateBy" column="update_by" /> |
| | | <result property="updateime" column="update_time" /> |
| | | <result property="updateTime" column="update_time" /> |
| | | <result property="remark" column="remark" /> |
| | | <association property="dept" column="dept_id" javaType="SysDept" resultMap="deptResult" /> |
| | | <collection property="roles" javaType="java.util.List" resultMap="RoleResult" /> |