12个文件已删除
32个文件已添加
36个文件已修改
| | |
| | | <artifactId>dysmsapi20170525</artifactId> |
| | | <version>2.0.10</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>weixin-java-pay</artifactId> |
| | | <version>4.4.0</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | |
| | | |
| | | </dependencies> |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.domain.R; |
| | |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.redis.service.RedisService; |
| | | import com.ruoyi.common.utils.NumberUtil; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.SysLoginService; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TbAgreement; |
| | | import com.ruoyi.system.model.TbUser; |
| | | import com.ruoyi.system.service.TbAddressService; |
| | | import com.ruoyi.system.service.TbAgreementService; |
| | | import com.ruoyi.system.service.TbUserService; |
| | | import com.ruoyi.system.utils.wx.body.resp.Code2SessionRespBody; |
| | | import com.ruoyi.system.utils.wx.body.resq.Code2SessionResqBody; |
| | | import com.ruoyi.system.utils.wx.model.WeixinProperties; |
| | | import com.ruoyi.system.utils.wx.pojo.AppletUserDecodeData; |
| | | import com.ruoyi.system.utils.wx.pojo.AppletUserEncrypteData; |
| | | import com.ruoyi.system.utils.wx.tools.WxAppletTools; |
| | | import com.ruoyi.system.utils.wx.tools.WxUtils; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.CollectionUtils; |
| | | 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.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private TokenService tokenService; |
| | | |
| | | |
| | | @Autowired |
| | | private TbUserService tbUserService; |
| | | |
| | | |
| | | @Autowired |
| | | private TbAgreementService agreementService; |
| | | |
| | | /** |
| | | * 账号密码登录 |
| | |
| | | * @param loginBody 登录信息 |
| | | * @return 结果 |
| | | */ |
| | | @ApiOperation(value = "手机验证码登录",notes = "手机验证码登录") |
| | | @ApiOperation(value = "手机验证码登录",notes = "登录模块") |
| | | @PostMapping("/login") |
| | | public AjaxResult login(@Valid @RequestBody LoginBody loginBody) |
| | | { |
| | |
| | | return ajax; |
| | | } |
| | | |
| | | @ApiOperation(value = "通过code获得openid,获取用户信息",tags = {"微信小程序登录"}) |
| | | @ApiOperation(value = "通过code获得openid,获取用户信息",tags = {"登录模块"}) |
| | | @PostMapping("/openIdByJsCode") |
| | | public R<Map<String, Object>> openIdByJsCode(@RequestBody AppletUserEncrypteData data) { |
| | | public AjaxResult openIdByJsCode(@RequestBody AppletUserEncrypteData data) { |
| | | log.info("<<<<<<<<换取openid开始<<<<<<<<:{}", data.getCode()); |
| | | WxAppletTools appletTools = new WxAppletTools(wxRestTemplate, wxConfig, redisService); |
| | | Code2SessionRespBody body = appletTools.getOpenIdByJscode2session(new Code2SessionResqBody().build(data.getCode())); |
| | | String openid = body.getOpenid(); |
| | | String sessionKey = body.getSessionKey(); |
| | | return R.ok(); |
| | | |
| | | AppletUserDecodeData appletUserDecodeData = WxUtils.encryptedData(data.getEncryptedData(), sessionKey, data.getIv()); |
| | | appletUserDecodeData.setOpenId(openid); |
| | | // 先使用openId和当前手机号进行查询 |
| | | TbUser user = tbUserService.getOne(Wrappers.lambdaQuery(TbUser.class).eq(TbUser::getIsDelete,0).ne(TbUser::getStatus,3) |
| | | .and(e->e.eq(TbUser::getOpenId, appletUserDecodeData.getOpenId()).or() |
| | | .eq(TbUser::getPhone, appletUserDecodeData.getPhoneNumber()))); |
| | | if (user==null){ |
| | | user = new TbUser(); |
| | | user.setPhone(appletUserDecodeData.getPhoneNumber()); |
| | | user.setAvatar(appletUserDecodeData.getAvatarUrl()); |
| | | user.setUserName(appletUserDecodeData.getNickName()); |
| | | user.setOpenId(appletUserDecodeData.getOpenId()); |
| | | user.setInviteId(data.getInviteUserId()); |
| | | user.setStatus(1); |
| | | tbUserService.save(user); |
| | | }else { |
| | | user.setOpenId(appletUserDecodeData.getOpenId()); |
| | | user.updateById(); |
| | | } |
| | | if(user.getStatus()==2){ |
| | | return AjaxResult.error("登录失败,当前账号已被冻结"); |
| | | } |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | LoginUser loginUser = new LoginUser(); |
| | | loginUser.setUserId(Long.valueOf(user.getId())); |
| | | loginUser.setUser(new SysUser()); |
| | | ajax.put(Constants.TOKEN, tokenService.createToken(loginUser)); |
| | | ajax.put("username",user.getUserName()); |
| | | ajax.put("avatar",user.getAvatar()); |
| | | return ajax; |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "发送验证码",tags = {"发送验证码"}) |
| | | @ApiOperation(value = "发送验证码",tags = {"登录模块"}) |
| | | @PostMapping("/sendCode") |
| | | public R<?> sendCode(String phone) { |
| | | if (StringUtils.isBlank(phone)) { |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取协议",tags = {"获取协议 1用户 2隐私"}) |
| | | @PostMapping("/getAgreement") |
| | | public R<?> getAgreement(Integer type) { |
| | | |
| | | return R.ok(); |
| | | @ApiOperation(value = "获取协议 1=用户协议,2=隐私协议",tags = {"登录模块"}) |
| | | @GetMapping("/getAgreement/{type}") |
| | | public R<List<TbAgreement>> getAgreement() { |
| | | List<TbAgreement> list = agreementService.list(new LambdaQueryWrapper<TbAgreement>().in(TbAgreement::getType, 1, 2)); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.model.TbBanner; |
| | | import com.ruoyi.system.dto.*; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.CompanyListQuery; |
| | | import com.ruoyi.system.service.TbBannerService; |
| | | import com.ruoyi.system.service.TbCompanyService; |
| | | import com.ruoyi.system.query.MyPushCompanyListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.IndexCompanyListVo; |
| | | import com.ruoyi.system.vo.MyPushCompanyListVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/user") |
| | | @Api(tags = "商城模块") |
| | | @Api(tags = "发布模块") |
| | | public class CompanyController { |
| | | |
| | | @Autowired |
| | | private TbCompanyService tbCompanyService; |
| | | |
| | | @Autowired |
| | | private TbBannerService bannerService; |
| | | private TbIndustryService industryService; |
| | | |
| | | @Autowired |
| | | private TbOrderService orderService; |
| | | |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | |
| | | |
| | | @ApiOperation(value = "获取banner",tags = {"获取banner"}) |
| | | @GetMapping("/getBannerList") |
| | | public R<List<TbBanner>> getBannerList() { |
| | | List<TbBanner> list = bannerService.list(new LambdaQueryWrapper<TbBanner>().eq(TbBanner::getDelFlag, 0)); |
| | | return R.ok(list); |
| | | } |
| | | @Autowired |
| | | private TbScheduleService scheduleService; |
| | | |
| | | |
| | | @ApiOperation(value = "获取商城首页",tags = {"获取商城首页"}) |
| | | @GetMapping("/getCompanyList") |
| | | public R<Page<IndexCompanyListVo>> getCompanyList(@Valid CompanyListQuery query) { |
| | | |
| | | @ApiOperation(value = "获取我发布的公司",tags = {"发布模块"}) |
| | | @GetMapping("/getMyPushCompanyList") |
| | | public R<Page<MyPushCompanyListVo>> getMyPushCompanyList(MyPushCompanyListQuery query) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | Page<IndexCompanyListVo> page = tbCompanyService.getCompanyList(query,userId); |
| | | |
| | | Page<MyPushCompanyListVo> page = tbCompanyService.getMyPushCompanyList(query,userId); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取行业信息",tags = {"发布模块"}) |
| | | @GetMapping("/getIndustryList") |
| | | public R<Page<TbIndustry>> getIndustryList(BasePage page) { |
| | | Page<TbIndustry> page1 = industryService.page(new Page<>(page.getPageNum(),page.getPageSize()),new LambdaQueryWrapper<TbIndustry>().orderByDesc(TbIndustry::getOrderNum)); |
| | | return R.ok(page1); |
| | | } |
| | | |
| | | @ApiOperation(value = "立即发布",tags = {"发布模块"}) |
| | | @PostMapping("/pushCompany") |
| | | public R<?> pushCompany(@Valid @RequestBody PushCompanyDto dto) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | tbCompanyService.pushCompany(dto,userId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "编辑公司",tags = {"发布模块"}) |
| | | @PostMapping("/editCompany") |
| | | public R<?> editCompany(@Valid @RequestBody EditCompanyDto dto) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbCompany company = tbCompanyService.getById(dto.getId()); |
| | | if (company == null || !company.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | long count = orderService.count(new LambdaQueryWrapper<TbOrder>().eq(TbOrder::getCompanyId, dto.getId()).in(TbOrder::getStatus, 3, 4, 5)); |
| | | if (count > 0) { |
| | | return R.fail("订单状态不能修改"); |
| | | } |
| | | tbCompanyService.editCompany(dto,company,userId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "上下架",tags = {"发布模块"}) |
| | | @PostMapping("/companyUpdateStatus") |
| | | public R<?> companyUpdateStatus(@Valid @RequestBody CompanyUpdateStatusDto dto) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbCompany company = tbCompanyService.getById(dto.getId()); |
| | | if (company == null || !company.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | long count = orderService.count(new LambdaQueryWrapper<TbOrder>().eq(TbOrder::getCompanyId, dto.getId()).in(TbOrder::getStatus, 3, 4, 5)); |
| | | if (count > 0) { |
| | | return R.fail("订单状态不能修改"); |
| | | } |
| | | if(dto.getStatus()<1 || dto.getStatus()>2){ |
| | | return R.fail("状态错误"); |
| | | } |
| | | company.setStatus(dto.getStatus()); |
| | | tbCompanyService.updateById(company); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "确认订单",tags = {"发布模块"}) |
| | | @PostMapping("/confirmOrder") |
| | | public R<?> confirmOrder(String orderId) { |
| | | if(StringUtils.isEmpty(orderId)){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbOrder order = orderService.getById(orderId); |
| | | if(order==null){ |
| | | return R.fail("订单不存在"); |
| | | } |
| | | TbCompany company = tbCompanyService.getById(order.getCompanyId()); |
| | | if (company == null || !company.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | if(order.getStatus()!=2){ |
| | | return R.fail("该订单状态不需要确认"); |
| | | } |
| | | order.setStatus(3); |
| | | order.updateById(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "取消确认订单",tags = {"发布模块"}) |
| | | @PostMapping("/cancelConfirmOrder") |
| | | public R<?> cancelConfirmOrder(String orderId) { |
| | | if(StringUtils.isEmpty(orderId)){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbOrder order = orderService.getById(orderId); |
| | | if(order==null){ |
| | | return R.fail("订单不存在"); |
| | | } |
| | | TbCompany company = tbCompanyService.getById(order.getCompanyId()); |
| | | if (company == null || !company.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | // 待支付才能取消订单 已确认后 |
| | | if(order.getStatus()!=3){ |
| | | return R.fail("该订单状态不需要确认"); |
| | | } |
| | | order.setStatus(3); |
| | | order.updateById(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "添加办理进度",tags = {"发布模块"}) |
| | | @PostMapping("/addSchedule") |
| | | public R<?> addSchedule(@RequestBody @Valid AddScheduleDto dto) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbOrder order = orderService.getById(dto.getOrderId()); |
| | | if(order==null){ |
| | | return R.fail("订单不存在"); |
| | | } |
| | | TbCompany company = tbCompanyService.getById(order.getCompanyId()); |
| | | if (company == null || !company.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | scheduleService.addSchedule(dto,userId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "已完成",tags = {"发布模块"}) |
| | | @PostMapping("/saleSuccessOrder") |
| | | public R<?> saleSuccessOrder(String orderId) { |
| | | if(StringUtils.isEmpty(orderId)){ |
| | | return R.fail("参数错误"); |
| | | } |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbOrder order = orderService.getById(orderId); |
| | | if(order==null){ |
| | | return R.fail("订单不存在"); |
| | | } |
| | | TbCompany company = tbCompanyService.getById(order.getCompanyId()); |
| | | if (company == null || !company.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | if(order.getStatus()!=4){ |
| | | return R.fail("该订单状态不能完成"); |
| | | } |
| | | order.setStatus(5); |
| | | order.updateById(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.PushCompanyDto; |
| | | import com.ruoyi.system.model.TbBanner; |
| | | import com.ruoyi.system.model.TbIndustry; |
| | | import com.ruoyi.system.query.CompanyListQuery; |
| | | import com.ruoyi.system.service.TbBannerService; |
| | | import com.ruoyi.system.service.TbCompanyService; |
| | | import com.ruoyi.system.service.TbIndustryService; |
| | | import com.ruoyi.system.vo.IndexCompanyListVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.util.List; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/user") |
| | | @Api(tags = "商城模块") |
| | | public class CompanyShopController { |
| | | |
| | | @Autowired |
| | | private TbCompanyService tbCompanyService; |
| | | |
| | | @Autowired |
| | | private TbBannerService bannerService; |
| | | |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | |
| | | @ApiOperation(value = "获取banner",tags = {"商城模块"}) |
| | | @GetMapping("/getBannerList") |
| | | public R<List<TbBanner>> getBannerList() { |
| | | List<TbBanner> list = bannerService.list(new LambdaQueryWrapper<TbBanner>().eq(TbBanner::getDelFlag, "0")); |
| | | return R.ok(list); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取商城首页",tags = {"商城模块"}) |
| | | @GetMapping("/getCompanyList") |
| | | public R<Page<IndexCompanyListVo>> getCompanyList(@Valid CompanyListQuery query) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | Page<IndexCompanyListVo> page = tbCompanyService.getCompanyList(query,userId); |
| | | |
| | | return R.ok(page); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; |
| | | import com.github.binarywang.wxpay.exception.WxPayException; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.domain.model.LoginUser; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.framework.web.service.TokenService; |
| | | import com.ruoyi.system.dto.AddScheduleDto; |
| | | import com.ruoyi.system.dto.EditScheduleDto; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.MyOrderListQuery; |
| | | import com.ruoyi.system.service.*; |
| | | import com.ruoyi.system.vo.MyPushCompanyListVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.math.BigDecimal; |
| | | import java.net.MalformedURLException; |
| | | |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/order") |
| | | @Api(tags = "订单模块") |
| | | public class OrderController { |
| | | |
| | | |
| | | @Autowired |
| | | private TbOrderService orderService; |
| | | |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | |
| | | @Autowired |
| | | private TbCompanyService companyService; |
| | | |
| | | @Autowired |
| | | private TbScheduleService scheduleService; |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "获取我的订单",tags = {"订单模块"}) |
| | | @GetMapping("/getMyOrderList") |
| | | public R<Page<MyPushCompanyListVo>> getMyOrderList(MyOrderListQuery query) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | Page<MyPushCompanyListVo> page = orderService.getMyOrderList(query,userId); |
| | | return R.ok(page); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "立即支付",tags = {"订单模块"}) |
| | | @PostMapping("/payOrder") |
| | | public R<WxPayMpOrderResult> payOrder(String orderId) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbOrder tbOrder = orderService.getById(orderId); |
| | | if(!tbOrder.getUserId().equals(userId.toString())){ |
| | | return R.fail("非法操作"); |
| | | } |
| | | if(tbOrder.getStatus()!=3){ |
| | | return R.fail("订单状态错误"); |
| | | } |
| | | TbCompany company = companyService.getById(tbOrder.getCompanyId()); |
| | | // 判断是否在支付前下架了 或者删除了 |
| | | if(company==null || company.getStatus()!=1 || company.getIsDelete()==1){ |
| | | return R.fail("该公司已下架或者删除"); |
| | | } |
| | | |
| | | WxPayMpOrderResult result = orderService.payOrder(tbOrder,userId); |
| | | return R.ok(result); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "下单预定",tags = {"订单模块"}) |
| | | @PostMapping("/placeOrder") |
| | | public synchronized R<?> placeOrder(String companyId) { |
| | | if(StringUtils.isEmpty(companyId)){ |
| | | R.fail("id不能为空"); |
| | | } |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | // 查看现在是否可以单 判断这个公司是否上架 是否已经产生的了订单 |
| | | TbCompany company = companyService.getById(companyId); |
| | | if(company.getStatus()!=1){ |
| | | return R.fail("公司未上架"); |
| | | } |
| | | long count = orderService.count(new LambdaQueryWrapper<TbOrder>().eq(TbOrder::getCompanyId, companyId).ne(TbOrder::getStatus, -1)); |
| | | if (count > 0) { |
| | | return R.fail("改公司已被预定"); |
| | | } |
| | | orderService.placeOrder(companyId,company,userId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "买家完成订单",tags = {"订单模块"}) |
| | | @PostMapping("/buyerSuccessOrder") |
| | | public synchronized R<?> buyerSuccessOrder(String orderId) { |
| | | if(StringUtils.isEmpty(orderId)){ |
| | | R.fail("订单id不能为空"); |
| | | } |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbOrder order = orderService.getById(orderId); |
| | | if(order==null){ |
| | | return R.fail("订单不存在"); |
| | | } |
| | | TbCompany company = companyService.getById(order.getCompanyId()); |
| | | if (!order.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | if(order.getStatus()!=5){ |
| | | return R.fail("该订单状态不能完成"); |
| | | } |
| | | // 订单完成 商品已售卖 |
| | | order.setStatus(6); |
| | | order.updateById(); |
| | | company.setStatus(2); |
| | | |
| | | // 分佣 |
| | | orderService.commission(order,company.getUserId()); |
| | | |
| | | |
| | | company.updateById(); |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "买家回复进度",tags = {"订单模块"}) |
| | | @PostMapping("/buyerAddSchedule") |
| | | public synchronized R<?> buyerAddSchedule(@RequestBody @Valid AddScheduleDto dto) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbOrder order = orderService.getById(dto.getOrderId()); |
| | | if(order==null){ |
| | | return R.fail("订单不存在"); |
| | | } |
| | | if (!order.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | if(order.getStatus()!=4){ |
| | | return R.fail("该订单状态不能回复"); |
| | | } |
| | | scheduleService.buyerAddSchedule(dto,userId); |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "买家取消订单",tags = {"订单模块"}) |
| | | @PostMapping("/buyerCancelOrder") |
| | | public synchronized R<?> buyerCancelOrder(String orderId) { |
| | | if(StringUtils.isEmpty(orderId)){ |
| | | R.fail("订单id不能为空"); |
| | | } |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbOrder order = orderService.getById(orderId); |
| | | if(order==null){ |
| | | return R.fail("订单不存在"); |
| | | } |
| | | if (!order.getUserId().equals(userId.toString())) { |
| | | return R.fail("非法操作"); |
| | | } |
| | | if(order.getStatus()!=3){ |
| | | return R.fail("该订单状态不能取消"); |
| | | } |
| | | order.setStatus(-1); |
| | | order.updateById(); |
| | | return R.ok(); |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "编辑办理进度",tags = {"发布模块"}) |
| | | @PostMapping("/updateSchedule") |
| | | public R<?> updateSchedule(@RequestBody @Valid EditScheduleDto dto) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbSchedule schedule = scheduleService.getById(dto.getScheduleId()); |
| | | if(schedule==null){ |
| | | return R.fail("进度不存在"); |
| | | } |
| | | if(!schedule.getUserId().equals(userId.toString())){ |
| | | return R.fail("非法操作"); |
| | | } |
| | | schedule.setText(dto.getText()); |
| | | schedule.setImg(dto.getImg()); |
| | | schedule.updateById(); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "删除办理进度",tags = {"发布模块"}) |
| | | @DeleteMapping("/delSchedule/{scheduleId}") |
| | | public R<?> delSchedule(@PathVariable("scheduleId") String scheduleId) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | TbSchedule schedule = scheduleService.getById(scheduleId); |
| | | if(schedule==null){ |
| | | return R.fail("进度不存在"); |
| | | } |
| | | if(!schedule.getUserId().equals(userId.toString())){ |
| | | return R.fail("非法操作"); |
| | | } |
| | | scheduleService.removeById(scheduleId); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 微信小程序支付成功回调函数 |
| | | */ |
| | | @PostMapping(value = "/WX/zxsCallback") |
| | | public String wxNotify(@RequestBody String xmlData) { |
| | | try { |
| | | System.out.println("微信支付回调!!!!!!!!!!"); |
| | | return orderService.weAppletChatNotice(xmlData); |
| | | } catch (WxPayException e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | // TODO 需要订单来查看其他金额 |
| | | @ApiOperation(value = "获取用户钱包信息",tags = {"获取用户钱包信息"}) |
| | | @ApiOperation(value = "获取用户钱包信息",tags = {"用户钱包模块"}) |
| | | @GetMapping("/getUserAccount") |
| | | public R<UserAccountVo> getUserAccount() { |
| | | UserAccountVo userAccountVo = new UserAccountVo(); |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "获取用户钱包信息-收支明细",tags = {"获取用户钱包信息-收支明细"}) |
| | | @ApiOperation(value = "获取用户钱包信息-收支明细",tags = {"用户钱包模块"}) |
| | | @GetMapping("/getUserAccountDetail") |
| | | public R<Page<TbAccountDetail>> getUserAccountDetail(UserAccountDetailQuery query) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "申请提现",tags = {"获取用户钱包信息-申请提现"}) |
| | | @ApiOperation(value = "申请提现",tags = {"用户钱包模块"}) |
| | | @PostMapping("/withdrawal") |
| | | @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
| | | public R<?> withdrawal(@RequestBody @Valid UserWithdrawalDto dto) { |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "获取用户绑定的卡",tags = {"获取用户绑定的卡"}) |
| | | @ApiOperation(value = "获取用户绑定的卡",tags = {"用户钱包模块"}) |
| | | @GetMapping("/getUserBank") |
| | | public R<TbBank> getUserBank() { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "保存银行卡",tags = {"保存银行卡" }) |
| | | @ApiOperation(value = "保存银行卡",tags = {"用户钱包模块"}) |
| | | @PostMapping("/saveUserBank") |
| | | public R<?> getUserBank(@Valid @RequestBody SaveUserBankDto dto) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "获取用户地址",tags = {"获取用户地址"}) |
| | | @ApiOperation(value = "获取用户地址",tags = {"用户地址模块"}) |
| | | @GetMapping("/getAddressList") |
| | | public R<?> getAddressList() { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "添加修改用户地址",tags = {"添加修改用户地址"}) |
| | | @ApiOperation(value = "添加修改用户地址",tags = {"用户地址模块"}) |
| | | @PostMapping("/updateUserAddress") |
| | | public R<?> updateUserAddress(@RequestBody @Valid TbAddress tbAddress) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "账号注销",tags = {"账号注销"}) |
| | | @ApiOperation(value = "删除地址",tags = {"用户地址模块"}) |
| | | @DeleteMapping("/deleteAddress/{id}") |
| | | public R<?> deleteAddress(@PathVariable("id")String id) { |
| | | TbAddress address = addressService.getById(id); |
| | |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | |
| | | @ApiOperation(value = "修改用户信息",tags = {"修改用户信息"}) |
| | | @ApiOperation(value = "修改用户信息",tags = {"用户模块"}) |
| | | @PostMapping("/updateUserInfo") |
| | | public R<?> updateUserInfo(String avatar,String username) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取最新用户信息",tags = {"获取最新用户信息"}) |
| | | @ApiOperation(value = "获取最新用户信息",tags = {"用户模块"}) |
| | | @GetMapping("/getUserInfo") |
| | | public R<?> getUserInfo() { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | return R.ok(user); |
| | | } |
| | | |
| | | @ApiOperation(value = "账号注销",tags = {"账号注销"}) |
| | | @ApiOperation(value = "账号注销",tags = {"用户模块"}) |
| | | @GetMapping("/accountCancellation") |
| | | public R<?> accountCancellation() { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | @Autowired |
| | | private TokenService tokenService; |
| | | |
| | | @ApiOperation(value = "获取用户消息",tags = {"获取用户消息"}) |
| | | @ApiOperation(value = "获取用户消息",tags = {"消息模块"}) |
| | | @GetMapping("/getUserMessage") |
| | | public R<Page<TbMessage>> getUserMessage(UserMessageQuery query) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "消息已读",tags = {"消息已读"}) |
| | | @ApiOperation(value = "消息已读",tags = {"消息模块"}) |
| | | @PostMapping("/readMessage") |
| | | public R<?> readMessage(String id) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | # prefix: http://localhost:${server.port}${server.servlet.context-path} |
| | | prefix: https://xzgt.test.591taxi.cn:${server.port}${server.servlet.context-path} |
| | | wx: |
| | | conf: |
| | | appId: wxe91f1af7638aa5dd |
| | | secretId: a787e1a462715604e0c9528b6d8960d1 |
| | | memberAppId: wx31b64f0d4f09053b |
| | | memberAppSecret: 2f3604b43c3e7128414408d0fc67b048 |
| | | mchId: 1703389452 #微信支付商户号 |
| | | mchKey: t30dr8AnRWPQenwCpwik34hZGBHppnNi #微信支付商户密钥 |
| | | keyPath: /opt/cert/apiclient_cert.p12 # p12证书的位置 |
| | | staffAppId: wx31807bd6af726966 |
| | | staffAppSecret: 2c4934ec41ffe8aec6712 564617c396b |
| | | callbackPath: https://api.dshl.vip/WalletApi/WX/callback |
| | | notifyUrl: http://127.0.0.1:9081/order/WX/zxsCallback |
| | | |
| | | #OSS及短信配置 |
| | | code: |
| | | config: |
| | |
| | | accessKeySecret: 0SRb6XGkciQDPWn2rYqbJtq2qRMDY8 |
| | | signName: "四川金达通信工程" |
| | | templateCode: "SMS_293985284" |
| | | |
| | | cos: |
| | | client: |
| | | accessKey: AKIDCF5EF2c0DE1e5JK8r4EGJF4mNsMgp26x |
New file |
| | |
| | | package com.ruoyi.common.utils; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 订单处理工具类 |
| | | */ |
| | | public class OrderUtil { |
| | | |
| | | /* 订单号 */ |
| | | private static long orderNum = 0l; |
| | | |
| | | /* 日期 */ |
| | | private static String date; |
| | | |
| | | /** |
| | | * 生成不重复的订单号 【纯数字】 |
| | | * |
| | | * @return |
| | | */ |
| | | public static synchronized String getOrderNo() { |
| | | String str = new SimpleDateFormat("yyMMddHHmm").format(new Date()); |
| | | if (date == null || !date.equals(str)) { |
| | | date = str; |
| | | orderNum = 0l; |
| | | } |
| | | orderNum++; |
| | | long orderNo = Long.parseLong((date)) * 10000; |
| | | orderNo += orderNum; |
| | | return orderNo + ""; |
| | | } |
| | | |
| | | /** |
| | | * 生成不重复的订单号 【含前缀】 |
| | | * |
| | | * @param prefix |
| | | * @return |
| | | */ |
| | | public static synchronized String getOrderNoForPrefix(String prefix) { |
| | | return prefix + getOrderNo(); |
| | | } |
| | | |
| | | /** |
| | | * 生成不重复的订单号 【含后缀】 |
| | | * |
| | | * @param suffix |
| | | * @return |
| | | */ |
| | | public static synchronized String getOrderNoForSuffix(String suffix) { |
| | | return getOrderNo() + suffix; |
| | | } |
| | | |
| | | } |
| | |
| | | // 过滤请求 |
| | | .authorizeRequests() |
| | | // 对于登录login 注册register 验证码captchaImage 允许匿名访问 |
| | | .antMatchers("/getPrivacyAgreement/{agreementType}", |
| | | "/applet/queryProtocolConfigByType","/applet/login1", |
| | | "/login1","/applet/queryProtocolConfigByType", |
| | | "/register","/applet/getCode","/applet/loginCode", |
| | | "/applet/changepwd", "/captchaImage","/getCode","/loginCode", |
| | | "/operations/getBySingleNum/**", |
| | | "/user/getUserInfoByNumber/**", |
| | | "/wxLogin/**", |
| | | "/open/**","/cos/get/**" |
| | | .antMatchers( |
| | | "/wxLogin/**","/order/WX/zxsCallback" |
| | | |
| | | ).permitAll() |
| | | // 静态资源,可匿名访问 |
| | | .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() |
| | |
| | | @RequestMapping("/monitor/job") |
| | | public class SysJobController extends BaseController |
| | | { |
| | | @Autowired |
| | | private ISysJobService jobService; |
| | | |
| | | /** |
| | | * 查询定时任务列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysJob sysJob) |
| | | { |
| | | // startPage(); |
| | | List<SysJob> list = jobService.selectJobList(sysJob); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出定时任务列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('monitor:job:export')") |
| | | // @Log(title = "定时任务", businessType = BusinessType.EXPORT) |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysJob sysJob) |
| | | // { |
| | | // List<SysJob> list = jobService.selectJobList(sysJob); |
| | | // ExcelUtil<SysJob> util = new ExcelUtil<SysJob>(SysJob.class); |
| | | // util.exportExcel(response, list, "定时任务"); |
| | | // } |
| | | |
| | | /** |
| | | * 获取定时任务详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:query')") |
| | | @GetMapping(value = "/{jobId}") |
| | | public AjaxResult getInfo(@PathVariable("jobId") Long jobId) |
| | | { |
| | | return success(jobService.selectJobById(jobId)); |
| | | } |
| | | |
| | | /** |
| | | * 新增定时任务 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:add')") |
| | | @Log(title = "定时任务", businessType = BusinessType.INSERT) |
| | | @PostMapping |
| | | public AjaxResult add(@RequestBody SysJob job) throws SchedulerException, TaskException |
| | | { |
| | | if (!CronUtils.isValid(job.getCronExpression())) |
| | | { |
| | | return error("新增任务'" + job.getJobName() + "'失败,Cron表达式不正确"); |
| | | } |
| | | else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI)) |
| | | { |
| | | return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi'调用"); |
| | | } |
| | | else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS })) |
| | | { |
| | | return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap(s)'调用"); |
| | | } |
| | | else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) |
| | | { |
| | | return error("新增任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)'调用"); |
| | | } |
| | | else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR)) |
| | | { |
| | | return error("新增任务'" + job.getJobName() + "'失败,目标字符串存在违规"); |
| | | } |
| | | else if (!ScheduleUtils.whiteList(job.getInvokeTarget())) |
| | | { |
| | | return error("新增任务'" + job.getJobName() + "'失败,目标字符串不在白名单内"); |
| | | } |
| | | job.setCreateBy(getUsername()); |
| | | return toAjax(jobService.insertJob(job)); |
| | | } |
| | | |
| | | /** |
| | | * 修改定时任务 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:edit')") |
| | | @Log(title = "定时任务", businessType = BusinessType.UPDATE) |
| | | @PutMapping |
| | | public AjaxResult edit(@RequestBody SysJob job) throws SchedulerException, TaskException |
| | | { |
| | | if (!CronUtils.isValid(job.getCronExpression())) |
| | | { |
| | | return error("修改任务'" + job.getJobName() + "'失败,Cron表达式不正确"); |
| | | } |
| | | else if (StringUtils.containsIgnoreCase(job.getInvokeTarget(), Constants.LOOKUP_RMI)) |
| | | { |
| | | return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'rmi'调用"); |
| | | } |
| | | else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.LOOKUP_LDAP, Constants.LOOKUP_LDAPS })) |
| | | { |
| | | return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'ldap(s)'调用"); |
| | | } |
| | | else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), new String[] { Constants.HTTP, Constants.HTTPS })) |
| | | { |
| | | return error("修改任务'" + job.getJobName() + "'失败,目标字符串不允许'http(s)'调用"); |
| | | } |
| | | else if (StringUtils.containsAnyIgnoreCase(job.getInvokeTarget(), Constants.JOB_ERROR_STR)) |
| | | { |
| | | return error("修改任务'" + job.getJobName() + "'失败,目标字符串存在违规"); |
| | | } |
| | | else if (!ScheduleUtils.whiteList(job.getInvokeTarget())) |
| | | { |
| | | return error("修改任务'" + job.getJobName() + "'失败,目标字符串不在白名单内"); |
| | | } |
| | | job.setUpdateBy(getUsername()); |
| | | return toAjax(jobService.updateJob(job)); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务状态修改 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')") |
| | | @Log(title = "定时任务", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/changeStatus") |
| | | public AjaxResult changeStatus(@RequestBody SysJob job) throws SchedulerException |
| | | { |
| | | SysJob newJob = jobService.selectJobById(job.getJobId()); |
| | | newJob.setStatus(job.getStatus()); |
| | | return toAjax(jobService.changeStatus(newJob)); |
| | | } |
| | | |
| | | /** |
| | | * 定时任务立即执行一次 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:changeStatus')") |
| | | @Log(title = "定时任务", businessType = BusinessType.UPDATE) |
| | | @PutMapping("/run") |
| | | public AjaxResult run(@RequestBody SysJob job) throws SchedulerException |
| | | { |
| | | boolean result = jobService.run(job); |
| | | return result ? success() : error("任务不存在或已过期!"); |
| | | } |
| | | |
| | | /** |
| | | * 删除定时任务 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:remove')") |
| | | @Log(title = "定时任务", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{jobIds}") |
| | | public AjaxResult remove(@PathVariable Long[] jobIds) throws SchedulerException, TaskException |
| | | { |
| | | jobService.deleteJobByIds(jobIds); |
| | | return success(); |
| | | } |
| | | } |
| | |
| | | @RequestMapping("/monitor/jobLog") |
| | | public class SysJobLogController extends BaseController |
| | | { |
| | | @Autowired |
| | | private ISysJobLogService jobLogService; |
| | | |
| | | /** |
| | | * 查询定时任务调度日志列表 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:list')") |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysJobLog sysJobLog) |
| | | { |
| | | // startPage(); |
| | | List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog); |
| | | return getDataTable(list); |
| | | } |
| | | |
| | | /** |
| | | * 导出定时任务调度日志列表 |
| | | */ |
| | | // @PreAuthorize("@ss.hasPermi('monitor:job:export')") |
| | | // @Log(title = "任务调度日志", businessType = BusinessType.EXPORT) |
| | | // @PostMapping("/export") |
| | | // public void export(HttpServletResponse response, SysJobLog sysJobLog) |
| | | // { |
| | | // List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog); |
| | | // ExcelUtil<SysJobLog> util = new ExcelUtil<SysJobLog>(SysJobLog.class); |
| | | // util.exportExcel(response, list, "调度日志"); |
| | | // } |
| | | |
| | | /** |
| | | * 根据调度编号获取详细信息 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:query')") |
| | | @GetMapping(value = "/{jobLogId}") |
| | | public AjaxResult getInfo(@PathVariable Long jobLogId) |
| | | { |
| | | return success(jobLogService.selectJobLogById(jobLogId)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除定时任务调度日志 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:remove')") |
| | | @Log(title = "定时任务调度日志", businessType = BusinessType.DELETE) |
| | | @DeleteMapping("/{jobLogIds}") |
| | | public AjaxResult remove(@PathVariable Long[] jobLogIds) |
| | | { |
| | | return toAjax(jobLogService.deleteJobLogByIds(jobLogIds)); |
| | | } |
| | | |
| | | /** |
| | | * 清空定时任务调度日志 |
| | | */ |
| | | @PreAuthorize("@ss.hasPermi('monitor:job:remove')") |
| | | @Log(title = "调度日志", businessType = BusinessType.CLEAN) |
| | | @DeleteMapping("/clean") |
| | | public AjaxResult clean() |
| | | { |
| | | jobLogService.cleanJobLog(); |
| | | return success(); |
| | | } |
| | | } |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component("ryTask") |
| | | public class RyTask |
| | | { |
| | | public void ryMultipleParams(String s, Boolean b, Long l, Double d, Integer i) |
| | |
| | | * @author ruoyi |
| | | * |
| | | */ |
| | | @DisallowConcurrentExecution |
| | | public class QuartzDisallowConcurrentExecution extends AbstractQuartzJob |
| | | { |
| | | @Override |
| | |
| | | </description> |
| | | |
| | | <dependencies> |
| | | |
| | | |
| | | <!-- wx 支付 --> |
| | | <dependency> |
| | | <groupId>com.github.binarywang</groupId> |
| | | <artifactId>weixin-java-pay</artifactId> |
| | | <version>4.4.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.qcloud</groupId> |
| | | <artifactId>cos_api</artifactId> |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | @ApiModel("添加办理进度Dto") |
| | | @Data |
| | | public class AddScheduleDto { |
| | | @ApiModelProperty("订单id") |
| | | @NotBlank(message = "订单id不能为空") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("内容") |
| | | @NotBlank(message = "内容不能为空") |
| | | private String text; |
| | | |
| | | @ApiModelProperty("图片") |
| | | @NotBlank(message = "图片不能为空") |
| | | private String img; |
| | | |
| | | @ApiModelProperty("买家回复的进度id 卖家不传") |
| | | private String scheduleId; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @ApiModel("公司上下架Dto") |
| | | @Data |
| | | public class CompanyUpdateStatusDto { |
| | | @ApiModelProperty("公司id") |
| | | @NotBlank(message = "公司id不能为空") |
| | | private String id; |
| | | |
| | | @ApiModelProperty("1上架 2下架") |
| | | @NotNull(message = "状态不能为空") |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.system.model.TbOpeningBank; |
| | | import com.ruoyi.system.model.TbPermit; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | |
| | | @ApiModel("发布公司信息Dto") |
| | | @Data |
| | | public class EditCompanyDto { |
| | | @ApiModelProperty("公司id") |
| | | @NotBlank(message = "公司id不能为空") |
| | | private String id; |
| | | /** |
| | | * 公司名称 |
| | | */ |
| | | @ApiModelProperty("公司名称") |
| | | @NotBlank(message = "公司名称不能为空") |
| | | private String companyName; |
| | | /** |
| | | * 所在省 |
| | | */ |
| | | @ApiModelProperty("所在省") |
| | | @NotBlank(message = "所在省不能为空") |
| | | private String city; |
| | | /** |
| | | * 所在省code |
| | | */ |
| | | @ApiModelProperty("所在省code") |
| | | private String cityCode; |
| | | /** |
| | | * 所在市 |
| | | */ |
| | | @ApiModelProperty("所在市") |
| | | @NotBlank(message = "所在市不能为空") |
| | | private String province; |
| | | /** |
| | | * 所在市code |
| | | */ |
| | | @ApiModelProperty("所在市code") |
| | | private String provinceCode; |
| | | /** |
| | | * 所在区 |
| | | */ |
| | | @ApiModelProperty("所在区") |
| | | @NotBlank(message = "所在区不能为空") |
| | | private String area; |
| | | /** |
| | | * 所在区code |
| | | */ |
| | | @ApiModelProperty("所在区code") |
| | | @NotBlank(message = "所在区code不能为空") |
| | | private String areaCode; |
| | | /** |
| | | * 成立时间 |
| | | */ |
| | | @ApiModelProperty("成立时间") |
| | | @NotBlank(message = "成立时间不能为空") |
| | | private String establishTime; |
| | | /** |
| | | * 1个体工商户 2有限公司 3独资 |
| | | */ |
| | | @TableField("company_category") |
| | | @NotNull(message = "请选择公司类型") |
| | | @ApiModelProperty("公司类型 1个体工商户 2有限公司 3独资") |
| | | private Integer companyCategory; |
| | | /** |
| | | * 行业id |
| | | */ |
| | | @NotNull(message = "请选择行业") |
| | | @ApiModelProperty("行业id不能为空") |
| | | private Integer companyIndustryId; |
| | | /** |
| | | * 1一般纳税人 2小规模纳税人 3税务未登记 |
| | | */ |
| | | @NotNull(message = "请选择纳税人类型") |
| | | @ApiModelProperty("纳税人类型 1一般纳税人 2小规模纳税人 3税务未登记") |
| | | private Integer taxpayerType; |
| | | /** |
| | | * 纳税信用等级 |
| | | */ |
| | | @NotBlank(message = "请选择纳税信用等级") |
| | | @ApiModelProperty("纳税信用等级") |
| | | private String taxCredit; |
| | | /** |
| | | * 预估天数 |
| | | */ |
| | | @ApiModelProperty("预估天数") |
| | | @NotNull(message = "预计完成时间不能为空") |
| | | private Integer estimatedDays; |
| | | /** |
| | | * 公章数 |
| | | */ |
| | | @ApiModelProperty("公章数") |
| | | @NotNull(message = "请输入公章数") |
| | | private Integer officialSealNum; |
| | | /** |
| | | * 实缴资金 |
| | | */ |
| | | @ApiModelProperty("实缴资金") |
| | | private String paidInFunds; |
| | | /** |
| | | * 征信报告链接 |
| | | */ |
| | | @ApiModelProperty("征信报告链接") |
| | | @NotBlank(message = "征信报告链接不能为空") |
| | | private String link; |
| | | /** |
| | | * 开票额度 |
| | | */ |
| | | @ApiModelProperty("开票额度") |
| | | private String invoiceLimit; |
| | | /** |
| | | * 注册资本 企查查 |
| | | */ |
| | | @ApiModelProperty("注册资本 企查查") |
| | | private String realRegisteredCapital; |
| | | /** |
| | | * 注册资金 |
| | | */ |
| | | @ApiModelProperty("注册资金") |
| | | @NotBlank(message = "注册资金不能为空") |
| | | private String registeredCapital; |
| | | /** |
| | | * 高新技术企业 |
| | | */ |
| | | @NotNull(message = "请选择是否高新技术") |
| | | @ApiModelProperty("高新技术企业0否1是") |
| | | private Integer highTechEnterpriseTechnology; |
| | | /** |
| | | * 社保缴纳0无1有 |
| | | */ |
| | | @NotNull(message = "请选择是否缴纳社保") |
| | | @ApiModelProperty("社保缴纳0无1有") |
| | | private Integer socialSecurity; |
| | | /** |
| | | * 招投标0无1有 |
| | | */ |
| | | @NotNull(message = "请选择是否需要招投标") |
| | | @ApiModelProperty("招投标0无1有") |
| | | private Integer tendering; |
| | | /** |
| | | * 商标0无 1有 |
| | | */ |
| | | @NotNull(message = "请选择是否需要商标") |
| | | @ApiModelProperty("商标0无 1有") |
| | | private Integer haveTrademark; |
| | | /** |
| | | * 商标数 |
| | | */ |
| | | @ApiModelProperty("商标数") |
| | | private Integer trademarkNum; |
| | | /** |
| | | * 专利0无 1有 |
| | | */ |
| | | @NotNull(message = "请选择是否需要专利") |
| | | @ApiModelProperty("专利0无 1有") |
| | | private Integer havePatent; |
| | | /** |
| | | * 专利数 |
| | | */ |
| | | @ApiModelProperty("专利数") |
| | | private Integer patentNum; |
| | | /** |
| | | * 软著0无1有 |
| | | */ |
| | | @NotNull(message = "请选择是否需要软著") |
| | | @ApiModelProperty("软著0无1有") |
| | | private Integer haveSoftWorks; |
| | | /** |
| | | * 软著数 |
| | | */ |
| | | @ApiModelProperty("软著数") |
| | | private Integer softWorksNum; |
| | | /** |
| | | * 企业改名费 |
| | | */ |
| | | @ApiModelProperty("企业改名费") |
| | | private BigDecimal renameMoney; |
| | | /** |
| | | * 预计增加时间 |
| | | */ |
| | | @ApiModelProperty("预计增加时间") |
| | | private Integer renameDay; |
| | | /** |
| | | * 迁区费用 |
| | | */ |
| | | @ApiModelProperty("迁区费用") |
| | | private BigDecimal relocationAreaMoney; |
| | | /** |
| | | * 迁区预计增加时间 |
| | | */ |
| | | @ApiModelProperty("迁区预计增加时间") |
| | | private Integer relocationAreaDay; |
| | | /** |
| | | * 售卖价格 |
| | | */ |
| | | @ApiModelProperty("售卖价格") |
| | | @NotNull(message = "售卖价格不能为空") |
| | | private BigDecimal saleMoney; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty("联系电话") |
| | | @NotBlank(message = "联系电话不能为空") |
| | | private String phone; |
| | | /** |
| | | * 收件人 |
| | | */ |
| | | @ApiModelProperty("收件人") |
| | | @NotBlank(message = "收件人不能为空") |
| | | private String recipient; |
| | | /** |
| | | * 收件人地址 |
| | | */ |
| | | @ApiModelProperty("收件人地址") |
| | | @NotBlank(message = "收件人地址不能为空") |
| | | private String recipientAddress; |
| | | /** |
| | | * 所需资料 |
| | | */ |
| | | @ApiModelProperty("所需资料") |
| | | private String information; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("经营范围") |
| | | private String scope; |
| | | |
| | | @ApiModelProperty("许可证信息") |
| | | private List<TbPermit> permits; |
| | | |
| | | @ApiModelProperty("开户行信息") |
| | | @NotNull(message = "请选择开户行信息") |
| | | private List<TbOpeningBank> openingBanks; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | |
| | | @ApiModel("编辑办理进度Dto") |
| | | @Data |
| | | public class EditScheduleDto { |
| | | @ApiModelProperty("进度id") |
| | | @NotBlank(message = "进度id不能为空") |
| | | private String scheduleId; |
| | | |
| | | @ApiModelProperty("内容") |
| | | @NotBlank(message = "内容不能为空") |
| | | private String text; |
| | | |
| | | @ApiModelProperty("图片") |
| | | @NotBlank(message = "图片不能为空") |
| | | private String img; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.dto; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.ruoyi.system.model.TbOpeningBank; |
| | | import com.ruoyi.system.model.TbPermit; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | |
| | | @ApiModel("发布公司信息Dto") |
| | | @Data |
| | | public class PushCompanyDto { |
| | | /** |
| | | * 公司名称 |
| | | */ |
| | | @ApiModelProperty("公司名称") |
| | | @NotBlank(message = "公司名称不能为空") |
| | | private String companyName; |
| | | /** |
| | | * 所在省 |
| | | */ |
| | | @ApiModelProperty("所在省") |
| | | @NotBlank(message = "所在省不能为空") |
| | | private String city; |
| | | /** |
| | | * 所在省code |
| | | */ |
| | | @ApiModelProperty("所在省code") |
| | | private String cityCode; |
| | | /** |
| | | * 所在市 |
| | | */ |
| | | @ApiModelProperty("所在市") |
| | | @NotBlank(message = "所在市不能为空") |
| | | private String province; |
| | | /** |
| | | * 所在市code |
| | | */ |
| | | @ApiModelProperty("所在市code") |
| | | private String provinceCode; |
| | | /** |
| | | * 所在区 |
| | | */ |
| | | @ApiModelProperty("所在区") |
| | | @NotBlank(message = "所在区不能为空") |
| | | private String area; |
| | | /** |
| | | * 所在区code |
| | | */ |
| | | @ApiModelProperty("所在区code") |
| | | @NotBlank(message = "所在区code不能为空") |
| | | private String areaCode; |
| | | /** |
| | | * 成立时间 |
| | | */ |
| | | @ApiModelProperty("成立时间") |
| | | @NotBlank(message = "成立时间不能为空") |
| | | private String establishTime; |
| | | /** |
| | | * 1个体工商户 2有限公司 3独资 |
| | | */ |
| | | @TableField("company_category") |
| | | @NotNull(message = "请选择公司类型") |
| | | @ApiModelProperty("公司类型 1个体工商户 2有限公司 3独资") |
| | | private Integer companyCategory; |
| | | /** |
| | | * 行业id |
| | | */ |
| | | @NotNull(message = "请选择行业") |
| | | @ApiModelProperty("行业id不能为空") |
| | | private Integer companyIndustryId; |
| | | /** |
| | | * 1一般纳税人 2小规模纳税人 3税务未登记 |
| | | */ |
| | | @NotNull(message = "请选择纳税人类型") |
| | | @ApiModelProperty("纳税人类型 1一般纳税人 2小规模纳税人 3税务未登记") |
| | | private Integer taxpayerType; |
| | | /** |
| | | * 纳税信用等级 |
| | | */ |
| | | @NotBlank(message = "请选择纳税信用等级") |
| | | @ApiModelProperty("纳税信用等级") |
| | | private String taxCredit; |
| | | /** |
| | | * 预估天数 |
| | | */ |
| | | @ApiModelProperty("预估天数") |
| | | @NotNull(message = "预计完成时间不能为空") |
| | | private Integer estimatedDays; |
| | | /** |
| | | * 公章数 |
| | | */ |
| | | @ApiModelProperty("公章数") |
| | | @NotNull(message = "请输入公章数") |
| | | private Integer officialSealNum; |
| | | /** |
| | | * 实缴资金 |
| | | */ |
| | | @ApiModelProperty("实缴资金") |
| | | private String paidInFunds; |
| | | /** |
| | | * 征信报告链接 |
| | | */ |
| | | @ApiModelProperty("征信报告链接") |
| | | @NotBlank(message = "征信报告链接不能为空") |
| | | private String link; |
| | | /** |
| | | * 开票额度 |
| | | */ |
| | | @ApiModelProperty("开票额度") |
| | | private String invoiceLimit; |
| | | /** |
| | | * 注册资本 企查查 |
| | | */ |
| | | @ApiModelProperty("注册资本 企查查") |
| | | private String realRegisteredCapital; |
| | | /** |
| | | * 注册资金 |
| | | */ |
| | | @ApiModelProperty("注册资金") |
| | | @NotBlank(message = "注册资金不能为空") |
| | | private String registeredCapital; |
| | | /** |
| | | * 高新技术企业 |
| | | */ |
| | | @NotNull(message = "请选择是否高新技术") |
| | | @ApiModelProperty("高新技术企业0否1是") |
| | | private Integer highTechEnterpriseTechnology; |
| | | /** |
| | | * 社保缴纳0无1有 |
| | | */ |
| | | @NotNull(message = "请选择是否缴纳社保") |
| | | @ApiModelProperty("社保缴纳0无1有") |
| | | private Integer socialSecurity; |
| | | /** |
| | | * 招投标0无1有 |
| | | */ |
| | | @NotNull(message = "请选择是否需要招投标") |
| | | @ApiModelProperty("招投标0无1有") |
| | | private Integer tendering; |
| | | /** |
| | | * 商标0无 1有 |
| | | */ |
| | | @NotNull(message = "请选择是否需要商标") |
| | | @ApiModelProperty("商标0无 1有") |
| | | private Integer haveTrademark; |
| | | /** |
| | | * 商标数 |
| | | */ |
| | | @ApiModelProperty("商标数") |
| | | private Integer trademarkNum; |
| | | /** |
| | | * 专利0无 1有 |
| | | */ |
| | | @NotNull(message = "请选择是否需要专利") |
| | | @ApiModelProperty("专利0无 1有") |
| | | private Integer havePatent; |
| | | /** |
| | | * 专利数 |
| | | */ |
| | | @ApiModelProperty("专利数") |
| | | private Integer patentNum; |
| | | /** |
| | | * 软著0无1有 |
| | | */ |
| | | @NotNull(message = "请选择是否需要软著") |
| | | @ApiModelProperty("软著0无1有") |
| | | private Integer haveSoftWorks; |
| | | /** |
| | | * 软著数 |
| | | */ |
| | | @ApiModelProperty("软著数") |
| | | private Integer softWorksNum; |
| | | /** |
| | | * 企业改名费 |
| | | */ |
| | | @ApiModelProperty("企业改名费") |
| | | private BigDecimal renameMoney; |
| | | /** |
| | | * 预计增加时间 |
| | | */ |
| | | @ApiModelProperty("预计增加时间") |
| | | private Integer renameDay; |
| | | /** |
| | | * 迁区费用 |
| | | */ |
| | | @ApiModelProperty("迁区费用") |
| | | private BigDecimal relocationAreaMoney; |
| | | /** |
| | | * 迁区预计增加时间 |
| | | */ |
| | | @ApiModelProperty("迁区预计增加时间") |
| | | private Integer relocationAreaDay; |
| | | /** |
| | | * 售卖价格 |
| | | */ |
| | | @ApiModelProperty("售卖价格") |
| | | @NotNull(message = "售卖价格不能为空") |
| | | private BigDecimal saleMoney; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | @ApiModelProperty("联系电话") |
| | | @NotBlank(message = "联系电话不能为空") |
| | | private String phone; |
| | | /** |
| | | * 收件人 |
| | | */ |
| | | @ApiModelProperty("收件人") |
| | | @NotBlank(message = "收件人不能为空") |
| | | private String recipient; |
| | | /** |
| | | * 收件人地址 |
| | | */ |
| | | @ApiModelProperty("收件人地址") |
| | | @NotBlank(message = "收件人地址不能为空") |
| | | private String recipientAddress; |
| | | /** |
| | | * 所需资料 |
| | | */ |
| | | @ApiModelProperty("所需资料") |
| | | private String information; |
| | | /** |
| | | * 备注 |
| | | */ |
| | | @ApiModelProperty("备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty("经营范围") |
| | | private String scope; |
| | | |
| | | @ApiModelProperty("许可证信息") |
| | | private List<TbPermit> permits; |
| | | |
| | | @ApiModelProperty("开户行信息") |
| | | @NotNull(message = "请选择开户行信息") |
| | | private List<TbOpeningBank> openingBanks; |
| | | } |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Mapper |
| | | public interface SysConfigMapper |
| | | { |
| | | /** |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.model.TbAgreement; |
| | | |
| | | /** |
| | | * <p> |
| | | * 协议 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | public interface TbAgreementMapper extends BaseMapper<TbAgreement> { |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.model.TbCompany; |
| | | import com.ruoyi.system.query.MyPushCompanyListQuery; |
| | | import com.ruoyi.system.vo.MyPushCompanyListVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TbCompanyMapper extends BaseMapper<TbCompany> { |
| | | |
| | | |
| | | Page<MyPushCompanyListVo> getMyPushCompanyList(@Param("page") Page<MyPushCompanyListVo> page, @Param("query") MyPushCompanyListQuery query, @Param("userId") Long userId); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.system.model.TbOrder; |
| | | import com.ruoyi.system.query.MyOrderListQuery; |
| | | import com.ruoyi.system.vo.MyPushCompanyListVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | public interface TbOrderMapper extends BaseMapper<TbOrder> { |
| | | |
| | | Page<MyPushCompanyListVo> getMyOrderList(@Param("page") Page<MyPushCompanyListVo> page, @Param("query") MyOrderListQuery query, @Param("userId") Long userId); |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.model.TbSchedule; |
| | | |
| | | /** |
| | | * <p> |
| | | * 进度表 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | public interface TbScheduleMapper extends BaseMapper<TbSchedule> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.system.model.TbSystemConfig; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统配置 Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | public interface TbSystemConfigMapper extends BaseMapper<TbSystemConfig> { |
| | | |
| | | } |
| | |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | @TableField("source_id") |
| | | private String sourceId; |
| | | |
| | | @TableField("order_price") |
| | | private BigDecimal orderPrice; |
| | | |
| | | @TableField("order_id") |
| | | private String orderId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 协议 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("tb_agreement") |
| | | public class TbAgreement extends Model<TbAgreement> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 类型(1=用户协议,2=隐私协议,3=下单须知,4=关于我们,5=注销协议) |
| | | */ |
| | | @ApiModelProperty("类型(1=用户协议,2=隐私协议,3=下单须知,4=关于我们,5=注销协议)") |
| | | private Integer type; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | @ApiModelProperty("内容") |
| | | private String content; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("invoice_limit") |
| | | private String invoiceLimit; |
| | | /** |
| | | * 注册资本 |
| | | * 注册资本 企查查 |
| | | */ |
| | | @TableField("real_registered_capital") |
| | | private String realRegisteredCapital; |
| | | /** |
| | | * 注册资金 |
| | | */ |
| | | @TableField("registered_capital") |
| | | private String registeredCapital; |
| | |
| | | * 备注 |
| | | */ |
| | | private String remark; |
| | | |
| | | private Integer status; |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | |
| | | |
| | | private String scope; |
| | | |
| | | private Integer isDelete; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | |
| | | /** |
| | | * 开户行名称 |
| | | */ |
| | | @ApiModelProperty("开户行名称") |
| | | private String name; |
| | | /** |
| | | * 开户类型 |
| | | */ |
| | | @ApiModelProperty("开户类型") |
| | | private String category; |
| | | /** |
| | | * 有无外币0无 1有 |
| | | */ |
| | | @ApiModelProperty("有无外币0无 1有") |
| | | @TableField("have_foreign_currency") |
| | | private Integer haveForeignCurrency; |
| | | @TableField("create_time") |
New file |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单表 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("tb_order") |
| | | public class TbOrder extends Model<TbOrder> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | /** |
| | | * 购买公司id |
| | | */ |
| | | @TableField("company_id") |
| | | private String companyId; |
| | | /** |
| | | * -1取消 0待支付 2待确认 3已确认 4办理中 5已完成 |
| | | */ |
| | | private Integer status; |
| | | /** |
| | | * 购买人id |
| | | */ |
| | | @TableField("user_id") |
| | | private String userId; |
| | | /** |
| | | * 购买价格 |
| | | */ |
| | | private BigDecimal price; |
| | | /** |
| | | * 订单编号 |
| | | */ |
| | | @TableField("order_no") |
| | | private String orderNo; |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | /** |
| | | * 确认时间 |
| | | */ |
| | | @TableField("confirm_time") |
| | | private Date confirmTime; |
| | | /** |
| | | * 支付时间 |
| | | */ |
| | | @TableField("pay_time") |
| | | private Date payTime; |
| | | |
| | | @TableField("shareUserId") |
| | | private String share_user_id; |
| | | |
| | | @TableField("commission_price") |
| | | private BigDecimal commissionPrice; |
| | | |
| | | @TableField("commission_platform") |
| | | private BigDecimal commissionPlatform; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | |
| | | /** |
| | | * 名称 |
| | | */ |
| | | @ApiModelProperty("名称") |
| | | private String name; |
| | | /** |
| | | * 等级 |
| | | */ |
| | | @ApiModelProperty("等级") |
| | | private String level; |
| | | /** |
| | | * 失效时间 |
| | | */ |
| | | @ApiModelProperty("失效时间") |
| | | @TableField("expire_time") |
| | | private String expireTime; |
| | | @TableField("create_time") |
New file |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | | * 进度表 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("tb_schedule") |
| | | public class TbSchedule extends Model<TbSchedule> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.ASSIGN_ID) |
| | | private String id; |
| | | /** |
| | | * 订单id |
| | | */ |
| | | @TableField("order_id") |
| | | private String orderId; |
| | | /** |
| | | * 内容 |
| | | */ |
| | | private String text; |
| | | /** |
| | | * 图片 |
| | | */ |
| | | private String img; |
| | | @TableField("create_time") |
| | | private Date createTime; |
| | | /** |
| | | * 卖家回复才会有 |
| | | */ |
| | | @TableField("parent_id") |
| | | private String parentId; |
| | | |
| | | |
| | | private String userId; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.model; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.experimental.Accessors; |
| | | |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统配置 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @Accessors(chain = true) |
| | | @TableName("tb_system_config") |
| | | public class TbSystemConfig extends Model<TbSystemConfig> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | /** |
| | | * 类型(1=启动页管理,2-客服管理,3-抽单设置) |
| | | */ |
| | | private Integer type; |
| | | /** |
| | | * 配置内容json(1和2为图片地址,3为{“platform”:"2.00","user":"0.50"}) |
| | | */ |
| | | private String content; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | @ApiModel("发布查询query") |
| | | public class MyOrderListQuery extends BasePage { |
| | | @ApiModelProperty("0待支付 2待确认 4办理中 5已完成") |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.query; |
| | | |
| | | import com.ruoyi.common.core.domain.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | @ApiModel("发布查询query") |
| | | public class MyPushCompanyListQuery extends BasePage { |
| | | @ApiModelProperty("1待交易 2待确认 3已确认 4办理中 5已完成") |
| | | private Integer status; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.model.TbAgreement; |
| | | |
| | | /** |
| | | * <p> |
| | | * 协议 服务类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | public interface TbAgreementService extends IService<TbAgreement> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.dto.EditCompanyDto; |
| | | import com.ruoyi.system.dto.PushCompanyDto; |
| | | import com.ruoyi.system.model.TbCompany; |
| | | import com.ruoyi.system.query.CompanyListQuery; |
| | | import com.ruoyi.system.query.MyPushCompanyListQuery; |
| | | import com.ruoyi.system.vo.IndexCompanyListVo; |
| | | import com.ruoyi.system.vo.MyPushCompanyListVo; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | |
| | | Page<IndexCompanyListVo> getCompanyList(CompanyListQuery query, Long userId); |
| | | |
| | | |
| | | void pushCompany(PushCompanyDto dto, Long userId); |
| | | |
| | | |
| | | void editCompany(EditCompanyDto dto, TbCompany company , Long userId); |
| | | |
| | | |
| | | Page<MyPushCompanyListVo> getMyPushCompanyList(MyPushCompanyListQuery query, Long userId); |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; |
| | | import com.github.binarywang.wxpay.exception.WxPayException; |
| | | import com.ruoyi.system.model.TbCompany; |
| | | import com.ruoyi.system.model.TbOrder; |
| | | import com.ruoyi.system.query.MyOrderListQuery; |
| | | import com.ruoyi.system.vo.MyPushCompanyListVo; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单表 服务类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | public interface TbOrderService extends IService<TbOrder> { |
| | | |
| | | Page<MyPushCompanyListVo> getMyOrderList(MyOrderListQuery query, Long userId); |
| | | |
| | | |
| | | WxPayMpOrderResult payOrder(TbOrder tbOrder, Long userId); |
| | | |
| | | |
| | | void placeOrder(String companyId, TbCompany company,Long userId); |
| | | |
| | | |
| | | String weAppletChatNotice(String xmlData) throws WxPayException; |
| | | |
| | | void commission(TbOrder order,String userId); |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.dto.AddScheduleDto; |
| | | import com.ruoyi.system.model.TbSchedule; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * <p> |
| | | * 进度表 服务类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | public interface TbScheduleService extends IService<TbSchedule> { |
| | | |
| | | void addSchedule( AddScheduleDto dto,Long userId); |
| | | |
| | | |
| | | void buyerAddSchedule(AddScheduleDto dto,Long userId); |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.model.TbSystemConfig; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统配置 服务类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | public interface TbSystemConfigService extends IService<TbSystemConfig> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.mapper.TbAgreementMapper; |
| | | import com.ruoyi.system.model.TbAgreement; |
| | | import com.ruoyi.system.service.TbAgreementService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 协议 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | @Service |
| | | public class TbAgreementServiceImpl extends ServiceImpl<TbAgreementMapper, TbAgreement> implements TbAgreementService { |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.dto.EditCompanyDto; |
| | | import com.ruoyi.system.dto.PushCompanyDto; |
| | | import com.ruoyi.system.mapper.TbCompanyMapper; |
| | | import com.ruoyi.system.mapper.TbOpeningBankMapper; |
| | | import com.ruoyi.system.model.TbCompany; |
| | | import com.ruoyi.system.model.TbIndustry; |
| | | import com.ruoyi.system.model.TbOpeningBank; |
| | | import com.ruoyi.system.model.TbPermit; |
| | | import com.ruoyi.system.query.CompanyListQuery; |
| | | import com.ruoyi.system.query.MyPushCompanyListQuery; |
| | | import com.ruoyi.system.service.TbCompanyService; |
| | | import com.ruoyi.system.service.TbIndustryService; |
| | | import com.ruoyi.system.service.TbOpeningBankService; |
| | | import com.ruoyi.system.service.TbPermitService; |
| | | import com.ruoyi.system.vo.IndexCompanyListVo; |
| | | import com.ruoyi.system.vo.MyPushCompanyListVo; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | @Autowired |
| | | private TbIndustryService industryService; |
| | | |
| | | @Autowired |
| | | private TbOpeningBankService openingBankService; |
| | | |
| | | @Override |
| | | public Page<IndexCompanyListVo> getCompanyList(CompanyListQuery query, Long userId) { |
| | | Page<TbCompany> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | Page<IndexCompanyListVo> page1 = new Page<>(); |
| | | LambdaQueryWrapper<TbCompany> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(TbCompany::getIsDelete,0); |
| | | queryWrapper.eq(TbCompany::getStatus,1); |
| | | if(query.getCertificateNames()!=null && query.getCertificateNames().size()>0){ |
| | | List<TbPermit> tbPermits = permitService.list(new LambdaQueryWrapper<TbPermit>().in(TbPermit::getName, query.getCertificateNames())); |
| | | if(tbPermits.isEmpty()){ |
| | |
| | | page1.setRecords(list); |
| | | return page1; |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
| | | public void pushCompany(PushCompanyDto dto, Long userId) { |
| | | TbCompany tbCompany = new TbCompany(); |
| | | BeanUtils.copyProperties(dto,tbCompany); |
| | | tbCompany.setUserId(userId.toString()); |
| | | this.save(tbCompany); |
| | | |
| | | List<TbPermit> permits = dto.getPermits(); |
| | | for (TbPermit permit : permits) { |
| | | permit.setCompanyId(tbCompany.getId()); |
| | | permitService.save(permit); |
| | | } |
| | | List<TbOpeningBank> openingBanks = dto.getOpeningBanks(); |
| | | for (TbOpeningBank openingBank : openingBanks) { |
| | | openingBank.setCompanyId(tbCompany.getId()); |
| | | openingBankService.save(openingBank); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
| | | public void editCompany(EditCompanyDto dto, TbCompany company ,Long userId) { |
| | | BeanUtils.copyProperties(dto,company); |
| | | company.setUserId(userId.toString()); |
| | | this.updateById(company); |
| | | permitService.remove(new LambdaQueryWrapper<TbPermit>().eq(TbPermit::getCompanyId,dto.getId())); |
| | | openingBankService.remove(new LambdaQueryWrapper<TbOpeningBank>().eq(TbOpeningBank::getCompanyId,dto.getId())); |
| | | List<TbPermit> permits = dto.getPermits(); |
| | | for (TbPermit permit : permits) { |
| | | permit.setCompanyId(company.getId()); |
| | | permitService.save(permit); |
| | | } |
| | | List<TbOpeningBank> openingBanks = dto.getOpeningBanks(); |
| | | for (TbOpeningBank openingBank : openingBanks) { |
| | | openingBank.setCompanyId(company.getId()); |
| | | openingBankService.save(openingBank); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Page<MyPushCompanyListVo> getMyPushCompanyList(MyPushCompanyListQuery query, Long userId) { |
| | | Page<MyPushCompanyListVo> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | return this.baseMapper.getMyPushCompanyList(page,query,userId); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult; |
| | | import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; |
| | | import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; |
| | | import com.github.binarywang.wxpay.exception.WxPayException; |
| | | import com.github.binarywang.wxpay.service.WxPayService; |
| | | import com.ruoyi.common.utils.OrderUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.TbOrderMapper; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.MyOrderListQuery; |
| | | import com.ruoyi.system.service.TbOrderService; |
| | | import com.ruoyi.system.service.TbSystemConfigService; |
| | | import com.ruoyi.system.service.TbUserService; |
| | | import com.ruoyi.system.utils.wx.WxProperties; |
| | | import com.ruoyi.system.vo.MyPushCompanyListVo; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.checkerframework.checker.units.qual.A; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.core.annotation.OrderUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Propagation; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.net.InetAddress; |
| | | import java.net.MalformedURLException; |
| | | import java.util.Date; |
| | | import java.util.Objects; |
| | | import java.util.Optional; |
| | | |
| | | /** |
| | | * <p> |
| | | * 订单表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class TbOrderServiceImpl extends ServiceImpl<TbOrderMapper, TbOrder> implements TbOrderService { |
| | | |
| | | |
| | | @Resource |
| | | private WxProperties wxProperties; |
| | | |
| | | @Resource |
| | | private WxPayService wxPayService; |
| | | |
| | | |
| | | @Autowired |
| | | private TbSystemConfigService configService; |
| | | |
| | | @Autowired |
| | | private TbUserService userService; |
| | | |
| | | |
| | | @Override |
| | | public Page<MyPushCompanyListVo> getMyOrderList(MyOrderListQuery query, Long userId) { |
| | | Page<MyPushCompanyListVo> page = new Page<>(query.getPageNum(), query.getPageSize()); |
| | | return this.baseMapper.getMyOrderList(page,query,userId); |
| | | } |
| | | |
| | | @Override |
| | | public WxPayMpOrderResult payOrder(TbOrder tbOrder, Long userId) { |
| | | WxPayMpOrderResult result = this.createWxOrderToWxService(tbOrder.getUserId(),tbOrder.getOrderNo(),tbOrder.getPrice(),"购买商品", ""); |
| | | return result; |
| | | } |
| | | |
| | | @Override |
| | | public void placeOrder(String companyId, TbCompany company,Long userId) { |
| | | // 创建订单 |
| | | TbOrder tbOrder = new TbOrder(); |
| | | tbOrder.setCompanyId(companyId); |
| | | tbOrder.setUserId(userId.toString()); |
| | | tbOrder.setOrderNo( OrderUtil.getOrderNoForPrefix("ZSX")); |
| | | tbOrder.setStatus(2); |
| | | tbOrder.setPrice(company.getSaleMoney()); |
| | | |
| | | // 生成记录 看是否分佣 金额 |
| | | TbUser user = userService.getById(company.getUserId()); |
| | | TbSystemConfig config = configService.getOne(new LambdaQueryWrapper<TbSystemConfig>().eq(TbSystemConfig::getType, 3)); |
| | | |
| | | if(config!=null){ |
| | | JSONObject jsonObject = JSONObject.parseObject(config.getContent()); |
| | | BigDecimal platformCommission = new BigDecimal(jsonObject.get("platform").toString()); |
| | | BigDecimal userCommission = new BigDecimal(jsonObject.get("user").toString()); |
| | | BigDecimal price = tbOrder.getPrice(); |
| | | BigDecimal divide = platformCommission.divide(new BigDecimal("100")); |
| | | BigDecimal platformCommissionMoney = divide.multiply(price).setScale(2, RoundingMode.HALF_UP); |
| | | if(StringUtils.isNotEmpty(user.getInviteId()) && user.getInviteNum()>0){ |
| | | BigDecimal divide1 = userCommission.divide(new BigDecimal("100")); |
| | | BigDecimal userCommissionMoney = divide1.multiply(price).setScale(2, RoundingMode.HALF_UP); |
| | | tbOrder.setCommissionPrice(userCommissionMoney); |
| | | } |
| | | tbOrder.setShare_user_id(user.getInviteId()); |
| | | tbOrder.setCommissionPlatform(platformCommissionMoney); |
| | | } |
| | | tbOrder.insert(); |
| | | |
| | | |
| | | // 生成记录 |
| | | TbAccountDetail tbAccountDetail = new TbAccountDetail(); |
| | | tbAccountDetail.setUserId(company.getUserId()); |
| | | tbAccountDetail.setType(1); |
| | | tbAccountDetail.setCategory(2); |
| | | tbAccountDetail.setStatus(1); |
| | | BigDecimal subtract = tbOrder.getPrice().subtract(tbOrder.getCommissionPrice()).subtract(tbOrder.getCommissionPlatform()); |
| | | tbAccountDetail.setMoney(subtract); |
| | | tbAccountDetail.setOrderId(tbOrder.getId()); |
| | | tbAccountDetail.insert(); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | @Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) |
| | | public String weAppletChatNotice(String xmlData) throws WxPayException { |
| | | final WxPayOrderNotifyResult notifyResult = this.wxPayService.parseOrderNotifyResult( |
| | | xmlData); |
| | | // 更新用户订单状态 |
| | | String outTradeNo = notifyResult.getOutTradeNo(); |
| | | TbOrder order = this.getOne(new LambdaQueryWrapper<TbOrder>().eq(TbOrder::getOrderNo, outTradeNo)); |
| | | if (order!=null) { |
| | | order.setStatus(4); |
| | | order.setPayTime(new Date()); |
| | | order.updateById(); |
| | | } |
| | | return "<xml> <return_code><![CDATA[SUCCESS]]></return_code> <return_msg><![CDATA[OK]]></return_msg> </xml>"; |
| | | } |
| | | |
| | | @Override |
| | | public void commission(TbOrder order,String userId) { |
| | | String shareUserId = order.getShare_user_id(); |
| | | if(StringUtils.isNotEmpty(shareUserId)){ |
| | | TbUser shareUser = userService.getById(shareUserId); |
| | | BigDecimal add = shareUser.getBalance().add(order.getCommissionPrice()); |
| | | shareUser.setBalance(add); |
| | | shareUser.updateById(); |
| | | |
| | | |
| | | TbAccountDetail accountDetail = new TbAccountDetail(); |
| | | accountDetail.setUserId(shareUserId); |
| | | accountDetail.setType(1); |
| | | accountDetail.setCategory(4); |
| | | accountDetail.setStatus(2); |
| | | accountDetail.setMoney(order.getCommissionPrice()); |
| | | accountDetail.setOrderPrice(order.getPrice()); |
| | | accountDetail.setSourceId(order.getUserId()); |
| | | accountDetail.insert(); |
| | | |
| | | |
| | | } |
| | | BigDecimal decimal = order.getPrice().subtract(order.getCommissionPrice()).subtract(order.getCommissionPlatform()); |
| | | TbUser user = userService.getById(userId); |
| | | BigDecimal add = user.getBalance().add(decimal); |
| | | user.setBalance(add); |
| | | user.updateById(); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * @param openId 微信用户openId |
| | | * @param outTradeNo 我们的系统订单编号 |
| | | * @param amountPrice 付款金额 |
| | | * @param description 商品描述 |
| | | * @param type 付款类型 详见PayTypeEnumConst |
| | | * @Description: 向微信服务器发起预付款订单 |
| | | * @Return: java.util.Map<java.lang.String, java.lang.Object> |
| | | */ |
| | | public WxPayMpOrderResult createWxOrderToWxService(String openId, String outTradeNo, |
| | | BigDecimal amountPrice, String description, String type){ |
| | | double amount = amountPrice.doubleValue(); // 将字符串"0.01"转换为浮点数0.01 |
| | | int amountInFen = (int) (amount * 100); |
| | | try { |
| | | WxPayUnifiedOrderRequest wxPayUnifiedOrderRequest = new WxPayUnifiedOrderRequest(); |
| | | |
| | | wxPayUnifiedOrderRequest.setBody("购买商品"); |
| | | wxPayUnifiedOrderRequest.setOutTradeNo(outTradeNo); |
| | | wxPayUnifiedOrderRequest.setTotalFee(amountInFen);// 元转成分 |
| | | wxPayUnifiedOrderRequest.setSpbillCreateIp( |
| | | InetAddress.getLoopbackAddress().getHostAddress()); |
| | | wxPayUnifiedOrderRequest.setTradeType("JSAPI"); |
| | | wxPayUnifiedOrderRequest.setNotifyUrl( |
| | | wxProperties.getNotifyUrl() +"mall-hotel-order/WX/callback"); |
| | | WxPayMpOrderResult result = wxPayService.createOrder(wxPayUnifiedOrderRequest); |
| | | |
| | | return result; |
| | | } catch (WxPayException e) { |
| | | log.error("微信支付失败!订单号:{},原因:{}", outTradeNo, e.getMessage()); |
| | | e.printStackTrace(); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.dto.AddScheduleDto; |
| | | import com.ruoyi.system.mapper.TbScheduleMapper; |
| | | import com.ruoyi.system.model.TbSchedule; |
| | | import com.ruoyi.system.service.TbScheduleService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 进度表 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | @Service |
| | | public class TbScheduleServiceImpl extends ServiceImpl<TbScheduleMapper, TbSchedule> implements TbScheduleService { |
| | | |
| | | @Override |
| | | public void addSchedule(AddScheduleDto dto,Long userId) { |
| | | TbSchedule tbSchedule = new TbSchedule(); |
| | | tbSchedule.setOrderId(dto.getOrderId()); |
| | | tbSchedule.setText(dto.getText()); |
| | | tbSchedule.setImg(dto.getImg()); |
| | | tbSchedule.setUserId(userId.toString()); |
| | | this.save(tbSchedule); |
| | | } |
| | | |
| | | @Override |
| | | public void buyerAddSchedule(AddScheduleDto dto,Long userId) { |
| | | TbSchedule tbSchedule = new TbSchedule(); |
| | | tbSchedule.setOrderId(dto.getOrderId()); |
| | | tbSchedule.setText(dto.getText()); |
| | | tbSchedule.setImg(dto.getImg()); |
| | | tbSchedule.setParentId(dto.getScheduleId()); |
| | | tbSchedule.setUserId(userId.toString()); |
| | | this.save(tbSchedule); |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.system.mapper.TbSystemConfigMapper; |
| | | import com.ruoyi.system.model.TbSystemConfig; |
| | | import com.ruoyi.system.service.TbSystemConfigService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 系统配置 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author administrator |
| | | * @since 2025-05-27 |
| | | */ |
| | | @Service |
| | | public class TbSystemConfigServiceImpl extends ServiceImpl<TbSystemConfigMapper, TbSystemConfig> implements TbSystemConfigService { |
| | | |
| | | } |
| | |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | public abstract class AbstractJob implements Job{ |
| | | protected Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | @Override |
| | | public abstract void execute(JobExecutionContext context) throws JobExecutionException; |
| | | |
| | | protected FlwTaskMapper flwTaskMapper; |
| | | protected FlwTaskActorMapper flwTaskActorMapper; |
| | | protected SmsUtil smsUtil; |
| | | protected ISysUserService sysUserService; |
| | | |
| | | public AbstractJob(){ |
| | | this.flwTaskMapper = SpringContextsUtil.getBean(FlwTaskMapper.class); |
| | | this.flwTaskActorMapper = SpringContextsUtil.getBean(FlwTaskActorMapper.class); |
| | | this.smsUtil = SpringContextsUtil.getBean(SmsUtil.class); |
| | | this.sysUserService = SpringContextsUtil.getBean(ISysUserService.class); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import java.util.Map; |
| | | |
| | | public class QuartzManager { |
| | | private static SchedulerFactory factory = new StdSchedulerFactory(); |
| | | private static final String TRIGGER_NAME_PREFIX = "TRIGGER_PREFIX_"; |
| | | private static final String JOB_NAME_PREFIX = "JOB_PREFIX_"; |
| | | |
| | | /** |
| | | * 添加定时任务:具体某个时间点执行一次的任务,如:在某个2015-06-01 12:00发送一条消息 |
| | | * |
| | | * @param jobName |
| | | * 具体的任务名+ID标识唯一 |
| | | * @param jobType |
| | | * @param date |
| | | * @param jp |
| | | */ |
| | | public synchronized static void addJob(Class<? extends Job> jobClass, String jobName, TimeJobType jobType, Date date, |
| | | Map<String, ? extends Object> jp) { |
| | | //logger.debug("ADD JOB {},jobName={},jobTyep={},jobDate={},",jobClass.getName(),jobName,jobType,date); |
| | | try { |
| | | Scheduler sched = factory.getScheduler(); |
| | | JobDetail job = JobBuilder.newJob(jobClass).withIdentity(JOB_NAME_PREFIX + jobName, jobType.getType()) |
| | | .setJobData(new JobDataMap(jp)).build(); |
| | | |
| | | SimpleTrigger trigger = (SimpleTrigger) TriggerBuilder.newTrigger() |
| | | .withIdentity(TRIGGER_NAME_PREFIX + jobName, jobType.getType()).startAt(date).build(); |
| | | removeJob(jobName, jobType); |
| | | |
| | | sched.scheduleJob(job, trigger); |
| | | |
| | | if (!sched.isShutdown()) { |
| | | sched.start(); |
| | | } |
| | | } catch (Exception e) { |
| | | //logger.error("ADD JOB exception {},jobName={},jobTyep={},jobDate={},",jobClass.getName(),jobName,jobType,date); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改一个任务的触发时间(使用默认的任务组名,触发器名,触发器组名) |
| | | * @param jobName |
| | | * @param time |
| | | */ |
| | | public synchronized static void modifyJobTime(String jobName,TimeJobType jobType, Date time) { |
| | | //logger.error("Update JOB exception,jobName={},jobTyep={},jobDate={}," ,jobName,jobType,time); |
| | | try { |
| | | JobKey jobKey = new JobKey(JOB_NAME_PREFIX + jobName, jobType.getType()); |
| | | TriggerKey key = new TriggerKey(TRIGGER_NAME_PREFIX + jobName, jobType.getType()); |
| | | |
| | | |
| | | Scheduler sched = factory.getScheduler(); |
| | | SimpleTrigger trigger = (SimpleTrigger) sched.getTrigger(key); |
| | | if(trigger == null) { |
| | | return; |
| | | } |
| | | Date oldTime = trigger.getStartTime(); |
| | | |
| | | if (oldTime.getTime() != time.getTime()) { |
| | | JobDetail jobDetail = sched.getJobDetail(jobKey); |
| | | Class<? extends Job> objJobClass = jobDetail.getJobClass(); |
| | | removeJob(jobName,jobType); |
| | | Map<String, Object> jp = jobDetail.getJobDataMap(); |
| | | addJob(objJobClass, jobName, jobType, time, jp); |
| | | } |
| | | } catch (Exception e) { |
| | | // logger.error("Update JOB exception,jobName={},jobTyep={},jobDate={}," ,jobName,jobType,time); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 移除一个任务 |
| | | * |
| | | * @param jobName |
| | | */ |
| | | public synchronized static void removeJob(String jobName, TimeJobType jobType) { |
| | | try { |
| | | JobKey jobKey = new JobKey(JOB_NAME_PREFIX + jobName, jobType.getType()); |
| | | TriggerKey key = new TriggerKey(TRIGGER_NAME_PREFIX + jobName, jobType.getType()); |
| | | Scheduler sched = factory.getScheduler(); |
| | | |
| | | JobDetail detail = sched.getJobDetail(jobKey); |
| | | if (detail != null) { |
| | | sched.pauseJob(jobKey); |
| | | sched.pauseTrigger(key);// 停止触发器 |
| | | sched.unscheduleJob(key);// 移除触发器 |
| | | sched.deleteJob(jobKey);// 删除任务 |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 启动所有定时任务 |
| | | */ |
| | | public synchronized static void startJobs() { |
| | | try { |
| | | Scheduler sched = factory.getScheduler(); |
| | | sched.start(); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 关闭所有定时任务 |
| | | */ |
| | | public synchronized static void shutdownJobs() { |
| | | try { |
| | | Scheduler sched = factory.getScheduler(); |
| | | if (!sched.isShutdown()) { |
| | | sched.shutdown(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | * @date 2025年2月17日 下午7:22:28 |
| | | */ |
| | | public enum TimeJobType { |
| | | AUTO_AUDIT("auto_audit","自动审核"); |
| | | private String type; |
| | | private String desc; |
| | | private TimeJobType(String type, String desc) { |
| | | this.type = type; |
| | | this.desc = desc; |
| | | } |
| | | public String getType() { |
| | | return type; |
| | | } |
| | | public void setType(String type) { |
| | | this.type = type; |
| | | } |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | } |
| | |
| | | * @author Administrator |
| | | * |
| | | */ |
| | | public class StateProcessJob extends AbstractJob { |
| | | public class StateProcessJob { |
| | | |
| | | public static final String name = "stateProcess_"; |
| | | |
| | | @Override |
| | | public void execute(JobExecutionContext context) |
| | | throws JobExecutionException { |
| | | JobDataMap maps = context.getMergedJobDataMap(); |
| | | Long taskId = maps.getLong("id"); |
| | | try { |
| | | System.err.println("执行定时任务"); |
| | | ProcessAgreeBO processAgreeBO = new ProcessAgreeBO(); |
| | | processAgreeBO.setTaskId(String.valueOf(taskId)); |
| | | FlwTaskActor flwTaskActor = flwTaskActorMapper.selectOne(Wrappers.lambdaQuery(FlwTaskActor.class).eq(FlwTaskActor::getTaskId, taskId).last("LIMIT 1")); |
| | | if(Objects.isNull(flwTaskActor)){ |
| | | System.err.println("该任务不存在"); |
| | | return; |
| | | } |
| | | processAgreeBO.setRemark("自动审批"); |
| | | processAgreeBO.setUserId(Long.valueOf(flwTaskActor.getActorId())); |
| | | // 短信发送 |
| | | SysUser sysUser = sysUserService.selectUserById(Long.valueOf(flwTaskActor.getActorId())); |
| | | smsUtil.sendSms(sysUser.getPhonenumber(), "2369951", new String[]{}); |
| | | }catch(Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | import org.springframework.context.ApplicationContextAware; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public class SpringContextsUtil implements ApplicationContextAware{ |
| | | |
| | | private static ApplicationContext applicationContext; |
| | |
| | | * @author zhibing.pu |
| | | * @date 2023/7/11 8:39 |
| | | */ |
| | | @Component |
| | | public class TaskUtil { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.utils.wx; |
| | | |
| | | |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | @Configuration |
| | | @ConfigurationProperties(prefix = WxProperties.WX_PREFIX) |
| | | public class WxProperties { |
| | | |
| | | public static final String WX_PREFIX = "wx"; |
| | | |
| | | private String memberAppId; |
| | | |
| | | private String memberAppSecret; |
| | | private String appId; |
| | | /** |
| | | * 微信支付商户号 |
| | | */ |
| | | private String mchId; |
| | | /** |
| | | * 微信支付商户密钥 |
| | | */ |
| | | private String mchKey; |
| | | /** |
| | | * apiclient_cert.p12文件的绝对路径,或者如果放在项目中,请以classpath:开头指定 |
| | | */ |
| | | private String keyPath; |
| | | |
| | | private String callbackPath; |
| | | |
| | | private String staffAppId; |
| | | |
| | | private String staffAppSecret; |
| | | |
| | | private String notifyUrl; |
| | | |
| | | public String getNotifyUrl() { |
| | | return notifyUrl; |
| | | } |
| | | |
| | | public void setNotifyUrl(String notifyUrl) { |
| | | this.notifyUrl = notifyUrl; |
| | | } |
| | | |
| | | public String getMemberAppId() { |
| | | return memberAppId; |
| | | } |
| | | |
| | | public void setMemberAppId(String memberAppId) { |
| | | this.memberAppId = memberAppId; |
| | | } |
| | | |
| | | public String getMemberAppSecret() { |
| | | return memberAppSecret; |
| | | } |
| | | |
| | | public void setMemberAppSecret(String memberAppSecret) { |
| | | this.memberAppSecret = memberAppSecret; |
| | | } |
| | | |
| | | public String getStaffAppId() { |
| | | return staffAppId; |
| | | } |
| | | |
| | | public void setStaffAppId(String staffAppId) { |
| | | this.staffAppId = staffAppId; |
| | | } |
| | | |
| | | public String getStaffAppSecret() { |
| | | return staffAppSecret; |
| | | } |
| | | |
| | | public String getMchId() { |
| | | return mchId; |
| | | } |
| | | |
| | | public void setMchId(String mchId) { |
| | | this.mchId = mchId; |
| | | } |
| | | |
| | | public String getMchKey() { |
| | | return mchKey; |
| | | } |
| | | |
| | | public void setMchKey(String mchKey) { |
| | | this.mchKey = mchKey; |
| | | } |
| | | |
| | | public String getKeyPath() { |
| | | return keyPath; |
| | | } |
| | | |
| | | public void setKeyPath(String keyPath) { |
| | | this.keyPath = keyPath; |
| | | } |
| | | |
| | | |
| | | public String getCallbackPath() { |
| | | return callbackPath; |
| | | } |
| | | |
| | | public void setCallbackPath(String callbackPath) { |
| | | this.callbackPath = callbackPath; |
| | | } |
| | | |
| | | public void setStaffAppSecret(String staffAppSecret) { |
| | | this.staffAppSecret = staffAppSecret; |
| | | } |
| | | |
| | | public String getAppId() { |
| | | return appId; |
| | | } |
| | | |
| | | public void setAppId(String appId) { |
| | | this.appId = appId; |
| | | } |
| | | } |
| | |
| | | private String signature; |
| | | private String code; |
| | | @ApiModelProperty(value = "邀请用户id") |
| | | private Long inviteUserId; |
| | | private String inviteUserId; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @ApiModel("发布结果Vo") |
| | | @Data |
| | | public class MyPushCompanyListVo { |
| | | @ApiModelProperty("公司id") |
| | | private String id; |
| | | |
| | | @ApiModelProperty("公司名称") |
| | | private String companyName; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty("售卖价格") |
| | | private BigDecimal saleMoney; |
| | | |
| | | @ApiModelProperty("订单id") |
| | | private String orderId; |
| | | |
| | | @ApiModelProperty("状态 -1取消 1待交易 2待确认(预定) 3已确认(待支付) 4办理中 5已完成") |
| | | private Integer status; |
| | | } |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TbAccountDetailMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.rest.model.TbAccountDetail"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="type" property="type" /> |
| | | <result column="category" property="category" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TbAddressMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.rest.model.TbAddress"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="city" property="city" /> |
| | | <result column="city_code" property="cityCode" /> |
| | | <result column="province" property="province" /> |
| | | <result column="province_code" property="provinceCode" /> |
| | | <result column="area" property="area" /> |
| | | <result column="area_code" property="areaCode" /> |
| | | <result column="username" property="username" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="detail" property="detail" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="is_delete" property="isDelete" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.system.mapper.TbAgreementMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TbAgreement"> |
| | | <id column="id" property="id" /> |
| | | <result column="type" property="type" /> |
| | | <result column="content" property="content" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TbBankMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.rest.model.TbBank"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="card_no" property="cardNo" /> |
| | | <result column="username" property="username" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="is_delete" property="isDelete" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TbBannerMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TbBanner"> |
| | | <id column="id" property="id" /> |
| | | <result column="position" property="position" /> |
| | | <result column="name" property="name" /> |
| | | <result column="jump_type" property="jumpType" /> |
| | | <result column="content_type" property="contentType" /> |
| | | <result column="content" property="content" /> |
| | | <result column="image_url" property="imageUrl" /> |
| | | <result column="video_url" property="videoUrl" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
| | |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="getMyPushCompanyList" resultType="com.ruoyi.system.vo.MyPushCompanyListVo"> |
| | | select * from ( |
| | | select t1.id,t1.company_name,t1.create_time,t1.sale_money ,t2.id orderId, |
| | | COALESCE(t2.status, 1) AS status |
| | | from tb_company t1 |
| | | left join tb_order t2 on t1.id = t2.company_id |
| | | where t1.user_id = #{userId} and t2.status >0 |
| | | ) as t3 where 1= 1 |
| | | <if test="query.status!=null"> |
| | | and t3.status = #{query.status} |
| | | </if> |
| | | order by t3.create_time desc |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.system.mapper.TbMessageMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.stylefeng.guns.rest.model.TbMessage"> |
| | | <id column="id" property="id" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="message" property="message" /> |
| | | <result column="is_read" property="isRead" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.system.mapper.TbOrderMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TbOrder"> |
| | | <id column="id" property="id" /> |
| | | <result column="company_id" property="companyId" /> |
| | | <result column="status" property="status" /> |
| | | <result column="user_id" property="userId" /> |
| | | <result column="price" property="price" /> |
| | | <result column="order_no" property="orderNo" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="confirm_time" property="confirmTime" /> |
| | | </resultMap> |
| | | |
| | | <select id="getMyOrderList" resultType="com.ruoyi.system.vo.MyPushCompanyListVo"> |
| | | select t1.id orderId,t2.id,t2.compamy_name companyName,t2.create_time createTime,t2.sale_money saleMoney,t2.status |
| | | from tb_order t1 left join tb_company t2 on t1.company_id = t2.id |
| | | where t2.user_id =#{userId} |
| | | order by t1.create_time desc |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <result column="company_id" property="companyId" /> |
| | | <result column="name" property="name" /> |
| | | <result column="level" property="level" /> |
| | | <result column="expire_ time" property="expire time" /> |
| | | <result column="expire_ time" property="expireTime" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
New file |
| | |
| | | <?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.system.mapper.TbScheduleMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TbSchedule"> |
| | | <id column="id" property="id" /> |
| | | <result column="order_id" property="orderId" /> |
| | | <result column="text" property="text" /> |
| | | <result column="img" property="img" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="parent_id" property="parentId" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <mapper namespace="com.ruoyi.system.mapper.TbSystemConfigMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.system.model.TbSystemConfig"> |
| | | <id column="id" property="id" /> |
| | | <result column="type" property="type" /> |
| | | <result column="content" property="content" /> |
| | | </resultMap> |
| | | |
| | | </mapper> |