分销团队审核
This commit is contained in:
parent
2547d9b92c
commit
3bbde9b5a3
|
|
@ -1,6 +1,8 @@
|
|||
package com.ghy.web.controller.customer;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.ghy.common.enums.PlaceStatus;
|
||||
import com.ghy.common.utils.CacheUtils;
|
||||
|
|
@ -11,6 +13,7 @@ import com.ghy.customer.service.CustomerService;
|
|||
import com.ghy.worker.domain.Worker;
|
||||
import com.ghy.worker.domain.WorkerBank;
|
||||
import com.ghy.worker.domain.WorkerCertification;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.shiro.authz.annotation.RequiresPermissions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
|
|
@ -63,6 +66,20 @@ public class CustomerPlaceController extends BaseController
|
|||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@PostMapping("/app/myCustomerPlace")
|
||||
@ResponseBody
|
||||
public AjaxResult myCustomerPlace(@RequestBody CustomerPlace customerPlace){
|
||||
Customer param = new Customer();
|
||||
param.setCustomerPlace(customerPlace.getCustomerId());
|
||||
param.setPlaceStatus(1);
|
||||
List<Customer> customerList = customerService.getCustomerList(param);
|
||||
List<Long> ids = customerList.stream().map(Customer::getCustomerId).collect(Collectors.toList());
|
||||
if(!CollectionUtils.isNotEmpty(ids)){
|
||||
return AjaxResult.success(new ArrayList<>());
|
||||
}
|
||||
return AjaxResult.success(customerPlaceService.getByCustomerIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* App查询分销申请列表
|
||||
*/
|
||||
|
|
@ -168,6 +185,13 @@ public class CustomerPlaceController extends BaseController
|
|||
return toAjax(customerPlaceService.updateCustomerPlace(customerPlace));
|
||||
}
|
||||
|
||||
@PostMapping("/app/edit")
|
||||
@ResponseBody
|
||||
public AjaxResult appEdit(@RequestBody CustomerPlace customerPlace)
|
||||
{
|
||||
return toAjax(customerPlaceService.updateCustomerPlace(customerPlace));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除分销申请
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -42,6 +42,16 @@ public class CustomerPlace extends BaseEntity
|
|||
|
||||
private String subType;
|
||||
|
||||
private String customerLogoUrl;
|
||||
|
||||
public String getCustomerLogoUrl() {
|
||||
return customerLogoUrl;
|
||||
}
|
||||
|
||||
public void setCustomerLogoUrl(String customerLogoUrl) {
|
||||
this.customerLogoUrl = customerLogoUrl;
|
||||
}
|
||||
|
||||
public void setId(String id)
|
||||
{
|
||||
this.id = id;
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ public interface CustomerPlaceMapper
|
|||
*/
|
||||
public CustomerPlace selectCustomerPlaceById(String id);
|
||||
|
||||
public List<CustomerPlace> getByCustomerIds(@Param("ids") List<Long> ids);
|
||||
|
||||
/**
|
||||
* 查询分销申请列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package com.ghy.customer.service;
|
|||
|
||||
import java.util.List;
|
||||
import com.ghy.customer.domain.CustomerPlace;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 分销申请Service接口
|
||||
|
|
@ -19,6 +20,8 @@ public interface ICustomerPlaceService
|
|||
*/
|
||||
public CustomerPlace selectCustomerPlaceById(String id);
|
||||
|
||||
public List<CustomerPlace> getByCustomerIds(List<Long> ids);
|
||||
|
||||
/**
|
||||
* 查询分销申请列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
package com.ghy.customer.service.impl;
|
||||
import java.util.List;
|
||||
import com.ghy.common.utils.DateUtils;
|
||||
import com.ghy.customer.domain.Customer;
|
||||
import com.ghy.customer.service.CustomerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.ghy.customer.mapper.CustomerPlaceMapper;
|
||||
|
|
@ -20,6 +22,9 @@ public class CustomerPlaceServiceImpl implements ICustomerPlaceService
|
|||
@Autowired
|
||||
private CustomerPlaceMapper customerPlaceMapper;
|
||||
|
||||
@Autowired
|
||||
private CustomerService customerService;
|
||||
|
||||
/**
|
||||
* 查询分销申请
|
||||
*
|
||||
|
|
@ -32,6 +37,16 @@ public class CustomerPlaceServiceImpl implements ICustomerPlaceService
|
|||
return customerPlaceMapper.selectCustomerPlaceById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<CustomerPlace> getByCustomerIds(List<Long> ids) {
|
||||
List<CustomerPlace> byCustomerIds = customerPlaceMapper.getByCustomerIds(ids);
|
||||
byCustomerIds.forEach(customerPlace -> {
|
||||
Customer customer = customerService.selectByCustomerId(customerPlace.getCustomerId());
|
||||
customerPlace.setCustomerLogoUrl(customer.getCustomerLogoUrl());
|
||||
});
|
||||
return byCustomerIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询分销申请列表
|
||||
*
|
||||
|
|
|
|||
|
|
@ -22,6 +22,20 @@
|
|||
select id, name, customer_id, phone, city, status, create_by, create_time, update_by, update_time, remark from customer_place
|
||||
</sql>
|
||||
|
||||
|
||||
<select id="getByCustomerIds" resultMap="CustomerPlaceResult">
|
||||
<include refid="selectCustomerPlaceVo" />
|
||||
<where>
|
||||
<if test="ids != null and ids.size > 0">
|
||||
and customer_id in
|
||||
<foreach item="item" index="ids" collection="ids" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and remark is null
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectCustomerPlaceList" parameterType="com.ghy.customer.domain.CustomerPlace" resultMap="CustomerPlaceResult">
|
||||
<include refid="selectCustomerPlaceVo"/>
|
||||
<where>
|
||||
|
|
|
|||
|
|
@ -288,6 +288,7 @@ public class ShiroConfig
|
|||
filterChainDefinitionMap.put("/adapay/**", "anon");
|
||||
filterChainDefinitionMap.put("/system/area/**", "anon");
|
||||
filterChainDefinitionMap.put("/customer/address/**", "anon");
|
||||
filterChainDefinitionMap.put("/customer/place/app/**", "anon");
|
||||
filterChainDefinitionMap.put("/customer/selection/app/**", "anon");
|
||||
filterChainDefinitionMap.put("/jim/**", "anon");
|
||||
filterChainDefinitionMap.put("/MP_verify_bRFuvYpyQ4WLr0on.txt", "anon");
|
||||
|
|
|
|||
Loading…
Reference in New Issue