Commit d7a0a94c authored by lcl's avatar lcl

u

parent 0961f6b0
package com.dsk.web.controller.customer;
import cn.hutool.core.bean.BeanException;
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.map.MapUtil;
import cn.hutool.http.HttpException;
import com.dsk.common.annotation.Log;
import com.dsk.common.annotation.RepeatSubmit;
import com.dsk.common.core.controller.BaseController;
......@@ -14,7 +11,6 @@ import com.dsk.common.utils.poi.ExcelUtil;
import com.dsk.system.domain.customer.Customer;
import com.dsk.system.domain.customer.dto.CustomerBusinessSearchDto;
import com.dsk.system.domain.customer.dto.CustomerSearchDto;
import com.dsk.system.searchService.BusinessOpportunityRadarService;
import com.dsk.system.service.ICustomerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
......@@ -39,8 +35,6 @@ public class CustomerController extends BaseController {
@Autowired
private ICustomerService baseService;
// @Autowired
// private BusinessOpportunityRadarService opportunityRadarService;
/**
* 查询客户列表
......@@ -128,21 +122,6 @@ public class CustomerController extends BaseController {
continue;
}
try {
// Map<String, Object> map = opportunityRadarService.enterpriseByName(customer.getCompanyName());
// if (ObjectUtils.isEmpty(map)) {
// throw new HttpException("远程调用匹配接口失败!");
// }
// Map<String, Object> obj = BeanUtil.beanToMap(map.get("data"));
// if (!ObjectUtils.isEmpty(obj)) {
// customer.setCompanyId(MapUtil.getInt(obj, "jskEid"));
// customer.setLegalPerson(MapUtil.getStr(obj, "legalPerson"));
// customer.setRegisterCapital(MapUtil.getStr(obj, "registeredCapitalStr"));
// customer.setProvinceId(MapUtil.getInt(obj, "provinceId"));
// customer.setCityId(MapUtil.getInt(obj, "cityId"));
// customer.setDistrictId(MapUtil.getInt(obj, "countyId"));
// customer.setRegisterAddress(MapUtil.getStr(obj, "domicile"));
// customer.setCreditCode(MapUtil.getStr(obj, "creditCode"));
// }
baseService.add(customer);
successCount++;
} catch (Exception e) {
......
......@@ -69,9 +69,6 @@ public class SysUser extends BaseEntity
@Excel(name = "最后登录时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss", type = Excel.Type.EXPORT)
private Date loginDate;
//是否体验用户 0否 1是
private Integer isExperience;
/** 部门对象 */
@Excels({
@Excel(name = "部门名称", targetAttr = "deptName", type = Excel.Type.EXPORT),
......@@ -299,14 +296,6 @@ public class SysUser extends BaseEntity
this.roleId = roleId;
}
public Integer getIsExperience() {
return isExperience;
}
public void setIsExperience(Integer isExperience) {
this.isExperience = isExperience;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
......@@ -323,7 +312,6 @@ public class SysUser extends BaseEntity
.append("delFlag", getDelFlag())
.append("loginIp", getLoginIp())
.append("loginDate", getLoginDate())
.append("isExperience", getIsExperience())
.append("createBy", getCreateBy())
.append("createTime", getCreateTime())
.append("updateBy", getUpdateBy())
......
package com.dsk.system.domain.business.dto;
import com.dsk.common.core.domain.BaseEntity;
import lombok.Data;
import java.util.List;
import java.util.Map;
/**
* @author lxl
......@@ -10,7 +12,7 @@ import java.util.List;
* @Date 2023/5/16 上午 9:10
**/
@Data
public class BusinessListDto {
public class BusinessListDto extends BaseEntity {
/**
* 是否私人数据 0:否 1:是
......
......@@ -6,6 +6,7 @@ import cn.hutool.core.map.MapUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson2.JSONObject;
import com.dsk.acc.openapi.client.util.CommonUtils;
import com.dsk.common.annotation.DataScope;
import com.dsk.common.config.RuoYiConfig;
import com.dsk.common.constant.HttpStatus;
import com.dsk.common.core.domain.AjaxResult;
......@@ -91,12 +92,9 @@ public class BusinessInfoServiceImpl implements IBusinessInfoService {
* @return 项目详情
*/
@Override
@DataScope(deptAlias = "d", userAlias = "u")
public List<BusinessListVo> selectBusinessInfoList(BusinessListDto dto) {
SysUser user = SecurityUtils.getLoginUser().getUser();
dto.setUserId(user.getUserId());
if (user.getIsExperience() == 1) {
dto.setIsPrivate(1);
}
dto.setUserId(SecurityUtils.getUserId());
List<BusinessListVo> businessListVos = businessInfoMapper.selectBusinessInfoList(dto);
if (!CollectionUtils.isEmpty(businessListVos) && ObjectUtil.isNotEmpty(dto.getProjectName())) {
for (BusinessListVo vo : businessListVos) {
......
......@@ -104,13 +104,8 @@
LEFT JOIN business_follow_record f on f.business_id = i.id
LEFT JOIN business_label l on l.business_id = i.id
LEFT JOIN sys_user u on u.user_id = bu.user_id
LEFT JOIN sys_dept d on d.dept_id = u.dept_id
<where>
<if test="isPrivate == 1 ">
and bu.user_id = #{userId}
</if>
<if test="isPrivate == 0 ">
and (bu.user_id = #{userId} or i.is_private = 1)
</if>
<if test="projectType != null and projectType != ''">
and i.project_type in
<foreach collection="projectType" item="projectType" open="(" separator="," close=")">
......@@ -147,6 +142,11 @@
#{districtId}
</foreach>
</if>
<choose>
<when test="isPrivate == 1"> and bu.user_id = #{userId} </when>
<!-- 数据范围过滤 -->
<otherwise> and (bu.user_id = #{userId} or i.is_private = 1) ${params.dataScope} </otherwise>
</choose>
</where>
GROUP BY i.id
ORDER BY i.create_time DESC
......
......@@ -18,7 +18,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="delFlag" column="del_flag" />
<result property="loginIp" column="login_ip" />
<result property="loginDate" column="login_date" />
<result property="isExperience" column="is_experience"/>
<result property="createBy" column="create_by" />
<result property="createTime" column="create_time" />
<result property="updateBy" column="update_by" />
......@@ -49,7 +48,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectUserVo">
select u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber,
u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.is_experience, u.create_by, u.create_time, u.remark,
u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
d.dept_id, d.parent_id, d.ancestors, d.dept_name, d.order_num, d.leader, d.status as dept_status,
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status
from sys_user u
......@@ -60,7 +59,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status,
u.del_flag, u.login_ip, u.login_date, u.is_experience, u.create_by, u.create_time, u.remark, d.dept_name, d.leader
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader
from sys_user u
left join sys_dept d on u.dept_id = d.dept_id
where u.del_flag = '0'
......@@ -158,7 +157,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sex != null and sex != ''">sex,</if>
<if test="password != null and password != ''">password,</if>
<if test="status != null and status != ''">status,</if>
<if test="isExperience != null ">is_experience,</if>
<if test="createBy != null and createBy != ''">create_by,</if>
<if test="remark != null and remark != ''">remark,</if>
create_time
......@@ -173,7 +171,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="sex != null and sex != ''">#{sex},</if>
<if test="password != null and password != ''">#{password},</if>
<if test="status != null and status != ''">#{status},</if>
<if test="isExperience != null ">#{isExperience},</if>
<if test="createBy != null and createBy != ''">#{createBy},</if>
<if test="remark != null and remark != ''">#{remark},</if>
sysdate()
......@@ -194,7 +191,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="status != null and status != ''">status = #{status},</if>
<if test="loginIp != null and loginIp != ''">login_ip = #{loginIp},</if>
<if test="loginDate != null">login_date = #{loginDate},</if>
<if test="isExperience != null">is_experience = #{isExperience},</if>
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="remark != null">remark = #{remark},</if>
update_time = sysdate()
......
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