no message
This commit is contained in:
parent
e2ec85c7ae
commit
10835cd1a7
|
|
@ -79,9 +79,9 @@ public class ShopController extends BaseController {
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@GetMapping("/customer/{customerId}")
|
@GetMapping("/worker/{workerId}")
|
||||||
public AjaxResult getShopsByCustomerId(@PathVariable Long customerId) {
|
public AjaxResult getShopsByWorkerId(@PathVariable Long workerId) {
|
||||||
List<Shop> shops = shopService.getShopsByCustomerId(customerId);
|
List<Shop> shops = shopService.getShopsByWorkerId(workerId);
|
||||||
return AjaxResult.success(shops);
|
return AjaxResult.success(shops);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -11,7 +11,7 @@ public class Shop implements Serializable {
|
||||||
private Long shopId; // 店铺ID
|
private Long shopId; // 店铺ID
|
||||||
private String shopName; // 店铺名称
|
private String shopName; // 店铺名称
|
||||||
private String imageUrl; // 店铺图片
|
private String imageUrl; // 店铺图片
|
||||||
private Long customerId; // 用户ID
|
private Long workerId; // 工作人员ID
|
||||||
|
|
||||||
private Long provinceId;
|
private Long provinceId;
|
||||||
private String provinceName;
|
private String provinceName;
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ public interface ShopMapper {
|
||||||
List<Shop> selectAll();
|
List<Shop> selectAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询商铺列表
|
* 根据工作人员ID查询商铺列表
|
||||||
*/
|
*/
|
||||||
List<Shop> selectShopsByCustomerId(@Param("customerId") Long customerId);
|
List<Shop> selectShopsByWorkerId(@Param("workerId") Long workerId);
|
||||||
}
|
}
|
||||||
|
|
@ -11,7 +11,7 @@ public interface ShopService {
|
||||||
List<Shop> listShops();
|
List<Shop> listShops();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID查询商铺列表
|
* 根据工作人员ID查询商铺列表
|
||||||
*/
|
*/
|
||||||
List<Shop> getShopsByCustomerId(Long customerId);
|
List<Shop> getShopsByWorkerId(Long workerId);
|
||||||
}
|
}
|
||||||
|
|
@ -39,7 +39,7 @@ public class ShopServiceImpl implements ShopService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Shop> getShopsByCustomerId(Long customerId) {
|
public List<Shop> getShopsByWorkerId(Long workerId) {
|
||||||
return shopMapper.selectShopsByCustomerId(customerId);
|
return shopMapper.selectShopsByWorkerId(workerId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -64,10 +64,10 @@
|
||||||
SELECT * FROM shop
|
SELECT * FROM shop
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectShopsByCustomerId" resultMap="ShopResultMap">
|
<select id="selectShopsByWorkerId" resultMap="ShopResultMap">
|
||||||
select *
|
select *
|
||||||
from shop
|
from shop
|
||||||
where customer_id = #{customerId}
|
where worker_id = #{workerId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
||||||
Loading…
Reference in New Issue