Commit e057c625 authored by EDY's avatar EDY

优化

parent 899e35c6
...@@ -124,4 +124,16 @@ public class BaseCustomInfoController extends BaseController ...@@ -124,4 +124,16 @@ public class BaseCustomInfoController extends BaseController
List<CustomReportVo> customReports = baseCustomInfoService.customReport(subjectName); List<CustomReportVo> customReports = baseCustomInfoService.customReport(subjectName);
return success(customReports); return success(customReports);
} }
/**
* 删除客户信息
*/
// @PreAuthorize("@ss.hasPermi('custom:info:remove')")
@Log(title = "客户信息", businessType = BusinessType.DELETE)
@PostMapping("/conclude/{ids}")
public AjaxResult conclude(@PathVariable Long[] ids,Integer khzt)
{
baseCustomInfoService.conclude(ids,khzt);
return AjaxResult.success();
}
} }
...@@ -7,14 +7,19 @@ import com.alibaba.fastjson2.JSONObject; ...@@ -7,14 +7,19 @@ import com.alibaba.fastjson2.JSONObject;
import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.system.domain.business.BaseCustomInfo; import com.ruoyi.system.domain.business.BaseCustomInfo;
import com.ruoyi.system.service.business.IBaseCustomInfoService; import com.ruoyi.system.service.business.IBaseCustomInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import java.time.Instant;
import java.util.Date;
@RestController("") @RestController("")
@RequestMapping("baidu/clue") @RequestMapping("baidu/clue")
@Slf4j
public class BaiduClueController { public class BaiduClueController {
@Autowired @Autowired
...@@ -73,4 +78,30 @@ public class BaiduClueController { ...@@ -73,4 +78,30 @@ public class BaiduClueController {
iBaseCustomInfoService.insertBaseCustomInfo(baseCustomInfo); iBaseCustomInfoService.insertBaseCustomInfo(baseCustomInfo);
return AjaxResult.success(); return AjaxResult.success();
} }
@PostMapping(value = "/fy/msg")
public AjaxResult fyMsg(@RequestBody JSONObject json) {
log.info("json=========={}",json.toJSONString());
BaseCustomInfo baseCustomInfo = new BaseCustomInfo();
baseCustomInfo.setKhxm(json.getString("name"));
baseCustomInfo.setKhly(7);
baseCustomInfo.setSjh(json.getString("telphone"));
baseCustomInfo.setWx(json.getString("weixin"));
baseCustomInfo.setKhdz(json.getString("address"));
baseCustomInfo.setKhxq(json.getString("remark"));
baseCustomInfo.setGjc("无");
baseCustomInfo.setKhzt(1);
baseCustomInfo.setGs(1);
String commitTime = json.getString("create_time");
Instant instant = Instant.ofEpochSecond(Long.parseLong(commitTime));
baseCustomInfo.setCreateTime(Date.from(instant));
baseCustomInfo.setUpdateTime(Date.from(instant));
baseCustomInfo.setCreateBy("SYSTEM");
baseCustomInfo.setUpdateBy("SYSTEM");
iBaseCustomInfoService.insertBaseCustomInfo(baseCustomInfo);
return AjaxResult.success();
}
} }
...@@ -111,7 +111,7 @@ public class SecurityConfig ...@@ -111,7 +111,7 @@ public class SecurityConfig
.authorizeHttpRequests((requests) -> { .authorizeHttpRequests((requests) -> {
permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll()); permitAllUrl.getUrls().forEach(url -> requests.antMatchers(url).permitAll());
// 对于登录login 注册register 验证码captchaImage 允许匿名访问 // 对于登录login 注册register 验证码captchaImage 允许匿名访问
requests.antMatchers("/login", "/register", "/captchaImage","/baidu/clue/msg").permitAll() requests.antMatchers("/login", "/register", "/captchaImage","/baidu/clue/msg","/baidu/clue/fy/msg").permitAll()
// 静态资源,可匿名访问 // 静态资源,可匿名访问
.antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll() .antMatchers(HttpMethod.GET, "/", "/*.html", "/**/*.html", "/**/*.css", "/**/*.js", "/profile/**").permitAll()
.antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll() .antMatchers("/swagger-ui.html", "/swagger-resources/**", "/webjars/**", "/*/api-docs", "/druid/**").permitAll()
......
...@@ -25,23 +25,23 @@ public class BaseCustomInfo extends BaseEntity ...@@ -25,23 +25,23 @@ public class BaseCustomInfo extends BaseEntity
private Long id; private Long id;
/** 客户姓名 */ /** 客户姓名 */
@Excel(name = "客户姓名") // @Excel(name = "客户姓名")
private String khxm; private String khxm;
/** 客户公司 */ /** 客户公司 */
@Excel(name = "客户公司") // @Excel(name = "客户公司")
private String khgs; private String khgs;
/** 客户来源 */ /** 客户来源 */
@Excel(name = "客户来源" ,readConverterExp = "1=软艺,2=软通,3=网联,4=软盈,5=渠道") @Excel(name = "主体名称" ,readConverterExp = "1=软艺,2=软通,3=网联,4=软盈,5=渠道")
private Integer khly; private Integer khly;
/** 客户类型 */ /** 客户类型 */
@Excel(name = "客户类型" ,readConverterExp = "1=公司,2=个人") // @Excel(name = "客户类型" ,readConverterExp = "1=公司,2=个人")
private Long khlx; private Long khlx;
/** 产品类别 */ /** 产品类别 */
@Excel(name = "产品类别",readConverterExp = "1=APP,2=PC,3=小程序,4=H5") // @Excel(name = "产品类别",readConverterExp = "1=APP,2=PC,3=小程序,4=H5")
private Long cplb; private Long cplb;
/** 手机号 */ /** 手机号 */
...@@ -53,27 +53,27 @@ public class BaseCustomInfo extends BaseEntity ...@@ -53,27 +53,27 @@ public class BaseCustomInfo extends BaseEntity
private String wx; private String wx;
/** 客户地址 */ /** 客户地址 */
@Excel(name = "客户地址") // @Excel(name = "客户地址")
private String khdz; private String khdz;
/** 客户需求描述 */ /** 客户需求描述 */
@Excel(name = "客户需求描述") // @Excel(name = "客户需求描述")
private String khxq; private String khxq;
/** 关键词 */ /** 关键词 */
@Excel(name = "关键词") // @Excel(name = "关键词")
private String gjc; private String gjc;
/** 客户行业 */ /** 客户行业 */
@Excel(name = "客户行业",readConverterExp = "1=农林牧渔,2=采矿业,3=制造业,4=水电燃气,5=建筑业,6=批发零售,7=交通运输,8=住宿餐饮,9=互联网,10=房地产业,11=商务服务,12=科技服务,13=居民服务,14=水利公共,15=公共卫生,16=文体娱乐,17=公共机构,18=国际组织,19=其他,20=教育培训") // @Excel(name = "客户行业",readConverterExp = "1=农林牧渔,2=采矿业,3=制造业,4=水电燃气,5=建筑业,6=批发零售,7=交通运输,8=住宿餐饮,9=互联网,10=房地产业,11=商务服务,12=科技服务,13=居民服务,14=水利公共,15=公共卫生,16=文体娱乐,17=公共机构,18=国际组织,19=其他,20=教育培训")
private String khhy; private String khhy;
/** 意向等级 */ /** 意向等级 */
@Excel(name = "意向等级",readConverterExp = "1=无意向,2=低意向,3=高意向" ) // @Excel(name = "意向等级",readConverterExp = "1=无意向,2=低意向,3=高意向" )
private Long yxdj; private Long yxdj;
/** 客户状态 */ /** 客户状态 */
@Excel(name = "客户状态" ,readConverterExp = "1=未联系,2=已上门,3=已电话,4=已微信,5=已成交,6=已签合同,7=已终止,8=商务谈判") // @Excel(name = "客户状态" ,readConverterExp = "1=未联系,2=已上门,3=已电话,4=已微信,5=已成交,6=已签合同,7=已终止,8=商务谈判")
private Integer khzt; private Integer khzt;
/** 归属 1 个人 2 部门 */ /** 归属 1 个人 2 部门 */
...@@ -85,17 +85,17 @@ public class BaseCustomInfo extends BaseEntity ...@@ -85,17 +85,17 @@ public class BaseCustomInfo extends BaseEntity
private Long gsId; private Long gsId;
/** 负责人 */ /** 负责人 */
@Excel(name = "负责人") // @Excel(name = "负责人")
private String fzr; private String fzr;
/** 标签 */ /** 标签 */
@Excel(name = "标签",readConverterExp = "1=预算低,2=个人,3=公司,4=有实力,5=预算一般,6=预算高,7=比价,8=找本地,9=未接通") // @Excel(name = "标签",readConverterExp = "1=预算低,2=个人,3=公司,4=有实力,5=预算一般,6=预算高,7=比价,8=找本地,9=未接通")
private String bq; private String bq;
/** 备注 */ /** 备注 */
@Excel(name = "备注") // @Excel(name = "备注")
private String bz; private String bz;
/** 是否删除 1 删除 0 正常 */ /** 是否删除 1 删除 0 正常 */
......
...@@ -66,4 +66,6 @@ public interface BaseCustomInfoMapper ...@@ -66,4 +66,6 @@ public interface BaseCustomInfoMapper
List<ThreadReportVo> threadReport(@Param("periodType") Integer periodType, @Param("khly") Integer khly); List<ThreadReportVo> threadReport(@Param("periodType") Integer periodType, @Param("khly") Integer khly);
List<CustomReportVo> customReport(Integer khly); List<CustomReportVo> customReport(Integer khly);
List<BaseCustomInfo> selectBaseCustomInfoByIds(Long[] ids);
} }
...@@ -65,4 +65,6 @@ public interface IBaseCustomInfoService ...@@ -65,4 +65,6 @@ public interface IBaseCustomInfoService
List<ThreadReportVo> threadReport(Integer periodType, String subjectName); List<ThreadReportVo> threadReport(Integer periodType, String subjectName);
List<CustomReportVo> customReport(String subjectName); List<CustomReportVo> customReport(String subjectName);
void conclude(Long[] ids, Integer khzt);
} }
...@@ -144,4 +144,15 @@ public class BaseCustomInfoServiceImpl implements IBaseCustomInfoService { ...@@ -144,4 +144,15 @@ public class BaseCustomInfoServiceImpl implements IBaseCustomInfoService {
} }
return baseCustomInfoMapper.customReport(khly); return baseCustomInfoMapper.customReport(khly);
} }
@Override
public void conclude(Long[] ids, Integer khzt) {
List<BaseCustomInfo> baseCustomInfos = baseCustomInfoMapper.selectBaseCustomInfoByIds(ids);
if (!baseCustomInfos.isEmpty()) {
for (BaseCustomInfo baseCustomInfo : baseCustomInfos) {
baseCustomInfo.setKhzt(khzt);
baseCustomInfoMapper.updateBaseCustomInfo(baseCustomInfo);
}
}
}
} }
...@@ -42,7 +42,7 @@ public class SysDeptServiceImpl implements ISysDeptService ...@@ -42,7 +42,7 @@ public class SysDeptServiceImpl implements ISysDeptService
* @return 部门信息集合 * @return 部门信息集合
*/ */
@Override @Override
@DataScope(deptAlias = "d") // @DataScope(deptAlias = "d")
public List<SysDept> selectDeptList(SysDept dept) public List<SysDept> selectDeptList(SysDept dept)
{ {
return deptMapper.selectDeptList(dept); return deptMapper.selectDeptList(dept);
......
...@@ -84,7 +84,7 @@ public class SysUserServiceImpl implements ISysUserService ...@@ -84,7 +84,7 @@ public class SysUserServiceImpl implements ISysUserService
* @return 用户信息集合信息 * @return 用户信息集合信息
*/ */
@Override @Override
@DataScope(deptAlias = "d", userAlias = "u") // @DataScope(deptAlias = "d", userAlias = "u")
public List<SysUser> selectUserList(SysUser user) public List<SysUser> selectUserList(SysUser user)
{ {
return userMapper.selectUserList(user); return userMapper.selectUserList(user);
......
...@@ -151,6 +151,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -151,6 +151,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
ORDER BY ORDER BY
month; month;
</select> </select>
<select id="selectBaseCustomInfoByIds" resultType="com.ruoyi.system.domain.business.BaseCustomInfo">
select * from base_custom_info where id in
<foreach item="id" collection="array" open="(" separator="," close=")">
#{id}
</foreach>
</select>
<insert id="insertBaseCustomInfo" parameterType="BaseCustomInfo" useGeneratedKeys="true" keyProperty="id"> <insert id="insertBaseCustomInfo" parameterType="BaseCustomInfo" useGeneratedKeys="true" keyProperty="id">
insert into base_custom_info insert into base_custom_info
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment