2024-09-16 半流程

This commit is contained in:
zhp
2024-09-16 11:53:41 +08:00
parent 4c8957660a
commit 8612fb5c39
30 changed files with 1493 additions and 694 deletions

View File

@@ -1,7 +1,6 @@
package com.ruoyi.system.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
@@ -15,7 +14,7 @@ import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.system.domain.Channel;
import com.ruoyi.common.core.domain.http.Channel;
import com.ruoyi.system.service.IChannelService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;

View File

@@ -3,15 +3,11 @@ package com.ruoyi.system.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.domain.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
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 com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
@@ -47,6 +43,18 @@ public class CustomerApplyLogController extends BaseController
return getDataTable(list);
}
/**
* 获取商户今日已申请数
*
*
* @param merchantId
* @param source 请求来源
* @return 结果
*/
@GetMapping("/log/sum")
public R<Integer> sum(@PathVariable("merchantId") Long merchantId, @RequestHeader(SecurityConstants.FROM_SOURCE) String source){
return R.ok(customerApplyLogService.getApplySum(merchantId));
}
/**
* 导出客户申请记录列表
*/

View File

@@ -1,23 +1,17 @@
package com.ruoyi.system.controller;
import java.util.List;
import java.io.IOException;
import javax.servlet.http.HttpServletResponse;
import com.ruoyi.common.core.constant.SecurityConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.system.service.IChannelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
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 com.ruoyi.common.log.annotation.Log;
import com.ruoyi.common.log.enums.BusinessType;
import com.ruoyi.common.security.annotation.RequiresPermissions;
import com.ruoyi.system.domain.Merchant;
import com.ruoyi.common.core.domain.http.Merchant;
import com.ruoyi.system.service.IMerchantService;
import com.ruoyi.common.core.web.controller.BaseController;
import com.ruoyi.common.core.web.domain.AjaxResult;
@@ -52,6 +46,16 @@ public class MerchantController extends BaseController
return getDataTable(list);
}
/**
* 获取合适的产品
*
* @return 结果
*/
@GetMapping("/merchantList")
public R<List<Merchant>> merchantList(){
return merchantService.getMerchantList();
}
/**
* 导出商户列表
*/

View File

