diff --git a/pom.xml b/pom.xml index b5f5605d..6423abc6 100644 --- a/pom.xml +++ b/pom.xml @@ -18,17 +18,19 @@ UTF-8 1.8 2.7.2 + 1.5.3 2021.0.3 2021.0.1.0 2.0.4 1.5.1 2.7.3 - 2.2.2 + 3.0.2 3.0.0 1.6.2 1.27.2 2.3.2 1.4.3 + 5.3.3 1.2.11 3.5.1 2.11.0 @@ -95,12 +97,11 @@ - + io.swagger @@ -121,10 +122,16 @@ - + + + + com.github.pagehelper + pagehelper + ${pagehelper.version} @@ -239,7 +246,12 @@ ruoyi-common-datascope ${ruoyi.version} - + + + com.mybatis-flex + mybatis-flex-spring-boot-starter + ${mybatis-flex.version} + com.ruoyi diff --git a/ruoyi-common/ruoyi-common-core/pom.xml b/ruoyi-common/ruoyi-common-core/pom.xml index f3fba33f..bcf477c1 100644 --- a/ruoyi-common/ruoyi-common-core/pom.xml +++ b/ruoyi-common/ruoyi-common-core/pom.xml @@ -48,9 +48,13 @@ - + + + com.github.pagehelper + pagehelper @@ -112,7 +116,11 @@ javax.servlet javax.servlet-api - + + + com.mybatis-flex + mybatis-flex-spring-boot-starter + io.swagger diff --git a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java index b316f893..79aee389 100644 --- a/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java +++ b/ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/web/domain/BaseEntity.java @@ -5,6 +5,7 @@ import java.util.Date; import java.util.HashMap; import java.util.Map; import com.fasterxml.jackson.annotation.JsonFormat; +import com.mybatisflex.annotation.Column; /** * Entity基类 @@ -16,6 +17,7 @@ public class BaseEntity implements Serializable private static final long serialVersionUID = 1L; /** 搜索值 */ + @Column(ignore = true) private String searchValue; /** 创建者 */ @@ -23,6 +25,7 @@ public class BaseEntity implements Serializable /** 创建时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Column(onInsertValue = "now()") private Date createTime; /** 更新者 */ @@ -30,12 +33,14 @@ public class BaseEntity implements Serializable /** 更新时间 */ @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @Column(onUpdateValue = "now()", onInsertValue = "now()") private Date updateTime; /** 备注 */ private String remark; /** 请求参数 */ + @Column(ignore = true) private Map params; public String getSearchValue() diff --git a/ruoyi-common/ruoyi-common-security/pom.xml b/ruoyi-common/ruoyi-common-security/pom.xml index 69fbad15..605d3884 100644 --- a/ruoyi-common/ruoyi-common-security/pom.xml +++ b/ruoyi-common/ruoyi-common-security/pom.xml @@ -33,7 +33,11 @@ com.ruoyi ruoyi-common-redis - + + + com.mybatis-flex + mybatis-flex-spring-boot-starter + diff --git a/ruoyi-modules/ruoyi-system/pom.xml b/ruoyi-modules/ruoyi-system/pom.xml index 14822bf3..4e07cb60 100644 --- a/ruoyi-modules/ruoyi-system/pom.xml +++ b/ruoyi-modules/ruoyi-system/pom.xml @@ -59,7 +59,11 @@ com.ruoyi ruoyi-common-datasource - + + + com.mybatis-flex + mybatis-flex-spring-boot-starter + com.ruoyi diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java index dc0f8a64..d3e35c68 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/RuoYiSystemApplication.java @@ -1,5 +1,10 @@ package com.ruoyi.system; - +import com.github.pagehelper.PageInterceptor; +import com.ruoyi.system.configProperties.XxlJobProperties; +import com.xxl.job.core.executor.impl.XxlJobSpringExecutor; +import lombok.extern.log4j.Log4j2; +import lombok.var; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import com.ruoyi.common.security.annotation.EnableCustomConfig; @@ -14,6 +19,7 @@ import org.springframework.web.client.RestTemplate; * * @author ruoyi */ +@Log4j2 @EnableCustomConfig @EnableCustomSwagger2 @EnableRyFeignClients @@ -39,4 +45,29 @@ public class RuoYiSystemApplication public RestTemplate restTemplate(RestTemplateBuilder builder) { // Do any additional configuration here return builder.build(); } + //使用自动配置无效, + //需要手动注入bean,以让 + //com.mybatisflex.spring.boot.MybatisFlexAutoConfiguration#MybatisFlexAutoConfiguration + //正常获取到com.github.pagehelper.PageInterceptor + @Bean public PageInterceptor pageInterceptor(){ + var i = new PageInterceptor(); + //转小驼峰用 var i = new MyPageInterceptor(); + //i.setProperties(null); + return i; + } + @Autowired + private XxlJobProperties xxlJobProperties; + @Bean + public XxlJobSpringExecutor xxlJobExecutor() { + System.out.println(">>>>>>>>>>> xxl-job config init from nacos"); + XxlJobSpringExecutor xxlJobSpringExecutor = new XxlJobSpringExecutor(); + xxlJobSpringExecutor.setAdminAddresses(xxlJobProperties.getAdmin().getAddresses()); + xxlJobSpringExecutor.setAppname(xxlJobProperties.getExecutor().getAppname()); + xxlJobSpringExecutor.setIp(xxlJobProperties.getExecutor().getIp()); + xxlJobSpringExecutor.setPort(xxlJobProperties.getExecutor().getPort()); + xxlJobSpringExecutor.setAccessToken(xxlJobProperties.getAccessToken()); + xxlJobSpringExecutor.setLogPath(xxlJobProperties.getExecutor().getLogpath()); + xxlJobSpringExecutor.setLogRetentionDays(xxlJobProperties.getExecutor().getLogretentiondays()); + return xxlJobSpringExecutor; + } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/configProperties/XxlJobProperties.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/configProperties/XxlJobProperties.java new file mode 100644 index 00000000..ac0e9283 --- /dev/null +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/configProperties/XxlJobProperties.java @@ -0,0 +1,53 @@ +package com.ruoyi.system.configProperties; +import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.cloud.context.config.annotation.RefreshScope; +import org.springframework.stereotype.Component; + +@Component +@Data +@ConfigurationProperties("xxl.job") +@RefreshScope +public class XxlJobProperties { + + /** + * admin : {"addresses":"http://192.168.2.165:32530/xxl-job-admin"} + * executor : {"ip":null,"port":9999,"logpath":"/data/applogs/xxl-job/jobhandler","appname":"xxl-job-001"} + * accessToken : null + */ + + private AdminBean admin; + private ExecutorBean executor; + private String accessToken; + + + @Setter + @Getter + public static class AdminBean { + /** + * addresses : http://192.168.2.165:32530/xxl-job-admin + */ + + private String addresses; + + + } + @Setter + @Getter + public static class ExecutorBean { + /** + * ip : null + * port : 9999 + * logpath : /data/applogs/xxl-job/jobhandler + * appname : xxl-job-001 + */ + + private String ip; + private int port; + private String logpath; + private String appname; + private int logretentiondays; + } +} diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/FollowUpController.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/FollowUpController.java index 54bccfa5..7f1e317b 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/FollowUpController.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/FollowUpController.java @@ -78,7 +78,7 @@ public class FollowUpController extends BaseController @PostMapping public AjaxResult add(@RequestBody FollowUp followUp) { - return toAjax(followUpService.insertFollowUp(followUp)); + return toAjax(followUpService.save(followUp)); } /** diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingTeamRel.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingTeamRel.java index 95da08a3..4086b569 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingTeamRel.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/BuildingTeamRel.java @@ -2,6 +2,8 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import com.mybatisflex.annotation.Table; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,6 +15,8 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2023-07-04 */ +@Data +@Table("building_team_rel") public class BuildingTeamRel extends BaseEntity { private static final long serialVersionUID = 1L; @@ -21,23 +25,23 @@ public class BuildingTeamRel extends BaseEntity private Long id; /** $column.columnComment */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String isDeleted; /** $column.columnComment */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date createdTime; /** $column.columnComment */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String createdBy; /** $column.columnComment */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private String modifiedBy; /** $column.columnComment */ - @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()") + private Date lastUpdatedTime; /** 场馆id */ @@ -48,90 +52,4 @@ public class BuildingTeamRel extends BaseEntity @Excel(name = "球队场馆关联表") private Long teamId; - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setIsDeleted(String isDeleted) - { - this.isDeleted = isDeleted; - } - - public String getIsDeleted() - { - return isDeleted; - } - public void setCreatedTime(Date createdTime) - { - this.createdTime = createdTime; - } - - public Date getCreatedTime() - { - return createdTime; - } - public void setCreatedBy(String createdBy) - { - this.createdBy = createdBy; - } - - public String getCreatedBy() - { - return createdBy; - } - public void setModifiedBy(String modifiedBy) - { - this.modifiedBy = modifiedBy; - } - - public String getModifiedBy() - { - return modifiedBy; - } - public void setLastUpdatedTime(Date lastUpdatedTime) - { - this.lastUpdatedTime = lastUpdatedTime; - } - - public Date getLastUpdatedTime() - { - return lastUpdatedTime; - } - public void setBuildingId(Long buildingId) - { - this.buildingId = buildingId; - } - - public Long getBuildingId() - { - return buildingId; - } - public void setTeamId(Long teamId) - { - this.teamId = teamId; - } - - public Long getTeamId() - { - return teamId; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("isDeleted", getIsDeleted()) - .append("createdTime", getCreatedTime()) - .append("createdBy", getCreatedBy()) - .append("modifiedBy", getModifiedBy()) - .append("lastUpdatedTime", getLastUpdatedTime()) - .append("buildingId", getBuildingId()) - .append("teamId", getTeamId()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Customer.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Customer.java index b90599d1..eb979c70 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Customer.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/Customer.java @@ -3,6 +3,7 @@ package com.ruoyi.system.domain; import java.util.List; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -14,6 +15,7 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2023-05-06 */ +@Data public class Customer extends BaseEntity { private static final long serialVersionUID = 1L; @@ -60,7 +62,8 @@ public class Customer extends BaseEntity /** 客户居住 区县/区域 */ @Excel(name = "客户居住 区县/区域") private String liveAddress; - + @Excel(name = "到店状态") + private String storeStatus; /** 客户状态 */ @Excel(name = "客户状态") private String status; @@ -137,317 +140,4 @@ public class Customer extends BaseEntity /** 跟进模块-客户跟进记录信息 */ private List followUpList; - - public void setId(Long id) - { - this.id = id; - } - - public Long getId() - { - return id; - } - public void setUserName(String userName) - { - this.userName = userName; - } - - public String getUserName() - { - return userName; - } - public void setNickName(String nickName) - { - this.nickName = nickName; - } - - public String getNickName() - { - return nickName; - } - public void setUserType(String userType) - { - this.userType = userType; - } - - public String getUserType() - { - return userType; - } - public void setEmail(String email) - { - this.email = email; - } - - public String getEmail() - { - return email; - } - public void setPhoneNumber(String phoneNumber) - { - this.phoneNumber = phoneNumber; - } - - public String getPhoneNumber() - { - return phoneNumber; - } - public void setSex(String sex) - { - this.sex = sex; - } - - public String getSex() - { - return sex; - } - public void setAvatar(String avatar) - { - this.avatar = avatar; - } - - public String getAvatar() - { - return avatar; - } - public void setClueChannel(String clueChannel) - { - this.clueChannel = clueChannel; - } - - public String getClueChannel() - { - return clueChannel; - } - public void setDataSource(String dataSource) - { - this.dataSource = dataSource; - } - - public String getDataSource() - { - return dataSource; - } - public void setLiveAddress(String liveAddress) - { - this.liveAddress = liveAddress; - } - - public String getLiveAddress() - { - return liveAddress; - } - public void setStatus(String status) - { - this.status = status; - } - - public String getStatus() - { - return status; - } - public void setDelFlag(String delFlag) - { - this.delFlag = delFlag; - } - - public String getDelFlag() - { - return delFlag; - } - public void setLoginIp(String loginIp) - { - this.loginIp = loginIp; - } - - public String getLoginIp() - { - return loginIp; - } - public void setLoginDate(Date loginDate) - { - this.loginDate = loginDate; - } - - public Date getLoginDate() - { - return loginDate; - } - public void setWechat(String wechat) - { - this.wechat = wechat; - } - - public String getWechat() - { - return wechat; - } - public void setBuyCarType(String buyCarType) - { - this.buyCarType = buyCarType; - } - - public String getBuyCarType() - { - return buyCarType; - } - public void setExistModels(String existModels) - { - this.existModels = existModels; - } - - public String getExistModels() - { - return existModels; - } - public void setIsAssessment(Integer isAssessment) - { - this.isAssessment = isAssessment; - } - - public Integer getIsAssessment() - { - return isAssessment; - } - public void setIntentionCarModels(String intentionCarModels) - { - this.intentionCarModels = intentionCarModels; - } - - public String getIntentionCarModels() - { - return intentionCarModels; - } - public void setContrastCarModels(String contrastCarModels) - { - this.contrastCarModels = contrastCarModels; - } - - public String getContrastCarModels() - { - return contrastCarModels; - } - public void setIsTestDrive(Integer isTestDrive) - { - this.isTestDrive = isTestDrive; - } - - public Integer getIsTestDrive() - { - return isTestDrive; - } - public void setIsOffer(Integer isOffer) - { - this.isOffer = isOffer; - } - - public Integer getIsOffer() - { - return isOffer; - } - public void setIsFinance(Integer isFinance) - { - this.isFinance = isFinance; - } - - public Integer getIsFinance() - { - return isFinance; - } - public void setUnBookingCarReason(String unBookingCarReason) - { - this.unBookingCarReason = unBookingCarReason; - } - - public String getUnBookingCarReason() - { - return unBookingCarReason; - } - public void setPreToStoreDate(Date preToStoreDate) - { - this.preToStoreDate = preToStoreDate; - } - - public Date getPreToStoreDate() - { - return preToStoreDate; - } - public void setLastToStoreDate(Date lastToStoreDate) - { - this.lastToStoreDate = lastToStoreDate; - } - - public Date getLastToStoreDate() - { - return lastToStoreDate; - } - public void setStoreName(String storeName) - { - this.storeName = storeName; - } - - public String getStoreName() - { - return storeName; - } - public void setOrderDate(Date orderDate) - { - this.orderDate = orderDate; - } - - public Date getOrderDate() - { - return orderDate; - } - - public List getFollowUpList() - { - return followUpList; - } - - public void setFollowUpList(List followUpList) - { - this.followUpList = followUpList; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("userName", getUserName()) - .append("nickName", getNickName()) - .append("userType", getUserType()) - .append("email", getEmail()) - .append("phoneNumber", getPhoneNumber()) - .append("sex", getSex()) - .append("avatar", getAvatar()) - .append("clueChannel", getClueChannel()) - .append("dataSource", getDataSource()) - .append("liveAddress", getLiveAddress()) - .append("status", getStatus()) - .append("delFlag", getDelFlag()) - .append("loginIp", getLoginIp()) - .append("loginDate", getLoginDate()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .append("wechat", getWechat()) - .append("buyCarType", getBuyCarType()) - .append("existModels", getExistModels()) - .append("isAssessment", getIsAssessment()) - .append("intentionCarModels", getIntentionCarModels()) - .append("contrastCarModels", getContrastCarModels()) - .append("isTestDrive", getIsTestDrive()) - .append("isOffer", getIsOffer()) - .append("isFinance", getIsFinance()) - .append("unBookingCarReason", getUnBookingCarReason()) - .append("preToStoreDate", getPreToStoreDate()) - .append("lastToStoreDate", getLastToStoreDate()) - .append("storeName", getStoreName()) - .append("orderDate", getOrderDate()) - .append("followUpList", getFollowUpList()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FollowUp.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FollowUp.java index 29a555d8..efde3bc6 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FollowUp.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/domain/FollowUp.java @@ -2,6 +2,10 @@ package com.ruoyi.system.domain; import java.util.Date; import com.fasterxml.jackson.annotation.JsonFormat; +import com.mybatisflex.annotation.Id; +import com.mybatisflex.annotation.KeyType; +import com.mybatisflex.annotation.Table; +import lombok.Data; import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringStyle; import com.ruoyi.common.core.annotation.Excel; @@ -13,11 +17,14 @@ import com.ruoyi.common.core.web.domain.BaseEntity; * @author ruoyi * @date 2023-05-07 */ +@Data +@Table("f_follow_up") public class FollowUp extends BaseEntity { private static final long serialVersionUID = 1L; /** id */ + @Id(keyType = KeyType.Auto) private Integer id; /** 客户id */ @@ -41,76 +48,9 @@ public class FollowUp extends BaseEntity /** 级别 */ @Excel(name = "级别") private String followLevel; + @Excel(name = "跟进结果") + private String followResult; + @Excel(name = "跟进方式") + private String followUpMethod; - public void setId(Integer id) - { - this.id = id; - } - - public Integer getId() - { - return id; - } - public void setCustomerId(Long customerId) - { - this.customerId = customerId; - } - - public Long getCustomerId() - { - return customerId; - } - public void setFollowUpDate(Date followUpDate) - { - this.followUpDate = followUpDate; - } - - public Date getFollowUpDate() - { - return followUpDate; - } - public void setFollowUpRecord(String followUpRecord) - { - this.followUpRecord = followUpRecord; - } - - public String getFollowUpRecord() - { - return followUpRecord; - } - public void setPreToStoreDate(Date preToStoreDate) - { - this.preToStoreDate = preToStoreDate; - } - - public Date getPreToStoreDate() - { - return preToStoreDate; - } - public void setFollowLevel(String followLevel) - { - this.followLevel = followLevel; - } - - public String getFollowLevel() - { - return followLevel; - } - - @Override - public String toString() { - return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE) - .append("id", getId()) - .append("customerId", getCustomerId()) - .append("followUpDate", getFollowUpDate()) - .append("followUpRecord", getFollowUpRecord()) - .append("preToStoreDate", getPreToStoreDate()) - .append("createBy", getCreateBy()) - .append("createTime", getCreateTime()) - .append("updateBy", getUpdateBy()) - .append("updateTime", getUpdateTime()) - .append("remark", getRemark()) - .append("followLevel", getFollowLevel()) - .toString(); - } } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FollowUpMapper.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FollowUpMapper.java index f242bdcf..b6c9400c 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FollowUpMapper.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/mapper/FollowUpMapper.java @@ -1,6 +1,8 @@ package com.ruoyi.system.mapper; import java.util.List; + +import com.mybatisflex.core.BaseMapper; import com.ruoyi.system.domain.FollowUp; /** @@ -9,7 +11,7 @@ import com.ruoyi.system.domain.FollowUp; * @author ruoyi * @date 2023-05-07 */ -public interface FollowUpMapper +public interface FollowUpMapper extends BaseMapper { /** * 查询跟进模块-客户跟进记录 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IFollowUpService.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IFollowUpService.java index 0cf4a5ad..a86d6ac7 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IFollowUpService.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/IFollowUpService.java @@ -1,6 +1,8 @@ package com.ruoyi.system.service; import java.util.List; + +import com.mybatisflex.core.service.IService; import com.ruoyi.system.domain.FollowUp; /** @@ -9,7 +11,7 @@ import com.ruoyi.system.domain.FollowUp; * @author ruoyi * @date 2023-05-07 */ -public interface IFollowUpService +public interface IFollowUpService extends IService { /** * 查询跟进模块-客户跟进记录 diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java index c2fa8975..e2988c62 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/CustomerServiceImpl.java @@ -76,8 +76,8 @@ public class CustomerServiceImpl implements ICustomerService public int updateCustomer(Customer customer) { customer.setUpdateTime(DateUtils.getNowDate()); - customerMapper.deleteFollowUpByCustomerId(customer.getId()); - insertFollowUp(customer); + /* customerMapper.deleteFollowUpByCustomerId(customer.getId()); + insertFollowUp(customer);*/ return customerMapper.updateCustomer(customer); } diff --git a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FollowUpServiceImpl.java b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FollowUpServiceImpl.java index 9c5d149c..4e4ae70d 100644 --- a/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FollowUpServiceImpl.java +++ b/ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/FollowUpServiceImpl.java @@ -1,7 +1,11 @@ package com.ruoyi.system.service.impl; import java.util.List; + +import com.mybatisflex.spring.service.impl.ServiceImpl; import com.ruoyi.common.core.utils.DateUtils; +import com.ruoyi.system.domain.Customer; +import com.ruoyi.system.mapper.CustomerMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.system.mapper.FollowUpMapper; @@ -15,10 +19,12 @@ import com.ruoyi.system.service.IFollowUpService; * @date 2023-05-07 */ @Service -public class FollowUpServiceImpl implements IFollowUpService +public class FollowUpServiceImpl extends ServiceImpl implements IFollowUpService { @Autowired private FollowUpMapper followUpMapper; + @Autowired + private CustomerMapper customerMapper; /** * 查询跟进模块-客户跟进记录 @@ -54,6 +60,16 @@ public class FollowUpServiceImpl implements IFollowUpService public int insertFollowUp(FollowUp followUp) { followUp.setCreateTime(DateUtils.getNowDate()); + Customer customer = new Customer(); + customer.setId(followUp.getCustomerId()); + //如果跟进记录的跟进级别选择 + if("战败".equals(followUp.getFollowLevel())){ + customer.setStatus("defeat"); + customerMapper.updateCustomer(customer); + }else if("订车".equals(followUp.getFollowLevel())||"成交".equals(followUp.getFollowLevel())){ + customer.setStatus("order"); + customerMapper.updateCustomer(customer); + } return followUpMapper.insertFollowUp(followUp); } diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml index 59f231d1..af69b78c 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/bootstrap.yml @@ -5,6 +5,25 @@ server: mybatis: configuration: mapUnderscoreToCamelCase: true +# MyBatis配置 +mybatis-flex: + # 搜索指定包别名 + typeAliasesPackage: com.ruoyi.**.domain + # 配置mapper的扫描,找到所有的mapper.xml映射文件 + mapper-locations: classpath*:mapper/**/*Mapper.xml + cacheEnabled: true + useGeneratedKeys: true + defaultExecutorType: SIMPLE + configuration: + # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl + # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl + # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl + logImpl: org.apache.ibatis.logging.slf4j.Slf4jImpl +# PageHelper分页插件 +pagehelper: + helperDialect: mysql + supportMethodsArguments: true + params: count=countSql # Spring spring: servlet: diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CustomerMapper.xml b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CustomerMapper.xml index 5640a7e3..0916b6d5 100644 --- a/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CustomerMapper.xml +++ b/ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/CustomerMapper.xml @@ -17,6 +17,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + @@ -60,7 +61,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select id, user_name, nick_name, user_type, email, phonenumber, sex, avatar, clue_channel, data_source, live_address, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, wechat, buy_car_type, exist_models, is_assessment, intention_car_models, contrast_car_models, is_test_drive, is_offer, is_finance, un_booking_car_reason, pre_to_store_date, last_to_store_date, store_name, order_date from f_customer + select id, user_name, nick_name, user_type, email,store_status, phonenumber, sex, avatar, clue_channel, data_source, live_address, status, del_flag, login_ip, login_date, create_by, create_time, update_by, update_time, remark, wechat, buy_car_type, exist_models, is_assessment, intention_car_models, contrast_car_models, is_test_drive, is_offer, is_finance, un_booking_car_reason, pre_to_store_date, last_to_store_date, store_name, order_date from f_customer and customer_id = #{customerId} + and follow_result = #{followResult} + and follow_up_method = #{followUpMethod} and follow_up_date = #{followUpDate} and follow_up_record = #{followUpRecord} and pre_to_store_date = #{preToStoreDate} @@ -51,6 +55,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time, remark, follow_level, + follow_result , + follow_up_method , #{customerId}, @@ -63,6 +69,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" #{updateTime}, #{remark}, #{followLevel}, + #{followResult}, + #{followUpMethod}, @@ -79,6 +87,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" update_time = #{updateTime}, remark = #{remark}, follow_level = #{followLevel}, + follow_result = #{followResult}, + follow_up_method = #{followUpMethod}, where id = #{id} diff --git a/ruoyi-ui/src/views/system/bookManger/index.vue b/ruoyi-ui/src/views/system/bookManger/index.vue new file mode 100644 index 00000000..968736e5 --- /dev/null +++ b/ruoyi-ui/src/views/system/bookManger/index.vue @@ -0,0 +1,882 @@ + + + + diff --git a/ruoyi-ui/src/views/system/competitionSet/index.vue b/ruoyi-ui/src/views/system/competitionSet/index.vue index 4bd41351..98bf0740 100644 --- a/ruoyi-ui/src/views/system/competitionSet/index.vue +++ b/ruoyi-ui/src/views/system/competitionSet/index.vue @@ -56,7 +56,7 @@ - + - - + + +