bug修改

master
wangweijia 6 years ago
parent 6ba1860f29
commit fd47c31853

@ -10,6 +10,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import java.util.List;
import java.util.Map;
/**
@ -29,9 +30,9 @@ public class PoiStoreStaffController extends BaseController {
*/
@ResponseBody
@PostMapping("/user/seller")
public Map<String,Object> getSellerData(@RequestParam("userId")long userId, Long shopId, Long regionId, Long companyId){
public Map<String,Object> getSellerData(@RequestParam("userId")long userId, Long shopId, Long regionId, Long companyId, List<Long> customers){
try {
return data(poiSellerService.getAllSeller(regionId, shopId, userId, companyId));
return data(poiSellerService.getAllSeller(regionId, shopId, userId, companyId, customers));
}catch (Exception e){
log.error("查找用户管辖的导购",e);
return fail();

@ -44,7 +44,7 @@ public class PoiSellerService {
/**
*
*/
public List<PoiStoreStaffDTO> getAllSeller(Long regionId, Long shopId, long userId, Long companyId){
public List<PoiStoreStaffDTO> getAllSeller(Long regionId, Long shopId, long userId, Long companyId, List<Long> customers){
List<Long> shopIds = new ArrayList<>();
//先找到店铺
if(null != shopId){
@ -59,6 +59,12 @@ public class PoiSellerService {
}else if(companyId != null){
//有公司就查公司店铺
shopIds.addAll(customerViewService.getCompanyShop(companyId,userId));
}else if(customers != null){
for(Long cp : customers){
//有公司就查公司店铺
shopIds.addAll(customerViewService.getCompanyShop(cp,userId));
}
}else {
//什么都没有就全查
shopIds = privilageDomainService.listUserDatePermission(userId);

@ -30,12 +30,12 @@
<if test="endDate != null">
and t1.create_time <![CDATA[ < ]]> #{endDate}
</if>
order by t2.id,t1.user_id asc
order by t2.id,t1.user_id, t1.create_time desc
</select>
<select id="selectCustomerInfoBySellerId" resultType="com.kiisoo.ic.customer.bean.OpCustomerDTO">
select
t2.id,t2.`name`,t2.member_id as idCard,GROUP_CONCAT(DISTINCT t0.`name`) as shopName, GROUP_CONCAT(DISTINCT t4.`name`) as sellerName, t3.birthday, t2.phone
,t3.name as vipName,t3.phone as vipPhone
,t3.name as vipName,t3.phone as vipPhone, t1.create_time
from
poi_store t0,
op_seller_customer_relation t1 LEFT JOIN privilage_user t4 on t1.user_id = t4.id,
@ -49,7 +49,7 @@
and t1.create_time <![CDATA[ < ]]> #{endDate}
</if>
GROUP BY t2.id
order by t2.id asc
order by t2.id, t1.create_time desc
</select>
<!--客户list-->

Loading…
Cancel
Save