@@ -1,138 +0,0 @@
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
/**
* 渠道配置对象 channel
*
* @author ruoyi
* @date 2024-09-15
*/
public class Channel extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** */
private Long id;
/** 渠道名称 */
@Excel(name = "渠道名称")
private String channelName;
/** 渠道签名 */
@Excel(name = "渠道签名")
private String channelSign;
/** 扣量比 */
@Excel(name = "扣量比")
private Long score;
/** 推广页名称 */
@Excel(name = "推广页名称")
private String htmlName;
/** 推广页地址 */
@Excel(name = "推广页地址")
private String htmlLocation;
/** 可访问IP */
@Excel(name = "可访问IP")
private String ips;
/** 开启关闭时段 */
@Excel(name = "开启关闭时段")
private String period;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setChannelName(String channelName)
{
this.channelName = channelName;
}
public String getChannelName()
{
return channelName;
}
public void setChannelSign(String channelSign)
{
this.channelSign = channelSign;
}
public String getChannelSign()
{
return channelSign;
}
public void setScore(Long score)
{
this.score = score;
}
public Long getScore()
{
return score;
}
public void setHtmlName(String htmlName)
{
this.htmlName = htmlName;
}
public String getHtmlName()
{
return htmlName;
}
public void setHtmlLocation(String htmlLocation)
{
this.htmlLocation = htmlLocation;
}
public String getHtmlLocation()
{
return htmlLocation;
}
public void setIps(String ips)
{
this.ips = ips;
}
public String getIps()
{
return ips;
}
public void setPeriod(String period)
{
this.period = period;
}
public String getPeriod()
{
return period;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("channelName", getChannelName())
.append("channelSign", getChannelSign())
.append("score", getScore())
.append("htmlName", getHtmlName())
.append("htmlLocation", getHtmlLocation())
.append("ips", getIps())
.append("period", getPeriod())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

View File

@@ -1,642 +0,0 @@
package com.ruoyi.system.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
/**
* 商户对象 merchant
*
* @author ruoyi
* @date 2024-09-15
*/
public class Merchant extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Long id;
/** 商户类型 1H5 2连登 3半流程 4全流程 */
@Excel(name = "商户类型 1H5 2连登 3半流程 4全流程")
private Long merchantType;
/** 商户名称 */
@Excel(name = "商户名称")
private String merchantName;
/** 商户描述 */
@Excel(name = "商户描述")
private String merchantDescribe;
/** 商户主体 */
@Excel(name = "商户主体")
private String merchantCompany;
/** logo文件地址 */
@Excel(name = "logo文件地址")
private Long logo;
/** 是否上下架 */
@Excel(name = "是否上下架")
private Long status;
/** 定量数 */
@Excel(name = "定量数")
private String limitNum;
/** 是否定量 0否 1是 */
@Excel(name = "是否定量 0否 1是")
private Long limitType;
/** 渠道限制类型 0不限 1准入 2禁入 */
@Excel(name = "渠道限制类型 0不限 1准入 2禁入")
private Long channelLimitType;
/** 年龄限制开始 */
@Excel(name = "年龄限制开始")
private Long ageLimitStart;
/** 年龄限制结束 */
@Excel(name = "年龄限制结束")
private Long ageLimitEnd;
/** 手机号禁入号段英文逗号分隔 */
@Excel(name = "手机号禁入号段英文逗号分隔")
private String phoneLimit;
/** 无社保 */
@Excel(name = "无社保")
private Long socialSecurityNo;
/** 社保未满6个月 */
@Excel(name = "社保未满6个月")
private Long socialSecurityLow;
/** 社保6个月以上 */
@Excel(name = "社保6个月以上")
private Long socialSecurityHigh;
/** 无车 */
@Excel(name = "无车")
private Long carNo;
/** 有车 */
@Excel(name = "有车")
private Long carHave;
/** 保单缴纳不满一年 */
@Excel(name = "保单缴纳不满一年")
private Long guaranteeSlipLow;
/** 保单缴纳一年以上 */
@Excel(name = "保单缴纳一年以上")
private Long guaranteeSlipCentre;
/** 保单缴纳2年以上 */
@Excel(name = "保单缴纳2年以上")
private Long guaranteeSlipHigh;
/** 初中 */
@Excel(name = "初中")
private Long educationMiddle;
/** 高中 */
@Excel(name = "高中")
private Long educationHighSchool;
/** 中专 */
@Excel(name = "中专")
private Long educationPolytechnic;
/** 大专 */
@Excel(name = "大专")
private Long educationJuniorCollege;
/** 本科 */
@Excel(name = "本科")
private Long educationUndergraduateCourse;
/** 研究生及以上 */
@Excel(name = "研究生及以上")
private Long educationPostgraduate;
/** 公积金未满6个月 */
@Excel(name = "公积金未满6个月")
private Long accumulationFundLow;
/** 公积金满6个月以上 */
@Excel(name = "公积金满6个月以上")
private Long accumulationFundHigh;
/** 本地无房 */
@Excel(name = "本地无房")
private Long hourseNo;
/** 本地全款房 */
@Excel(name = "本地全款房")
private Long hourseFullPayment;
/** 本地按揭 */
@Excel(name = "本地按揭")
private Long hourseMortgaging;
/** 上班族 */
@Excel(name = "上班族")
private Long officeWorker;
/** 公务员 */
@Excel(name = "公务员")
private Long civilServant;
/** 私营业主 */
@Excel(name = "私营业主")
private Long privatePropertyOwners;
/** 个体户 */
@Excel(name = "个体户")
private Long selfEmployedPerson;
/** 其他职业 */
@Excel(name = "其他职业")
private Long otherOccupations;
/** 花呗5000以下 */
@Excel(name = "花呗5000以下")
private Long huaBeiLow;
/** 花呗5000-10000 */
@Excel(name = "花呗5000-10000")
private Long huaBeiMiddle;
/** 花呗10000以上 */
@Excel(name = "花呗10000以上")
private Long huaBeiHigh;
/** 白条5000以下 */
@Excel(name = "白条5000以下")
private Long baiTiaoLow;
/** 白条5000-10000 */
@Excel(name = "白条5000-10000")
private Long baiTiaoMiddle;
/** 白条10000以上 */
@Excel(name = "白条10000以上")
private Long baiTiaoHigh;
/** 芝麻分 */
@Excel(name = "芝麻分")
private Long zhiMa;
public void setId(Long id)
{
this.id = id;
}
public Long getId()
{
return id;
}
public void setMerchantType(Long merchantType)
{
this.merchantType = merchantType;
}
public Long getMerchantType()
{
return merchantType;
}
public void setMerchantName(String merchantName)
{
this.merchantName = merchantName;
}
public String getMerchantName()
{
return merchantName;
}
public void setMerchantDescribe(String merchantDescribe)
{
this.merchantDescribe = merchantDescribe;
}
public String getMerchantDescribe()
{
return merchantDescribe;
}
public void setMerchantCompany(String merchantCompany)
{
this.merchantCompany = merchantCompany;
}
public String getMerchantCompany()
{
return merchantCompany;
}
public void setLogo(Long logo)
{
this.logo = logo;
}
public Long getLogo()
{
return logo;
}
public void setStatus(Long status)
{
this.status = status;
}
public Long getStatus()
{
return status;
}
public void setLimitNum(String limitNum)
{
this.limitNum = limitNum;
}
public String getLimitNum()
{
return limitNum;
}
public void setLimitType(Long limitType)
{
this.limitType = limitType;
}
public Long getLimitType()
{
return limitType;
}
public void setChannelLimitType(Long channelLimitType)
{
this.channelLimitType = channelLimitType;
}
public Long getChannelLimitType()
{
return channelLimitType;
}
public void setAgeLimitStart(Long ageLimitStart)
{
this.ageLimitStart = ageLimitStart;
}
public Long getAgeLimitStart()
{
return ageLimitStart;
}
public void setAgeLimitEnd(Long ageLimitEnd)
{
this.ageLimitEnd = ageLimitEnd;
}
public Long getAgeLimitEnd()
{
return ageLimitEnd;
}
public void setPhoneLimit(String phoneLimit)
{
this.phoneLimit = phoneLimit;
}
public String getPhoneLimit()
{
return phoneLimit;
}
public void setSocialSecurityNo(Long socialSecurityNo)
{
this.socialSecurityNo = socialSecurityNo;
}
public Long getSocialSecurityNo()
{
return socialSecurityNo;
}
public void setSocialSecurityLow(Long socialSecurityLow)
{
this.socialSecurityLow = socialSecurityLow;
}
public Long getSocialSecurityLow()
{
return socialSecurityLow;
}
public void setSocialSecurityHigh(Long socialSecurityHigh)
{
this.socialSecurityHigh = socialSecurityHigh;
}
public Long getSocialSecurityHigh()
{
return socialSecurityHigh;
}
public void setCarNo(Long carNo)
{
this.carNo = carNo;
}
public Long getCarNo()
{
return carNo;
}
public void setCarHave(Long carHave)
{
this.carHave = carHave;
}
public Long getCarHave()
{
return carHave;
}
public void setGuaranteeSlipLow(Long guaranteeSlipLow)
{
this.guaranteeSlipLow = guaranteeSlipLow;
}
public Long getGuaranteeSlipLow()
{
return guaranteeSlipLow;
}
public void setGuaranteeSlipCentre(Long guaranteeSlipCentre)
{
this.guaranteeSlipCentre = guaranteeSlipCentre;
}
public Long getGuaranteeSlipCentre()
{
return guaranteeSlipCentre;
}
public void setGuaranteeSlipHigh(Long guaranteeSlipHigh)
{
this.guaranteeSlipHigh = guaranteeSlipHigh;
}
public Long getGuaranteeSlipHigh()
{
return guaranteeSlipHigh;
}
public void setEducationMiddle(Long educationMiddle)
{
this.educationMiddle = educationMiddle;
}
public Long getEducationMiddle()
{
return educationMiddle;
}
public void setEducationHighSchool(Long educationHighSchool)
{
this.educationHighSchool = educationHighSchool;
}
public Long getEducationHighSchool()
{
return educationHighSchool;
}
public void setEducationPolytechnic(Long educationPolytechnic)
{
this.educationPolytechnic = educationPolytechnic;
}
public Long getEducationPolytechnic()
{
return educationPolytechnic;
}
public void setEducationJuniorCollege(Long educationJuniorCollege)
{
this.educationJuniorCollege = educationJuniorCollege;
}
public Long getEducationJuniorCollege()
{
return educationJuniorCollege;
}
public void setEducationUndergraduateCourse(Long educationUndergraduateCourse)
{
this.educationUndergraduateCourse = educationUndergraduateCourse;
}
public Long getEducationUndergraduateCourse()
{
return educationUndergraduateCourse;
}
public void setEducationPostgraduate(Long educationPostgraduate)
{
this.educationPostgraduate = educationPostgraduate;
}
public Long getEducationPostgraduate()
{
return educationPostgraduate;
}
public void setAccumulationFundLow(Long accumulationFundLow)
{
this.accumulationFundLow = accumulationFundLow;
}
public Long getAccumulationFundLow()
{
return accumulationFundLow;
}
public void setAccumulationFundHigh(Long accumulationFundHigh)
{
this.accumulationFundHigh = accumulationFundHigh;
}
public Long getAccumulationFundHigh()
{
return accumulationFundHigh;
}
public void setHourseNo(Long hourseNo)
{
this.hourseNo = hourseNo;
}
public Long getHourseNo()
{
return hourseNo;
}
public void setHourseFullPayment(Long hourseFullPayment)
{
this.hourseFullPayment = hourseFullPayment;
}
public Long getHourseFullPayment()
{
return hourseFullPayment;
}
public void setHourseMortgaging(Long hourseMortgaging)
{
this.hourseMortgaging = hourseMortgaging;
}
public Long getHourseMortgaging()
{
return hourseMortgaging;
}
public void setOfficeWorker(Long officeWorker)
{
this.officeWorker = officeWorker;
}
public Long getOfficeWorker()
{
return officeWorker;
}
public void setCivilServant(Long civilServant)
{
this.civilServant = civilServant;
}
public Long getCivilServant()
{
return civilServant;
}
public void setPrivatePropertyOwners(Long privatePropertyOwners)
{
this.privatePropertyOwners = privatePropertyOwners;
}
public Long getPrivatePropertyOwners()
{
return privatePropertyOwners;
}
public void setSelfEmployedPerson(Long selfEmployedPerson)
{
this.selfEmployedPerson = selfEmployedPerson;
}
public Long getSelfEmployedPerson()
{
return selfEmployedPerson;
}
public void setOtherOccupations(Long otherOccupations)
{
this.otherOccupations = otherOccupations;
}
public Long getOtherOccupations()
{
return otherOccupations;
}
public void setHuaBeiLow(Long huaBeiLow)
{
this.huaBeiLow = huaBeiLow;
}
public Long getHuaBeiLow()
{
return huaBeiLow;
}
public void setHuaBeiMiddle(Long huaBeiMiddle)
{
this.huaBeiMiddle = huaBeiMiddle;
}
public Long getHuaBeiMiddle()
{
return huaBeiMiddle;
}
public void setHuaBeiHigh(Long huaBeiHigh)
{
this.huaBeiHigh = huaBeiHigh;
}
public Long getHuaBeiHigh()
{
return huaBeiHigh;
}
public void setBaiTiaoLow(Long baiTiaoLow)
{
this.baiTiaoLow = baiTiaoLow;
}
public Long getBaiTiaoLow()
{
return baiTiaoLow;
}
public void setBaiTiaoMiddle(Long baiTiaoMiddle)
{
this.baiTiaoMiddle = baiTiaoMiddle;
}
public Long getBaiTiaoMiddle()
{
return baiTiaoMiddle;
}
public void setBaiTiaoHigh(Long baiTiaoHigh)
{
this.baiTiaoHigh = baiTiaoHigh;
}
public Long getBaiTiaoHigh()
{
return baiTiaoHigh;
}
public void setZhiMa(Long zhiMa)
{
this.zhiMa = zhiMa;
}
public Long getZhiMa()
{
return zhiMa;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("merchantType", getMerchantType())
.append("merchantName", getMerchantName())
.append("merchantDescribe", getMerchantDescribe())
.append("merchantCompany", getMerchantCompany())
.append("logo", getLogo())
.append("status", getStatus())
.append("limitNum", getLimitNum())
.append("limitType", getLimitType())
.append("channelLimitType", getChannelLimitType())
.append("ageLimitStart", getAgeLimitStart())
.append("ageLimitEnd", getAgeLimitEnd())
.append("phoneLimit", getPhoneLimit())
.append("socialSecurityNo", getSocialSecurityNo())
.append("socialSecurityLow", getSocialSecurityLow())
.append("socialSecurityHigh", getSocialSecurityHigh())
.append("carNo", getCarNo())
.append("carHave", getCarHave())
.append("guaranteeSlipLow", getGuaranteeSlipLow())
.append("guaranteeSlipCentre", getGuaranteeSlipCentre())
.append("guaranteeSlipHigh", getGuaranteeSlipHigh())
.append("educationMiddle", getEducationMiddle())
.append("educationHighSchool", getEducationHighSchool())
.append("educationPolytechnic", getEducationPolytechnic())
.append("educationJuniorCollege", getEducationJuniorCollege())
.append("educationUndergraduateCourse", getEducationUndergraduateCourse())
.append("educationPostgraduate", getEducationPostgraduate())
.append("accumulationFundLow", getAccumulationFundLow())
.append("accumulationFundHigh", getAccumulationFundHigh())
.append("hourseNo", getHourseNo())
.append("hourseFullPayment", getHourseFullPayment())
.append("hourseMortgaging", getHourseMortgaging())
.append("officeWorker", getOfficeWorker())
.append("civilServant", getCivilServant())
.append("privatePropertyOwners", getPrivatePropertyOwners())
.append("selfEmployedPerson", getSelfEmployedPerson())
.append("otherOccupations", getOtherOccupations())
.append("huaBeiLow", getHuaBeiLow())
.append("huaBeiMiddle", getHuaBeiMiddle())
.append("huaBeiHigh", getHuaBeiHigh())
.append("baiTiaoLow", getBaiTiaoLow())
.append("baiTiaoMiddle", getBaiTiaoMiddle())
.append("baiTiaoHigh", getBaiTiaoHigh())
.append("zhiMa", getZhiMa())
.append("createTime", getCreateTime())
.append("updateTime", getUpdateTime())
.append("remark", getRemark())
.toString();
}
}

View File

@@ -1,7 +1,10 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.Channel;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.http.Channel;
import com.ruoyi.system.domain.CustomerApplyLog;
/**
* 渠道配置Mapper接口
@@ -9,7 +12,7 @@ import com.ruoyi.system.domain.Channel;
* @author ruoyi
* @date 2024-09-15
*/
public interface ChannelMapper
public interface ChannelMapper extends BaseMapper<Channel>
{
/**
* 查询渠道配置

View File

@@ -1,6 +1,9 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.http.Merchant;
import com.ruoyi.system.domain.CustomerApplyLog;
/**
@@ -9,7 +12,7 @@ import com.ruoyi.system.domain.CustomerApplyLog;
* @author ruoyi
* @date 2024-09-15
*/
public interface CustomerApplyLogMapper
public interface CustomerApplyLogMapper extends BaseMapper<CustomerApplyLog>
{
/**
* 查询客户申请记录

View File

@@ -1,7 +1,10 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.Merchant;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.domain.http.Customer;
import com.ruoyi.common.core.domain.http.Merchant;
/**
* 商户Mapper接口
@@ -9,7 +12,7 @@ import com.ruoyi.system.domain.Merchant;
* @author ruoyi
* @date 2024-09-15
*/
public interface MerchantMapper
public interface MerchantMapper extends BaseMapper<Merchant>
{
/**
* 查询商户

View File

@@ -1,7 +1,7 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.Channel;
import com.ruoyi.common.core.domain.http.Channel;
/**
* 渠道配置Service接口

View File

@@ -1,6 +1,8 @@
package com.ruoyi.system.service;
import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.system.domain.CustomerApplyLog;
/**
@@ -9,7 +11,7 @@ import com.ruoyi.system.domain.CustomerApplyLog;
* @author ruoyi
* @date 2024-09-15
*/
public interface ICustomerApplyLogService
public interface ICustomerApplyLogService extends IService<CustomerApplyLog>
{
/**
* 查询客户申请记录
@@ -58,4 +60,11 @@ public interface ICustomerApplyLogService
* @return 结果
*/
public int deleteCustomerApplyLogById(Long id);
/**
* 获取当日商户已申请数
* @param merchantId
* @return
*/
Integer getApplySum(Long merchantId);
}

View File

@@ -1,7 +1,11 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.Merchant;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.http.Customer;
import com.ruoyi.common.core.domain.http.Merchant;
/**
* 商户Service接口
@@ -9,7 +13,7 @@ import com.ruoyi.system.domain.Merchant;
* @author ruoyi
* @date 2024-09-15
*/
public interface IMerchantService
public interface IMerchantService extends IService<Merchant>
{
/**
* 查询商户
@@ -58,4 +62,11 @@ public interface IMerchantService
* @return 结果
*/
public int deleteMerchantById(Long id);
/**
* 获取基本合适的商户
* @return
*/
R<List<Merchant>> getMerchantList();
}

View File

@@ -11,7 +11,7 @@ import org.apache.commons.lang3.RandomStringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.stereotype.Service;
import com.ruoyi.system.domain.Channel;
import com.ruoyi.common.core.domain.http.Channel;
import com.ruoyi.system.service.IChannelService;
import org.springframework.transaction.annotation.Transactional;

View File

@@ -1,7 +1,12 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.common.core.utils.LocalDateTimeUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.CustomerApplyLogMapper;
@@ -15,7 +20,7 @@ import com.ruoyi.system.service.ICustomerApplyLogService;
* @date 2024-09-15
*/
@Service
public class CustomerApplyLogServiceImpl implements ICustomerApplyLogService
public class CustomerApplyLogServiceImpl extends ServiceImpl<CustomerApplyLogMapper, CustomerApplyLog> implements IService<CustomerApplyLog>,ICustomerApplyLogService
{
@Autowired
private CustomerApplyLogMapper customerApplyLogMapper;
@@ -93,4 +98,20 @@ public class CustomerApplyLogServiceImpl implements ICustomerApplyLogService
{
return customerApplyLogMapper.deleteCustomerApplyLogById(id);
}
/**
* 获取当日商户已申请数
* @param merchantId
* @return
*/
@Override
public Integer getApplySum(Long merchantId) {
Long aLong = customerApplyLogMapper.selectCount(
new LambdaQueryWrapper<CustomerApplyLog>()
.eq(CustomerApplyLog::getMerchantId, merchantId)
.eq(CustomerApplyLog::getOrderStatus, 0)
.ge(CustomerApplyLog::getCreateTime, LocalDateTimeUtils.getDateFromLocalDateTime(LocalDateTimeUtils.getTodayStartTime()))
.le(CustomerApplyLog::getCreateTime, LocalDateTimeUtils.getDateFromLocalDateTime(LocalDateTimeUtils.getTodayEndTime())));
return aLong.intValue();
}
}

View File

@@ -1,11 +1,19 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import cn.hutool.core.collection.CollectionUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.domain.http.Customer;
import com.ruoyi.common.core.utils.DateUtils;
import com.ruoyi.system.mapper.CustomerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.MerchantMapper;
import com.ruoyi.system.domain.Merchant;
import com.ruoyi.common.core.domain.http.Merchant;
import com.ruoyi.system.service.IMerchantService;
/**
@@ -15,7 +23,7 @@ import com.ruoyi.system.service.IMerchantService;
* @date 2024-09-15
*/
@Service
public class MerchantServiceImpl implements IMerchantService
public class MerchantServiceImpl extends ServiceImpl<MerchantMapper, Merchant> implements IService<Merchant>,IMerchantService
{
@Autowired
private MerchantMapper merchantMapper;
@@ -93,4 +101,17 @@ public class MerchantServiceImpl implements IMerchantService
{
return merchantMapper.deleteMerchantById(id);
}
/**
* 获取基本合适的商户
* @return
*/
@Override
public R<List<Merchant>> getMerchantList() {
List<Merchant> merchants = merchantMapper.selectList(new LambdaQueryWrapper<Merchant>().eq(Merchant::getStatus, true));
if (CollectionUtil.isEmpty(merchants)){
return R.fail();
}
return R.ok(merchants);
}
}

View File

@@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.ChannelMapper">
<resultMap type="com.ruoyi.system.domain.Channel" id="ChannelResult">
<resultMap type="com.ruoyi.common.core.domain.http.Channel" id="ChannelResult">
<result property="id" column="id" />
<result property="channelName" column="channel_name" />
<result property="channelSign" column="channel_sign" />
@@ -24,7 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectChannelIdName">
select id, channel_name, channel_sign from channel
</sql>
<select id="selectChannelList" parameterType="com.ruoyi.system.domain.Channel" resultMap="ChannelResult">
<select id="selectChannelList" parameterType="com.ruoyi.common.core.domain.http.Channel" resultMap="ChannelResult">
<include refid="selectChannelVo"/>
<where>
<if test="channelName != null and channelName != ''"> and channel_name like concat('%', #{channelName}, '%')</if>
@@ -42,7 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id}
</select>
<insert id="insertChannel" parameterType="com.ruoyi.system.domain.Channel" useGeneratedKeys="true" keyProperty="id">
<insert id="insertChannel" parameterType="com.ruoyi.common.core.domain.http.Channel" useGeneratedKeys="true" keyProperty="id">
insert into channel
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="channelName != null">channel_name,</if>
@@ -70,7 +70,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</trim>
</insert>
<update id="updateChannel" parameterType="com.ruoyi.system.domain.Channel">
<update id="updateChannel" parameterType="com.ruoyi.common.core.domain.http.Channel">
update channel
<trim prefix="SET" suffixOverrides=",">
<if test="channelName != null">channel_name = #{channelName},</if>

View File

@@ -4,7 +4,7 @@
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ruoyi.system.mapper.MerchantMapper">
<resultMap type="com.ruoyi.system.domain.Merchant" id="MerchantResult">
<resultMap type="com.ruoyi.common.core.domain.http.Merchant" id="MerchantResult">
<result property="id" column="id" />
<result property="merchantType" column="merchant_type" />
<result property="merchantName" column="merchant_name" />
@@ -58,7 +58,7 @@
select id, merchant_type, merchant_name, merchant_describe, merchant_company, logo, status, limit_num, limit_type, channel_limit_type, age_limit_start, age_limit_end, phone_limit, social_security_no, social_security_low, social_security_high, car_no, car_have, guarantee_slip_low, guarantee_slip_centre, guarantee_slip_high, education_middle, education_high_school, education_polytechnic, education_junior_college, education_undergraduate_course, education_postgraduate, accumulation_fund_low, accumulation_fund_high, hourse_no, hourse_full_payment, hourse_mortgaging, office_worker, civil_servant, private_property_owners, self_employed_person, other_occupations, hua_bei_low, hua_bei_middle, hua_bei_high, bai_tiao_low, bai_tiao_middle, bai_tiao_high, zhi_ma, create_time, update_time, remark from merchant
</sql>
<select id="selectMerchantList" parameterType="com.ruoyi.system.domain.Merchant" resultMap="MerchantResult">
<select id="selectMerchantList" parameterType="com.ruoyi.common.core.domain.http.Merchant" resultMap="MerchantResult">
<include refid="selectMerchantVo"/>
<where>
<if test="merchantType != null "> and merchant_type = #{merchantType}</if>
@@ -112,7 +112,7 @@
where id = #{id}
</select>
<insert id="insertMerchant" parameterType="com.ruoyi.system.domain.Merchant" useGeneratedKeys="true" keyProperty="id">
<insert id="insertMerchant" parameterType="com.ruoyi.common.core.domain.http.Merchant" useGeneratedKeys="true" keyProperty="id">
insert into merchant
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="merchantType != null">merchant_type,</if>
@@ -212,7 +212,7 @@
</trim>
</insert>
<update id="updateMerchant" parameterType="com.ruoyi.system.domain.Merchant">
<update id="updateMerchant" parameterType="com.ruoyi.common.core.domain.http.Merchant">
update merchant
<trim prefix="SET" suffixOverrides=",">
<if test="merchantType != null">merchant_type = #{merchantType},</if>